0 Replies Latest reply on Jul 18, 2005 4:45 PM by Karl Koster

    Class xxx violates loader constraints in a farm environment

    Karl Koster Newbie

      I am getting the following stack trace from a "secondary" instance of JBoss in a clustered/farmed environment.

      
      16:25:58,659 INFO [STDOUT] java.lang.LinkageError: Class com/amaranth/date/Hour violates loader constraints
      16:25:58,659 INFO [STDOUT] at com.amaranth.date.Hour.getStartTime(Hour.java:61)
      16:25:58,659 INFO [STDOUT] at com.amaranth.date.DefaultTimeRange.<init>(DefaultTimeRange.java:56)
      16:25:58,659 INFO [STDOUT] at com.amaranth.date.AbstractTimeRange.<clinit>(AbstractTimeRange.java:24)
      16:25:58,659 INFO [STDOUT] at jrockit.reflect.InitialConstructorInvoker.newInstance([Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
      16:25:58,659 INFO [STDOUT] at java.lang.reflect.Constructor.newInstance([Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
      16:25:58,659 INFO [STDOUT] at java.beans.Statement.invoke(Statement.java:257)
      16:25:58,659 INFO [STDOUT] at java.beans.Expression.getValue(Expression.java:98)
      16:25:58,659 INFO [STDOUT] at com.sun.beans.MutableExpression.getValue(ObjectHandler.java:400)
      16:25:58,659 INFO [STDOUT] at com.sun.beans.ObjectHandler.getValue(ObjectHandler.java:106)
      16:25:58,659 INFO [STDOUT] at com.sun.beans.ObjectHandler.endElement(ObjectHandler.java:327)
      16:25:58,659 INFO [STDOUT] at org.apache.xerces.parsers.AbstractSAXParser.endElement(Lorg.apache.xerces.xni.QName;Lorg.apache.xerces.xni.Augmentations;)V(Unknown Source)
      16:25:58,659 INFO [STDOUT] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement()I(Unknown Source)
      16:25:58,659 INFO [STDOUT] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z(Unknown Source)
      16:25:58,659 INFO [STDOUT] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z(Unknown Source)
      16:25:58,659 INFO [STDOUT] at org.apache.xerces.parsers.XML11Configuration.parse(Z)Z(Unknown Source)
      16:25:58,659 INFO [STDOUT] at org.apache.xerces.parsers.XML11Configuration.parse(Lorg.apache.xerces.xni.parser.XMLInputSource;)V(Unknown Source)
      16:25:58,659 INFO [STDOUT] at org.apache.xerces.parsers.XMLParser.parse(Lorg.apache.xerces.xni.parser.XMLInputSource;)V(Unknown Source)
      16:25:58,659 INFO [STDOUT] at org.apache.xerces.parsers.AbstractSAXParser.parse(Lorg.xml.sax.InputSource;)V(Unknown Source)
      16:25:58,659 INFO [STDOUT] at javax.xml.parsers.SAXParser.parse(Lorg.xml.sax.InputSource;Lorg.xml.sax.HandlerBase;)V(Unknown Source)
      16:25:58,659 INFO [STDOUT] at javax.xml.parsers.SAXParser.parse(Ljava.io.InputStream;Lorg.xml.sax.HandlerBase;)V(Unknown Source)
      16:25:58,659 INFO [STDOUT] at java.beans.XMLDecoder.readObject(XMLDecoder.java:205)
      16:25:58,659 INFO [STDOUT] at com.amaranth.market.MarketManagementBean.getMarkets(MarketManagementBean.java:115)
      16:25:58,659 INFO [STDOUT] at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
      16:25:58,659 INFO [STDOUT] at jrockit.reflect.InitialMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
      16:25:58,659 INFO [STDOUT] at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
      16:25:58,659 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:99)
      


      The sequence of events is as follows:
      Start the primary JBoss server.
      Start the secondary JBoss server.
      Deploy ejb3 jars to primary server. (deployment is successful on secondary)
      Run test application. (hits the primary server and completes successfully)
      Kill the primary JBoss server.
      Run the application again (hits the secondary server and gets the exception.)

      The line number in question is instantiating another object that resides in the same archive as the class throwing the exception. Since the application ran on the "primary" server and the deployment to the secondary server iwas successful, I am assuming that the secondary's archive is identical to the primary's.

      Any ideas?