[JBossWS] - Eorros of creating WS client stub class
by SARA1232007
Hi,
I'm using jboss-4.2.2.GA and jbossws-native-3.0.5.GA. I create the WS client using jbossws. But when I run WS client, I get the excpetions when I invoke the creation of WS client stub class. The exceptions are as following:
Exception in thread "main" java.lang.IllegalStateException: Failed to load javax.xml.ws.spi.Provider: com.sun.xml.ws.spi.ProviderImpl
| at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:94)
| at javax.xml.ws.spi.Provider.provider(Provider.java:80)
| at javax.xml.ws.Service.<init>(Service.java:79)
| at org.openuri._2004._04.helloworld.HelloWorldPOJOService.<init>(HelloWorldPOJOService.java:45)
| at samples.webservice.ClientTester.main(ClientTester.java:8)
| Caused by: java.lang.ExceptionInInitializerError
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
| at java.lang.reflect.Constructor.newInstance(Unknown Source)
| at java.lang.Class.newInstance0(Unknown Source)
| at java.lang.Class.newInstance(Unknown Source)
| at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:89)
| ... 4 more
| Caused by: javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference.
| at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:222)
| at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:218)
| at java.security.AccessController.doPrivileged(Native Method)
| at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:217)
| at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88)
| ... 11 more
| Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
| Two classes have the same XML type name "address". Use @XmlType.name and @XmlType.namespace to assign different names to them.
| this problem is related to the following location:
| at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
| at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
| at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
| this problem is related to the following location:
| at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
| at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address
| at javax.xml.ws.wsaddressing.W3CEndpointReference
| Two classes have the same XML type name "elements". Use @XmlType.name and @XmlType.namespace to assign different names to them.
| this problem is related to the following location:
| at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
| at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
| at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
| this problem is related to the following location:
| at javax.xml.ws.wsaddressing.W3CEndpointReference$Elements
| at private javax.xml.ws.wsaddressing.W3CEndpointReference$Elements javax.xml.ws.wsaddressing.W3CEndpointReference.referenceParameters
| at javax.xml.ws.wsaddressing.W3CEndpointReference
|
| at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
| at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438)
| at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
| at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
| at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211)
| at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
| at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
| at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
| at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:220)
| ... 15 more
|
|
|
Can anyone tell me what's wrong?
Thanks.
Sara
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232724#4232724
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232724
17 years, 2 months
[JBoss jBPM] - Error while starting JBoss+jBPM.
by dynamolalit
Hi,
I have JBoss 4.2.2 & i have configured jBPM 3.2.6 installer jar on it.I was getting some DB related error which i removed using
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4198452#4198452
But now i am getting these logs while trying to start my JBoss.
anonymous wrote : 15:53:04,381 ERROR [LogInterceptor] NoSuchEntityException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
| javax.ejb.NoSuchEntityException: Entity not found: primaryKey=5
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:238)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
| at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:278)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
| at java.util.TimerThread.mainLoop(Timer.java:512)
| at java.util.TimerThread.run(Timer.java:462)
| 15:53:04,381 ERROR [TimerImpl] Error invoking ejbTimeout: javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=5
| 15:53:04,391 ERROR [LogInterceptor] NoSuchEntityException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
| javax.ejb.NoSuchEntityException: Entity not found: primaryKey=6
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:238)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
| at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:278)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
| at java.util.TimerThread.mainLoop(Timer.java:512)
| at java.util.TimerThread.run(Timer.java:462)
| 15:53:04,491 ERROR [TimerImpl] Error invoking ejbTimeout: javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=6
| 15:53:04,491 ERROR [LogInterceptor] NoSuchEntityException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
| javax.ejb.NoSuchEntityException: Entity not found: primaryKey=7
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:238)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
| at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:278)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
| at java.util.TimerThread.mainLoop(Timer.java:512)
| at java.util.TimerThread.run(Timer.java:462)
| 15:53:04,551 ERROR [TimerImpl] Error invoking ejbTimeout: javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=7
| 15:53:04,551 ERROR [LogInterceptor] NoSuchEntityException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
| javax.ejb.NoSuchEntityException: Entity not found: primaryKey=8
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:238)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
| at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:278)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
| at java.util.TimerThread.mainLoop(Timer.java:512)
| at java.util.TimerThread.run(Timer.java:462)
| 15:53:04,611 ERROR [TimerImpl] Error invoking ejbTimeout: javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=8
| 15:53:04,611 ERROR [LogInterceptor] NoSuchEntityException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
| javax.ejb.NoSuchEntityException: Entity not found: primaryKey=9
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:238)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
| at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:278)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
| at java.util.TimerThread.mainLoop(Timer.java:512)
| at java.util.TimerThread.run(Timer.java:462)
| 15:53:04,671 ERROR [TimerImpl] Error invoking ejbTimeout: javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=9
| 15:53:04,681 ERROR [LogInterceptor] NoSuchEntityException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
| javax.ejb.NoSuchEntityException: Entity not found: primaryKey=5
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:238)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
| at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:278)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:112)
| 15:53:04,731 ERROR [STDERR] javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=5
| 15:53:04,731 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:333)
| 15:53:04,741 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
| 15:53:04,741 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| 15:53:04,741 ERROR [STDERR] at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| 15:53:04,741 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:960)
| 15:53:04,751 ERROR [STDERR] at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| 15:53:04,751 ERROR [STDERR] at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:112)
| 15:53:04,751 ERROR [LogInterceptor] NoSuchEntityException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
| javax.ejb.NoSuchEntityException: Entity not found: primaryKey=6
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:238)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
| at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:278)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:112)
| 15:53:04,811 ERROR [STDERR] javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=6
| 15:53:04,811 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:333)
| 15:53:04,811 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
| 15:53:04,811 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| 15:53:04,822 ERROR [STDERR] at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| 15:53:04,822 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:960)
| 15:53:04,822 ERROR [STDERR] at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| 15:53:04,822 ERROR [STDERR] at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:112)
| 15:53:04,852 INFO [EJBDeployer] Deployed: file:/D:/Installed Softwares/jboss-4.2.2.GA-jbpm/server/default/deploy/jbpm/jbpm-enterprise.jar/
| 15:53:04,902 INFO [TomcatDeployer] deploy, ctxPath=/jbpm-console, warUrl=.../deploy/jbpm/jsf-console.war/
| 15:53:04,912 WARN [TomcatDeployer] message-destination-ref 'jms/JobQueue' ignoring message-destination-link 'JobQueue' because it has a jndi-name in
| jboss-web.xml
| 15:53:04,932 ERROR [LogInterceptor] NoSuchEntityException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
| javax.ejb.NoSuchEntityException: Entity not found: primaryKey=7
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:238)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
| at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:278)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:112)
| 15:53:04,982 ERROR [STDERR] javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=7
| 15:53:04,982 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:333)
| 15:53:04,992 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
| 15:53:04,992 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| 15:53:04,992 ERROR [STDERR] at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| 15:53:04,992 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:960)
| 15:53:05,002 ERROR [STDERR] at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| 15:53:05,002 ERROR [STDERR] at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:112)
| 15:53:05,002 ERROR [LogInterceptor] NoSuchEntityException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
| javax.ejb.NoSuchEntityException: Entity not found: primaryKey=8
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:238)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
| at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:278)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:112)
| 15:53:05,062 ERROR [STDERR] javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=8
| 15:53:05,062 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:333)
| 15:53:05,062 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
| 15:53:05,062 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| 15:53:05,072 ERROR [STDERR] at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| 15:53:05,072 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:960)
| 15:53:05,072 ERROR [STDERR] at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| 15:53:05,072 ERROR [STDERR] at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:112)
| 15:53:05,082 ERROR [LogInterceptor] NoSuchEntityException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
| javax.ejb.NoSuchEntityException: Entity not found: primaryKey=9
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:238)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
| at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:278)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:112)
| 15:53:05,132 ERROR [STDERR] javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=9
| 15:53:05,132 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:333)
| 15:53:05,142 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
| 15:53:05,142 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| 15:53:05,142 ERROR [STDERR] at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
| 15:53:05,142 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:960)
| 15:53:05,152 ERROR [STDERR] at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
| 15:53:05,152 ERROR [STDERR] at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:112)
| 15:53:05,823 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
| 15:53:06,384 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
| 15:53:06,414 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
Can anyone help me.
Thank You,
regards,
Lalit.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232677#4232677
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232677
17 years, 2 months
[JBoss Cache: Core Edition] - Cache 3 + Hibernate 3.3 + JMX/JNDI exposure
by trybik
Hello,
sorry for the long explanation, but I wanted to make things clear.
I am a LAMS developer. Till now, we were using JBoss Cache 1.4.2 on JBoss 4.0.2. It was deployed as a MBean and was made available by JMX as "jboss.cache:service=TreeCache".
The new idea was to use the latest JBoss Cache 3.1.0.
We are not using CacheManager, as our needs are small
and we only have one, local instance of Cache.
The suggested way of deploying Cache is to use "-jboss-beans.xml"
deployments. Beans can be exposed to JMX by using
annotations. I've read this guide:
http://www.jboss.org/file-access/default/members/jbosscache/freezone/docs...
For our needs, "lams-cache-jboss-beans.xml" was written.
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
|
| <!-- LAMS TreeCache configuration for JBoss 5 -->
|
| <bean name="LamsCacheConfig"
|
| class="org.jboss.cache.config.Configuration">
|
| <!-- Externally injected services -->
|
| <property name="runtimeConfig">
|
| <bean class="org.jboss.cache.config.RuntimeConfig">
|
| <property name="transactionManager">
|
| <inject bean="jboss:service=TransactionManager"
|
| property="TransactionManager"/>
|
| </property>
|
| <!-- We don't need it
| <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
| -->
| </bean>
|
| </property>
|
|
|
| <property name="multiplexerStack">udp</property>
|
|
|
| <property name="clusterName">TreeCache-Cluster</property>
|
|
|
| <property name="isolationLevel">READ_COMMITTED</property>
|
|
|
| <property name="cacheMode">LOCAL</property>
|
|
|
| <property name="stateRetrievalTimeout">15000</property>
|
|
|
| <property name="syncReplTimeout">20000</property>
|
|
|
| <property name="lockAcquisitionTimeout">15000</property>
|
|
|
| <property name="exposeManagementStatistics">true</property>
|
| </bean>
|
| <!-- Factory to build the Cache. -->
|
| <bean name="DefaultCacheFactory" class="org.jboss.cache.DefaultCacheFactory" />
|
|
| <bean name="LamsCache" class="org.jboss.cache.Cache">
|
| <constructor factoryMethod="createCache">
|
| <factory bean="DefaultCacheFactory"/>
|
| <parameter class="org.jboss.cache.config.Configuration"><inject bean="LamsCacheConfig"/></parameter>
|
| <parameter class="boolean">false</parameter>
|
| </constructor>
|
|
|
| </bean>
|
| <bean name="LamsJmxWrapper" class="org.jboss.cache.jmx.CacheJmxWrapper">
|
| <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=LamsCache", exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, registerDirectly=true)</annotation>
|
| <constructor>
|
| <parameter><inject bean="LamsCache"/></parameter>
|
| </constructor>
| </bean>
| </deployment>
But there is problem with Hibernate 3.3 integration. I want to use SharedJBossCacheRegionFactory. It looks for the Cache config file (treecache.xml) and builds its own instance.
But in LAMS we need access to cache from withing the code too. We have a special website for Admins where they can lookup and manipulate the cache.
The code used to connect to cache using JMX, similary to this: MBeanServer server = JMXUtil.getMBeanServer();
| CacheJmxWrapperMBean wrapper = (CacheJmxWrapperMBean) MBeanServerInvocationHandler.newProxyInstance(
| server, ObjectName.getInstance(cacheObjectName), CacheJmxWrapperMBean.class, false);
| cache = wrapper.getCache();
So we need a separately deployed Cache instance, like the way we did before.
It is impossible to expose to JMX the Cache instance itself, as we declare a bean as
org.jboss.cache.Cache
which is an interface. Interfaces can not be MBeans, since they do not inherit from Object. In Cache 2, the Cache bean was CacheImpl which was a concrete class. In Cache 3 it is constructed by
CacheFactory and we have only the interface, which can not be exposed.
Then, there is CacheJmxWrapper class. It wraps the Cache and allows JMX exposition.
Since in Hibernate we do not create local instance of Cache, we need to access the deployed one
somehow. We are left with JndiSharedJBossCacheRegionFactory. It allows accessing Cache instance by JNDI. But
we have it only in JMX. So we need to expose it to JNDI.
In JBoss 5 documentation there is a chapter concerning Cache JNDI exposure, but it says that at the
time of writing of this document, this functionality is not yet implemented...
Standard <jndi-name> tag does not work - parser will not read it.
There is a solution explained in:
http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4....
It gets the cache from JMX and exposes it to JNDI.
But Hibernate will not accept it, because the exposed interface is CacheJmxWrapperMBean and not
Cache itself! For our Admin code it is OK, but for Hibernate it's not. It would not accept the exposed bean.
The question is: is there a way to expose the Cache itself to JNDI, to make Hibernate accept it and also get it for Admin?
Currently SharedJBossCacheRegionFactory is used and a local instance of Cache is created. It is not exposed to JMX, so we do not have access to it from within the code.
This is the treecache.xml:<?xml version="1.0" encoding="UTF-8"?>
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- TreeCache Service Configuration for LAMS -->
|
| <!-- This approach is deprecated for JBoss 5 and it is used only temporarly,
| until a way to utilise lams-cache-jboss-beans.xml is found.
| The Cache configured in this file is NOT deployed as a separate service,
| but it is used by Hibernate to create a local (not JMX exposed) instance
| for its own use)
| -->
| <!-- ===================================================================== -->
|
| <server>
|
| <!-- ==================================================================== -->
| <!-- Defines TreeCache configuration -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.cache.TreeCache"
| name="jboss.cache:service=TreeCache">
|
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
|
|
| <!-- Configure the TransactionManager -->
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.JBossTransactionManagerLookup</attribute>
|
|
| <!--
| Node locking level : SERIALIZABLE
| REPEATABLE_READ (default)
| READ_COMMITTED
| READ_UNCOMMITTED
| NONE
| -->
| <attribute name="IsolationLevel">READ_COMMITTED</attribute>
|
| <!--
| Valid modes are LOCAL
| REPL_ASYNC
| REPL_SYNC
| -->
| <attribute name="CacheMode">LOCAL</attribute>
|
| <!-- Name of cluster. Needs to be the same for all clusters, in order
| to find each other
| -->
| <attribute name="ClusterName">TreeCache-Cluster</attribute>
|
| <!-- JGroups protocol stack properties. Can also be a URL,
| e.g. file:/home/bela/default.xml
| <attribute name="ClusterProperties"></attribute>
| -->
|
| <attribute name="ClusterConfig">
| <config>
| <!-- UDP: if you have a multihomed machine,
| set the bind_addr attribute to the appropriate NIC IP address -->
| <!-- UDP: On Windows machines, because of the media sense feature
| being broken with multicast (even after disabling media sense)
| set the loopback attribute to true -->
| <UDP mcast_addr="228.1.2.3" mcast_port="48866"
| ip_ttl="64" ip_mcast="true"
| mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
| ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
| loopback="false"/>
| <PING timeout="2000" num_initial_members="3"
| up_thread="false" down_thread="false"/>
| <MERGE2 min_interval="10000" max_interval="20000"/>
| <FD shun="true" up_thread="true" down_thread="true"/>
| <VERIFY_SUSPECT timeout="1500"
| up_thread="false" down_thread="false"/>
| <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
| max_xmit_size="8192" up_thread="false" down_thread="false"/>
| <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
| down_thread="false"/>
| <pbcast.STABLE desired_avg_gossip="20000"
| up_thread="false" down_thread="false"/>
| <FRAG frag_size="8192"
| down_thread="false" up_thread="false"/>
| <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
| shun="true" print_local_addr="true"/>
| <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>
| </config>
| </attribute>
|
|
| <!--
| The max amount of time (in milliseconds) we wait until the
| initial state (ie. the contents of the cache) are retrieved from
| existing members in a clustered environment
| -->
| <attribute name="InitialStateRetrievalTimeout">5000</attribute>
|
| <!--
| Number of milliseconds to wait until all responses for a
| synchronous call have been received.
| -->
| <attribute name="SyncReplTimeout">10000</attribute>
|
| <!-- Max number of milliseconds to wait for a lock acquisition -->
| <attribute name="LockAcquisitionTimeout">15000</attribute>
|
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">5</attribute>
| <!-- Name of the DEFAULT eviction policy class. -->
| <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
| <!-- Cache wide default -->
| <region name="/_default_">
| <attribute name="maxNodes">5000</attribute>
| <attribute name="timeToLiveSeconds">1000</attribute>
| </region>
| <region name="/org/lamsfoundation/lams/contentrepository">
| <attribute name="maxNodes">200</attribute>
| <attribute name="timeToLiveSeconds">900</attribute>
| </region>
| </config>
| </attribute>
| </mbean>
| </server>
Thank you for your quick reply!
Marcin Cieslak
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232651#4232651
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232651
17 years, 2 months
[Tomcat, HTTPD, Servlets & JSP] - problem with loader constraint violation?
by ritesh163
Hello everyone,
I am having problem with loader constraint violation. I am using jboss-5.0.1.GA with JDK 1.6. The server starts normally with welcome page of my application but when I start to login through that page, there occurs problem which is given below:
| exception
| javax.servlet.ServletException: Servlet.init() for servlet controller threw exception
| org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
| org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
|
| root cause
|
| java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.parsers.DocumentBuilder.parse(Lorg/xml/sax/InputSource;)Lorg/w3c/dom/Document;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, np/com/remitron/admin/utility/Config, and the class loader (instance of <bootloader>) for resolved class, javax/xml/parsers/DocumentBuilder, have different Class objects for the type org/xml/sax/InputSource used in the signature
| np.com.remitron.admin.utility.Config.init(Config.java:33)
|
|
Can anyone suggest me, what this exception means? and also how to solve this problem?
The code in config.java file is given below:
| protected void init(ServletContext sctx,String xmlFile) throws Exception
| {
| InputStream is=null;
| try {
| is=sctx.getResourceAsStream(xmlFile);
| DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
| DocumentBuilder builder=factory.newDocumentBuilder();
| Document doc=builder.parse(new InputSource(is));
| root=doc.getDocumentElement();
|
| }
|
| finally{
| if(is!=null)
| {
| is.close();
| }
| }
| }
|
|
Thank you.
-Ritesh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232648#4232648
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232648
17 years, 2 months
[JBoss Portal] - Re: Jboss portal on JBoss AS5
by hilmer
Thanks for the pointer.
I have changed the xsd (see below). I do not know if this is as intended, but now deployment works for me on CR1 :-)
--Soren
| <?xml version="1.0"?>
| <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ~ JBoss, a division of Red Hat ~
| ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
| ~ contributors as indicated by the @authors tag. See the ~
| ~ copyright.txt in the distribution for a full listing of ~
| ~ individual contributors. ~
| ~ ~
| ~ This is free software; you can redistribute it and/or modify it ~
| ~ under the terms of the GNU Lesser General Public License as ~
| ~ published by the Free Software Foundation; either version 2.1 of ~
| ~ the License, or (at your option) any later version. ~
| ~ ~
| ~ This software is distributed in the hope that it will be useful, ~
| ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
| ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
| ~ Lesser General Public License for more details. ~
| ~ ~
| ~ You should have received a copy of the GNU Lesser General Public ~
| ~ License along with this software; if not, write to the Free ~
| ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
| ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
|
| <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| xmlns:jbxb="http://www.jboss.org/xml/ns/jbxb"
| elementFormDefault="qualified">
|
| <xsd:element name="identity-ui-configuration">
| <xsd:complexType>
| <xsd:annotation>
| <xsd:appinfo>
| <jbxb:class impl="org.jboss.portal.core.identity.services.metadata.IdentityUIConfiguration"/>
| </xsd:appinfo>
| </xsd:annotation>
|
| <xsd:sequence>
| <!-- User portlet and user management portlet preferences -->
| <xsd:element name="subscription-mode" type="subscriptionMode" default="jbp_identity_validation_workflow"/>
| <xsd:element name="admin-subscription-mode" minOccurs="0" maxOccurs="1" type="subscriptionMode" default="automatic"/>
| <xsd:element name="overwrite-workflow" type="xsd:boolean" default="false"/>
| <xsd:element name="email-domain" minOccurs="1" maxOccurs="1" type="xsd:string" default="example.com" />
| <xsd:element name="email-from" minOccurs="1" maxOccurs="1" type="xsd:string" default="no-reply(a)example.com" />
| <xsd:element name="password-generation-characters" minOccurs="1" maxOccurs="1" type="xsd:string"/>
| <xsd:element name="default-roles" type="defaultRoles" minOccurs="1" maxOccurs="1"/>
|
| <!-- user interface components -->
| <xsd:element name="ui-components" minOccurs="1" maxOccurs="1">
| <xsd:annotation>
| <xsd:appinfo>
| <jbxb:class impl="java.util.HashMap"/>
| </xsd:appinfo>
| </xsd:annotation>
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="ui-component" minOccurs="1" maxOccurs="unbounded" type="UIComponent" />
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
| <!-- end: user interface components -->
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
|
| <!-- restictions for subscription-modes -->
|
| <xsd:simpleType name="subscriptionMode">
| <xsd:restriction base="xsd:string">
| <xsd:enumeration value="custom" />
| <xsd:enumeration value="automatic" />
| <xsd:enumeration value="jbp_identity_validation_workflow" />
| <xsd:enumeration value="jbp_identity_validation_approval_workflow" />
| </xsd:restriction>
| </xsd:simpleType>
|
| <xsd:complexType name="defaultRoles">
| <xsd:sequence>
| <xsd:element name="role" minOccurs="1" type="xsd:string" maxOccurs="unbounded"/>
| </xsd:sequence>
| </xsd:complexType>
|
| <xsd:complexType name="validators">
| <xsd:sequence>
| <xsd:element name="validator" minOccurs="1" type="xsd:string" maxOccurs="unbounded"/>
| </xsd:sequence>
| </xsd:complexType>
|
| <xsd:complexType name="componentValues">
| <xsd:annotation>
| <xsd:appinfo>
| <jbxb:mapEntry nonNullValue="true"/>
| </xsd:appinfo>
| </xsd:annotation>
| <xsd:choice minOccurs="1" maxOccurs="1">
| <xsd:element name="value" maxOccurs="unbounded">
| <xsd:complexType>
| <xsd:annotation>
| <xsd:appinfo>
| <jbxb:mapEntry/>
| <jbxb:characters>
| <jbxb:mapEntryValue/>
| </jbxb:characters>
| </xsd:appinfo>
| </xsd:annotation>
| <xsd:simpleContent>
| <xsd:extension base="xsd:string">
| <xsd:attribute name="key" type="xsd:string">
| <xsd:annotation>
| <xsd:appinfo>
| <jbxb:mapEntryKey/>
| </xsd:appinfo>
| </xsd:annotation>
| </xsd:attribute>
| </xsd:extension>
| </xsd:simpleContent>
| </xsd:complexType>
| </xsd:element>
| </xsd:choice>
| </xsd:complexType>
|
| <xsd:complexType name="UIComponent">
| <xsd:annotation>
| <xsd:appinfo>
| <jbxb:mapEntry impl="org.jboss.portal.core.identity.services.metadata.UIComponentConfiguration" getKeyMethod="getName" setKeyMethod="setName" />
| </xsd:appinfo>
| </xsd:annotation>
| <xsd:sequence>
| <xsd:element name="property-ref" maxOccurs="1" minOccurs="1" type="xsd:string" />
| <xsd:element name="localization-bundle" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="validators" type="validators" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="converter" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="required" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="read-only" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="values" type="componentValues" minOccurs="0" maxOccurs="1">
| <xsd:annotation>
| <xsd:appinfo>
| <jbxb:class impl="java.util.HashMap"/>
| </xsd:appinfo>
| </xsd:annotation>
| </xsd:element>
| </xsd:sequence>
| <!-- attribute name -->
| <xsd:attribute name="name" type="xsd:string" use="required" />
| </xsd:complexType>
|
| </xsd:schema>
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232646#4232646
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232646
17 years, 2 months
[Installation, Configuration & DEPLOYMENT] - Re: Re-deployment questions?
by jaikiran
anonymous wrote : Any idea to implement it?
|
Okay, let me give this a try.
anonymous wrote : For my original question, I want to inform end user with a message (webpage) about the upgrading of web application whenever the end user access the web application.
|
| Does anyone have good idea to accomplish this objective? If we set the error webpage for 404 only in that web application, it won't work when stop/undeploy that web application. If we set the error webpage 404 globally in the whole JBoss, it may lead to wrong message to other application users.
|
I think this redirection to a custom maintenance page should happen outside the application server, for exactly the reasons you noted above. I guess it could be done by setting up some Apache configurations[1] outside the JBoss AS which will redirect the request to a different URL so that the original request never reaches the JBoss server.
[1] I have no clue how this can be done, since i have not looked into such configurations. I might be wrong too, about this being possible with some "Apache configuration"
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232641#4232641
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232641
17 years, 2 months
[EJB 3.0] - Re: Webservice error
by z_idane
here is the entire exception stack
| javax.ejb.EJBException: java.lang.IllegalArgumentException: Wrong target. class webservices.action.BookSearchActionService for public webservices.beans.Book[] webservices.action.BookSearchActionService.searchBooks(java.lang.String)
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:372)
| at org.jboss.ejb3.stateless.StatelessContainer.invokeEndpoint(StatelessContainer.java:727)
| at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:96)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:219)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
| at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232627#4232627
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232627
17 years, 2 months
[EJB 3.0] - Webservice error
by z_idane
Hi,
I am trying to extend a stateless sesssion bean BookSearchActionService to webservice.
After deploying, when i try to invoke the webserice. I get following error.
java.lang.IllegalArgumentException: Wrong target. class webservices.action.BookSearchActionService for public webservices.beans.Book[] webservices.action.BookSearchActionService.searchBooks(java.lang.String)
Here is my SLB code
| package webservices.action;
|
| import java.util.ArrayList;
|
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
| import javax.jws.soap.SOAPBinding.ParameterStyle;
| import javax.jws.soap.SOAPBinding.Style;
| import javax.jws.soap.SOAPBinding.Use;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import webservices.beans.Book;
| @Stateless
| @WebService(name="booksearch",
| serviceName="booksearch",
| targetNamespace="URN:ejbmodule.bookserch")
| @SOAPBinding(parameterStyle=ParameterStyle.WRAPPED,style=Style.DOCUMENT,use=Use.LITERAL)
| public class BookSearchActionService {
|
| @PersistenceContext
| private EntityManager mgr;
| @WebMethod(operationName="searchBooksByAuthor",action="searchBooksByAuthor")
| public Book[] searchBooks(String author) {
| ArrayList<Book> list = (ArrayList<Book>) mgr.createNamedQuery("findBooksByAuthor").setParameter("author", author).getResultList();
| Book[] books = new Book[list.size()];
| for (int i = 0; i < list.size(); i++) {
| books = list.get(i);
| }
| return books;
| }
|
| }
|
|
Am I missing anything here ?
thanks in advance.
Mayuresh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232625#4232625
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232625
17 years, 2 months
[Installation, Configuration & DEPLOYMENT] - Static variable gets shared in 2 applications
by sada1977
Hi,
I have two turbine appliactions deployed in JBoss 4.0.4GA default profile. Actually turbine jar is packaged seperately in 2 ears but still static variables in turbine servlet are getting shared between 2 applications.
I have added jboss-app.xml in meta-inf of both ear files e.g.
<jboss-app>
<loader-repository>
test:loader=test.ear
<loader-repository-config>
java2ParentDelegation=false
</loader-repository-config>
</loader-repository>
</jboss-app>
After adding above, applications are not getting deployed. It throws exception like,
java.lang.NoClassDefFoundError: java/lang/Object
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:672)
at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:652)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
I am not getting why this is not working?
Can anybody gives solution?
If I add above jboss-app.xml for test applications having only servlet(common to both) then it works fine (static var is not getting shared). But it doesn't work for my turbine application where there are too many jars ejbs etc.
Please give suggestions if anybody has.
Thanks in advance.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232621#4232621
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232621
17 years, 2 months
[JNDI/Naming/Network] - JNDI Entries Disappear Randomly in 4.2.3/4.3 (Bug?)
by jthinaka
Problem Statement
After a server is running for a while, JNDI entries will randomly disappear. This doesn't allow other JBoss servers to look up queues and topics.
Problem Symptoms
1. Clients will get random "ConnectionFactory" not bound errors (when they've already gotten that look up before.
2. They will get a reference to ConnectionFactory, but will get Queue not bound errors. Again this is after it's already been working for a while.
3. Any shutdown using shutdown.sh will result in RMIAdapter not bound errors forcing to do a kill -9 on the server process.
Problem Resolution
Restart server until the problem happens again.
Where Help is Needed
This is clearly a major issue. Our application is massively distributed with batch and online aspects. At any given time we have about twenty + clients (stand alone Java clients as well as Jboss servers) connecting to one batch-processor. They all queue batch requests to this server and things start failing smack dab in the middle of production (and the day). This problem has appeared in 4.3, 4.2.2 and 4.2.3 (we actually rolled back to 4.2.3 but for different reasons we can go into later). As I mentioned, restart of the batch processor fixes the problem.
What makes this problem very hard to debug is that it happens after things have been running good for a while. Suddenly we'll get those errors, and from the client perspective it makes sense, because those JNDI entries are missing from the JNDIView JMX Bean.
Can any body shed some light on this?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232603#4232603
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232603
17 years, 2 months
[EJB 3.0] - @Resource(name =
by cpslo1999
I've been searching the 'net trying to find out how to use in JBoss 5.0.1.GA.
@Resource(name = "some/name")
However, all of the examples show the annotation used this way:
@Resource(mappedName = "some/jndi/name")
Also, the specification says that mappedName is a provider specific attribute, app servers aren't required to even implement it, and that it is absolutely not portable. All sound like good reasons to avoid using mappedName.
Since I can't seem to find any instructions (and guessing hasn't given me any results either), I'll ask. Is there a way to use the name form of the @Resource annotation in JBoss? If so, where can I discover (or configure) the name of the JMS topic I'm trying to inject?
Thanks,
Josh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232598#4232598
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232598
17 years, 2 months
[JBossWS] - JBossWS client not sending Basic Authentication
by leobaz2
Hi, I have a web service client that is trying to call a webservice secured with basic authentication. I had this working with JAVA 6 but not with JAVA 5.
I am setting the username and password correctly as seen below but I am still getting a 401 error code back. When I used tcpmon to inspect the request\response, I can see that the username and password is not being passed to the client.
| Map requestContext = ((BindingProvider) manager).getRequestContext();
| requestContext.put(BindingProvider.USERNAME_PROPERTY, username);
| requestContext.put(BindingProvider.PASSWORD_PROPERTY, password);
|
When I debug, I can see that the web service proxy has the username and password in its Map. So why are they not being sent along with the webservice call? Does it have something to do with the versions of the Jars I am using? I am using JBoss 4.2.3 and the jars are.
| jboss\client\xmlsec.jar
| jboss\client\jboss-jaxws.jar
| jboss\client\jbossws-client.jar
| jboss\client\jboss-common-client.jar
| jboss\lib\endorsed\serializer.jar
| jboss\lib\endorsed\xalan.jar
| jboss\lib\endorsed\xercesImpl.jar
| commons-validator
| commons-logging-api
| <my client stubs jar> created using jwsc ant task
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232592#4232592
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232592
17 years, 2 months
[JBoss Messaging] - ClassCastException looking up ConnectionFactory
by markstrecker
Hello,
I'm trying to get the P2P example working so that my webapp(running in JBoss 4.2.3) can write and consume messages. I used the example from the JBoss docs (http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Se...) and when I start the webapp and execute my JNDI lookup, I get this error :
java.lang.ClassCastException: org.jboss.mq.SpyConnectionFactory cannot be cast to javax.jms.QueueConnectionFactory
So, I change it to a SpyConnectionFactory and get a similar error about SpyQueue. I change that and then get this :
| java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/web/tomcat/service/WebAppClassLoader) previously initiated loading for a different type with name "javax/jms/QueueConnection"
| java.lang.ClassLoader.defineClass1(Native Method)
| java.lang.ClassLoader.defineClass(Unknown Source)
| java.security.SecureClassLoader.defineClass(Unknown Source)
| org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1814)
| org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
| org.jboss.web.tomcat.service.WebAppClassLoader.findClass(WebAppClassLoader.java:75)
| org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
| org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
| java.lang.ClassLoader.loadClassInternal(Unknown Source)
|
Here's the original version of my code.
| package test.jms;
|
| import javax.jms.JMSException;
| import javax.jms.Queue;
| import javax.jms.QueueConnection;
| import javax.jms.QueueConnectionFactory;
| import javax.jms.QueueReceiver;
| import javax.jms.QueueSender;
| import javax.jms.QueueSession;
| import javax.jms.TextMessage;
| import javax.naming.InitialContext;
| import javax.naming.NamingException;
|
| public class QueueSetup
| {
| public void sendRecvAsync(String text) throws JMSException, NamingException
| {
| InitialContext iniCtx = new InitialContext();
| Object tmp = iniCtx.lookup("ConnectionFactory");
| QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
| QueueConnection conn = qcf.createQueueConnection();
| Queue que = (Queue) iniCtx.lookup("queue/A");
| QueueSession session = conn.createQueueSession(false,
| QueueSession.AUTO_ACKNOWLEDGE);
| conn.start();
|
| // Set the async listener
| QueueReceiver recv = session.createReceiver(que);
| recv.setMessageListener(new MyMessageListener());
|
| // Send a text msg
| QueueSender send = session.createSender(que);
| TextMessage tm = session.createTextMessage("This is a test");
| send.send(tm);
| send.close();
| }
| }
|
Any ideas about what's wrong?(I did try java:JmsXA with similar results) Is there some setup that I missed?
TIA
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232574#4232574
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232574
17 years, 2 months