3 Replies Latest reply on Aug 23, 2009 10:49 AM by jaikiran pai

    LinkageError during quartz job execution

    Joe W Newbie

      I am using quartz with JBoss AS 5.1.0. When I am running with a single node in my partition (cluster) all quartz jobs work fine. But when I start up a second node suddenly one or more quartz jobs begin to encounter this exception:

      java.lang.LinkageError: Class com/squaretrade/locator/JMSResourceName violates loader constraints
      .

      This code was working fine with JBoss 4.0.5.

      I have posted the log output at the end of this message.

      I have checked that the class being referenced in the LinkageError (JMSResourceName) is not included in more than one place in my ear file and that it is not found in the client, common or server library folders. JMSResourceName is an enum that is included in a single jar file that is contained in the in the ear file. It is also contained in a jar file that is found in a sar file but the sar file is deployed in the deploy-ha directory and the ear file is deployed in the deploy directory; each is in a separate classloader so I doubt that is the problem (also, there are numerous other classes found in both of the aforementioned ear and sar files and there are no issues with those classes).

      Another oddity is that there have been some times when this issue has not surfaced (though most of the time it does). Also, the quartz job that encouters the error is not necessarily the same one each time (e.g., quartz job 1 may encounter the error while quartz job 2 is fine; then after I shut both servers down and restart them again quartz job 2 may get the error this time while quartz job 1 may be fine).

      I have followed the instructions outlined in http://www.jboss.org/community/wiki/ClassCastExceptions to find the duplicate deployment but the output showed that it was "Not loaded in repository cache".

      The quartz rar is included in my ear file only; I had to remove it from the deploy directory for JBoss due to class loading issues that I saw when trying to use quartz.

      Thanks for any help in this matter.

      ERROR [DefaultQuartzScheduler_Worker-8][2009-08-21 14:24:00,110][org.jboss.aspects.tx.TxPolicy] Logger.java(408): javax.ejb.EJBTransactionRolledbackException: Unexpected Error
      java.lang.LinkageError: Class com/squaretrade/locator/JMSResourceName violates loader constraints
       at java.lang.Class.getDeclaredMethods0(Native Method)
       at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
       at java.lang.Class.getDeclaredMethod(Class.java:1907)
       at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1354)
       at java.io.ObjectStreamClass.access$1700(ObjectStreamClass.java:52)
       at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:421)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
       at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
       at java.io.ObjectStreamClass.initProxy(ObjectStreamClass.java:491)
       at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1508)
       at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)
       at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
       at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
       at org.jboss.remoting.Client.invoke(Client.java:1724)
       at org.jboss.remoting.Client.invoke(Client.java:629)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:84)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at at org.jboss.aspects.remoting.ClusteredPojiProxy.invoke(ClusteredPojiProxy.java:79)
       at $Proxy564.createProxyBusiness(Unknown Source)
       at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
       at org.jboss.ejb3.proxy.clustered.objectfactory.session.SessionClusteredProxyObjectFactory.getProxy(SessionClusteredProxyObjectFactory.java:87)
       at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
       at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
       at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
       at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1346)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:817)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
       at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
       at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:89)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:61)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:89)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:83)
       at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:74)
       at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1086)
       at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:83)
       at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:73)
       at org.jboss.ejb3.pool.StrictMaxPool.get(StrictMaxPool.java:146)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
       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:80)
       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.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:270)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)
       at $Proxy828.execute(Unknown Source)
       at org.jboss.resource.adapter.quartz.inflow.QuartzJob.execute(QuartzJob.java:57)
       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      
      ERROR [DefaultQuartzScheduler_Worker-8][2009-08-21 14:24:00,111][org.quartz.core.JobRunShell] JobRunShell.java(212): Job default.WarrantyNonTransactionalFirstTimeRetailEmailRequeueingOperation t
      hrew an unhandled Exception:
      javax.ejb.EJBTransactionRolledbackException: Unexpected Error
      java.lang.LinkageError: Class com/squaretrade/locator/JMSResourceName violates loader constraints
       at java.lang.Class.getDeclaredMethods0(Native Method)
       at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
       at java.lang.Class.getDeclaredMethod(Class.java:1907)
       at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1354)
       at java.io.ObjectStreamClass.access$1700(ObjectStreamClass.java:52)
       at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:421)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
       at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
       at java.io.ObjectStreamClass.initProxy(ObjectStreamClass.java:491)
       at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1508)
       at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)
       at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
       at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
       at org.jboss.remoting.Client.invoke(Client.java:1724)
       at org.jboss.remoting.Client.invoke(Client.java:629)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:84)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ClusteredPojiProxy.invoke(ClusteredPojiProxy.java:79)
       at $Proxy564.createProxyBusiness(Unknown Source)
       at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
       at org.jboss.ejb3.proxy.clustered.objectfactory.session.SessionClusteredProxyObjectFactory.getProxy(SessionClusteredProxyObjectFactory.java:87)
       at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
       at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
       at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
       at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1346)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:817)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
       at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
       at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:89)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:61)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:89)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:83)
       at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:74)
       at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1086)
       at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:83)
       at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:73)
       at org.jboss.ejb3.pool.StrictMaxPool.get(StrictMaxPool.java:146)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
       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:80)
       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.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:270)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)
       at $Proxy828.execute(Unknown Source)
       at org.jboss.resource.adapter.quartz.inflow.QuartzJob.execute(QuartzJob.java:57)
       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:105)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
       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:80)
       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.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:270)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)
       at $Proxy828.execute(Unknown Source)
       at org.jboss.resource.adapter.quartz.inflow.QuartzJob.execute(QuartzJob.java:57)
       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      ERROR [DefaultQuartzScheduler_Worker-8][2009-08-21 14:24:00,113][org.quartz.core.ErrorLogger] QuartzScheduler.java(2015): Job (default.WarrantyNonTransactionalFirstTimeRetailEmailRequeueingOpera
      tion threw an exception.
      org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: javax.ejb.EJBTransactionRolledbackException: Unexpected Error
      java.lang.LinkageError: Class com/squaretrade/locator/JMSResourceName violates loader constraints
       at java.lang.Class.getDeclaredMethods0(Native Method)
       at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
       at java.lang.Class.getDeclaredMethod(Class.java:1907)
       at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1354)
       at java.io.ObjectStreamClass.access$1700(ObjectStreamClass.java:52)
       at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:421)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
       at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
       at java.io.ObjectStreamClass.initProxy(ObjectStreamClass.java:491)
       at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1508)
       at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)
       at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
       at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
       at org.jboss.remoting.Client.invoke(Client.java:1724)
       at org.jboss.remoting.Client.invoke(Client.java:629)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:84)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ClusteredPojiProxy.invoke(ClusteredPojiProxy.java:79)
       at $Proxy564.createProxyBusiness(Unknown Source)
       at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
       at org.jboss.ejb3.proxy.clustered.objectfactory.session.SessionClusteredProxyObjectFactory.getProxy(SessionClusteredProxyObjectFactory.java:87)
       at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
       at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
       at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
       at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1346)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:817)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
       at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
       at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:89)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:61)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:89)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:83)
       at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:74)
       at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1086)
       at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:83)
       at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:73)
       at org.jboss.ejb3.pool.StrictMaxPool.get(StrictMaxPool.java:146)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
       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:80)
       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.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:270)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)
       at $Proxy828.execute(Unknown Source)
       at org.jboss.resource.adapter.quartz.inflow.QuartzJob.execute(QuartzJob.java:57)
       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      ]
       at org.quartz.core.JobRunShell.run(JobRunShell.java:214)
       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      * Nested Exception (Underlying Cause) ---------------
      javax.ejb.EJBTransactionRolledbackException: Unexpected Error
      java.lang.LinkageError: Class com/squaretrade/locator/JMSResourceName violates loader constraints
       at java.lang.Class.getDeclaredMethods0(Native Method)
       at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
       at java.lang.Class.getDeclaredMethod(Class.java:1907)
       at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1354)
       at java.io.ObjectStreamClass.access$1700(ObjectStreamClass.java:52)
       at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:421)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
       at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
       at java.io.ObjectStreamClass.initProxy(ObjectStreamClass.java:491)
       at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1508)
       at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)
       at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
       at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
       at org.jboss.remoting.Client.invoke(Client.java:1724)
       at org.jboss.remoting.Client.invoke(Client.java:629)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:84)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ClusteredPojiProxy.invoke(ClusteredPojiProxy.java:79)
       at $Proxy564.createProxyBusiness(Unknown Source)
       at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
       at org.jboss.ejb3.proxy.clustered.objectfactory.session.SessionClusteredProxyObjectFactory.getProxy(SessionClusteredProxyObjectFactory.java:87)
       at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
       at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
       at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
       at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1346)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:817)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
       at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
       at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:89)
       at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:61)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:89)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:83)
       at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
       at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:74)
       at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1086)
       at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:83)
       at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:73)
       at org.jboss.ejb3.pool.StrictMaxPool.get(StrictMaxPool.java:146)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
       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:80)
       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.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:270)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)
       at $Proxy828.execute(Unknown Source)
       at org.jboss.resource.adapter.quartz.inflow.QuartzJob.execute(QuartzJob.java:57)
       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:105)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
       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:80)
       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.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:270)
       at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)
       at $Proxy828.execute(Unknown Source)
       at org.jboss.resource.adapter.quartz.inflow.QuartzJob.execute(QuartzJob.java:57)
       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      


      [/url]

        • 1. Re: LinkageError during quartz job execution
          Joe W Newbie

          Also worth noting is that I have included jboss-app.xml in my ear file with the following loader-repository tag:

          <jboss-app>
           <loader-repository>
           app:loader=batch.ear
           </loader-repository>
          </jboss-app>
          



          • 2. Re: LinkageError during quartz job execution
            Joe W Newbie

            I also tried updating the file ear-deployer-jboss-beans.xml so that "EARClassLoaderDeployer" is set to true. Still the same, LinkageError.

            • 3. Re: LinkageError during quartz job execution
              jaikiran pai Master

               

              I have checked that the class being referenced in the LinkageError (JMSResourceName) is not included in more than one place in my ear file and that it is not found in the client, common or server library folders. JMSResourceName is an enum that is included in a single jar file that is contained in the in the ear file. It is also contained in a jar file that is found in a sar file but the sar file is deployed in the deploy-ha directory and the ear file is deployed in the deploy directory; each is in a separate classloader so I doubt that is the problem (also, there are numerous other classes found in both of the aforementioned ear and sar files and there are no issues with those classes).


              Difficult to identify the issue when so many factors are involved. Let's start with an simple application in the "default" server configuration which does not involve the deploy-ha folder and take it from there. When exactly does this exception happen? Do you have a EJB3 MDB configured to receive quartz messages?