I've been trying to upload an Android application .apk file to an Worklight application center running on Power System Linux RHEL v6.5 and Worklight Foundation Server version 6.2.0.1. The AppCenter Database is DB2 V 10.5. I get the following error in the console.log for the appcenter server:
[err] dataBaseFromDataSource=true
[err] dataBaseUrl=jdbc:db2://localhost:50000/APPCNTR
[err] dataBaseDriver=IBM Data Server Driver for JDBC and SQLJ
[err] dataBaseDriverVersion=4.17
[err] dataBaseProduct=DB2/LINUXPPC64
[err] dataBaseVersion=SQL10053
[err] dataBaseUser=dasusr1
[err] 370 appcenterdb-db2 INFO [Default Executor-thread-4] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 882 appcenterdb-db2 INFO [Default Executor-thread-4] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DB2Dictionary" (DB2/LINUXPPC64 SQL10053 ,IBM Data Server Driver for JDBC and SQLJ 4.17.29).
[err] java.io.IOException: Expected chunk of type 0x11c0200, read 0x1200200.
[err] at com.ibm.puremeap.util.android.ReadUtil.readCheckType(ReadUtil.java:32)
[err] at com.ibm.puremeap.util.android.AndroidResourceParser.readPackage(AndroidResourceParser.java:80)
[err] at com.ibm.puremeap.util.android.AndroidResourceParser.read(AndroidResourceParser.java:62)
[err] at com.ibm.puremeap.util.android.AndroidAPKResolver.resolve(AndroidAPKResolver.java:138)
[err] at com.ibm.puremeap.util.android.AAPT.getMetadata(AAPT.java:362)
[err] at com.ibm.puremeap.services.UploadService.fileUploaded(UploadService.java:153)
[err] at com.ibm.puremeap.services.UploadService.__fileUploadedJSON__(UploadService.java:106)
[err] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[err] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
[err] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
[err] at java.lang.reflect.Method.invoke(Method.java:618)
...
....
...
[ERROR ] Exception during resource upload. null
[ERROR ] {
"id": "8a3f6944-8ce5-4323-9fa2-ac5d72483b31",
"message": "FWLAC0000E: A server error was detected.",
"productVersion": "6.2.0.01-20141013-1735"
I have successfully deployed the IBM AppCenter Installer but have yet to successfully upload an android application .apk file. I've manually installed the .apk on an android phone and the application installs and works just fine.
I've tried to generate the .apk file a couple of different ways, but the result is always the same. I've used the androidproject->run as->android application, exporting the application, as well as just copying the .apk file to a directory used for uploads.
My environment includes:
Android Development Toolkit Version: 23.0.4.1468518
Eclipse Version: Kepler Service Release 2 Build id: 20140224-062
The issue my environment had was the configured android build tools revisions installed. This can be viewed in the SDK Manager.
My target android sdk build defined in the project is 19. The installed android build tools, as viewed from the SDK Manager, included revisions 21, and 19.1. I had to remove revision 21 from the configuration and add revision 19.
The lessen learned from this exercise is to make sure your minSDK and target SDK builds are installed as shown in the Android SDK Manager.
With these changes, I can now successfully deploy mny androidapp.apk to a stand-alone Power System Linux server running the Worklight Server Application Center.