[JBoss JIRA] (ELY-461) Enhancements to PermissionMapper, RoleMapper, RoleDecoder
by David Lloyd (JIRA)
David Lloyd created ELY-461:
-------------------------------
Summary: Enhancements to PermissionMapper, RoleMapper, RoleDecoder
Key: ELY-461
URL: https://issues.jboss.org/browse/ELY-461
Project: WildFly Elytron
Issue Type: Enhancement
Components: API / SPI, Permissions
Reporter: David Lloyd
Assignee: David Lloyd
Change RoleMapper, RoleDecoder, etc. to return new interface Roles which is iterable & has contains() method. Add chaining & etc. capabilities.
Change PermissionMapper to return new interface PermissionThing (come up with a name), which only has implies(Permission) & maybe default method checkPermission.
Change RoleDecoder to accept AuthorizationIdentity.
Change PermissionMapper to accept SecurityIdentity instead.
Add stuff to SecurityIdentity.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (DROOLS-1093) Database Outage causes Session Persistence to break
by Artur Kronenberg (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1093?page=com.atlassian.jira.plugi... ]
Artur Kronenberg updated DROOLS-1093:
-------------------------------------
Attachment: test-standalone.zip
Standalone Eclipse project with gradle build file that helps to reproduce this issue.
> Database Outage causes Session Persistence to break
> ----------------------------------------------------
>
> Key: DROOLS-1093
> URL: https://issues.jboss.org/browse/DROOLS-1093
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.3.0.Final
> Environment: Mac OS 10.10.5, Eclipse Mars Release, Java 1.8, Drools 6.3.0.Final
> Docs QE Status: NEW
> Reporter: Artur Kronenberg
> Assignee: Mario Fusco
> Attachments: test-standalone.zip
>
>
> Hi,
> I have ran into this a number of times and I am still working on the reproducer. I decided to raise this issue in case someone has seen something similar and/or I am on the wrong track and I'd rather know now before spending even more days on chasing this down.
> We had a DB outage 2 nights ago, and I have a timer task inserting 1 object into my rules every minute. The first time this happened with the DB outage, the result was:
> {code:java}
> java.lang.RuntimeException: Unable to commit transaction
> at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:239) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:587) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:377) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.insert(CommandBasedStatefulKnowledgeSession.java:410) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at io.shureview.drools.model.impl.SessionHolder.insert(SessionHolder.java:62) ~[shureview-drools-engine-1.0.jar:na]
> at io.shureview.drools.tasks.ExpiryTimerTask.lambda$run$18(ExpiryTimerTask.java:60) ~[shureview-drools-engine-1.0.jar:na]
> at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707) ~[na:1.8.0_72]
> at io.shureview.drools.tasks.ExpiryTimerTask.run(ExpiryTimerTask.java:55) ~[shureview-drools-engine-1.0.jar:na]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_72]
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_72]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_72]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_72]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_72]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_72]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72]
> Caused by: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
> at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:241) ~[btm-2.1.4.jar:2.1.4]
> at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143) ~[btm-2.1.4.jar:2.1.4]
> at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:236) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> ... 14 common frames omitted
> Caused by: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not execute statement
> at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1316) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1510) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:114) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:532) ~[btm-2.1.4.jar:2.1.4]
> at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:235) ~[btm-2.1.4.jar:2.1.4]
> ... 16 common frames omitted
> Caused by: org.hibernate.exception.JDBCConnectionException: could not execute statement
> at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:132) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:189) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3240) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3138) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3468) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:304) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1195) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:109) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> ... 19 common frames omitted
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1884) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1868) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSChannel.write(IOBuffer.java:1855) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSWriter.flush(IOBuffer.java:4215) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSWriter.writePacket(IOBuffer.java:4116) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSWriter.endMessage(IOBuffer.java:3122) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:7127) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:444) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:383) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6703) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1929) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:184) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:159) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:326) ~[sqljdbc4-4.2.jar:na]
> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> ... 31 common frames omitted
> {code}
> This is then followed by:
> {code:java}
> java.lang.RuntimeException: Unable to load session snapshot
> at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:103) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SingleSessionCommandService.initExistingKnowledgeSession(SingleSessionCommandService.java:242) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:557) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:377) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.insert(CommandBasedStatefulKnowledgeSession.java:410) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at io.shureview.drools.model.impl.SessionHolder.insert(SessionHolder.java:62) ~[shureview-drools-engine-1.0.jar:na]
> at io.shureview.drools.tasks.ExpiryTimerTask.lambda$run$18(ExpiryTimerTask.java:60) ~[shureview-drools-engine-1.0.jar:na]
> at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707) ~[na:1.8.0_72]
> at io.shureview.drools.tasks.ExpiryTimerTask.run(ExpiryTimerTask.java:55) ~[shureview-drools-engine-1.0.jar:na]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_72]
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_72]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_72]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_72]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_72]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_72]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72]
> Caused by: java.lang.NullPointerException: null
> at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readTruthMaintenanceSystem(ProtobufInputMarshaller.java:586) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:247) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:118) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:131) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:95) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> ... 15 common frames omitted
> {code}
> My rules update and retract facts each time the rules are run.
> I wonder if somehow an object is removed from the working memory, then the persistence fails to update the table, the rollback does not rollback the working memory, and the persistence is broken.
> I have NOT found a solution for this so far. I was wondering though, is there a way for me to run a replace-all flush operation to simply serialise the working state of my session and throw away all other data. This could be a temporary workaround.
> Thanks and let me know if there is something else you need. I will try and add a reproducer as soon as I can.
> P.S.: Not sure if this may be Bitronix at fault here. I am running without a container, so I provided this standalone implementation for JTA.
> Thanks,
> Artur
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (DROOLS-1093) Database Outage causes Session Persistence to break
by Artur Kronenberg (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1093?page=com.atlassian.jira.plugi... ]
Artur Kronenberg commented on DROOLS-1093:
------------------------------------------
Finally I managed to reproduce it. As with the history of my reproducers, the code is a bit weird and there are manual instructions.
1. I am using a mysql database for persistence. (sadly the datasource must be a pooled datasource of the type I am using. I use the dropwizard factory to create it since this is as close to my setup as it gets and I did not manage to reproduce it any other way - using gradle should be fine to pull in that dep)
2. I create a persisted session the normal way
3. Insert an event that inserts 1k models into the session
4. create a timer task that inserts expiry facts that randomly match a model fact and retract them. (this task for some reason has to be set to at least 30 seconds (that is what i tried it with). If shorter, the effect is different ant the NPE does not appear)
5. now the fun part:
5.1. Use Starter to start the new application. (main method has to call create())
5.2. Once you see this message in the output, stop the database (mysql.server stop)
{code:java}
Expiry run. Sleep for a while. Rules: XXXX
Sleep
{code}
5.3. After you stopped the DB, wait for 30 seconds for the first exeption:
{code:java}
16:15:53.212 [pool-1-thread-1] WARN o.d.p.SingleSessionCommandService - Could not commit session
java.lang.RuntimeException: Unable to commit transaction
at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:239) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:587) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:377) [drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.insert(CommandBasedStatefulKnowledgeSession.java:410) [drools-core-6.3.0.Final.jar:6.3.0.Final]
at org.pandaa.test.Starter$2.lambda$0(Starter.java:154) [bin/:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_74]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_74]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_74]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_74]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_74]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_74]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_74]
Caused by: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:241) ~[btm-2.1.4.jar:2.1.4]
at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143) ~[btm-2.1.4.jar:2.1.4]
at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:236) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
... 11 common frames omitted
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not execute statement
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1316) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1510) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:114) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:532) ~[btm-2.1.4.jar:2.1.4]
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:235) ~[btm-2.1.4.jar:2.1.4]
... 13 common frames omitted
Caused by: org.hibernate.exception.JDBCConnectionException: could not execute statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:132) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:189) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3240) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3138) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3468) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:304) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1195) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:109) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
... 16 common frames omitted
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_74]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_74]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_74]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_74]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2985) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2871) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3414) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922) ~[mysql-connector-java-5.1.6.jar:na]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
... 28 common frames omitted
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:209) ~[na:1.8.0_74]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_74]
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2428) ~[mysql-connector-java-5.1.6.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2882) ~[mysql-connector-java-5.1.6.jar:na]
... 38 common frames omitted
{code}
5.4. Start the server again once you saw the exception. Wait for 30 seconds
5.5. Once you see the same message as in 5.2. stop the database again
5.6. Wait for the exception, then start the database again
5.7. The next time it tries to insert the ExpiryFact, it will try to re-init the session and blow up with a NullPointerException
{code:java}
java.lang.RuntimeException: Unable to load session snapshot
at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:103) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
at org.drools.persistence.SingleSessionCommandService.initExistingKnowledgeSession(SingleSessionCommandService.java:242) [drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:557) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:377) [drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.insert(CommandBasedStatefulKnowledgeSession.java:410) [drools-core-6.3.0.Final.jar:6.3.0.Final]
at org.pandaa.test.Starter$2.lambda$0(Starter.java:154) [bin/:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_74]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_74]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_74]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_74]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_74]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_74]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_74]
Caused by: java.lang.NullPointerException: null
at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readTruthMaintenanceSystem(ProtobufInputMarshaller.java:586) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:247) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:118) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
at org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:131) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:95) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
... 12 common frames omitted
{code}
We have now created a broken session that can not be loaded anymore.
I apologise for the complicated nature of this, but it wasn't quite straight forward to reproduce this issue. I am still not certain what is happening here and how to handle it. Currently I have to recreate everything from scratch since there is no way to fix the session at that point anymore.
If you could advise me on how to work around this and or if I am somehow causing this issue myself, that would be wonderful :)
On IRC it was mentioned that when there is an SQL exception I should probably reload the session anyway. Is that correct?
Thanks,
Artur
> Database Outage causes Session Persistence to break
> ----------------------------------------------------
>
> Key: DROOLS-1093
> URL: https://issues.jboss.org/browse/DROOLS-1093
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.3.0.Final
> Environment: Mac OS 10.10.5, Eclipse Mars Release, Java 1.8, Drools 6.3.0.Final
> Docs QE Status: NEW
> Reporter: Artur Kronenberg
> Assignee: Mario Fusco
>
> Hi,
> I have ran into this a number of times and I am still working on the reproducer. I decided to raise this issue in case someone has seen something similar and/or I am on the wrong track and I'd rather know now before spending even more days on chasing this down.
> We had a DB outage 2 nights ago, and I have a timer task inserting 1 object into my rules every minute. The first time this happened with the DB outage, the result was:
> {code:java}
> java.lang.RuntimeException: Unable to commit transaction
> at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:239) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:587) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:377) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.insert(CommandBasedStatefulKnowledgeSession.java:410) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at io.shureview.drools.model.impl.SessionHolder.insert(SessionHolder.java:62) ~[shureview-drools-engine-1.0.jar:na]
> at io.shureview.drools.tasks.ExpiryTimerTask.lambda$run$18(ExpiryTimerTask.java:60) ~[shureview-drools-engine-1.0.jar:na]
> at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707) ~[na:1.8.0_72]
> at io.shureview.drools.tasks.ExpiryTimerTask.run(ExpiryTimerTask.java:55) ~[shureview-drools-engine-1.0.jar:na]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_72]
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_72]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_72]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_72]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_72]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_72]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72]
> Caused by: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
> at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:241) ~[btm-2.1.4.jar:2.1.4]
> at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143) ~[btm-2.1.4.jar:2.1.4]
> at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:236) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> ... 14 common frames omitted
> Caused by: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not execute statement
> at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1316) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1510) ~[hibernate-entitymanager-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:114) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:532) ~[btm-2.1.4.jar:2.1.4]
> at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:235) ~[btm-2.1.4.jar:2.1.4]
> ... 16 common frames omitted
> Caused by: org.hibernate.exception.JDBCConnectionException: could not execute statement
> at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:132) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:189) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3240) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3138) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3468) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:304) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1195) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:109) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> ... 19 common frames omitted
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1884) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1868) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSChannel.write(IOBuffer.java:1855) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSWriter.flush(IOBuffer.java:4215) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSWriter.writePacket(IOBuffer.java:4116) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSWriter.endMessage(IOBuffer.java:3122) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:7127) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:444) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:383) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6703) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1929) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:184) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:159) ~[sqljdbc4-4.2.jar:na]
> at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:326) ~[sqljdbc4-4.2.jar:na]
> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186) ~[hibernate-core-4.2.21.Final.jar:4.2.21.Final]
> ... 31 common frames omitted
> {code}
> This is then followed by:
> {code:java}
> java.lang.RuntimeException: Unable to load session snapshot
> at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:103) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SingleSessionCommandService.initExistingKnowledgeSession(SingleSessionCommandService.java:242) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:557) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:377) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.insert(CommandBasedStatefulKnowledgeSession.java:410) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at io.shureview.drools.model.impl.SessionHolder.insert(SessionHolder.java:62) ~[shureview-drools-engine-1.0.jar:na]
> at io.shureview.drools.tasks.ExpiryTimerTask.lambda$run$18(ExpiryTimerTask.java:60) ~[shureview-drools-engine-1.0.jar:na]
> at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707) ~[na:1.8.0_72]
> at io.shureview.drools.tasks.ExpiryTimerTask.run(ExpiryTimerTask.java:55) ~[shureview-drools-engine-1.0.jar:na]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_72]
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_72]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_72]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_72]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_72]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_72]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72]
> Caused by: java.lang.NullPointerException: null
> at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readTruthMaintenanceSystem(ProtobufInputMarshaller.java:586) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:247) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:118) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:131) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
> at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:95) ~[drools-persistence-jpa-6.3.0.Final.jar:6.3.0.Final]
> ... 15 common frames omitted
> {code}
> My rules update and retract facts each time the rules are run.
> I wonder if somehow an object is removed from the working memory, then the persistence fails to update the table, the rollback does not rollback the working memory, and the persistence is broken.
> I have NOT found a solution for this so far. I was wondering though, is there a way for me to run a replace-all flush operation to simply serialise the working state of my session and throw away all other data. This could be a temporary workaround.
> Thanks and let me know if there is something else you need. I will try and add a reproducer as soon as I can.
> P.S.: Not sure if this may be Bitronix at fault here. I am running without a container, so I provided this standalone implementation for JTA.
> Thanks,
> Artur
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (DROOLS-1091) On EAP: java.lang.ClassNotFoundException: com.google.inject.servlet.ServletModuleTargetVisitor
by David virgil naranjo (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1091?page=com.atlassian.jira.plugi... ]
David virgil naranjo updated DROOLS-1091:
-----------------------------------------
Git Pull Request: https://github.com/jboss-integration/kie-eap-modules/pull/16
> On EAP: java.lang.ClassNotFoundException: com.google.inject.servlet.ServletModuleTargetVisitor
> -----------------------------------------------------------------------------------------------
>
> Key: DROOLS-1091
> URL: https://issues.jboss.org/browse/DROOLS-1091
> Project: Drools
> Issue Type: Feature Request
> Components: integration
> Affects Versions: 6.4.0.CR1
> Reporter: David virgil naranjo
> Assignee: David virgil naranjo
> Fix For: 6.4.0.CR2
>
>
> Include com.google.inject.extensions:guice-servlet on the EAP distro:
> {code}
> 15:40:57,147 INFO [org.switchyard.common.camel.SwitchYardCamelContextImpl] (MSC service thread 1-8) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
> 15:40:57,147 INFO [org.switchyard.common.camel.SwitchYardCamelContextImpl] (MSC service thread 1-8) Total 0 routes, of which 0 is started.
> 15:40:57,148 INFO [org.switchyard.common.camel.SwitchYardCamelContextImpl] (MSC service thread 1-8) Apache Camel 2.0.1.redhat-621084 (CamelContext: camel-11) started in 0.191 seconds
> 15:40:57,222 WARN [org.kie.scanner.embedder.MavenSettings] (MSC service thread 1-8) Environment variable M2_HOME is not set
> 15:40:57,514 WARN [org.jboss.modules] (MSC service thread 1-8) Failed to define class org.eclipse.sisu.inject.DefaultRankingFunction$ServletVisitor in Module "org.eclipse.sisu:main" from local module loader @1fd60031 (finder: local module finder @1aa6a14b (roots: /home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/bpms,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/soa,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse-integration,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/base)): java.lang.LinkageError: Failed to link org/eclipse/sisu/inject/DefaultRankingFunction$ServletVisitor (Module "org.eclipse.sisu:main" from local module loader @1fd60031 (finder: local module finder @1aa6a14b (roots: /home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/bpms,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/soa,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse-integration,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/base)))
> at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.Module.loadModuleClass(Module.java:568) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.eclipse.sisu.inject.DefaultRankingFunction.<clinit>(DefaultRankingFunction.java:40)
> at org.codehaus.plexus.DefaultPlexusContainer$DefaultsModule.configure(DefaultPlexusContainer.java:860)
> at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:253)
> at com.google.inject.spi.Elements.getElements(Elements.java:108)
> at com.google.inject.spi.Elements.getElements(Elements.java:99)
> at org.eclipse.sisu.wire.WireModule.configure(WireModule.java:75)
> at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:253)
> at com.google.inject.spi.Elements.getElements(Elements.java:108)
> at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:135)
> at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
> at com.google.inject.Guice.createInjector(Guice.java:96)
> at com.google.inject.Guice.createInjector(Guice.java:73)
> at com.google.inject.Guice.createInjector(Guice.java:62)
> at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481)
> at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:206)
> at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:168)
> at org.kie.scanner.embedder.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:166) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:140) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.PlexusComponentProvider.<init>(PlexusComponentProvider.java:37) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenEmbedderUtils.buildComponentProvider(MavenEmbedderUtils.java:56) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenEmbedder.<init>(MavenEmbedder.java:81) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenEmbedder.<init>(MavenEmbedder.java:75) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:42) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenProjectLoader.loadMavenProject(MavenProjectLoader.java:96) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.Aether.<init>(Aether.java:62) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.Aether.getAether(Aether.java:74) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.MavenRepository.getMavenRepository(MavenRepository.java:80) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.ArtifactResolver.<init>(ArtifactResolver.java:53) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.KieRepositoryScannerImpl.getArtifactResolver(KieRepositoryScannerImpl.java:102) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:119) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.loadKieModuleFromMavenRepo(KieRepositoryImpl.java:130) [drools-compiler-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:116) [drools-compiler-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:93) [drools-compiler-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:115) [drools-compiler-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:111) [drools-compiler-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.config.builder.patch.PatchedRuntimeEnvironmentBuilder.getDefault(PatchedRuntimeEnvironmentBuilder.java:236) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.config.builder.patch.PatchedRuntimeEnvironmentBuilder.newDefaultBuilder(PatchedRuntimeEnvironmentBuilder.java:555) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.config.builder.RuntimeEnvironmentBuilder.build(RuntimeEnvironmentBuilder.java:125) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.config.builder.RuntimeManagerBuilder.build(RuntimeManagerBuilder.java:55) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.runtime.KnowledgeRuntimeManagerFactory.newRuntimeManager(KnowledgeRuntimeManagerFactory.java:81) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.exchange.KnowledgeExchangeHandler.newPerRequestRuntimeManager(KnowledgeExchangeHandler.java:121) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.rules.exchange.RulesExchangeHandler.doStart(RulesExchangeHandler.java:95) [switchyard-component-rules-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.deploy.BaseServiceHandler.start(BaseServiceHandler.java:60) [switchyard-deploy-2.0.1.redhat-621084.jar:2.0.1.redhat-621084]
> at org.switchyard.deploy.internal.Deployment.deployImplementations(Deployment.java:582) [switchyard-deploy-2.0.1.redhat-621084.jar:2.0.1.redhat-621084]
> at org.switchyard.deploy.internal.Deployment.start(Deployment.java:144) [switchyard-deploy-2.0.1.redhat-621084.jar:2.0.1.redhat-621084]
> at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:127) [switchyard-deploy-jboss-as7-2.0.1.redhat-621084.jar:2.0.1.redhat-621084]
> at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:77) [switchyard-deploy-jboss-as7-2.0.1.redhat-621084.jar:2.0.1.redhat-621084]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]
> Caused by: java.lang.NoClassDefFoundError: com/google/inject/servlet/ServletModuleTargetVisitor
> at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_55]
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_55]
> at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482) [jboss-modules.jar:1.3.7.Final-redhat-1]
> ... 60 more
> Caused by: java.lang.ClassNotFoundException: com.google.inject.servlet.ServletModuleTargetVisitor from [Module "org.eclipse.sisu:main" from local module loader @1fd60031 (finder: local module finder @1aa6a14b (roots: /home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/bpms,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/soa,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse-integration,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/base))]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.7.Final-redhat-1]
> ... 64 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (DROOLS-1091) On EAP: java.lang.ClassNotFoundException: com.google.inject.servlet.ServletModuleTargetVisitor
by David virgil naranjo (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1091?page=com.atlassian.jira.plugi... ]
David virgil naranjo resolved DROOLS-1091.
------------------------------------------
Fix Version/s: 6.4.0.CR2
Resolution: Done
> On EAP: java.lang.ClassNotFoundException: com.google.inject.servlet.ServletModuleTargetVisitor
> -----------------------------------------------------------------------------------------------
>
> Key: DROOLS-1091
> URL: https://issues.jboss.org/browse/DROOLS-1091
> Project: Drools
> Issue Type: Feature Request
> Components: integration
> Affects Versions: 6.4.0.CR1
> Reporter: David virgil naranjo
> Assignee: David virgil naranjo
> Fix For: 6.4.0.CR2
>
>
> Include com.google.inject.extensions:guice-servlet on the EAP distro:
> {code}
> 15:40:57,147 INFO [org.switchyard.common.camel.SwitchYardCamelContextImpl] (MSC service thread 1-8) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
> 15:40:57,147 INFO [org.switchyard.common.camel.SwitchYardCamelContextImpl] (MSC service thread 1-8) Total 0 routes, of which 0 is started.
> 15:40:57,148 INFO [org.switchyard.common.camel.SwitchYardCamelContextImpl] (MSC service thread 1-8) Apache Camel 2.0.1.redhat-621084 (CamelContext: camel-11) started in 0.191 seconds
> 15:40:57,222 WARN [org.kie.scanner.embedder.MavenSettings] (MSC service thread 1-8) Environment variable M2_HOME is not set
> 15:40:57,514 WARN [org.jboss.modules] (MSC service thread 1-8) Failed to define class org.eclipse.sisu.inject.DefaultRankingFunction$ServletVisitor in Module "org.eclipse.sisu:main" from local module loader @1fd60031 (finder: local module finder @1aa6a14b (roots: /home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/bpms,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/soa,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse-integration,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/base)): java.lang.LinkageError: Failed to link org/eclipse/sisu/inject/DefaultRankingFunction$ServletVisitor (Module "org.eclipse.sisu:main" from local module loader @1fd60031 (finder: local module finder @1aa6a14b (roots: /home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/bpms,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/soa,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse-integration,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/base)))
> at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.Module.loadModuleClass(Module.java:568) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.eclipse.sisu.inject.DefaultRankingFunction.<clinit>(DefaultRankingFunction.java:40)
> at org.codehaus.plexus.DefaultPlexusContainer$DefaultsModule.configure(DefaultPlexusContainer.java:860)
> at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:253)
> at com.google.inject.spi.Elements.getElements(Elements.java:108)
> at com.google.inject.spi.Elements.getElements(Elements.java:99)
> at org.eclipse.sisu.wire.WireModule.configure(WireModule.java:75)
> at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:253)
> at com.google.inject.spi.Elements.getElements(Elements.java:108)
> at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:135)
> at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
> at com.google.inject.Guice.createInjector(Guice.java:96)
> at com.google.inject.Guice.createInjector(Guice.java:73)
> at com.google.inject.Guice.createInjector(Guice.java:62)
> at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481)
> at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:206)
> at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:168)
> at org.kie.scanner.embedder.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:166) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:140) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.PlexusComponentProvider.<init>(PlexusComponentProvider.java:37) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenEmbedderUtils.buildComponentProvider(MavenEmbedderUtils.java:56) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenEmbedder.<init>(MavenEmbedder.java:81) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenEmbedder.<init>(MavenEmbedder.java:75) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:42) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.embedder.MavenProjectLoader.loadMavenProject(MavenProjectLoader.java:96) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.Aether.<init>(Aether.java:62) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.Aether.getAether(Aether.java:74) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.MavenRepository.getMavenRepository(MavenRepository.java:80) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.ArtifactResolver.<init>(ArtifactResolver.java:53) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.KieRepositoryScannerImpl.getArtifactResolver(KieRepositoryScannerImpl.java:102) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:119) [kie-ci-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.loadKieModuleFromMavenRepo(KieRepositoryImpl.java:130) [drools-compiler-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:116) [drools-compiler-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:93) [drools-compiler-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:115) [drools-compiler-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:111) [drools-compiler-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.config.builder.patch.PatchedRuntimeEnvironmentBuilder.getDefault(PatchedRuntimeEnvironmentBuilder.java:236) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.config.builder.patch.PatchedRuntimeEnvironmentBuilder.newDefaultBuilder(PatchedRuntimeEnvironmentBuilder.java:555) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.config.builder.RuntimeEnvironmentBuilder.build(RuntimeEnvironmentBuilder.java:125) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.config.builder.RuntimeManagerBuilder.build(RuntimeManagerBuilder.java:55) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.runtime.KnowledgeRuntimeManagerFactory.newRuntimeManager(KnowledgeRuntimeManagerFactory.java:81) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.common.knowledge.exchange.KnowledgeExchangeHandler.newPerRequestRuntimeManager(KnowledgeExchangeHandler.java:121) [switchyard-component-common-knowledge-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.component.rules.exchange.RulesExchangeHandler.doStart(RulesExchangeHandler.java:95) [switchyard-component-rules-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
> at org.switchyard.deploy.BaseServiceHandler.start(BaseServiceHandler.java:60) [switchyard-deploy-2.0.1.redhat-621084.jar:2.0.1.redhat-621084]
> at org.switchyard.deploy.internal.Deployment.deployImplementations(Deployment.java:582) [switchyard-deploy-2.0.1.redhat-621084.jar:2.0.1.redhat-621084]
> at org.switchyard.deploy.internal.Deployment.start(Deployment.java:144) [switchyard-deploy-2.0.1.redhat-621084.jar:2.0.1.redhat-621084]
> at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:127) [switchyard-deploy-jboss-as7-2.0.1.redhat-621084.jar:2.0.1.redhat-621084]
> at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:77) [switchyard-deploy-jboss-as7-2.0.1.redhat-621084.jar:2.0.1.redhat-621084]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]
> Caused by: java.lang.NoClassDefFoundError: com/google/inject/servlet/ServletModuleTargetVisitor
> at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_55]
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_55]
> at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482) [jboss-modules.jar:1.3.7.Final-redhat-1]
> ... 60 more
> Caused by: java.lang.ClassNotFoundException: com.google.inject.servlet.ServletModuleTargetVisitor from [Module "org.eclipse.sisu:main" from local module loader @1fd60031 (finder: local module finder @1aa6a14b (roots: /home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/bpms,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/soa,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/fuse-integration,/home/virchete/dev/workspace/switchyard/fuse-bxms-integ/release/eap/itests/target/jboss-eap-6.4/modules/system/layers/base))]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.7.Final-redhat-1]
> ... 64 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6377) Composite Keys -- org.hibernate.property.access.spi.PropertyAccessException: Error accessing field
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-6377?page=com.atlassian.jira.plugin.... ]
Scott Marlow commented on WFLY-6377:
------------------------------------
I think that this was already fixed in Hibernate 5.0.9 (via HHH-10545 HHH-10546). Can you recreate with 5.0.9?
> Composite Keys -- org.hibernate.property.access.spi.PropertyAccessException: Error accessing field
> --------------------------------------------------------------------------------------------------
>
> Key: WFLY-6377
> URL: https://issues.jboss.org/browse/WFLY-6377
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 10.0.0.Final
> Environment: Mac OSX, Wildfly 10.0, Hibernate 5.0/5.1, PostgreSQL 9.3
> Reporter: Akhbar Falafel
> Assignee: Scott Marlow
> Attachments: out.log
>
>
> I have 2 entity classes mapped in Hibernate 5.1: ProductBean and CommentBean. They are pretty simple, and look something like this...
> {code:java}
> @Entity(name = "Comment")
> @Table(name = "tbl_comment")
> public class CommentBean implements Serializable {
> @Id
> @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_comment_id")
> @SequenceGenerator(name = "seq_comment_id", sequenceName = "seq_comment_id", allocationSize = 1)
> private Long id = null;
> ...
> }
> @Entity(name = "Product")
> @Table(name = "tbl_product")
> public class CommentBean implements Serializable {
> @Id
> @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_product_id")
> @SequenceGenerator(name = "seq_product_id", sequenceName = "seq_product_id", allocationSize = 1)
> private Long id = null;
> @ManyToMany(cascade = CascadeType.MERGE)
> @JoinTable(name = "tbl_product_comments", joinColumns = {
> @JoinColumn(name = "product_id", referencedColumnName = "id") }, inverseJoinColumns = {
> @JoinColumn(name = "comment_id", referencedColumnName = "id") }, uniqueConstraints = {
> @UniqueConstraint(columnNames = { "product_id", "comment_id" }) })
> @IndexedEmbedded
> @OrderBy(value = "createdDate ASC")
> private Set<CommentBean> comments = new LinkedHashSet<>();
> ...
> }
> {code}
> I'm trying to map the Many-To-Many relation for the comments property in its own class, so that I can add additional properties to the relation in the future. The mapping class looks like this:
> {code:java}
> @Entity(name = "ProductComment")
> @Table(name = "tbl_product_comments")
> public class ProductCommentBean implements Serializable {
> private static final long serialVersionUID = 4730115318809856150L;
> @ManyToOne(optional = false)
> @JoinColumn(name = "productID", referencedColumnName = "id", nullable = false, insertable = false, updatable = false)
> @NotNull
> private ProductBean answer = null;
> @ManyToOne(optional = false)
> @JoinColumn(name = "comment_id", referencedColumnName = "id", nullable = false, insertable = false, updatable = false)
> @NotNull
> private CommentBean comment = null;
> @EmbeddedId
> private ID id = new ID();
> @Embeddable
> public static class ID implements Serializable {
> @Column(name = "product_id")
> private Long productID = null;
> @Column(name = "comment_id")
> private Long commentID = null;
> @Override
> public boolean equals(final Object other) {
> if (this == other) {
> return true;
> }
> if (!(other instanceof ID)) {
> return false;
> }
> ID castOther = (ID) other;
> return new EqualsBuilder().append(productID, castOther. productID).append(commentID, castOther.commentID)
> .isEquals();
> }
> @Override
> public int hashCode() {
> return new HashCodeBuilder(-2081682373, -1619249).append(productID).append(commentID).toHashCode();
> }
> public ID() {
> super();
> // TODO Auto-generated constructor stub
> }
> public ID(Long productID, Long commentID) {
> super();
> this.productID = productID;
> this.commentID = commentID;
> }
> }
> public ProductCommentBean(ProductBean product, CommentBean comment) {
> super();
> this.product = product;
> this.comment = comment;
> this.id.productID =product.getId();
> this.id.commentID = comment.getId();
> }
> }
> ...
> }
> {code}
> Upon my first deployment, I am able to create a ProductCommentBean object and save it to the database successfully. However, if I run a "clean" during development, the subsequent call to save a ProductCommentBean object results in the following exception:
> ISPN000136: Error executing command GetKeyValueCommand, writing keys []: org.hibernate.property.access.spi.PropertyAccessException: Error accessing field [private java.lang.Long com.test.ProductCommentBean$ID.productID] by reflection for persistent property [com.test.ProductCommentBean$ID#productID] : com.test.ProductCommentBean$ID@a8a90e31
> If I do a shutdown and restart of the server, I am once again able to save a ProductCommentBean object the first time. A clean again, however, will set it back to the error state.
> I have tested this code on Wildfly 10 and JBoss EAP 7.0 Beta, and receive the same results. I've also tested it using Hibernate 5.0 and 5.1, also with the same results.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6382) Class loader leak due to Infinispan ExpirationManagerImpl
by Paul Ferraro (JIRA)
Paul Ferraro created WFLY-6382:
----------------------------------
Summary: Class loader leak due to Infinispan ExpirationManagerImpl
Key: WFLY-6382
URL: https://issues.jboss.org/browse/WFLY-6382
Project: WildFly
Issue Type: Bug
Components: Clustering, JPA / Hibernate
Affects Versions: 10.0.0.Final
Reporter: Paul Ferraro
Assignee: Paul Ferraro
h3. Scenario
Given a WAR containing a persistence unit with second level cache and query cache enabled, I'm consistently hitting a Metaspace OutOfMemoryError after redeploying the unchanged application a couple of times.
Analyzing the situation with Eclipse Memory Analyzer, I found one cause to be WFLY-6348, but even after applying that fix locally, I'm still having a Classloader leak which I can trace to a thread used by Infinispan referencing an obsolete web app classloader as context classloader.
Just to rule out that this might be related to WFLY-6283, WFLY-6285, I repeated my experiments with a local build of WildFly master (2f11a59aee0dbdd52b65c5c684eafa83c3f418da), with Hibernate locally upgraded to 5.0.9.
I'm still getting a classloader leak with that build.
h3. Analysis
{{org.infinispan.expiration.impl.ExpirationManagerImpl}} uses a {{LazyInitializingScheduledExecutorService}}. Due to lazy initialization, the {{ExecutorService}} and the underlying thread pool is not created until my web app is deployed. Thus, when the {{ExecutorService}} is created, the context class loader is set to the web app class loader, and this appears to propagate to the threads of the executor thread pool.
When the application is undeployed, {{ExpirationManagerImpl.stop()}} gets invoked to cancel any running expiration task. However, the {{ExecutorService}} is not shut down, the threads remain alive and still keep a reference to the now obsolete context classloader.
h3. Remarks
I'm not sure if this analysis is correct, at least I hope there's a clue for WildFly and Infinispan experts to identify the real cause.
By the way, it would be helpful if all threads created by Infinispan had meaningful names, rather than default names like {{pool-5-thread-1}}.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6377) Composite Keys -- org.hibernate.property.access.spi.PropertyAccessException: Error accessing field
by Akhbar Falafel (JIRA)
[ https://issues.jboss.org/browse/WFLY-6377?page=com.atlassian.jira.plugin.... ]
Akhbar Falafel updated WFLY-6377:
---------------------------------
Attachment: out.log
Attached TRACE logs
> Composite Keys -- org.hibernate.property.access.spi.PropertyAccessException: Error accessing field
> --------------------------------------------------------------------------------------------------
>
> Key: WFLY-6377
> URL: https://issues.jboss.org/browse/WFLY-6377
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 10.0.0.Final
> Environment: Mac OSX, Wildfly 10.0, Hibernate 5.0/5.1, PostgreSQL 9.3
> Reporter: Akhbar Falafel
> Assignee: Scott Marlow
> Attachments: out.log
>
>
> I have 2 entity classes mapped in Hibernate 5.1: ProductBean and CommentBean. They are pretty simple, and look something like this...
> {code:java}
> @Entity(name = "Comment")
> @Table(name = "tbl_comment")
> public class CommentBean implements Serializable {
> @Id
> @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_comment_id")
> @SequenceGenerator(name = "seq_comment_id", sequenceName = "seq_comment_id", allocationSize = 1)
> private Long id = null;
> ...
> }
> @Entity(name = "Product")
> @Table(name = "tbl_product")
> public class CommentBean implements Serializable {
> @Id
> @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_product_id")
> @SequenceGenerator(name = "seq_product_id", sequenceName = "seq_product_id", allocationSize = 1)
> private Long id = null;
> @ManyToMany(cascade = CascadeType.MERGE)
> @JoinTable(name = "tbl_product_comments", joinColumns = {
> @JoinColumn(name = "product_id", referencedColumnName = "id") }, inverseJoinColumns = {
> @JoinColumn(name = "comment_id", referencedColumnName = "id") }, uniqueConstraints = {
> @UniqueConstraint(columnNames = { "product_id", "comment_id" }) })
> @IndexedEmbedded
> @OrderBy(value = "createdDate ASC")
> private Set<CommentBean> comments = new LinkedHashSet<>();
> ...
> }
> {code}
> I'm trying to map the Many-To-Many relation for the comments property in its own class, so that I can add additional properties to the relation in the future. The mapping class looks like this:
> {code:java}
> @Entity(name = "ProductComment")
> @Table(name = "tbl_product_comments")
> public class ProductCommentBean implements Serializable {
> private static final long serialVersionUID = 4730115318809856150L;
> @ManyToOne(optional = false)
> @JoinColumn(name = "productID", referencedColumnName = "id", nullable = false, insertable = false, updatable = false)
> @NotNull
> private ProductBean answer = null;
> @ManyToOne(optional = false)
> @JoinColumn(name = "comment_id", referencedColumnName = "id", nullable = false, insertable = false, updatable = false)
> @NotNull
> private CommentBean comment = null;
> @EmbeddedId
> private ID id = new ID();
> @Embeddable
> public static class ID implements Serializable {
> @Column(name = "product_id")
> private Long productID = null;
> @Column(name = "comment_id")
> private Long commentID = null;
> @Override
> public boolean equals(final Object other) {
> if (this == other) {
> return true;
> }
> if (!(other instanceof ID)) {
> return false;
> }
> ID castOther = (ID) other;
> return new EqualsBuilder().append(productID, castOther. productID).append(commentID, castOther.commentID)
> .isEquals();
> }
> @Override
> public int hashCode() {
> return new HashCodeBuilder(-2081682373, -1619249).append(productID).append(commentID).toHashCode();
> }
> public ID() {
> super();
> // TODO Auto-generated constructor stub
> }
> public ID(Long productID, Long commentID) {
> super();
> this.productID = productID;
> this.commentID = commentID;
> }
> }
> public ProductCommentBean(ProductBean product, CommentBean comment) {
> super();
> this.product = product;
> this.comment = comment;
> this.id.productID =product.getId();
> this.id.commentID = comment.getId();
> }
> }
> ...
> }
> {code}
> Upon my first deployment, I am able to create a ProductCommentBean object and save it to the database successfully. However, if I run a "clean" during development, the subsequent call to save a ProductCommentBean object results in the following exception:
> ISPN000136: Error executing command GetKeyValueCommand, writing keys []: org.hibernate.property.access.spi.PropertyAccessException: Error accessing field [private java.lang.Long com.test.ProductCommentBean$ID.productID] by reflection for persistent property [com.test.ProductCommentBean$ID#productID] : com.test.ProductCommentBean$ID@a8a90e31
> If I do a shutdown and restart of the server, I am once again able to save a ProductCommentBean object the first time. A clean again, however, will set it back to the error state.
> I have tested this code on Wildfly 10 and JBoss EAP 7.0 Beta, and receive the same results. I've also tested it using Hibernate 5.0 and 5.1, also with the same results.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6319) NPE in LocalEjbReceiver.removeClusterNodes during server shutdown
by Richard Achmatowicz (JIRA)
[ https://issues.jboss.org/browse/WFLY-6319?page=com.atlassian.jira.plugin.... ]
Richard Achmatowicz commented on WFLY-6319:
-------------------------------------------
https://github.com/wildfly/wildfly/pull/8780
> NPE in LocalEjbReceiver.removeClusterNodes during server shutdown
> -----------------------------------------------------------------
>
> Key: WFLY-6319
> URL: https://issues.jboss.org/browse/WFLY-6319
> Project: WildFly
> Issue Type: Bug
> Components: Clustering, EJB
> Reporter: Ladislav Thon
> Assignee: Dmitrii Tikhomirov
>
> In a failover test that passivates sessions to a SQL database (though I think this isn't really relevant much), I've seen a NPE in {{LocalEjbReceiver.removeClusterNodes}}:
> {code}
> 04:09:29,330 WARN [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000004: Failure during stop of service jboss.ejb3.localEjbReceiver.value: java.lang.NullPointerException
> at org.jboss.as.ejb3.remote.LocalEjbReceiver.removeClusterNodes(LocalEjbReceiver.java:701)
> at org.jboss.as.ejb3.remote.LocalEjbReceiver.disassociate(LocalEjbReceiver.java:681)
> at org.jboss.ejb.client.EJBClientContext.unregisterEJBReceiver(EJBClientContext.java:446)
> at org.jboss.ejb.client.EJBReceiverContext.close(EJBReceiverContext.java:57)
> at org.jboss.as.ejb3.remote.LocalEjbReceiver.stop(LocalEjbReceiver.java:410)
> at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:2056)
> at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:2017)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> This happens during server shutdown, so it probably doesn't affect anything.
> Logs:
> https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-7x-failover-db-s...
> https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-7x-failover-db-s...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6377) Composite Keys -- org.hibernate.property.access.spi.PropertyAccessException: Error accessing field
by Akhbar Falafel (JIRA)
[ https://issues.jboss.org/browse/WFLY-6377?page=com.atlassian.jira.plugin.... ]
Akhbar Falafel commented on WFLY-6377:
--------------------------------------
[~smarlow] HHH-10618
To recreate the issue, I started the Wildfly server with no deployments via Eclipse. Once started, I deployed my .WAR file. At this point, my code _IS_ able to work as expected. Then, I performed a _clean_ (again via Eclipse) to redeploy my .WAR file. Once I do that, I get the exception noted in the report. I will post TRACE logs shortly.
> Composite Keys -- org.hibernate.property.access.spi.PropertyAccessException: Error accessing field
> --------------------------------------------------------------------------------------------------
>
> Key: WFLY-6377
> URL: https://issues.jboss.org/browse/WFLY-6377
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 10.0.0.Final
> Environment: Mac OSX, Wildfly 10.0, Hibernate 5.0/5.1, PostgreSQL 9.3
> Reporter: Akhbar Falafel
> Assignee: Scott Marlow
>
> I have 2 entity classes mapped in Hibernate 5.1: ProductBean and CommentBean. They are pretty simple, and look something like this...
> {code:java}
> @Entity(name = "Comment")
> @Table(name = "tbl_comment")
> public class CommentBean implements Serializable {
> @Id
> @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_comment_id")
> @SequenceGenerator(name = "seq_comment_id", sequenceName = "seq_comment_id", allocationSize = 1)
> private Long id = null;
> ...
> }
> @Entity(name = "Product")
> @Table(name = "tbl_product")
> public class CommentBean implements Serializable {
> @Id
> @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_product_id")
> @SequenceGenerator(name = "seq_product_id", sequenceName = "seq_product_id", allocationSize = 1)
> private Long id = null;
> @ManyToMany(cascade = CascadeType.MERGE)
> @JoinTable(name = "tbl_product_comments", joinColumns = {
> @JoinColumn(name = "product_id", referencedColumnName = "id") }, inverseJoinColumns = {
> @JoinColumn(name = "comment_id", referencedColumnName = "id") }, uniqueConstraints = {
> @UniqueConstraint(columnNames = { "product_id", "comment_id" }) })
> @IndexedEmbedded
> @OrderBy(value = "createdDate ASC")
> private Set<CommentBean> comments = new LinkedHashSet<>();
> ...
> }
> {code}
> I'm trying to map the Many-To-Many relation for the comments property in its own class, so that I can add additional properties to the relation in the future. The mapping class looks like this:
> {code:java}
> @Entity(name = "ProductComment")
> @Table(name = "tbl_product_comments")
> public class ProductCommentBean implements Serializable {
> private static final long serialVersionUID = 4730115318809856150L;
> @ManyToOne(optional = false)
> @JoinColumn(name = "productID", referencedColumnName = "id", nullable = false, insertable = false, updatable = false)
> @NotNull
> private ProductBean answer = null;
> @ManyToOne(optional = false)
> @JoinColumn(name = "comment_id", referencedColumnName = "id", nullable = false, insertable = false, updatable = false)
> @NotNull
> private CommentBean comment = null;
> @EmbeddedId
> private ID id = new ID();
> @Embeddable
> public static class ID implements Serializable {
> @Column(name = "product_id")
> private Long productID = null;
> @Column(name = "comment_id")
> private Long commentID = null;
> @Override
> public boolean equals(final Object other) {
> if (this == other) {
> return true;
> }
> if (!(other instanceof ID)) {
> return false;
> }
> ID castOther = (ID) other;
> return new EqualsBuilder().append(productID, castOther. productID).append(commentID, castOther.commentID)
> .isEquals();
> }
> @Override
> public int hashCode() {
> return new HashCodeBuilder(-2081682373, -1619249).append(productID).append(commentID).toHashCode();
> }
> public ID() {
> super();
> // TODO Auto-generated constructor stub
> }
> public ID(Long productID, Long commentID) {
> super();
> this.productID = productID;
> this.commentID = commentID;
> }
> }
> public ProductCommentBean(ProductBean product, CommentBean comment) {
> super();
> this.product = product;
> this.comment = comment;
> this.id.productID =product.getId();
> this.id.commentID = comment.getId();
> }
> }
> ...
> }
> {code}
> Upon my first deployment, I am able to create a ProductCommentBean object and save it to the database successfully. However, if I run a "clean" during development, the subsequent call to save a ProductCommentBean object results in the following exception:
> ISPN000136: Error executing command GetKeyValueCommand, writing keys []: org.hibernate.property.access.spi.PropertyAccessException: Error accessing field [private java.lang.Long com.test.ProductCommentBean$ID.productID] by reflection for persistent property [com.test.ProductCommentBean$ID#productID] : com.test.ProductCommentBean$ID@a8a90e31
> If I do a shutdown and restart of the server, I am once again able to save a ProductCommentBean object the first time. A clean again, however, will set it back to the error state.
> I have tested this code on Wildfly 10 and JBoss EAP 7.0 Beta, and receive the same results. I've also tested it using Hibernate 5.0 and 5.1, also with the same results.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month