IBM Application Center APK upload failed

2019-09-09 00:04发布

问题:

My IBM Application Center version 7.0.0.00-20150729-1801

Trying to upload the App Center Client APK file to App Center Console. It fails with an error - FWLAC0000E: A server error was detected.

[8/16/15 23:16:35:510 CDT] 00000129 UploadService I file uploaded [8/16/15 23:16:52:661 CDT] 00000129 ApplicationSe E { "id": "223b252a-a3aa-443d-9472-49e413d4af1c", "message": "FWLAC0000E: A server error was detected.", "params": [ ], "productVersion": "7.0.0.00-20150729-1801" } com.ibm.puremeap.resources.exceptions.SystemException: The field "aclApp" of instance "com.ibm.puremeap.jpa.entity.AclAppPrincipalEntity[ id=unknown ]" contained a null value; the metadata for this field specifies that nulls are illegal. at com.ibm.puremeap.resources.data.impl.ApplicationHelper.createApplicationImpl(ApplicationHelper.java:1741) at com.ibm.puremeap.resources.data.impl.ApplicationHelper.createApplication(ApplicationHelper.java:1628) at com.ibm.puremeap.artifacts.Application.create(Application.java:497) at com.ibm.puremeap.services.ApplicationService.create(ApplicationService.java:154) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63) at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22) at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75) at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22) at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75) at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:34) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22) at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75) at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleResourceMethod(FindResourceMethodHandler.java:151) at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:65) at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleSubResourceLocator(FindResourceMethodHandler.java:235) at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:115) at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleSubResourceLocator(FindResourceMethodHandler.java:235) at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:115) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22) at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75) at org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:95) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22) at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75) at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22) at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75) at org.apache.wink.server.internal.handlers.OptionsMethodHandler.handleRequest(OptionsMethodHandler.java:46) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22) at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75) at org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22) at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75) at org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(ResourceInvocation.java:92) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22) at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75) at org.apache.wink.server.internal.log.Requests.handleRequest(Requests.java:76) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26) at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22) at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75) at org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:60) at org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:207) at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154) at org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:124) at com.ibm.puremeap.services.RestServlet.service(RestServlet.java:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97) at com.ibm.puremeap.services.RestFilter.doFilter(RestFilter.java:60) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:939) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881) Caused by: org.apache.openjpa.persistence.InvalidStateException: The field "aclApp" of instance "com.ibm.puremeap.jpa.entity.AclAppPrincipalEntity[ id=unknown ]" contained a null value; the metadata for this field specifies that nulls are illegal. at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:567) at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:505) at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:3059) at org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(SingleFieldManager.java:808) at org.apache.openjpa.kernel.SingleFieldManager.preFlushPCs(SingleFieldManager.java:762) at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:656) at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:589) at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:505) at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:3059) at org.apache.openjpa.kernel.PDirtyState.beforeFlush(PDirtyState.java:39) at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:1075) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2127) at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2087) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1858) at org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:602) at org.apache.openjpa.kernel.StateManagerImpl.assignField(StateManagerImpl.java:689) at org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(StateManagerImpl.java:1696) at com.ibm.ws.persistence.kernel.WsJpaStateManagerImpl.beforeAccessField(WsJpaStateManagerImpl.java:109) at org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateManagerImpl.java:1627) at com.ibm.puremeap.jpa.entity.AclAppPrincipalEntity.pcGetid(AclAppPrincipalEntity.java) at com.ibm.puremeap.jpa.entity.AclAppPrincipalEntity.equals(AclAppPrincipalEntity.java:201) at java.util.ArrayList.contains(ArrayList.java:309) at com.ibm.puremeap.jpa.entity.AclApplicationEntity.addPrincipal(AclApplicationEntity.java:253) at com.ibm.puremeap.jpa.entity.AclApplicationEntity.addAccessRightForPrincipal(AclApplicationEntity.java:195) at com.ibm.puremeap.resources.data.impl.ApplicationHelper.getUpdatedACLOnCreate(ApplicationHelper.java:648) at com.ibm.puremeap.resources.data.impl.ApplicationHelper.createApplicationImpl(ApplicationHelper.java:1734) ... 86 more

回答1:

The log shows that this is a database problem, probably caused by OpenJPA. I suspect that a wrong version of OpenJPA is used in Websphere. This can be detected in the log, for instance if you see a message in the log such as

INFO [server.startup : 2] openjpa.Runtime - Starting OpenJPA 2.x

As of MobileFirst 7.0 and earlier, the correct OpenJPA version must be 1.2.2, not 2.x (2.2.3 or similar).

This error typically occurs if the parentLast classloader policy is not set for the applicationcenter.war. For WAS Full Profile, see step 5 here. For WAS Liberty Profile, see the element <classloader delegation="parentLast"> here.