3 Replies Latest reply on Feb 10, 2012 6:00 AM by Dee Kay

    Migration from AS6.1 to AS7 ...followed all official recommendations...no success

    Dee Kay Newbie

      Hello all,

       

      i'm migrating from AS6.1 to 7, but i've some problems deploying my EAR-project.

      I followed all suggestions as explained on  docs.jboss.org  but on deployment AS7

      isn't able to resolve my classes.

      (I try to deploy an iText-Module, itextpdf-5.1.3.jar).

       

      Here the steps i've done:

       

       

      a) I created directories and the module.xml-file module under [AS]/modules/com/itextpdf/main

       

      Content:

       

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

      <module xmlns="urn:jboss:module:1.0" name="com.mysql">

          <resources>

                <resource-root path="itextpdf-5.1.3.jar"/>

              </resources>

      </module>

       

      No success....however this works fine for the datasources i defined with mysql.

      The AS doesn't even build an .index-file (he did it for the mysql-module).

       

       

      b) I changed standalone.xml

       

      <subsystem xmlns="urn:jboss:domain:ee:1.0">

         <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

      </subsystem>

       

       

      c) I tried the more granular jboss-deployment-structure.xml-variant...no success

       

       

       

       

      All variants throw this exception-log:

       

      [org.jboss.modules] (MSC service thread 1-8) Failed to define class my.domain.general.pdf.elements.PDFTable$Cell in Module "deployment.Icon.ear.IconEJB.jar:main" from Service Module Loader: java.lang.LinkageError: Failed to link my/domain/general/pdf/elements/PDFTable$Cell (Module "deployment.Icon.ear.IconEJB.jar:main" from Service Module Loader)

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

          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:505)

          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 org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner.getPackagesInJar(HibernateAnnotationScanner.java:92)

          at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:490) [hibernate-entitymanager-4.0.0.Final.jar:4.0.0.Final]

          at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:852) [hibernate-entitymanager-4.0.0.Final.jar:4.0.0.Final]

          at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:597) [hibernate-entitymanager-4.0.0.Final.jar:4.0.0.Final]

          at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72) [hibernate-entitymanager-4.0.0.Final.jar:4.0.0.Final]

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:149) [jboss-as-jpa-7.1.0.CR1b.jar:7.1.0.CR1b]

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:79) [jboss-as-jpa-7.1.0.CR1b.jar:7.1.0.CR1b]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.6.0_22]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.6.0_22]

          at java.lang.Thread.run(Thread.java:679) [:1.6.0_22]

      Caused by: java.lang.NoClassDefFoundError: com/itextpdf/text/pdf/PdfPCell

          at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_22]

          at java.lang.ClassLoader.defineClass(ClassLoader.java:634) [:1.6.0_22]

          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [:1.6.0_22]

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

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

          ... 20 more

      Caused by: java.lang.ClassNotFoundException: com.itextpdf.text.pdf.PdfPCell from [Module "deployment.Icon.ear.IconEJB.jar:main" from Service Module Loader]

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

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

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

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

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

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

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

          ... 25 more

       

       

       

      The file itself is deployed in / of the application.

      Tried it on 7.0.1.Final and 7.1.0.CR1b. Each of them can't find my class.

       

       

       

      Any ideas?

       

      Kind regards

       

      Daniel