[jboss-jira] [JBoss JIRA] (AS7-4019) Jboss Remoting and java transient fields.
David Lloyd (JIRA)
jira-events at lists.jboss.org
Thu Mar 22 10:54:47 EDT 2012
[ https://issues.jboss.org/browse/AS7-4019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Lloyd updated AS7-4019:
-----------------------------
Component/s: EJB
Forum Reference: https://community.jboss.org/message/721176#721176 (was: https://community.jboss.org/message/721176#721176)
OK after looking at the stack traces it would appear that there are indeed two problems.
1. Hibernate/JPA is not respecting transient fields. Whether or not this is a bug depends on the JPA spec with which I am unfamiliar.
{noformat}
10:03:22,414 ERROR [stderr] (MSC service thread 1-5) java.lang.Exception: Stack trace
10:03:22,414 ERROR [stderr] (MSC service thread 1-5) at java.lang.Thread.dumpStack(Thread.java:1249)
10:03:22,429 ERROR [stderr] (MSC service thread 1-5) at com.siemag.model.Employee.getDefaultTestValue(Employee.java:65)
10:03:22,429 ERROR [stderr] (MSC service thread 1-5) at com.siemag.model.Employee.<init>(Employee.java:25)
10:03:22,429 ERROR [stderr] (MSC service thread 1-5) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
10:03:22,429 ERROR [stderr] (MSC service thread 1-5) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
10:03:22,429 ERROR [stderr] (MSC service thread 1-5) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
10:03:22,429 ERROR [stderr] (MSC service thread 1-5) at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
10:03:22,429 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.engine.internal.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:46)
10:03:22,429 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.engine.internal.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:68)
10:03:22,429 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:75)
10:03:22,445 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:143)
10:03:22,445 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:498)
10:03:22,445 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:142)
10:03:22,445 ERROR [stderr] (MSC service thread 1-5) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
10:03:22,445 ERROR [stderr] (MSC service thread 1-5) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
10:03:22,445 ERROR [stderr] (MSC service thread 1-5) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
10:03:22,445 ERROR [stderr] (MSC service thread 1-5) at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
10:03:22,461 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:158)
10:03:22,461 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:131)
10:03:22,461 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:345)
10:03:22,461 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
10:03:22,461 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
10:03:22,461 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
10:03:22,461 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
10:03:22,461 ERROR [stderr] (MSC service thread 1-5) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
10:03:22,476 ERROR [stderr] (MSC service thread 1-5) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
10:03:22,476 ERROR [stderr] (MSC service thread 1-5) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
10:03:22,476 ERROR [stderr] (MSC service thread 1-5) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
10:03:22,476 ERROR [stderr] (MSC service thread 1-5) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
10:03:22,476 ERROR [stderr] (MSC service thread 1-5) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
10:03:22,476 ERROR [stderr] (MSC service thread 1-5) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
10:03:22,476 ERROR [stderr] (MSC service thread 1-5) at java.lang.Thread.run(Thread.java:662)
{noformat}
2. The EJB *server* code is configuring the MarshallingConfiguration with the wrong creator; it should just leave the default which should cause SunReflectiveCreator to be chosen for the serial creator.
{noformat}
10:08:22,135 ERROR [stderr] (Remoting "ws048059" task-2) java.lang.Exception: Stack trace
10:08:22,135 ERROR [stderr] (Remoting "ws048059" task-2) at java.lang.Thread.dumpStack(Thread.java:1249)
10:08:22,135 ERROR [stderr] (Remoting "ws048059" task-2) at com.siemag.model.Employee.getDefaultTestValue(Employee.java:65)
10:08:22,135 ERROR [stderr] (Remoting "ws048059" task-2) at com.siemag.model.Employee.<init>(Employee.java:25)
10:08:22,135 ERROR [stderr] (Remoting "ws048059" task-2) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
10:08:22,150 ERROR [stderr] (Remoting "ws048059" task-2) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
10:08:22,150 ERROR [stderr] (Remoting "ws048059" task-2) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
10:08:22,150 ERROR [stderr] (Remoting "ws048059" task-2) at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
10:08:22,150 ERROR [stderr] (Remoting "ws048059" task-2) at org.jboss.marshalling.reflect.ReflectiveCreator.create(ReflectiveCreator.java:107)
10:08:22,150 ERROR [stderr] (Remoting "ws048059" task-2) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1232)
10:08:22,150 ERROR [stderr] (Remoting "ws048059" task-2) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
10:08:22,150 ERROR [stderr] (Remoting "ws048059" task-2) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
10:08:22,150 ERROR [stderr] (Remoting "ws048059" task-2) at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
10:08:22,150 ERROR [stderr] (Remoting "ws048059" task-2) at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.processMessage(MethodInvocationMessageHandler.java:156)
10:08:22,166 ERROR [stderr] (Remoting "ws048059" task-2) at org.jboss.as.ejb3.remote.protocol.versionone.VersionOneProtocolChannelReceiver.handleMessage(VersionOneProtocolChannelReceiver.java:170)
10:08:22,166 ERROR [stderr] (Remoting "ws048059" task-2) at org.jboss.remoting3.remote.RemoteConnectionChannel$5.run(RemoteConnectionChannel.java:435)
10:08:22,166 ERROR [stderr] (Remoting "ws048059" task-2) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
10:08:22,166 ERROR [stderr] (Remoting "ws048059" task-2) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
10:08:22,166 ERROR [stderr] (Remoting "ws048059" task-2) at java.lang.Thread.run(Thread.java:662)
{noformat}
> Jboss Remoting and java transient fields.
> ------------------------------------------
>
> Key: AS7-4019
> URL: https://issues.jboss.org/browse/AS7-4019
> Project: Application Server 7
> Issue Type: Bug
> Components: EJB, JPA / Hibernate
> Affects Versions: 7.1.0.Final
> Environment: Windows XP
> Reporter: Sueleyman Vurucu
> Assignee: Scott Marlow
>
> Java transient field with default values restore the default value after deserialisation.
> This behaviour is different from the old remoting and standard java serialisation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list