Websphere IBM worklight 6.1-worklight服务器安装后,appcenter抛出错误

Websphere IBM worklight 6.1-worklight服务器安装后,appcenter抛出错误,websphere,ibm-mobilefirst,worklight-server,Websphere,Ibm Mobilefirst,Worklight Server,我已将Worklight server 6.1安装在带有derby数据库的WAS 85完整版本上。安装后尝试访问appcenter时遇到错误 RequestProces E org.apache.wink.server.internal.RequestProcessor handleRequest An unhandled exception occurred which will be propagated to the container.

我已将Worklight server 6.1安装在带有derby数据库的WAS 85完整版本上。安装后尝试访问appcenter时遇到错误

 RequestProces E org.apache.wink.server.internal.RequestProcessor handleRequest An unhandled exception occurred which will be propagated to the container.
                             java.lang.RuntimeException: Unable to open data base.
at com.ibm.puremeap.util.DataUtil.getData(DataUtil.java:475)
at com.ibm.puremeap.services.BaseService.<init>(BaseService.java:55)
at com.ibm.puremeap.services.MobileServices.<init>(MobileServices.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:68)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:529) 



Caused by: javax.persistence.PersistenceException: Provider error. Provider: org.apache.openjpa.persistence.PersistenceProviderImpl
at javax.persistence.Persistence.createFactory(Persistence.java:175)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:111)
at com.ibm.puremeap.resources.data.impl.PureMeapData.<init>(PureMeapData.java:180)
at com.ibm.puremeap.resources.data.impl.PureMeapData.fromDataSource(PureMeapData.java:102)
at com.ibm.puremeap.resources.data.DataStoreFactory.getJPADBStore(DataStoreFactory.java:46)
at com.ibm.puremeap.resources.data.DataStoreFactory.getDataStore(DataStoreFactory.java:34)
at com.ibm.puremeap.util.DataUtil.getData(DataUtil.java:453)
... 78 more


Caused by: <openjpa-1.2.2-r422266:898935 nonfatal general error> org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: wsjar:file:/C:/IBML/WebSphere/PortalServer/wcm/prereq.wcm/wcm/shared/app/ilwwcm-domain-impl.jar!/META-INF/persistence.xml [Location: Line: 3, C: 121]: org.xml.sax.SAXParseException: cvc-complex-type.3.1: Value '2.0' of attribute 'version' of element 'persistence' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '1.0'.
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:379)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:318)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:295)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:268)
RequestProces E org.apache.wink.server.internal.RequestProcessor handleRequest发生未经处理的异常,该异常将传播到容器。
java.lang.RuntimeException:无法打开数据库。
位于com.ibm.puremeap.util.DataUtil.getData(DataUtil.java:475)
位于com.ibm.puremeap.services.BaseService.(BaseService.java:55)
在com.ibm.puremeap.services.MobileServices.(MobileServices.java:58)
位于sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)
位于sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:68)
在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
位于java.lang.reflect.Constructor.newInstance(Constructor.java:529)
原因:javax.persistence.PersistenceException:提供程序错误。提供者:org.apache.openjpa.persistence.PersistenceProviderImpl
位于javax.persistence.persistence.createFactory(persistence.java:175)
位于javax.persistence.persistence.createEntityManagerFactory(persistence.java:111)
位于com.ibm.puremeap.resources.data.impl.PureMeapData。(PureMeapData.java:180)
位于com.ibm.puremeap.resources.data.impl.PureMeapData.fromDataSource(PureMeapData.java:102)
位于com.ibm.puremeap.resources.data.DataStoreFactory.getJPADBStore(DataStoreFactory.java:46)
位于com.ibm.puremeap.resources.data.DataStoreFactory.getDataStore(DataStoreFactory.java:34)
位于com.ibm.puremeap.util.DataUtil.getData(DataUtil.java:453)
... 78多
原因:org.apache.openjpa.util.GeneralException:org.xml.sax.SAXException:wsjar:file:/C:/IBML/WebSphere/PortalServer/wcm/prereq.wcm/wcm/shared/app/ilwwcm-domain-impl.jar/META-INF/persistence.xml[位置:第3行,C:121]:org.xml.sax.saxpasseException:cvc复杂类型。3.1:元素“persistence”的属性“version”的值“2.0”对于相应的属性使用无效。属性“version”的固定值为“1.0”。
位于org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:379)
位于org.apache.openjpa.lib.meta.xmlmataparser.parse(xmlmataparser.java:318)
位于org.apache.openjpa.lib.meta.xmlmataparser.parse(xmlmataparser.java:295)
位于org.apache.openjpa.lib.meta.xmlmataparser.parse(xmlmataparser.java:268)
是否有其他人在最新的worklight server+websphere application server 85中遇到过同样的问题


