1 Reply Latest reply on Jan 31, 2012 12:26 PM by ejroberts

    Jboss7.1 SAR module loading issue

    pushpak1981

      hi

      i am having an SAR which uses hibernate libraries. This SAR is directly deployed into JBoss/standalone/deployments folder.

       

      jboss-deployment-structure.xml structure is

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-deployment-structure>

          <deployment>

              <dependencies>                       

                   <module name="org.hibernate" export="true"/>     

              <module name="org.hibernate.validator" export="true" />

                  <module name="deployment.module.nested" export="true" />           

              </dependencies>

             

             

          </deployment>

          <module name="deployment.module.nested">

              <resources>

                  <resource-root path="jbpm-jboss.jar"/>

                  <resource-root path="jbpm.jar"/>

                  <resource-root path="jbpm-service-sar.jar"/>

              </resources>

          </module>

      </jboss-deployment-structure>

       

      the service is loaded properly through jboss-service.xml file but throws the following exception.

       

       

      Caused by: java.lang.NoClassDefFoundError: org/hibernate/StaleStateException

              at java.lang.Class.forName0(Native Method) [:1.6.0_03]

              at java.lang.Class.forName(Class.java:169) [:1.6.0_03]

              at org.jbpm.pvm.internal.util.ReflectUtil.classForName(ReflectUtil.java:440)

              at org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.getType(ObjectDescriptor.java:241)

              at org.jbpm.pvm.internal.wire.WireDefinition.addDescriptor(WireDefinition.java:88)

              at org.jbpm.pvm.internal.wire.xml.WireParser.parseDocumentElement(WireParser.java:208)

              at org.jbpm.pvm.internal.cfg.ConfigurationParser.parseDocument(ConfigurationParser.java:101)

              at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:432)

              at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:158)

              at org.jbpm.pvm.internal.cfg.ConfigurationParser.parseDocument(ConfigurationParser.java:86)

              at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:432)

              at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:158)

              at org.jbpm.pvm.internal.cfg.ConfigurationImpl.parse(ConfigurationImpl.java:137)

              at org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:116)

              at org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:50)

              at org.jbpm.api.Configuration.setResource(Configuration.java:79)

              at org.jbpm.api.Configuration.getProcessEngine(Configuration.java:126)

              at org.jbpm.jboss.internal.JbpmService.start(JbpmService.java:39)

              ... 13 more

       

      Somehow it is not able to find hibernate module and its classes. Is there any issue with the SAR and jboss-deployment-structure.xml ?