dennis-koch / ambeth Goto Github PK
View Code? Open in Web Editor NEWThe next generation distributed ORM framework
License: Apache License 2.0
The next generation distributed ORM framework
License: Apache License 2.0
Hallo Dennis,
Das Team hat ein Problem mit dem QueryBuilder. Sie bekommen beim Start vom Projekt (ich weiß nicht wie häufig) die Fehlermeldung, dass der QueryBuilder schon disposed ist. Kannst du dir das Problem mal angucken? [...] Das Team hat den Effekt mit folgendem Test nachgestellt (einfach in den QueryBuilderTest von Ambeth kopieren):
@test public void testQueryBuilder_fixed_finalized_error() { for (int i = 0; i < 100000; i++) { queryBuilderFactory.create(Employee.class).build(); } }
Wie es aussieht wird finalize() auf dem GCProxy aufgerufen, während der eigentliche Thread gerade in der build() Methode ist. Ich habe es mit dem Test reproduzieren können (nur in Run, nicht in Debug), auch wenn der QueryBuilder erst in eine Stackvariable oder ein Feld gesteckt wird.
java.lang.IllegalStateException: This query builder already is finalized! at de.osthus.ambeth.query.sql.SqlQueryBuilder.getBeanContext(SqlQueryBuilder.java:188) at de.osthus.ambeth.query.sql.SqlQueryBuilder.build(SqlQueryBuilder.java:1316) at de.osthus.ambeth.query.sql.SqlQueryBuilder.build(SqlQueryBuilder.java:1248) at de.osthus.ambeth.query.sql.SqlQueryBuilder.build(SqlQueryBuilder.java:1220) at de.osthus.ambeth.query.IQueryBuilder$GCProxy$1.build(Unknown Source) at de.osthus.ambeth.persistence.xml.QueryBuilderTest.testQueryBuilder_fixed_finalized_error(QueryBuilderTest.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at de.osthus.ambeth.testutil.AmbethIocRunner$4.evaluate(AmbethIocRunner.java:358) at de.osthus.ambeth.testutil.AmbethInformationBusWithPersistenceRunner$4.evaluate(AmbethInformationBusWithPersistenceRunner.java:573) at de.osthus.ambeth.testutil.AmbethInformationBusWithPersistenceRunner$5.evaluate(AmbethInformationBusWithPersistenceRunner.java:590) at de.osthus.ambeth.testutil.AmbethIocRunner$3.evaluate(AmbethIocRunner.java:315) at de.osthus.ambeth.testutil.AmbethIocRunner$5.evaluate(AmbethIocRunner.java:410) at de.osthus.ambeth.testutil.AmbethInformationBusWithPersistenceRunner$3.evaluate(AmbethInformationBusWithPersistenceRunner.java:549) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at de.osthus.ambeth.testutil.AmbethIocRunner.runChild(AmbethIocRunner.java:423) at de.osthus.ambeth.testutil.AmbethInformationBusWithPersistenceRunner.runChild(AmbethInformationBusWithPersistenceRunner.java:280) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at de.osthus.ambeth.testutil.AmbethIocRunner$2.evaluate(AmbethIocRunner.java:280) at de.osthus.ambeth.testutil.AmbethInformationBusWithPersistenceRunner$2.evaluate(AmbethInformationBusWithPersistenceRunner.java:299) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Weshalb wurde der Proxy, der eigentlich nur den QueryBuilder nach build() unbrauchbar machen sollte, durch den GCProxy ersetzt? Das verzögert doch nur das Aufräumen und das AIS-Team konnte dadurch ihre QueryBuilder-Objekte mehrfach benutzen (was wir ja genau nicht wollten). Wäre es nicht einfacher am Ende von build() selbst dispose() aufzurufen? Mit freundlichen Grüßen / Kind Regards
Unfortunately the project does not build out of the box.
git clone ...
cd jambeth
mvn clean package -DskipTests
Result
[ERROR] Failed to execute goal on project jambeth-util: Could not resolve dependencies for project com.koch.ambeth:jambeth-util:jar:3.0.2-SNAPSHOT: Could not find artifact com.koch.ambeth:junit-categories:jar:1.0.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :jambeth-util
There seem to be further dependency issues to get this to build:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:26 min
[INFO] Finished at: 2017-04-24T08:57:42+02:00
[INFO] Final Memory: 145M/1340M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project jambeth-information-bus-pom: Could not resolve dependencies for project com.koch.ambeth:jambeth-information-bus-pom:pom:3.0.2-SNAPSHOT: The following artifacts could not be resolved: com.koch.ambeth:jambeth-core:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-bytecode:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-cache:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-cache-bytecode:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-cache-datachange:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-cache-stream:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-datachange:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-dot:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-event:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-event-datachange:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-expr:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-filter:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-ioc:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-log:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-mapping:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-merge:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-merge-bytecode:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-security:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-security-bytecode:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-sensor:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-service:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-stream:jar:sources:3.0.2-SNAPSHOT, com.koch.ambeth:jambeth-util:jar:sources:3.0.2-SNAPSHOT: Could not find artifact com.koch.ambeth:jambeth-core:jar:sources:3.0.2-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :jambeth-information-bus-pom
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.