Can't deploy adapter/application in IBM MobileFirst Platform Foundation 7.0 - ibm-mobilefirst

In a production installation over 'WAS_LIBERTY_CORE_V8.5.5.4' with 'DB2':
I have now a simple configuration in server.xml.
The mobilefirst console shows the runtimes but I can't deploy adapters or applications. This is the content of messages.log. This 2 lines appears every attempt to upload an adapter/application:
[19/04/15 19:19:37:667 CEST] 0000008e org.apache.wink.server.internal.registry.ResourceRegistry I The system cannot find any method in the com.ibm.worklight.admin.services.RuntimeService class that supports POST. Verify that a method exists.
[19/04/15 19:19:37:683 CEST] 0000008e org.apache.wink.server.internal.RequestProcessor I The following error occurred during the invocation of the handlers chain: WebApplicationException (405) with message 'null' while processing POST request sent to http://MACHINENAME:9080/wladmin/management-apis/1.0/runtimes/test/
More info:
wlp.install.dir = C:/IBM/WebSphere/Liberty/
java.home = C:\Program Files\Java\jdk1.7.0_79\jre
java.version = 1.7.0_79
java.runtime = Java(TM) SE Runtime Environment (1.7.0_79-b15)
os = Windows Server 2008 R2 (6.1; amd64) (en_US)​
DB: DB2 in localhost
Complete server.xml file: https://drive.google.com/file/d/0BxAEyIioPI2YT2NPZXdCcktoT1U/view?usp=sharing
Complete console.log file: https://drive.google.com/file/d/0BxAEyIioPI2YUDhLZDQ0Qmgydk0/view?usp=sharing
Complete messages.log file: https://drive.google.com/file/d/0BxAEyIioPI2YdUREcjcyd3JYNGs/view?usp=sharing
I'm tried with other Java version like 'SDK_JAVA_TE_V7.0_WASLC_V8.5.5', with other runtimes, reinstalling all...

Per the comments, the error appears to happen only in IE 9.
As a work around, use a different browser such as Safari, Chrome, Firefox, Opera, etc... in order to deploy artifacts.
The issue with IE 9 will be investigated.

Related

Lotus/ibm/HCL Notes - JVM: Java Virtual Machine failed to Start

When trying to run any Java related code in my Notes Client I get the above error. I also get it in the designer client when creating or accessing any Java Web Services.
This is from my log
[1460:0002-2960] 06/08/2021 11:32:22 Agent error: Exception in thread "(unnamed thread)"
[1460:0002-2960] 06/08/2021 11:32:22 Agent error: java/lang/ExceptionInInitializerError
[1460:0002-2960] 06/08/2021 11:32:22 Agent error: java/lang/NullPointerException
[1460:0002-2960] 06/08/2021 11:32:22 Agent error: JVMJ9VM015W Initialization error for library jclse7b_28(14): JVMJ9VM009E J9VMDllMain failed
[1460:0002-2960] 06/08/2021 11:32:22 JVM: The Java Virtual Machine creation returned an invalid JVM machine pointer.
[1460:0002-2960] 06/08/2021 11:32:22 JVM: Java Virtual Machine failed to start
Looking around the internet this looks like "jclse7b_28(14)" might be a misleading error and the cause is actually "java.security.AccessControlException"
My client is 9.0.1
Revision 20131022.1138 (Release 9.0.1)
We have tried reinstalling the Notes, Designer and Admin Clients
Any ideas would be appreciated
Thanks,
Nigel
We got it working by uninstalling the Notes, Designer and Admin Clients and all files relating to lotus Notes (keeping copies of the id, names.nsf etc). We also uninstalled Java (not really sure that was required).
When we reinstalled everything the JVM worked.
Thanks to Karl and Duston for their responses

Liberty JAX-RS 2.0 client unmarshalling not working after deploying in IBM Bluemix

