I am trying to deploy a test application using Prime Faces, Hibernate, Spring DAO, EJB3, Facelets and JSF2.0 which I created in my Net Beans 6.9.1 IDE which works fine in GlassFish Server 3.0 but does not seem to run on JBoss-6.0.0.Final. Since the app connects to a MySQL database, uses JPA2 and JTA (EclipseLink), I have added the mysql-connector.x.x.x-bin.jar and the mysql-ds.xml files needed. Many of the jar files in our app's lib folder had to be removed because they were already included in JBoss AS 6 and were causing ClassCastExceptions. After refining the jars to be included in our app's lib folder, I am still obtaining a few errors.
Main error seems to be :-
05:27:18,931 ERROR [STDERR] log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
05:27:18,931 ERROR [STDERR] log4j:WARN Please initialize the log4j system properly.
05:27:18,975 ERROR [[/H2Care]] Exception sending context initialized event to listener instance of class
org.jboss.web.jsf.integration.config.JBossMojarra20ConfigureListener: java.lang.ClassCastException: Cannot cast org.hibernate.validator.util.LazyValidatorFactory to javax.validation.ValidatorFactory
Here is my persistence.xml file:
Please help. I attach the full JBoss 6 server log below :-
Long time no see....I've been taking a 10-months sabbatical..great to be back to JEE and JavaRanch with my new employer! Yep..java-validation.jar was one of the files that I had removed from our app's lib folder as well as hibernate-validation.jar since I found they're both already available in JBoss. The set of pre-available jars that is already included with JBoss seems to be a fallacy of JBoss. You see, we have no problems with Glassfish as they don't include jars so our app was able to run. We would expect it also to be able to run straight off with JBoss by copying the war to server/deploy but no, the moment we moved to JBoss, we had to include the -ds.xml and also look at duplicate jar files causing the ClassCastExceptions which to me is really a time waster. Anyway the 'Deployment in Error' problem still exists between these pair of jars : hibernate-validator and javax-validation. At the time I posted, I'd removed both. Let me try putting one not the other and see how the problem works out. Will keep everyone informed!
ezani abd halim
Joined: Jan 12, 2009
Just to make things cystal clear, I list down all the jars that I have in my lib folder of my app (leaving out the versions). They are :-
Has anyone faced the same problem and found a fix? Not making any headway on this. I've ensured eclipselink.jar and jaxax.persistence.jar is in JBoss and I know that the whole range of Hibernate jars (core, annotations, validation, etc) are already included in JBoss AS (server/all/common/lib) and after scouting that folder, I also found validation-api.jar. I believe it may be a conflict between hibernate-validator.jar and validation-api.jar in the JBoss AS libraries or a version mismatch so I will head in that direction for now. Will keep you informed if I can fix, God willing.