2011-12-06 37 views
0

我在GlassFish(ver.3)应用程序服务器中开发了一个JSF(2.1)应用程序(JavaEE5),其中包含primefaces(版本2.x)和Eclipse Link(ver 2 JPA 2.0)。现在我需要在WebLogic Server(10.x或11)中安装应用程序。当我尝试在Weblogics Web界面上安装应用程序时,它显示一条大错误消息 如何将我的应用程序从一台应用程序服务器迁移到另一台应用程序服务器?包括在项目将JSF 2.1应用程序从Glassfish 3迁移到Weblogic 10.x或11

错误消息开始像这样

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\[email protected] 
    finder: [email protected] 
    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':<[email protected] 
    finder: [email protected] 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) 
+0

我没有一个很好的答案,但它看起来像这个问题是围绕WebLogic类加载器。 WebLogic与其他应用程序服务器一样,都有自己的类加载器和它们的类加载器给予优惠待遇的内置库包。从Tomcat迁移到JBoss时,我遇到了类似的问题,因为JBoss 5类加载器正在加载其捆绑版本的JSF 1.2,而不是我在WEB-INF/lib中加载的JSF 2.0。 –

+0

尝试在Tomcat 7上运行应用程序,因为它没有预先捆绑的库,并且它的类加载器将首先在“WEB-INF/lib”中查找JAR文件。这将帮助您缩小问题范围。如果它适用于Tomcat,那么我们必须弄清楚WebLogic中正在加载哪个版本的JSF和JPA。 –

回答

0

你可以看看这个Eclipse的错误的LIB IDE的Netbeans 7.0 JSF 2.1 primefaces库,非常接近您的问题,还请注意的WebLogic 10.3拥有的Java EE 5和Servlet 2.5和JSF 2.1 requires Servlets 3.0 \

你也可以看到这个题目,它指向的schemaLocation的类型不同:http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg05639.html

您应该仔细查看移植指南!

编辑:该邮件也可能会有所帮助:http://blog.eisele.net/2011/01/weblogic-10340-oepe-maven-primefaces.html

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':<[email protected] 

这个特殊的问题造成的,因为web应用程序中提供这是JPA 2.0编写在WebLogic 10.3.x中只支持JPA 1.0 persistence.xml。您需要阅读以下开发人员指南,了解如何让JPA 2.0在Weblogic 10.3.x上运行:Running JPA 2.0 API on WebLogic 10.3

一旦你解决这个问题,你打不过作为已经Spauny暗示一个新的问题:JSF 2.1,需要3.0的Servlet,这可以可以通过升级的Weblogic 10.3到Weblogic 11.解决您需要降级到JSF 2.0。 JSF 2.0在Weblogic 10.3.3和更新的版本中被支持。对于旧版本,我不确定如何升级它。另见Steps to deploy latest JSF version in weblogic 10.3