1 2 3 Previous Next 33 Replies Latest reply on Jun 12, 2013 7:32 AM by chandrasachin16

    Problems deploying my older application on Jboss 7 (Failed to define class)

    chandrasachin16

      Hi community,

       

      First of all thanks for replying my previous questions. I am facing a new problem while deploying my older application on jboss 7. I am getting an error---  Failed to define class com.sun.xml.txw2.NamespaceSupport in Module "com.sun.xml.bind:main"

       

      Earlier I was facing problem with some dependencies so I added the following

       

      Dependencies: org.apache.cxf services,org.jboss.ws.cxf.jbossws-cxf-client services export,com.sun.xml.bind services in MANIFEST.MF but didnt solve the problem.

       

      My worry is even if I add the dependency as  com.sun.xml.bind services but still it is not able to find the class

      class com.sun.xml.txw2.NamespaceSupport

       

      Please find server logs below---------------

       

      11:19:04,802 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-1) Add Service

      id=B2MMLInterfaceBean

      address=http://localhost:3390/servicelayer/B2MMLInterfaceBean

      implementor=com.company.servicelayer.interfacemanager.B2MMLInterfaceBean

      invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker

      serviceName={http://interfacemanager.servicelayer.company.com/}B2MMLInterfaceBeanService

      portName={http://interfacemanager.servicelayer.company.com/}B2MMLInterfaceBeanPort

      wsdlLocation=null

      mtomEnabled=false

      properties=[org.jboss.as.webservices.metadata.modelEjbComponentViewName -> service jboss.deployment.subunit."xmes.ear"."servicelayer.jar".component.B2MMLInterfaceBean.VIEW."com.company.servicelayer.interfacema

      11:19:05,153 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-1) Creating Service {http://interfacemanager.servicelayer.company.com/}B2MMLInterfaceBeanService from class

      11:19:10,656 WARN  [org.jboss.modules] (MSC service thread 1-1) Failed to define class com.sun.xml.txw2.NamespaceSupport in Module "com.sun.xml.bind:main" from local module loader @431d9d (roots: D:\trunkV79JBoss

              at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0]

              at java.lang.ClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0]

              at java.security.SecureClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0]

              at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)

              at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)

              at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)

              at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

              at org.jboss.modules.Module.loadModuleClass(Module.java:517)

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

              at com.sun.xml.txw2.Document.<init>(Document.java:83) [jaxb-impl-2.2.4.jar:2.2.4]

              at com.sun.xml.txw2.TXW.create(TXW.java:108) [jaxb-impl-2.2.4.jar:2.2.4]

              at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeTo(XmlSchemaGenerator.java:610) [jaxb-impl-2.2.4.jar:2.2.4]

       

      Can any body please guide me on this .

       

      Sachin

        • 1. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
          nickarls

          list all jars bundled with your application, perhaps there is some conflict...

          • 2. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
            chandrasachin16

            Hi ,

             

            There are lot many jars in the lib folder of my application's ear  file out of which I am listing a few-

             

            jaxb-impl-1.0.6.jar

            jboss-client-7.1.0.Final.jar

            jaxen-full.jar

            wsdl4j-1.5.1.jar

            asm-attrs-1.5.3.jar

            bcel-5.1-jnbridge.jar

            jaxb-xjc-1.0.6.jar

            jaxbcommons-core-1.0.3.jar

            commons-codec-1.3.jar

            jaxp-ri-1.4.jar

            axis.jar

            jaxp-api-1.4.jar

             

            There are jaxb jars. Do you mean this might cause problem ?

             

            Sachin

            • 3. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
              nickarls

              Probably. Try taking out all XML related JARs from the deployment.

              • 4. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                chandrasachin16

                Hi ,

                 

                I tried to remove a single jar from the lib folder ( jaxb-impl-1.0.6.jar ) and came across many exceptions at the very beginning of ear deployment

                 

                    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0]

                Caused by: java.lang.NoClassDefFoundError: com/sun/xml/bind/RIElement

                    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0]
                    at java.lang.ClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0]
                    at java.security.SecureClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0]
                    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]
                    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]
                    ... 22 more

                Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.RIElement from [Module "deployment.xmes.ear.mes-engine.jar:main" from Service Module

                    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
                    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
                    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
                    ... 27 more

                 

                Keeping this  jar ( jaxb-impl-1.0.6.jar ) as it is the lib folder doesn't gives me this error at least and the deployment starts, starts the mdb also, but at some point later, I get the below error

                Failed to define class com.sun.xml.txw2.NamespaceSupport.

                 

                My schema is built using jaxb1 and hyperjaxb2 (was working in jboss 5). I was earlier facing couple of issues, like not able to find ObjectFactory Class while creating Jaxb instance(jaxb instance gets created during ear deployment ) but doing code changes and passing the right class loader fixed the problem.That means that even I have old jars of jaxb, still I am able to create jaxb instance during ear deployment. I am bit confused.

                 

                Sachin

                • 5. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                  sfcoy

                  You must remove all of the marked jars, otherwise you won't have much chance of getting this to work. Are you really using axis as well?

                   

                  *jaxb-impl-1.0.6.jar

                  *jboss-client-7.1.0.Final.jar

                  jaxen-full.jar

                  wsdl4j-1.5.1.jar

                  asm-attrs-1.5.3.jar

                  bcel-5.1-jnbridge.jar

                  *jaxb-xjc-1.0.6.jar

                  *jaxbcommons-core-1.0.3.jar

                  commons-codec-1.3.jar

                  *jaxp-ri-1.4.jar

                  axis.jar

                  *jaxp-api-1.4.jar

                   

                  Simple removing one of them may well make things worse.

                   

                  The jboss-client jar is also completely redundant.

                  • 6. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                    chandrasachin16

                    Hi Stephen,

                     

                    I tried with what you suggested. I removed all the jars from the lib folder of ear file(no jaxb jars,no axis jars), and tried to deploy my ear but unfortunately got  the very same errors at the beginning

                     

                       at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
                       at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.0.Final.jar:7.1.0.Fi
                       at org.jboss.as.server.deployment.reflect.ClassReflectionIndexUtil.findMethod(ClassReflectionIndexUtil.java:52) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
                       at org.jboss.as.ejb3.deployment.processors.dd.DeploymentDescriptorMethodProcessor.handleStatelessSessionBean(DeploymentDescriptorMethodProcessor.java:99)
                       at org.jboss.as.ejb3.deployment.processors.dd.DeploymentDescriptorMethodProcessor.deploy(DeploymentDescriptorMethodProcessor.java:76)
                       at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
                       at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                       at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                       at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0]
                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0]
                       at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0]

                    aused by: java.lang.NoClassDefFoundError: com/sun/xml/bind/RIElement

                       at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0]
                       at java.lang.ClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0]
                       at java.security.SecureClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0]
                       at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]
                       at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]
                       ... 22 more

                    aused by: java.lang.ClassNotFoundException: com.sun.xml.bind.RIElement from [Module "deployment.xmes.ear.mes-engine.jar:main" from Service Module Loader]

                       at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
                       at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
                       at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
                       at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
                       at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
                       ... 27 more

                     

                    0:05:58,505 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named B2MM

                     

                    This error seems to me is because, I don't have jaxb-impl-1.0.6 jar and related jars in my ear.

                    I have few questions in my mind might be silly, but still wan't to ask.

                     

                    1. The schema and mapping of java objects to database( in our product) is built on using jaxb1 and hyperjaxb2 using ant script. As I see in jboss 7 modules folder there are jaxb2 jars. Does this support? If really it does support what needs to be done? Does removing the jars from lib folder solve the purpose or still I need to do some work around.

                     

                    2. Second question related to this "Failed to define class com.sun.xml.txw2.NamespaceSupport in Module "com.sun.xml.bind:main" from local module loader" as in the starting of discussion. This occurs while  service for webservice gets started as I can see from the logs.Here there is a problem with version basically the jaxb jar version conflict as you mentioned, might be other jars as well . If this is happening during the start up of webservice then why this version conflict is not happening prior to start up of webservice when one of my static method in a class  creates a jaxb instance. It should  have also given error related to version conflict.

                    My Code ---   JAXBContext jaxbContext = JAXBContext.newInstance("com.performix.schemas.core",MesEnvironment.class.getClassLoader());  // This is what the static method in MesEnvironment class does.

                    I remove the jaxb1 jars and other jars and every thing is a mess. I add this jar and starts fine until it gives error when starting webservices.

                     

                    3. The webservices which are built using the following jars when we do the full build using ant (axis*.jar,jaxrpc*.jar,wsdl*.jar,commons-discovery*.jar,saaj*.jar). Do I need to change the jars also to create the webservies as per the jboss 7 ,or building webservices using the same old jars will work fine on jboss 7 specific jars.Also do I need to add this dependency in MANIFEST.MF

                    Dependencies: org.jboss.ws.cxf.jbossws-cxf-client services export,com.sun.xml.bind services export,org.apache.cxf services.

                    Is this really needed because I didn't find solution from using this.

                    My complete list of jars is as below-----------

                     

                    xsdlib-20060615.jar, xmlparserv2.jar, xMES_B2MMLClasses.jar, xbatchproxy.jar, wsdl4j-1.5.1.jar, wsdl4j-1.5.1.jar ,saxpath.jar, saxon-dom-8.7.jar, saxon-8.7.jar, saaj.jar, relaxngDatatype-20020414.jar, qdox.jar, PDFRenderer.jar, ojdbc14.jar ,namespace-1.0.1.jar,mes-workstep.jar ,MESEngineClient.jar, lwconnv2.jar, jtds-1.2.2.jar, jta-1.0.1B.jar, jstl-1.1.0.jar,  jopcbridge.jar , jnbcore.jar ,jconvert-1.0.9.jar ,jcifs-1.3.17.jar, jaxrpc.jar, jaxp-api-1.4.jar ,jax-qname-1.1.jar, jaxp-ri-1.4.jar ,jaxmexs.jar ,jaxen-full.jar ,jaxmeapi.jar , jaxme2.jar , jaxb-xjc-1.0.6.jar ,jaxb-libs-1.0.6.jar , jaxb-impl-1.0.6.jar ,jaxbcommons-testing-1.0.3.jar ,jaxbcommons-shared-1.0.3.jar, jaxbcommons-core-1.0.3.jar,jaxb-api-1.0.jar, janino.jar ,iTextAsian.jar, iText-2.1.3.jar , isorelax-20030108.jar ,hyperjaxb2-testing-0.6.0.jar ,hyperjaxb2-shared-0.6.0.jar, hyperjaxb2-hibernate-mapping-0.6.0.jar , hyperjaxb2-hibernate-customizations-0.6.0.jar , hyperjaxb2-core-0.6.0.jar, hsqldb-1.7.3.3.jar, hibernate3.jar, commons-logging-1.0.4.jar, commons-lang-2.1.jar, commons-io-1.2.jar, commons-httpclient-3.1.jar, commons-digester-1.6.jar, commons-discovery-0.4.jar,commons-collections-3.1.jar,commons-codec-1.3.jar, cglib-2.1_3.jar,bcel-5.1-jnbridge.jar, axis.jar, asm-attrs-1.5.3.jar, asm-1.5.3.jar, antlr-2.7.6rc1

                     

                     

                    Regards

                    Sachin

                    • 7. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                      nickarls

                      The deployment is still a mess ;-)

                       

                      You have lots of xml-related files in there, JBDC drivers, hibernate, other WS implementations. Start from scratch. List those jars you *really* import in your own code.

                      • 8. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                        chandrasachin16

                        Hi ,

                         

                        Out of these jars the one which I definitely need are

                         

                        xMES_B2MMLClasses.jar

                        mes-workstep.jar

                        MESEngineClient.jar

                        jopcbridge.jar

                        mes-xbatchSql.jar (missed this jar to add in my write up)

                        xbatchproxy.jar

                         

                        These are the jars which are our custom defined and these are required by our ear. Rest of the jars are xml related and are used at runtime. But it might be that some of the jars are not used at all at runtime.This product was designed long back and so some of the jars were added and not removed, of which I am not sure why they were added.Since it was working fine with Jboss 5, it remained there as it is.  I will try to figure out the necessay jars which are required and remove the jars which are not required at all.

                         

                        Regards

                        Sachin

                        • 9. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                          chandrasachin16

                          Hi ,

                           

                          I tried to figure out the jars required and also tried a different approach to tackle the class version problems. I kept the custom defined jars in the lib folder of ear and removed the other jars (xml related jars,web service related jars) and created a custom module and added these jars in this module and loaded it using jboss-deployment-structure.xml and removed all the dependencies from MANIFEST.MF. I didn't get the previous error but I am facing some issues of missing dependencies while deploying my ear on jboss 7 going through which I am not able to understand what exactly it is.My application is using ejb2 which are exposed through webservice, so I am using Jboss 7 (version 7.1.0). I have my ejb-jar.xml and jboss.xml.The ejb's do get started properly . The server log error is as below---

                           

                          17:43:16,547 INFO  [org.jboss.as.webservices] (MSC service thread 1-3) JBAS015540: Stopping service jboss.ws.port-component-link

                          17:43:16,608 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment mes-engine.jar in 265ms

                          17:43:16,611 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment OperatorUI_EJB.jar in 268ms

                          17:43:16,648 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment servicelayer.jar in 305ms

                          17:43:17,004 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment OperatorUI_Services.war in 661ms

                          17:43:19,886 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment adminui.war in 3542ms

                          17:43:20,702 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment xmes.ear in 4360ms

                          17:43:20,705 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

                          JBAS014775:    New missing/unsatisfied dependencies:

                                service jboss.naming.context.java.jboss.resources.ConnectionFactory (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.PlanMgrMessageRouter".env.ConnectionFactory, service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.OpcMessageRouter".env.ConnectionFactory, service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.HistoryMessageRouter".env.ConnectionFactory, service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.SystemEventMessageRouter".env.ConnectionFactory, JBAS014799: ... and 6 more ]

                                service jboss.naming.context.java.jboss.resources.jms.topic.xMESTopicPlanMgrMessage (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.PlanMgrMessageRouter".env.jms.topic.xMESTopicPlanMgrMessage]

                                service jboss.naming.context.java.jboss.resources.jms.topic.xMESTopicSystemEventMsg (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.SystemEventMessageRouter".env.jms.topic.xMESTopicSystemEventMsg]

                                service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicEvent (missing) dependents: [service jboss.naming.context.java.comp.xmes.OperatorUI_EJB."com.performix.integration.SystemMessageRouter".env.jms.topic.xMesTopicEvent, service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.EventRouter".env.jms.topic.xMesTopicEvent]

                                service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicEventForMsgToOpUi (missing) dependents: [service jboss.naming.context.java.comp.xmes.OperatorUI_EJB."com.performix.integration.MiniPodMessageRouter".env.jms.topic.xMesTopicEventForMsgToOpUi]

                                service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicHistory (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.HistoryMessageRouter".env.jms.topic.xMesTopicHistory]

                                service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicOpcServer1Read (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.OpcMessageRouter".env.jms.topic.xMesTopicOpcServer1Read]

                                service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicPhaseSignal (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.PhaseMessageRouter".env.jms.topic.xMesTopicPhaseSignal]

                                service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicUi (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.UiMessageRouter".env.jms.topic.xMesTopicUi]

                           

                          17:43:20,749 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" =>

                           

                           

                          The message driven beans are defined in the ejb-jar.xml something like  given below.

                           

                          <message-driven>

                                      <ejb-name>com.performix.mes.integration.SystemEventMessageRouter</ejb-name>

                                      <ejb-class>com.performix.mes.integration.SystemEventMessageRouter</ejb-class>

                                      <messaging-type>javax.jms.MessageListener</messaging-type>

                                      <transaction-type>Bean</transaction-type>

                                      <message-destination-type>javax.jms.Topic</message-destination-type>

                                      <resource-ref>

                                          <description>description</description>

                                          <res-ref-name>ConnectionFactory</res-ref-name>

                                          <res-type>javax.jms.ConnectionFactory</res-type>

                                          <res-auth>Application</res-auth>

                                          <res-sharing-scope>Shareable</res-sharing-scope>

                                      </resource-ref>

                                      <resource-env-ref>

                                          <resource-env-ref-name>jms/topic/xMESTopicSystemEventMsg</resource-env-ref-name>

                                          <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>

                                      </resource-env-ref>

                            </message-driven>

                           

                          and in jboss.xml it is something as given below

                           

                          <message-driven>

                                      <ejb-name>com.performix.mes.integration.OpcMessageRouter</ejb-name>

                                      <destination-jndi-name>topic/xMesTopicOpcServer1Read</destination-jndi-name>

                                      <configuration-name>Singleton Message Driven Bean</configuration-name>

                                      <resource-ref>

                                          <res-ref-name>ConnectionFactory</res-ref-name>

                                          <jndi-name>ConnectionFactory</jndi-name>

                                      </resource-ref>

                                  </message-driven>

                                  <message-driven>

                                      <ejb-name>com.performix.mes.integration.UiMessageRouter</ejb-name>

                                      <destination-jndi-name>topic/xMesTopicUi</destination-jndi-name>

                                      <configuration-name>Singleton Message Driven Bean</configuration-name>

                                      <resource-ref>

                                          <res-ref-name>ConnectionFactory</res-ref-name>

                                          <jndi-name>ConnectionFactory</jndi-name>

                                      </resource-ref>

                                  </message-driven>

                           

                           

                          Regards

                          Sachin

                          • 10. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                            sfcoy

                            jboss.xml is not used in AS7/WildFly.

                             

                            You need to migrate it to the new jboss-ejb3.xml file format, which is similar, but not the same.

                            • 11. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                              chandrasachin16

                              Hi Stephen,

                               

                              My jboss.xml used to have message driven beans as well as session beans defined. I had gone through the link   (https://docs.jboss.org/author/display/AS71/jboss-ejb3.xml+Reference

                              for migrating from jboss.xml to jboss-ejb3.xml. It only discusses about message driven beans,not the sesions beans. I tried to create this file. Please find the attachment and let me know if it's the right way to do.I am also attaching the ejb-jar.xml and jboss-webservices.xml ( removed the webservice.xml with jboss-webservices.xml file since it is not supported in AS 7). May be I am doing something wrong since I get the very same error of missing dependencies.The server log is given below---

                               

                               

                               

                              15:29:18,586 INFO  [com.performix.module.configuration.MesEnvironment] (MSC service thread 1-2) Executing static part.. Adding chars

                              15:29:18,624 INFO  [com.performix.module.configuration.MesEnvironment] (MSC service thread 1-2) Configuration Already Present. Not Adding.

                              15:29:18,626 INFO  [com.performix.module.configuration.MesEnvironment] (MSC service thread 1-2) :: Testing All Methods ::

                              15:29:18,663 INFO  [com.performix.module.configuration.MesEnvironment] (MSC service thread 1-2) Default Chartericstic already created.

                              15:29:18,665 INFO  [com.performix.module.configuration.MesEnvironment] (MSC service thread 1-2) Session Closed in MesEnvironment

                              15:29:18,729 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-2) Add Service

                              id=B2MMLInterfaceBean

                              address=http://localhost:3390/servicelayer/B2MMLInterfaceBean

                              implementor=com.performix.servicelayer.interfacemanager.B2MMLInterfaceBean

                              invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker

                              serviceName={http://interfacemanager.servicelayer.performix.com/}B2MMLInterfaceBeanService

                              portName={http://interfacemanager.servicelayer.performix.com/}B2MMLInterfaceBeanPort

                              wsdlLocation=null

                              mtomEnabled=false

                              properties=[org.jboss.as.webservices.metadata.modelEjbComponentViewName -> service jboss.deployment.subunit."xmes.ear"."servicelayer.jar".component.B2MMLInterfaceBean.VIEW."com.performix.servicelayer.interfacemanager.B2MMLInterfaceBean".SERVICE_ENDPOINT]

                              15:29:19,560 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-2) Creating Service {http://interfacemanager.servicelayer.performix.com/}B2MMLInterfaceBeanService from class com.performix.servicelayer.interfacemanager.B

                              15:29:23,224 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-2) Setting the server's publish address to be http://localhost:3390/servicelayer/B2MMLInterfaceBean

                              15:29:23,684 INFO  [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-2) WSDL published to: file:/D:/trunkV79JBoss7/external/tools/jboss-as-7.1.0.Final/standalone/data/wsdl/xmes.ear/servicelayer.jar/B2MMLInterfaceBeanService.wsdl

                              15:29:23,704 INFO  [org.jboss.as.webservices] (MSC service thread 1-2) JBAS015539: Starting service jboss.ws.port-component-link

                              15:29:23,749 INFO  [org.jboss.as.webservices] (MSC service thread 1-2) JBAS015539: Starting service jboss.ws.endpoint."xmes.ear"."servicelayer.jar".B2MMLInterfaceBean

                              15:29:23,776 INFO  [org.jboss.web] (MSC service thread 1-3) JBAS018210: Registering web context: /servicelayer

                              15:29:23,784 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-2) register: jboss.ws:context=servicelayer,endpoint=B2MMLInterfaceBean

                              15:29:23,788 ERROR [org.jboss.as] (MSC service thread 1-2) JBAS015875: JBoss AS 7.1.0.Final "Thunder" started (with errors) in 122414ms - Started 1312 of 1440 services (38 services failed or missing dependencies, 87 services are passive or on-demand)

                              15:29:23,995 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "xmes.ear" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.xmes.m

                              15:29:24,033 INFO  [org.jboss.as.webservices] (MSC service thread 1-3) JBAS015540: Stopping service jboss.ws.endpoint."xmes.ear"."servicelayer.jar".B2MMLInterfaceBean

                              15:29:24,092 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-3) remove: jboss.ws:context=servicelayer,endpoint=B2MMLInterfaceBean

                              15:29:24,038 INFO  [com.performix.module.integration.systemevent.SystemEventManager] (MSC service thread 1-1) WindowsEventMessage content as - [xMES Server Shutdown at time 31-May-2013 15:29]

                              15:29:24,122 INFO  [org.jboss.as.webservices] (MSC service thread 1-4) JBAS015540: Stopping service jboss.ws.port-component-link

                              15:29:24,127 INFO  [stdout] (MSC service thread 1-1) xMES WARN MSG - Call received for Windows Event = [XMES_SERVER_DOWN]

                              15:29:24,151 WARN  [Evt] (MSC service thread 1-1)  XMES_SERVER_DOWN : xMES Server Shutdown at time 31-May-2013 15:29

                              15:29:24,152 INFO  [stdout] (MSC service thread 1-1) Updated event log time

                              15:29:24,372 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment mes-engine.jar in 374ms

                              15:29:24,374 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment OperatorUI_EJB.jar in 376ms

                              15:29:24,390 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment servicelayer.jar in 392ms

                              15:29:24,875 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment OperatorUI_Services.war in 877ms

                              15:29:27,744 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment adminui.war in 3746ms

                              15:29:28,660 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment xmes.ear in 4664ms

                              15:29:28,663 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

                              JBAS014775:    New missing/unsatisfied dependencies:

                                    service jboss.naming.context.java.jboss.resources.ConnectionFactory (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.PlanMgrMessageRouter".env.ConnectionFactory, service jboss.naming.context.j

                                    service jboss.naming.context.java.jboss.resources.jms.topic.xMESTopicPlanMgrMessage (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.PlanMgrMessageRouter".env.jms.topic.xMESTopicPlanMgrMessage

                                    service jboss.naming.context.java.jboss.resources.jms.topic.xMESTopicSystemEventMsg (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.SystemEventMessageRouter".env.jms.topic.xMESTopicSystemEven

                                    service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicEvent (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.EventRouter".env.jms.topic.xMesTopicEvent, service jboss.naming.cont

                                    service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicEventForMsgToOpUi (missing) dependents: [service jboss.naming.context.java.comp.xmes.OperatorUI_EJB."com.performix.integration.MiniPodMessageRouter".env.jms.topic.xMesTopicEventForMsg

                                    service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicHistory (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.HistoryMessageRouter".env.jms.topic.xMesTopicHistory]

                                    service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicOpcServer1Read (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.OpcMessageRouter".env.jms.topic.xMesTopicOpcServer1Read]

                                    service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicPhaseSignal (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.PhaseMessageRouter".env.jms.topic.xMesTopicPhaseSignal]

                                    service jboss.naming.context.java.jboss.resources.jms.topic.xMesTopicUi (missing) dependents: [service jboss.naming.context.java.comp.xmes.mes-engine."com.performix.mes.integration.UiMessageRouter".env.jms.topic.xMesTopicUi]

                               

                              15:29:28,703 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies

                              => ["jboss.naming.context.java.comp.xmes.mes-engine.\"com.performix.mes.integration.UiMessageRouter\".env.jms.topic.xMesTopicUijboss.naming.context.java.jboss.resources.jms.topic.xMesTopicUiMissing[jboss.naming.context.java.comp.xmes.mes-engine.\"com.

                               

                               

                               

                              As  you can see from the above logs there are some routers defined which are basically message driven beans which get started before webservices get started .Please find the logs below--

                               

                              15:27:44,121 INFO  [org.jboss.as.ejb3] (MSC service thread 1-3) JBAS014142: Started message driven bean 'com.performix.mes.integration.EventRouter' with 'hornetq-ra' resource adapter

                              15:27:44,125 INFO  [org.jboss.as.ejb3] (MSC service thread 1-3) JBAS014142: Started message driven bean 'com.performix.mes.integration.PhaseMessageRouter' with 'hornetq-ra' resource adapter

                              15:27:44,129 INFO  [org.jboss.as.ejb3] (MSC service thread 1-3) JBAS014142: Started message driven bean 'com.performix.mes.integration.PlanMgrMessageRouter' with 'hornetq-ra' resource adapter

                              15:27:44,135 INFO  [org.jboss.as.ejb3] (MSC service thread 1-3) JBAS014142: Started message driven bean 'com.performix.mes.integration.UiMessageRouter' with 'hornetq-ra' resource adapter

                              15:27:44,139 INFO  [org.jboss.as.ejb3] (MSC service thread 1-3) JBAS014142: Started message driven bean 'com.performix.mes.integration.OpcMessageRouter' with 'hornetq-ra' resource adapter

                              15:27:44,142 INFO  [org.jboss.as.ejb3] (MSC service thread 1-3) JBAS014142: Started message driven bean 'com.performix.mes.integration.HistoryMessageRouter' with 'hornetq-ra' resource adapter

                              15:27:44,146 INFO  [org.jboss.as.ejb3] (MSC service thread 1-3) JBAS014142: Started message driven bean 'com.performix.mes.integration.SystemEventMessageRouter' with 'hornetq-ra' resource adapter

                              15:27:44,204 WARNING [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Unable to process deployment descriptor for context '/MESServices'

                               

                               

                              Regards

                              Sachin

                              • 12. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                                sfcoy

                                Do any of your session beans send messages to the various topics that you have defined?

                                 

                                If so, can you show a java code fragment that illustrates how you are delivering the message please?

                                • 13. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                                  chandrasachin16

                                  Hi Stephen,

                                   

                                  None of my session beans send message to topics.This task is done by other classes.

                                   

                                  Regards

                                  Sachin

                                  • 14. Re: Problems deploying my older application on Jboss 7 (Failed to define class)
                                    sfcoy

                                    What other classes?

                                     

                                    Also, please attach a complete server.log. We may find more clues in that.

                                    1 2 3 Previous Next