我在带有derby数据库的WAS 85完整版上安装了Worklight Server 6.1。安装后尝试访问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)
是否有其他人遇到与最新的worklight服务器+ websphere应用服务器85相同的问题。
我能够访问appcenter,但一切都变得灰暗。
答案 0 :(得分:1)
以下是调查摘要和一些可能有用的解决方法(已经尝试过)。
Server Classloader Policy (WebspherePortal/server1) = Multiple
Server Classloader Mode = PARENT_LAST
Application (Worklight) Classloader Mode = PARENT_LAST
War Classloader (Worklight) Policy = Module
War Classloader (Worklignt) Mode = PARENT_LAST
WebsherePortal/WCM shared library is applied/associated at Server level.
Worklight Shared library is applied/associated to Worklight Console Application.
Since the shared library of Portal/WCM is mapped at the server level its visible to all the applications installed on the server. So in this case it is available to Worklight Console as well. Also, we have a worklight shared library mapped to worklight console ear and and hence the clash (For JPA related problem I feel that J2EE container automatically finds "META-INF/persistence.xml" which is the portal one).
(1)在worklight控制台耳中打包web-inf / lib的worklight j2ee jar部分,以便War类加载器加载并覆盖门户共享库。
(2)在除WebSphere_Portal之外的单独服务器/配置文件上安装Worklight控制台。
(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.
其他参考: http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14580282
确保更正问题标题。它应该是Portal Server而不是Post服务器。此外,我相信您正在尝试访问Worklight控制台。