0

i developed a JSF(2.1) Application (JavaEE5) in GlassFish(ver.3) Application server with primefaces (ver 2.x) and Eclipse Link( ver 2 JPA 2.0). now i need to install the application in WebLogic Server(10.x or11 ). when i try to install application on Weblogics web interface it shows a big error message How i can mive my application from one application server to another? IDE Netbeans 7.0 JSF 2.1 primefaces libraries included in lib of the project

Error message starts like this

Message icon - Error Exception in AppMerge flows' progression
Message icon - Error Exception in AppMerge flows' progression
Message icon - Error Error loading the persistence descriptor WEB-INF/classes/META-INF/persistence.xml from the module Lee5.war. 
See the following stack trace for nested errors: 
    weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND D:\bea\user_projects\domains\base_domain\weblogic.utils.classloaders.GenericClassLoader@1702c48 
    finder: weblogic.utils.classloaders.CodeGenClassFinder@44757a 
    annotation: \WEB-INF\classes\META-INF\persistence.xml:2:3:2:3: 
    problem: cvc-attribute.4: The value '2.0' does not equal the fixed value '1.0' of attribute 'version':<weblogic.utils.classloaders.GenericClassLoader@1702c48 
    finder: weblogic.utils.classloaders.CodeGenClassFinder@44757a annotation: /WEB-INF/classes/META-INF/persistence.xml:2:3> 
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:245)
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:231) 
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:155) 
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:323) 
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788) 
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:411) 
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759) 
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768) 
    at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:177) 
    at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:101) 
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Tora
  • 31
  • 2
  • 10
  • I don't have a good answer but it looks like the issue is around teh WebLogic classloader. WebLogic like other application servers, have their own classloaders and their own built-in library bundles that their classloaders give preferential treatment to. I had a similar problem when moving from Tomcat to JBoss in that the JBoss 5 classloader was loading its bundled version of JSF 1.2 instead of JSF 2.0 that I had within WEB-INF/lib. – maple_shaft Dec 06 '11 at 11:58
  • Try to run your application on Tomcat 7, as it does not have pre-bundled libraries and its classloader will look in `WEB-INF/lib` first for JAR files. This will help you narrow the problem down. If it works on Tomcat then we have to figure out what version of JSF and JPA are being loaded in WebLogic. – maple_shaft Dec 06 '11 at 12:00

2 Answers2

2
annotation: \WEB-INF\classes\META-INF\persistence.xml:2:3:2:3: 
problem: cvc-attribute.4: The value '2.0' does not equal the fixed value '1.0' of attribute 'version':<weblogic.utils.classloaders.GenericClassLoader@1702c48 

This particular problem is caused because the webapp is supplying a persistence.xml which is written for JPA 2.0 while Weblogic 10.3.x only supports JPA 1.0. You need to read the following developer guide how to get JPA 2.0 to run on Weblogic 10.3.x: Running JPA 2.0 API on WebLogic 10.3.

Once you fix this, you'll however hit a new problem as already hinted by Spauny: JSF 2.1 requires Servlet 3.0 and this can only be solved by upgrading Weblogic 10.3 to Weblogic 11. You need to downgrade to JSF 2.0. JSF 2.0 is supported out the box in Weblogic 10.3.3 and newer. For older versions I'm not sure how to upgrade it. See also Steps to deploy latest JSF version in weblogic 10.3.

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
0

You could look at this Eclipse bug, very close with your problem, also please note that WebLogic 10.3 has Java EE 5 and Servlets 2.5 and JSF 2.1 requires Servlets 3.0.\

Also you could see this topic which points to the types differences of schemaLocation: http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg05639.html

You should look carefully at a migration guide!

Edit: This post could also be of help: http://blog.eisele.net/2011/01/weblogic-10340-oepe-maven-primefaces.html

spauny
  • 4,976
  • 9
  • 44
  • 61