Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    mlouis
    @mlouis08
    Noticed following inconsistent behavior in handling of date based queries when datastore is used vs. NOT. Using speedment 3.2.6 with MySQL 8.0.28 (ubuntu). Have a simple TEST table with FROM_DATE and TO_DATE columns of type DATE (table rows represent non-overlapping date intervals). Querying rows where a given 'input date' is between FROM_DATE and TO_DATE is failing when the input date is EQUAL to TO_DATE. Using the following query " testManager.stream()
    .filter(Test.FROM_DATE.lessOrEqual(date))
    .filter(Test.TO_DATE.greaterOrEqual(date))
    .forEach(System.out::println); " where 'date' is the input date. The same query works without datastore enabled. Any thoughts? I only store dates in the table (not with time ). Also noticed that just printing the rows of the table shows FROM_DATE and TO_DATE as the (Database date - 1 day). This is with and without datastore and may be reason for issue above.
    1 reply
    Per-Åke Minborg
    @minborg
    THat sounds odd. There is a “between” predicate that you could try. The fact it shows day -1 is suspicious. I will raise an issue about that.
    3 replies
    @leiffriis and @ravitejhaemani The license server is up and running now again. Sorry for the inconvenience.
    leiffriis
    @leiffriis
    Thanks
    leiffriis
    @leiffriis
    When running speedment:clearTables i got this error:
    Could not find any installed implementation of com.speedment.tool.core.internal.util.ConfigFileHelper.
    Per-Åke Minborg
    @minborg
    How dows your POM dependency look like?
    leiffriis
    @leiffriis
    <dependencies>
    <dependency>
    <groupId>net.sf.jt400</groupId>
    <artifactId>jt400</artifactId>
    <version>${as400.version}</version>
    <scope>runtime</scope>

    </dependency>
    <dependency>
    <groupId>com.speedment.enterprise.connectors</groupId>
    <artifactId>db2-connector</artifactId>
    <version>${speedment.version}</version>

    </dependency>
    <dependency>
    <groupId>com.speedment.enterprise</groupId>
    <artifactId>application</artifactId>
    <version>${speedment.version}</version>

    </dependency>
    </dependencies>
    Per-Åke Minborg
    @minborg
    Thanks. I ment to ask how your speedment plugin was configured. Sorry.
    leiffriis
    @leiffriis
    <plugins>
    <plugin>
    <groupId>com.speedment.enterprise</groupId>
    <artifactId>speedment-enterprise-maven-plugin</artifactId>
    <version>${speedment.version}</version>

    <configuration>
    <components>
    <component>com.speedment.enterprise.datastore.tool.DataStoreToolBundle</component>
    <component>com.speedment.enterprise.connectors.db2.Db2Bundle</component>
    </components>
    <appName>${project.artifactId}</appName>
    <packageName>${project.groupId}</packageName>
    </configuration>
    </plugin>
    <plugin>
    <artifactId>maven-compiler-plugin</artifactId>

    <version>3.8.1</version>
    </plugin>
    </plugins>
    Per-Åke Minborg
    @minborg
    Please go to the page https://speedment.com/download/ and select DB2 and past the POM config.
    There is a dependency missing there
    leiffriis
    @leiffriis
    How do I add database type AS400?
    Exception in thread "main" com.speedment.common.injector.exception.InjectorException: java.lang.reflect.InvocationTargetException
    at com.speedment.common.injector@3.2.6/com.speedment.common.injector.internal.InjectorBuilderImpl.throwInjectorException(InjectorBuilderImpl.java:407)
    at com.speedment.common.injector@3.2.6/com.speedment.common.injector.internal.InjectorBuilderImpl.executionHandler(InjectorBuilderImpl.java:380)
    at com.speedment.common.injector@3.2.6/com.speedment.common.injector.internal.InjectorBuilderImpl.lambda$handleNextState$11(InjectorBuilderImpl.java:325)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
    at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
    at com.speedment.common.injector@3.2.6/com.speedment.common.injector.internal.InjectorBuilderImpl.lambda$handleNextState$12(InjectorBuilderImpl.java:325)
    at java.base/java.lang.Iterable.forEach(Iterable.java:75)
    at com.speedment.common.injector@3.2.6/com.speedment.common.injector.internal.InjectorBuilderImpl.handleNextState(InjectorBuilderImpl.java:300)
    at com.speedment.common.injector@3.2.6/com.speedment.common.injector.internal.InjectorBuilderImpl.build(InjectorBuilderImpl.java:278)
    at com.speedment.runtime.application@3.2.6/com.speedment.runtime.application.AbstractApplicationBuilder.build(AbstractApplicationBuilder.java:386)
    at mymodule/example.Main.main(Main.java:12)
    Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.speedment.common.injector@3.2.6/com.speedment.common.injector.internal.StandardInjectorProxy.invoke(StandardInjectorProxy.java:45)
    at com.speedment.common.injector@3.2.6/com.speedment.common.injector.internal.execution.ReflectionExecutionImpl.invoke(ReflectionExecutionImpl.java:92)
    at com.speedment.common.injector@3.2.6/com.speedment.common.injector.internal.InjectorBuilderImpl.executionHandler(InjectorBuilderImpl.java:365)
    ... 17 more
    Caused by: com.speedment.runtime.core.exception.SpeedmentException: Unable to find the database type AS400. The installed types are:
    at com.speedment.runtime.core@3.2.6/com.speedment.runtime.core.util.DatabaseUtil.lambda$dbmsTypeOf$0(DatabaseUtil.java:51)
    at java.base/java.util.Optional.orElseThrow(Optional.java:408)
    at com.speedment.runtime.core@3.2.6/com.speedment.runtime.core.util.DatabaseUtil.dbmsTypeOf(DatabaseUtil.java:45)
    at com.speedment.runtime.core@3.2.6/com.speedment.runtime.core.internal.component.sql.SqlStreamSupplierImpl.<init>(SqlStreamSupplierImpl.java:109)
    at com.speedment.runtime.core@3.2.6/com.speedment.runtime.core.internal.component.sql.SqlStreamSupplierComponentImpl.lambda$startStreamSuppliers$0(SqlStreamSupplierComponentImpl.java:75)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
    at j
    Per-Åke Minborg
    @minborg
    Did you run the pom tool?
    image.png
    leiffriis
    @leiffriis
    Yes but I'll try it again from scratch
    leiffriis
    @leiffriis
    New project with new generated pom.xml form pom tool
    Generated code with tool
    created a test main class
    package example;

    import com.company.etkgaiadb.EtkgaiadbApplication;
    import com.company.etkgaiadb.EtkgaiadbApplicationBuilder;
    import com.company.etkgaiadb.as400.etkgaiadb.afeggp.AfeggpManager;

    public class Main {

    public static void main(String... args) {
    EtkgaiadbApplication etkgaiadbApplication = new EtkgaiadbApplicationBuilder()
    .withUsername("user")
    .withPassword("password")
    .build();

    AfeggpManager afeggps = etkgaiadbApplication.getOrThrow(AfeggpManager.class);
    afeggps.stream().forEachOrdered(System.out::println);
    }
    }
    But I still get this error

    at com.speedment.common.injector.internal.InjectorBuilderImpl.executionHandler(InjectorBuilderImpl.java:365)
    ... 17 more
    Caused by: com.speedment.runtime.core.exception.SpeedmentException: Unable to find the database type AS400. The installed types are:
    at com.speedment.runtime.core.util.DatabaseUtil.lambda$dbmsTypeOf$0(DatabaseUtil.java:51)
    at java.base/java.util.Optional.orElseThrow(Optional.java:408)
    at com.speedment.runtime.core.util.DatabaseUtil.dbmsTypeOf(DatabaseUtil.java:45)
    at com.speedment.runtime.core.internal.component.sql.SqlStreamSupplierImpl.<init>(SqlStreamSupplierImpl.java:109)
    at com.speedment.runtime.core.internal.component.sql.SqlStreamSupplierComponentImpl.lambda$startStreamSuppliers$0(SqlStreamSupplierComponentImpl.java:75)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
    at java.base/java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1239)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
    at com.speedment.runtime.core.internal.component.sql.SqlStreamSupplierComponentImpl.startStreamSuppliers(SqlStreamSupplierComponentImpl.java:72)
    at com.speedment.runtime.core.provider.DelegateSqlStreamSupplierComponent.startStreamSuppliers(DelegateSqlStreamSupplierComponent.java:59)
    ... 24 more

    Per-Åke Minborg
    @minborg
    Please post your pom.xml file
    leiffriis
    @leiffriis
    Mailed you the file
    Per-Åke Minborg
    @minborg
    Thanks
    Per-Åke Minborg
    @minborg
    @leiffriis You need to add a “Bundle”:
        EtkmenudbApplication etkgaiadbApplication = new EtkmenudbApplicationBuilder()
                .withUsername("myName")
                .withPassword("abc123")
                .withBundle(Db2Bundle.class)
                .build();
    After this, the app will start
    minhphuc
    @ngminhphuc
    Why I can not get the new row added in table (using get API) which I created (Post API) using Speedment API Rest? I check database it already write to the table but the get API return null?
    Per-Åke Minborg
    @minborg
    Are you using DataStore?
    If you do, you need to refresh the in-memory contents after an update.
    minhphuc
    @ngminhphuc
    How to reload data table in memory, thanks
    Per-Åke Minborg
    @minborg
    So you are using DataStore?
    Please confirm.
    minhphuc
    @ngminhphuc
    Where I can check if using DataStore or not?
    Per-Åke Minborg
    @minborg
    Do you use Open-Sounce Speedment?
    Can you show your application builder?
    minhphuc
    @ngminhphuc
    I'm using speedment enterprise free version 3.2.6
    Per-Åke Minborg
    @minborg
    And are you adding InMemoryBundle to your application builder?
    minhphuc
    @ngminhphuc
    yes, this's my config in pom.xml
    <plugin>
    <groupId>com.speedment.enterprise</groupId>
    <artifactId>speedment-enterprise-maven-plugin</artifactId>
    <version>${speedment.version}</version>

    <configuration>
    <components>
    <component>com.speedment.enterprise.datastore.tool.DataStoreToolBundle</component>
    <component>com.speedment.enterprise.plugins.enums.EnumSerializerBundle</component>
    <component>com.speedment.enterprise.plugins.spring.SpringGeneratorBundle</component>
    </components>
    <appName>${project.artifactId}</appName>
    <packageName>${project.groupId}</packageName>
    </configuration>

    <dependencies>
    <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>${mysql.version}</version>
    <scope>runtime</scope>

    </dependency>
    </dependencies>
    </plugin>
    Per-Åke Minborg
    @minborg
    That is why you do not see the updated row. Please see https://speedment.github.io/speedment-doc/datastore.html#using-datastore
    You need to refresh your data content
    Alternatively, do not use DataStore and query the database directly.
    minhphuc
    @ngminhphuc
    okie, thanks Minborg
    mlouis
    @mlouis08
    Using speedment with MySql 8 which supports unsigned BIGINT as primary key. Using latest JDBC driver version 8.0.29. The generated speedment code has "resultSet.getBigInteger(<index>)", which results in a compile error since getBigInteger() seems not supported in java.sql.ResultSet. Online recommendations say use getObject(index, BigInteger.class). Any suggestions here. thanks
    Per-Åke Minborg
    @minborg
    Hrmm. Any chance that you can map that column to long, int, float or String? I will raise an issue about this.
    mhafizyusof
    @mhafizyusof
    image.png
    Hi All. I have an exception of "Unable to fin the database type SQLServer "while build with ApplicationBuilder. Do you guys have idea about this? Thanks.
    Per-Åke Minborg
    @minborg
    mhafizyusof
    @mhafizyusof
    ok thanks Minborg, I will try this.
    Albert Lockett
    @albertlockett_twitter
    is there some kind of issue happening right now w/ service.speedment.com ?
    Albert Lockett
    @albertlockett_twitter
    [10:24:18][albert.lockett2] curl -v -XGET http://service.speedment.com
    Note: Unnecessary use of -X or --request, GET is already inferred.
    *   Trying 35.224.129.15:80...
    * Connected to service.speedment.com (35.224.129.15) port 80 (#0)
    > GET / HTTP/1.1
    > Host: service.speedment.com
    > User-Agent: curl/7.77.0
    > Accept: */*
    > 
    * Mark bundle as not supporting multiuse
    < HTTP/1.1 302 Found
    < Location: https://service.speedment.com/
    < Date: Tue, 26 Jul 2022 14:29:46 GMT
    < Content-Length: 5
    < Content-Type: text/plain; charset=utf-8
    < 
    * Connection #0 to host service.speedment.com left intact
    Found%
    this took > 5mins
    Albert Lockett
    @albertlockett_twitter
    This was an issue cause the statistics reporter was using the common fork join pool to post to that endpoint. If there's other that accidently submits work to the common fork join pool, it will be blocked
    Per-Åke Minborg
    @minborg
    Ahh. ok. Thanks for the heads up. I think it is not desirable to use the fork join pool. I will raise an issue about this. Thanks for spotting this!