I have a REST client code working OK locally in a server but failing to unmarshall JSON into Java when packaged and deployed to Bluemix with same Liberty versión (8.5.5.9). Failing code:
Response response = get("/v0.1/path/" + var + "/path/" + var2);
return response.readEntity(MyClass.class);
In bluemix I get this exception:
2016-05-29T13:32:26.16+0200 [App/0] ERR Caused by:
java.lang.NullPointerException 2016-05-29T13:32:26.16+0200 [App/0]
ERR at
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProviders.getContextResolver(ThreadLocalProviders.java:50)
2016-05-29T13:32:26.16+0200 [App/0] ERR at [internal classes]
2016-05-29T13:32:26.16+0200 [App/0] ERR at
com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider._locateMapperViaProvider(JacksonJsonProvider.java:206)
2016-05-29T13:32:26.16+0200 [App/0] ERR at
com.fasterxml.jackson.jaxrs.base.ProviderBase.locateMapper(ProviderBase.java:853)
2016-05-29T13:32:26.16+0200 [App/0] ERR at
com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:764)
2016-05-29T13:32:26.16+0200 [App/0] ERR at
org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1356)
2016-05-29T13:32:26.16+0200 [App/0] ERR ... 13 more
The REST result by the server is OK. In fact, if I get that JSON code as String and use a Jackson mapper to unmarshall it , it works ok, but not if I do it the standard JAX-RS 2.0 client way:
return response.readEntity(MyClass.class);
which will fail with error above.
Edit:
Liberty Versions used:
The build pack wee run locally (JAX-RS 2.0 client requests working OK) is:
(WebSphere Application Server 8.5.5.9/wlp-1.0.12.cl50920160227-1523) on Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_77-b03 (en_US)
The one in BlueMix (JAX-RS 2.0 client requests throwing NPE at CXF class):
(WebSphere Application Server 2016.5.0.0/wlp-1.0.13.20160430-1625) on IBM J9 VM, version pxa6480sr3-20160428_01 (SR3) (en_US)
Thanks for any help
We currently experience the same problem with our application and Liberty Buildpack Version: v2.9-20160519-1249
It must be a problem with the current buildpack version, because we didn't change our application code and it was working fine with previous deployments to Bluemix.
As a workaround you can explicitly specify a previous liberty buildpack version when deploying your app to Bluemix. Either by using the '-b' parameter on the 'cf push' command or by defining the 'buildpack:" property in your manifest.yml file. Have a look at the following links for details:
new-console.ng.bluemix.net/docs/cfapps/byob.html
docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#buildpack
You can find out the name of the liberty buildpacks available either via 'cf buildpacks' command or here: bpversions.mybluemix.net
Unfortunately, even the previous version liberty_for_java_v2_8-20160430-1011 seems to have the problem described in this thread. Only the oldest version available liberty-for-java_v2_3-20151208-1311 from December last year, is not affected by this problem.
So currently, the only option seems to be to deploy your app via:
$ cf push MYAPP -b liberty-for-java_v2_3-20151208-1311
We are aware of this issue and it's being worked through a Support Ticket. Will update when we have more info.
IBM has recommended us to use the OpenSource Liberty build pack. It is based on 8.5.5.9, the same official download version, and also seems to have solved the problem. To do this we use this manifest.yml
buildpack: https://github.com/cloudfoundry/ibm-websphere-liberty-buildpack.git
env:
IBM_JVM_LICENSE: L-PMAA-A3Z8P2
IBM_LIBERTY_LICENSE: L-MCAO-9SYMVC
JBP_CONFIG_IBMJDK: "version: 1.8.+"
Until they fix the issue I like this workaround as allows to make sure the version deployed in BlueMix is the someone as the one we use locally to develop and test.

Server Worklight Development Server failed to start

I have install latest version of IBM Worklight on Marketplace of eclipse juno. I have create a new project and then run my project Run As > Run on Worklight Development Server. then i have face an error on the server. Please Help me.
Thanks
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
objc[42627]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
/Users/apple/Downloads/eclipse 2/plugins/com.worklight.studio.plugin_6.2.0.00-20140904-1709/liberty/wlp/bin/server: line 710: 42627 Abort trap: 6 "${JAVA_CMD}" "$#"
Your Log says Address Already in use. Restart your eclipse. Make sure process is killed.
Either your eclipse did not exit gracefully or some other application is using the port.
If some application is using the port go to server view of eclipse, expand "worklight development server" and change port in "server.xml" file. Hope that helps
According to your error message it is clearly saying that address already in use , this means the port number id using java.exe in background process.so this time if you stop server also this will not release.For this please do the following.
1.Download TCPView from http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx for windows.
2.Install TcpView , after that you will find the port number say 10080.Right click on port number and end process.Now Clean the project and run the server.
Hope this helps.

