[jboss-jira] [JBoss JIRA] Created: (JBAS-3383) CMP field of type java.lang.Properties failes

Ralf Zimmermann (JIRA) jira-events at jboss.com
Tue Jul 11 06:13:11 EDT 2006


CMP field of type java.lang.Properties failes
---------------------------------------------

                 Key: JBAS-3383
                 URL: http://jira.jboss.com/jira/browse/JBAS-3383
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: CMP service
    Affects Versions: JBossAS-4.0.4.GA
         Environment: Platform independant.
            Reporter: Ralf Zimmermann
         Assigned To: Alexey Loubyansky


Access to an EJB CMP field of type java.lang.Properties fails with the following Exception:

12:10:56,240 ERROR [STDERR] Caused by: javax.ejb.EJBException: Load failed
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:251)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
12:10:56,240 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
12:10:56,240 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:276)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:68)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:520)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.Container.invoke(Container.java:954)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:65)
12:10:56,240 ERROR [STDERR] 	at $Proxy331.getId(Unknown Source)
12:10:56,240 ERROR [STDERR] 	at de.cit.intelliform.ejb.manager.ManagerBean.getBackendActionDTO(ManagerBean.java:2321)
12:10:56,240 ERROR [STDERR] 	at de.cit.intelliform.ejb.manager.ManagerBean.getActionDTO(ManagerBean.java:2410)
12:10:56,240 ERROR [STDERR] 	at de.cit.intelliform.ejb.manager.ManagerBean.getActionDTO(ManagerBean.java:2393)
12:10:56,240 ERROR [STDERR] 	at de.cit.intelliform.ejb.manager.ManagerBean.getActionDTO(ManagerBean.java:2361)
12:10:56,240 ERROR [STDERR] 	at de.cit.intelliform.ejb.manager.ManagerBean.getBackendActionDTO(ManagerBean.java:2331)
12:10:56,240 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:10:56,240 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
12:10:56,240 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:10:56,240 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:585)
12:10:56,240 ERROR [STDERR] 	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
12:10:56,240 ERROR [STDERR] 	at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
12:10:56,255 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:64)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
12:10:56,255 ERROR [STDERR] 	... 67 more
12:10:56,255 ERROR [STDERR] Caused by: java.lang.IllegalStateException: Failed to find a ctor in class java.util.Properties that takes an instance of interface java.util.Map as an argument.
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCTypeFactory.cloneValue(JDBCTypeFactory.java:308)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCTypeFactory.access$000(JDBCTypeFactory.java:56)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCTypeFactory$3.getFieldState(JDBCTypeFactory.java:105)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge$FieldState.updateState(JDBCCMP2xFieldBridge.java:443)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge$FieldState.setClean(JDBCCMP2xFieldBridge.java:431)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.setClean(JDBCCMP2xFieldBridge.java:262)
12:10:56,255 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:208)
12:10:56,255 ERROR [STDERR] 	... 110 more


This is caused by an bug in org.jboss.ejb.plugins.cmp.jdbc.JDBCTypeFactory. The CMPFieldStateFactory for the type java.lang.Map is also used for the CMP field of type java.lang.Properties.
This is wrong:There is no ctor java.lang.Properties(java.lang.Map).

Workaround: configure a custom CMPFieldStateFactory  for the field.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list