0

I had installed Worklight server 6.1 on WAS 85 full version with derby database. Facing error when after installation trying to access the 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)

Does anyone else faced the same issue with latest worklight server+ websphere application server 85.

I was able to access appcenter but everything greyed out.

4

1 回答 1

1

以下是调查摘要和一些可能有帮助的解决方法(已经尝试过)。

(A) Websphere Portal Classloader 策略设置:


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).

(B) 可能的解决方法:


(1) 在worklight 控制台ear 中打包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 控制台。

于 2014-01-26T17:47:57.213 回答