8 Replies Latest reply on Feb 6, 2013 5:28 AM by sfcoy

    Encountered invalid class name

    akash_bansal

      Hi,

       

      Pls. help me, while deploying EAR file, I am getting following exception:

       

      17:04:19,714 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015960: Class Path entry bcprov-jdk14-137.jar in /C:/tools/jboss7/bin/content/acctrecv.ear/ar-spring-war-3.09-SNAPSHOT.war/WEB-INF/lib/itext-2.0.6.jar  does not point to a valid jar for a Class-Path reference.

      17:04:19,816 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) JBAS011401: Read persistence.xml for floodDatabase

      17:04:20,194 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.GlassFishInjectionProvider:com.sun.enterprise.InjectionManager' for service type 'com.sun.faces.spi.injectionprovider'

      17:04:20,195 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor' for service type 'com.sun.faces.spi.injectionprovider'

      17:04:20,196 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection' for service type 'com.sun.faces.spi.injectionprovider'

      17:04:22,758 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.module.service."deployment.acctrecv.ear.ar-transaction-upload-3.09-SNAPSHOT.jar".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.acctrecv.ear.ar-transaction-upload-3.09-SNAPSHOT.jar".main: JBAS018759: Failed to load module: deployment.acctrecv.ear.ar-transaction-upload-3.09-SNAPSHOT.jar:main

          at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:92) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_37]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_37]

          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]

      Caused by: org.jboss.modules.ModuleNotFoundException: deployment.external./lib/ar-entity-3.09-SNAPSHOT.jar:main

          at org.jboss.modules.ModuleLoader$FutureModule.getModule(ModuleLoader.java:511) [jboss-modules.jar:1.1.2.GA-redhat-1]

          at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:261) [jboss-modules.jar:1.1.2.GA-redhat-1]

          at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222) [jboss-modules.jar:1.1.2.GA-redhat-1]

          at org.jboss.as.server.moduleservice.ServiceModuleLoader.preloadModule(ServiceModuleLoader.java:158) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

          at org.jboss.modules.Module.addExportedPaths(Module.java:987) [jboss-modules.jar:1.1.2.GA-redhat-1]

          at org.jboss.modules.Module.addPaths(Module.java:893) [jboss-modules.jar:1.1.2.GA-redhat-1]

          at org.jboss.modules.Module.link(Module.java:1206) [jboss-modules.jar:1.1.2.GA-redhat-1]

          at org.jboss.modules.Module.relinkIfNecessary(Module.java:1235) [jboss-modules.jar:1.1.2.GA-redhat-1]

          at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:208) [jboss-modules.jar:1.1.2.GA-redhat-1]

          at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:71) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

          ... 5 more

        • 1. Re: Encountered invalid class name
          nickarls

          Those are just warnings, trying to see what is available on the classpath.

          But the actual error is a bit strange? Is this an exploded or zipped deployment archive? Wonder what the "deployment.external" stuff is in the module error message?

          • 2. Re: Encountered invalid class name
            akash_bansal

            Hi Nicklas,

             

            This is not exploded deployment archive. But I had removed a third party jar file form lib folder of EAR which was being packaged thru maven in EAR's lib folder as transitive dependency.

            • 3. Re: Encountered invalid class name
              akash_bansal

              Hi,

              I managed to resolve this issue. But I have stuck in another issue. My application is using Hibernate 3. Below is my persistence.xml file :

               

              <?xml version="1.0"?>

              <persistence xmlns="http://java.sun.com/xml/ns/persistence"

                           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                           xsi:schemaLocation="http://java.sun.com/xml/ns/persistence

                  http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"

                           version="1.0">

                 <persistence-unit name="floodDatabase" transaction-type="JTA">

                    <provider>org.hibernate.ejb.HibernatePersistence</provider>     

                    <jta-data-source>java:jboss/jdbc/AccountingDB</jta-data-source>

                    <jar-file>entity-${ejb3-entity.version}.jar</jar-file>

                    <jar-file>ar-entity-${version}.jar</jar-file>

                    <jar-file>ar-web-billing-entity-${version}.jar</jar-file>

                    <properties>

                       <property name="hibernate.dialect" value="${database.dialect}"/>

                       <property name="hibernate.connection.autocommit" value="false"/>

                       <property name="hibernate.show_sql" value="true"/>

                       <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>

                       <property name="hibernate.transaction.flush_before_completion" value="true"/>

                       <property name="jboss.entity.manager.factory.jndi.name" value="java:comp/env/persistence/floodDatabaseEntityManagerFactory"/>                 

                    </properties>          

                 </persistence-unit>

              </persistence>

               

              Below is an entry in spring's context.xml file :

               

              <jee:jndi-lookup id="entityManagerFactory" jndi-name="java:comp/env/persistence/floodDatabaseEntityManagerFactory"/>

               

              And finally, below is entry in web.xml file :

               

              <persistence-unit-ref>

                  <persistence-unit-ref-name>persistence/floodDatabaseEntityManagerFactory</persistence-unit-ref-name>

              </persistence-unit-ref>

               

              But when I am deploying EAR file, I am getting following exception :

               

              15:18:17,928 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.subunit."acctrecv.ear"."ar-spring-war-3.09-SNAPSHOT.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."acctrecv.ear"."ar-spring-war-3.09-SNAPSHOT.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "ar-spring-war-3.09-SNAPSHOT.war" of deployment "acctrecv.ear"

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_37]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_37]

                  at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]

              Caused by: java.lang.NullPointerException

                  at org.jboss.as.jpa.processor.PersistenceRefProcessor.getPersistenceUnitBindingSource(PersistenceRefProcessor.java:202)

                  at org.jboss.as.jpa.processor.PersistenceRefProcessor.getPersistenceUnitRefs(PersistenceRefProcessor.java:123)

                  at org.jboss.as.jpa.processor.PersistenceRefProcessor.processDescriptorEntries(PersistenceRefProcessor.java:74)

                  at org.jboss.as.ee.component.deployers.AbstractDeploymentDescriptorBindingsProcessor.deploy(AbstractDeploymentDescriptorBindingsProcessor.java:100)

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

                  ... 5 more

               

               

              Your help is really really appreciated.

              • 4. Re: Encountered invalid class name
                nickarls

                If you're on Hibernate 3, check out http://badr-elhouari.blogspot.fi/2011/10/how-to-use-hibernate-3-as-jpa-provider.html

                 

                Also, do you have any DS references in web.xml of ar-spring-war?

                • 5. Re: Encountered invalid class name
                  akash_bansal

                  Thanks Nicklas for replying,

                   

                  Yes, I am using Hibernate 3. and web.xml file does not contain any references for Data Source.

                  • 6. Re: Encountered invalid class name
                    sflanigan

                    Sorry I can't help with your problem, but did you resolve the issue "JBAS015893: Encountered invalid class name"?  How?

                    • 7. Re: Encountered invalid class name
                      akash_bansal

                      This is just warning.

                      • 8. Re: Encountered invalid class name
                        sfcoy

                        When using Spring Framework to manage JPA it helps to rename your persistence.xml file to something else, such as spring-persistence.xml. You need to specify this name in the spring configured entity manager factory.

                         

                        Doing this prevents the standard JPA deployment scanner from picking up your persistence.xml and attempting to prepare it.

                         

                        There's other ways to do this, but I've found this to be the simplest.