Changing the path for Worklight LogDirectory

I want to change the log directory to my custom path. So i have edited the server.xml like below.
<logging consoleLogLevel="OFF" copySystemStreams="false" maxFileSize="5" maxFiles="5" messageFileName="messages.log" logDirectory="/var/log" />
But once i changed and restarted the server it is not starting and throwing the below error
Launching LibertyServer (WebSphere Application Server 8.5.5.0/wlp-1.0.3.20130510-0831) on Java HotSpot(TM) 64-Bit Server VM, version 1.6.0_45-b06 (en_US)
[AUDIT ] CWWKE0001I: The server LibertyServer has been launched.
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at ../../../src/share/instrument/JPLISAgent.c line: 806
Worklight version 6.0.0.2 Liberty profile version 8.5.5.0-20130510-0831
if you need any info please comment.
Found the issue. it is the problem with the permission.
Please follow the below steps to avoid the errors.
Modify server.xml logging property like in the question.
Modifying value of ‘com.ibm.ws.logging.log.directory’ property in bootstrap.properties file to "/var/log"
Giving write permission to wladmin in folder ‘/var/log’ using the following command.
chmod -R 777 /var/log with superuser (superuser is root)

Error in transporting an application from development worklight to Worklight Server Consumer Edition

I am using IBM Worklight environment. I have created a small application "SampleHybridProject" using Worklight Developer studio and tested it successfully.
Now when I am trying to deploy it on the Worklight Server Consumer Edition, and hitting the following URL: http://mymachine.com:9080/SampleHybridProject/console
I am getting this error in my browser:
Error 404: com.ibm.ws.webcontainer.servlet.exception.NoTargetForURIException: No target servlet configured for uri: /SampleHybridProject/console
I am using Worklight Edition 5.0.6. The Worklight Server is default "WAS with Liberty profile".
Here are the properties that I changed in worklight.properties file.
publicWorkLightHostname=localhost
publicWorkLightProtocol=http
publicWorkLightPort=9080
publicWorkLightContext=/SampleHybridProject
wl.db.type=MYSQL
wl.db.url=jdbc:mysql://mysqlinstalledonmypc:3306/WRKLGHT
wl.db.username=root
wl.db.password=admin
Here are the changes that I made in application-descriptor.xml:
<worklightServerRootURL>http://${local.IPAddress}:9080/SampleHybridProject</worklightServerRootURL>
Can you tell me what I am doing wrong or what I need to do?
I have found the problem and solved it. The problem is I was having this error in console.log file:
Error creating bean with name 'txManager' defined in URL [jar:file:/C:/ProgramData/IBM/Worklight/WAS85liberty-server/wlp/usr/shared/resou‌​rces/lib/worklight-jee-library.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/UnifiedClassLoader) previously initiated loading for a different type with name "javax/sql/DataSource"
This was because I had a jar in the server/lib folder of my project which was causing this problem. I removed the jar from server/lib folder and redeployed the .war file. Now the console is getting loaded.
Are you getting any deployment errors in your liberty logs? A 404 on the context root generally means either the WAR was not found, or the context root defaults to something other than 'SampleHybridProject'. If the WAR appears to be loading correctly, it will output where it is listening on similar to:
[AUDIT ] CWWKT0016I: Web application available (default_host): http://[hostname]:port/SampleHybridProject/*
If it says the context root is anything other than SampleHybridProject, you can set it in the tag in liberty's server.xml:
<application id="SampleHybridProject" name="SampleHybridProject"
location="SampleHybridProject.war" type="war"
context-root="SampleHybridProject">
...
</application>