[seam-dev] Deployment issues with JBoss 7 CR1
Emmanuel Bernard
emmanuel at hibernate.org
Fri Jul 8 12:05:05 EDT 2011
I've completed the work. Sanne is reviewing the pull-request and we will push a SNAPSHOT shortly after that (today or monday I'd say).
On 5 juil. 2011, at 13:46, Emmanuel Bernard wrote:
> Hibernate Search is not yet compatible with Hibernate Core 4. That's my next task :)
>
> On 5 juil. 2011, at 13:44, Ove Ranheim wrote:
>
>> Followed your advice below and only bundle dom4j and upgraded to Hibernate Search 4.0-SNAPSHOT to match with Hibernate Core 4-Beta2.
>>
>> Now I get CNF for org.hibernate.classic.Session (due to search!?).
>>
>> The logger issue still persists. in war/META-INF/MANIFEST.MF:
>>
>> Dependencies: org.slf4j, org.apache.log4j, org.apache.commons.logging
>>
>> The whole listing can be found here: http://pastebin.com/AMi9QCR5
>>
>>
>> Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Priority
>> at java.lang.Class.getDeclaredMethods0(Native Method) [:1.6.0_26]
>> at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) [:1.6.0_26]
>> at java.lang.Class.getDeclaredMethods(Class.java:1791) [:1.6.0_26]
>> at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:78) [jboss-as-weld-7.0.0.CR1.jar:7.0.0.CR1]
>> ... 11 more
>> Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Priority from [Module "org.jboss.logging:main" from local module loader @4157aa53 (roots: /opt/jboss7/modules)]
>> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
>> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
>> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
>> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
>> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
>> ... 15 more
>>
>> Caused by: java.lang.NoClassDefFoundError: Lorg/slf4j/Logger;
>> at java.lang.Class.getDeclaredFields0(Native Method) [:1.6.0_26]
>> at java.lang.Class.privateGetDeclaredFields(Class.java:2291) [:1.6.0_26]
>> at java.lang.Class.getDeclaredFields(Class.java:1743) [:1.6.0_26]
>> at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:81) [jboss-as-weld-7.0.0.CR1.jar:7.0.0.CR1]
>> ... 11 more
>> Caused by: java.lang.ClassNotFoundException: org.slf4j.Logger from [Module "org.jboss.logging:main" from local module loader @4157aa53 (roots: /opt/jboss7/modules)]
>> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
>> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
>> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
>> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
>> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
>> ... 15 more
>>
>>
>> On Jul 5, 2011, at 12:54 PM, Pete Muir wrote:
>>
>>>
>>> On 5 Jul 2011, at 11:41, Ove Ranheim wrote:
>>>
>>>> Hi,
>>>>
>>>> The speed improvement of JBoss 7 is just beyond awesome and no words could cover my excitement to this fantastic piece of engineering work.
>>>>
>>>> During this weekend I tried to get my project deployed in JBoss 7 and it looks like I'm close to a success. I'd like to share my experience and point out where it fails for me.
>>>>
>>>> Deployment assembly looks like:
>>>>
>>>> * 16 project extensions related to my project (my project is named parts)
>>>>
>>>> * Uses Weld 1.1.1, Seam Solder, Faces, International, Servlet, Persistence, Mail, Catch, Config, JMS, Remoting and Security.
>>>>
>>>> * Depends on Hibernate Core 3.6.0 (because of Seam Persistence), Hibernate Search 3.3.0 because of Hibernate Core, HornetQ and JAXB.
>>>>
>>>> * Includes all non-jboss-6 included jars (mvel, ora, joda-time, httpclient, etc.)
>>>>
>>>> What makes it hard to figure out is what dependencies should be opted in or out. The jboss-as-parent-7.0.0.CR1 gives idea to figure out dependency versions, but it's still hard to tell what's available in the deployment classpath for my WAR in JBoss 7 (standalone-preview).
>>>>
>>>> I added an extra profile to my pom to opt in jars that needs to be included in the J7 deployment:
>>>>
>>>> <profile>
>>>> <id>j7</id>
>>>> <dependencies>
>>>> <dependency>
>>>> <groupId>dom4j</groupId>
>>>> <artifactId>dom4j</artifactId>
>>>> <scope>compile</scope>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>org.slf4j</groupId>
>>>> <artifactId>slf4j-api</artifactId>
>>>> <version>1.5.10</version>
>>>> <scope>compile</scope>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>org.slf4j</groupId>
>>>> <artifactId>slf4j-log4j12</artifactId>
>>>> <version>1.5.10</version>
>>>> <scope>compile</scope>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>log4j</groupId>
>>>> <artifactId>log4j</artifactId>
>>>> <version>1.2.14</version>
>>>> <scope>compile</scope>
>>>> </dependency>
>>>
>>> Not sure about logging, but I believe it should work, try not bundling any slf4j...
>>>
>>>> <dependency>
>>>> <groupId>org.hibernate</groupId>
>>>> <artifactId>hibernate-search</artifactId>
>>>> <!-- version>3.4.0.Final</version -->
>>>> <scope>compile</scope>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>org.hibernate</groupId>
>>>> <artifactId>hibernate-core</artifactId>
>>>> <version>3.6.0.Final</version>
>>>> <scope>compile</scope>
>>>> </dependency>
>>>
>>> This is included in JBoss AS 7
>>>
>>>> <dependency>
>>>> <groupId>javax.validation</groupId>
>>>> <artifactId>validation-api</artifactId>
>>>> <version>1.0.0.GA</version>
>>>
>>> This is included in JBoss AS 7
>>>
>>>> </dependency>
>>>> </dependencies>
>>>> </profile>
>>>>
>>>>
>>>> The good thing is that I see a long list of registered EJB 3.x and 3.0 beans being successfully deployed. But, it fails with a CNF exception for log4j and slf4j loggers. I'm clueless to how to solve logger dependencies.
>>>>
>>>> I posted this issue on AS7 User forum (see bottom): http://community.jboss.org/thread/168853
>>>>
>>>> According to the migration guide: https://docs.jboss.org/author/display/AS7/How+do+I+migrate+my+application+from+AS5+or+AS6+to+AS7#HowdoImigratemyapplicationfromAS5orAS6toAS7-JBossLogging
>>>>
>>>> we need to include "legacy" Hibernate EntityManager, Validator and Annotations to get Seam to work. But, it does not tell whether this relates to Seam 2 or 3. Besides, wouldn't it make sense to opt out those and use the already available Hibernate 4-Beta2 and exclude "legacy" Hibernate dependencies. The footprint of the deployment would be smaller. And how does this affect the JPA in J7 when I include "legacy" hibernate?
>>>
>>> This guide is referring to Seam 2, not Seam 3!
>>>
>>> Marek, can you make sure this is clear?
>>>
>>>>
>>>> The logger is my current showstopper and I don't know what error will be next. Has anyone deployed the Seam Booking example successfully to J7?
>>>
>>> I believe Dan has tested this as working.
>>>
>>>> I would like to see the migration guide clearer to the above and certainly would like to help out on the documentation side and do testing. Or in any other way be of help.
>>>>
>>>> What we need is a JBoss7 deployment matrix profile to act as a reference to everybody using Seam 3 and JBoss 7 project.
>>>
>>>>
>>>> Cheers,
>>>> Ove
>>>>
>>>>
>>>> _______________________________________________
>>>> seam-dev mailing list
>>>> seam-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>>
>>
>>
>> _______________________________________________
>> seam-dev mailing list
>> seam-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/seam-dev
>
>
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
More information about the seam-dev
mailing list