我可以访问appcenter,但所有内容都变灰了。

下面是调查总结和一些可能有用的解决方法(已经尝试过)

(A) Websphere Portal类加载器策略设置:
(B) 可能的解决办法:
(1) 在worklight控制台ear中打包web inf/lib的worklight j2ee jar部分,以便加载War类加载器并覆盖门户共享库

(2) 将Worklight console安装在WebSphere_Portal以外的单独服务器/配置文件上

(3) 因为问题与类路径中与JPA相关的不正确的.xml文件有关。我们可以通过以下解决方法来管理此问题

Steps:

(a) Rename worklight-jee-library.jar\META-INF\persistence.xml to  worklight-jee-library.jar\META-INF\worklight-persistence.xml.

(b) Modify/Add property called "persistenceXmlLocation" in worklight-jee-library.jar\conf\spring-server-core.xml and worklight-jee-library.jar\conf\spring-server-reports.xml files to have "META-INF/worklight-persistence.xml" (or classpath:./META-INF/worklight-persistence.xml).

Note: This is modified so that persistence xml file is picked from within worklight-jee-library.jar.

(c) - optional step - In persistence.xml similar paths (in <mapping-file> tag) should be mentioned for orm.xml files (I believe there are more than one orm files there).

(d) orm.xml file can be removed from ilwwcm-eventlog-jpa.jar.
步骤:
(a) 将worklight jee library.jar\META-INF\persistence.xml重命名为worklight jee library.jar\META-INF\worklight-persistence.xml。
(b) 修改/添加worklight jee library.jar\conf\spring-server-core.xml和worklight jee library.jar\conf\spring-server-reports.xml文件中名为“persistenceXmlLocation”的属性,使其具有“META-INF/worklight persistence.xml”(或类路径:./META-INF/worklight persistence.xml)。
注意:对其进行了修改,以便从worklight-jee-library.jar中选取持久性xml文件。
(c) -可选步骤-在persistence.xml中,应该提到orm.xml文件的类似路径(在标记中)(我相信那里有不止一个orm文件)。
(d) 可以从ilwwcm-eventlog-jpa.jar中删除orm.xml文件。
其他参考资料:


确保你更正了问题的标题。它应该是Portal Server,而不是Post Server。另外,我相信您正在尝试访问Worklight控制台。

尝试使用DB2安装Worklight server,但出现了相同的错误。
Steps:

(a) Rename worklight-jee-library.jar\META-INF\persistence.xml to  worklight-jee-library.jar\META-INF\worklight-persistence.xml.

(b) Modify/Add property called "persistenceXmlLocation" in worklight-jee-library.jar\conf\spring-server-core.xml and worklight-jee-library.jar\conf\spring-server-reports.xml files to have "META-INF/worklight-persistence.xml" (or classpath:./META-INF/worklight-persistence.xml).

Note: This is modified so that persistence xml file is picked from within worklight-jee-library.jar.

(c) - optional step - In persistence.xml similar paths (in <mapping-file> tag) should be mentioned for orm.xml files (I believe there are more than one orm files there).

(d) orm.xml file can be removed from ilwwcm-eventlog-jpa.jar.