Running rJava within JRI in JBoss - rjava

I'm running an R script in Jboss (a java application server) using JRI. Within the R script I have a call to a Java class.
Therefore, this is what I have:
Java program in JBoss --> invokes JRI and runs R script --> invokes Java program.
When I attempt to run the following script in JRI:
s <- .jnew("java/lang/String", "Hello World")
print(s)
The program runs, however throws the following exception:
12:18:16,786 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)
java.lang.NoClassDefFoundError: RJavaClassLoader
12:18:16,786 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
org.rosuda.JRI.Rengine.rniEval(Native Method)
12:18:16,786 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
org.rosuda.REngine.JRI.JRIEngine.eval(JRIEngine.java:281)
12:18:16,802 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
org.rosuda.REngine.REngine.parseAndEval(REngine.java:102)
12:18:16,803 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
org.rosuda.REngine.REngine.parseAndEval(REngine.java:108)
The first time I run an rJava statement, I get the exception. From then on, it almost works fine, the main problem is that the environment is not stable, as I see many exceptions from time to time.
I know that is possible to run rJava from within JRI, but is it possible in an application server like Jboss instead of a plain Java object?

Related

Why does Test Connection fail in Wildfly 20 Using SQL Anywhere sajdbc4 driver?

I had Wildfly 10 running previously and have just upgraded to Wildfly 20 (under Ubuntu 20). My configuration from Wildfly 10 no longer works when it comes to getting the Sybase SQL Anywhere 17 sajdbc4 driver working. When I "Test Connection" it fails. I am using the same configuration and testing against the exact same (SQL Anywhere High Availability) database server.
"Test Connection" on the following Datasource triggers an "Invalid ODBC handle" error:
<datasource jndi-name="java:jboss/datasources/TestDB" pool-name="TestDB" spy="true" tracking="true" enlistment-trace="true">
<connection-url>jdbc:sqlanywhere:Host=192.168.1.45:19000,192.168.1.45:19001;ServerName=TestDB</connection-url>
<driver>sajdbc4.jar</driver>
<security>
<user-name>...</user-name>
<password>...</password>
</security>
</datasource>
Connection is not valid
Caused by: java.sql.SQLException: Invalid ODBC handle
at deployment.sajdbc4.jar//sap.jdbc4.sqlanywhere.IDriver.makeODBCConnection(Native Method)
at deployment.sajdbc4.jar//sap.jdbc4.sqlanywhere.IDriver.connect(IDriver.java:809)
at org.jboss.ironjacamar.jdbcadapters#1.4.22.Final//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:321)
... 35 more
How I set this up:
I used the console to Deploy the sajdbc4.jar and that appears to work fine. I see no errors and sajdbc4 shows up as Deployed in the console and it also shows up as a JDBC Driver in the Subsystems. Here is what was created in standalone.xml after using the console:
deployment name="sajdbc4.jar" runtime-name="sajdbc4.jar">
content sha1="b690ff7a8ba1a3c2e8dd5079138b7970d969c2b9"/>
/deployment>
(I had to drop the leading angle brackets to get the previous lines to show - even when marked as Code!)
Next I had to ensure that the java.library.path and classpath included the path to the sajdbc4.jar and its support files so Wildfly can find them. To do so I added the "HACK" to the following in standalone.conf:
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
# ADDED FOLLOWING HACK
JAVA_OPTS="$JAVA_OPTS -Djava.library.path=/opt/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main -cp .:/opt/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main/sajdbc4.jar"
echo "Java Properties Next:"
java -XshowSettings:properties -version
else
echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
fi
Finally, I added the datasource block shown at the top. After starting Wildfly TestDB shows up as a Datasource in the Datasources Subsystem but when I Test Connection I get the "Invalid ODBC handle" error.
I feel confident that the driver and all its support files are "working" because I have a very simple Java test app that just makes a connection to TestDB, fetches from a table and displays the rows. Note that it uses the exact same java.library.path and classpath as I set in standalone.conf:
cd $HOME/Desktop
export LD_LIBRARY_PATH=/opt/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main
export CLASSPATH=.:/opt/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main/sajdbc4.jar
java sajdbc4DriverTest.java
Note that server.log shows no errors and in fact shows lines like:
[org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "sajdbc4.jar" (runtime-name: "sajdbc4.jar")
...
[org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0005: Deploying non-JDBC-compliant driver class sap.jdbc4.sqlanywhere.IDriver (version 4.0)
[org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0018: Started Driver service with driver-name = sajdbc4.jar
[org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) WFLYJCA0001: Bound data source [java:jboss/datasources/TestDB]
...
[org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "sajdbc4.jar" (runtime-name : "sajdbc4.jar")
Note that my connection string is for connecting to a SQL Anywhere High Availability system (hence the two URLS). In Wildfly 20 I see that there is now a new "HA URL Separator" field in the console's Datasource definition page. I tried setting that to a comma and that just changed the Test Connection error to "Unable to create connection from URL":
2020-08-25 11:45:08,378 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (External Management Request Threads -- 1) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: IJ031085: Unable to create connection from URL: jdbc:sqlanywhere:Host=192.168.1.45:19000,192.168.1.45:19001;ServerName=TestDB
at org.jboss.ironjacamar.jdbcadapters#1.4.22.Final//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getHALocalManagedConnection(LocalManagedConnectionFactory.java:381)
How do I get "Test Connection" to work?
Thank you in advance.
The problem turned out to be related to the fact that I was running Wildfly as a service and apparently my efforts above to set the java.library.path is failing. I know the reason for the error but I do not know how to set the path when running as a service.

Consumer thread error, thread abort on SimpleMessageListenerContainer

I have a application that is running a few months but recently the application is throw a error during receipt message by mq.
When the error is throw the application don't consume more messages. Restarting the application the consume of message is running normaly.
Erro:
4644201:[2018-10-02 10:34:31,068] ERROR [SimpleAsyncTaskExecutor-1] o.s.a.r.l.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1473) - Consumer thread error, thread abort.
4644418-java.lang.NoClassDefFoundError: org/springframework/classify/SubclassClassifier$ClassComparator
4644514- at org.springframework.classify.SubclassClassifier.classify(SubclassClassifier.java:115)
4644604- at org.springframework.classify.BinaryExceptionClassifier.classify(BinaryExceptionClassifier.java:104)
4644708- at org.springframework.retry.policy.SimpleRetryPolicy.retryForException(SimpleRetryPolicy.java:191)
4644809- at org.springframework.retry.policy.SimpleRetryPolicy.canRetry(SimpleRetryPolicy.java:143)
4644901- at org.springframework.retry.support.RetryTemplate.canRetry(RetryTemplate.java:357)
4644986- at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:291)
4645072- at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:172)
4645156- at org.springframework.retry.interceptor.RetryOperationsInterceptor.invoke(RetryOperationsInterceptor.java:98)
4645268- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
4645378- at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
4645471- at com.sun.proxy.$Proxy89.invokeListener(Unknown Source)
4645529- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:1238)
4645662- at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:727)
4645799- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:1192)
4645937- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:1176)
4646073- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1100(SimpleMessageListenerContainer.java:99)
4646201- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1370)
4646354- at java.lang.Thread.run(Thread.java:748)
4646396-Caused by: java.lang.ClassNotFoundException: org.springframework.classify.SubclassClassifier$ClassComparator
You are missing spring-retry on the class path. What are you using for dependency management? It should be added to the classpath automatically when using Maven or Gradle since it's a transitive dependency of spring-amqp.
Restarting the application the consume of message is running normaly.
That makes no sense; unless you have some kind of weird classloader problem.
Try running with -verbose to get logs for all the class loading.

MobileFirst v7.0 Operations Console shows "No runtimes installed" despite Server Configuration Tool showing Runtime. Some errors in logs

This one has me beat, I've looked around at a lot of other posts/questions both on Stack Overflow and elsewhere, as well as spoken to some IBMers who don't know the cause either.
I have set up a MobileFirst Platform Server in a VM as per the instructions in the knowledge centre for v7.0 "Tutorial for a basic installation of MobileFirst Server" (using DB2 as the Database). I have followed every step, yet at step #9, the Operations Console does not actually show the runtime as I would expect. This means I am unable to deploy the adapters etc. to be able to test the app properly on a physical device. (Eventually this VM will have public IP exposure so we can use/demo the application on any internet connection).
The application Center etc. deployed to the server is working fine and I have been able to connect my phone and tablet to it to download the deployed APKs and install them fine. It's just this runtime issue that's not working.
There are a few messages in the logs, that based on my research indicate errors that can either be ignored, or that were already fixed in 6.3. I'd love for someone to be able to shed some light on what's causing the issue, this is driving a few of us bananas. We believe it may be something to do with a JMX or SSLSocket error but cannot actually figure out the exact cause or how to rectify it (as we're not using ssl at all that we know of).
Screenshot of The Server Conf Tool
http://www.files.interestingmix.com.au/stack/mfps_servconf_runtime.png
Screenshot of The Operations Console
http://www.files.interestingmix.com.au/stack/mfps_opscons_noruntime.png
(The following server logs were cleansed before the "server start simpleserver" operation)
Extract from messages.log
E FWLSE0320E: Failed to check whether the admin services are ready. Caused by: [project worklight]
java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:2)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:9)
at com.ibm.net.ssl.www2.protocol.https.c.createSocket(c.java:145)
at sun.net.NetworkClient.doConnect(NetworkClient.java:174)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:407)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:502)
at com.ibm.net.ssl.www2.protocol.https.c.<init>(c.java:103)
at com.ibm.net.ssl.www2.protocol.https.c.a(c.java:25)
at com.ibm.net.ssl.www2.protocol.https.d.getNewHttpClient(d.java:20)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:943)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:11)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:479)
at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:63)
at com.ibm.ws.jmx.connector.client.rest.internal.RESTMBeanServerConnection.loadJMXServerInfo(RESTMBeanServerConnection.java:240)
at com.ibm.ws.jmx.connector.client.rest.internal.RESTMBeanServerConnection.<init>(RESTMBeanServerConnection.java:161)
at com.ibm.ws.jmx.connector.client.rest.internal.Connector.connect(Connector.java:371)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:278)
at com.worklight.common.util.jmx.LibertyRuntimeMBeanHandler.getMBeanServerConnection(LibertyRuntimeMBeanHandler.java:84)
at com.worklight.common.util.jmx.MBeanConnectorFactory.getLocalMBeanProxy(MBeanConnectorFactory.java:139)
at com.worklight.core.jmx.ProjectSynchronizationBean.isReady(ProjectSynchronizationBean.java:126)
at com.worklight.core.init.WorklightServletInitializer$1.run(WorklightServletInitializer.java:140)
at java.lang.Thread.run(Thread.java:780)
Caused by: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.SSLJsseUtil.b(SSLJsseUtil.java:147)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:8)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:3)
at javax.net.ssl.HttpsURLConnection.<init>(HttpsURLConnection.java:19)
at com.ibm.net.ssl.www2.protocol.https.b.<init>(b.java:94)
at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:3)
at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:8)
at java.net.URL.openConnection(URL.java:983)
at com.ibm.ws.jmx.connector.client.rest.internal.RESTMBeanServerConnection.getBasicConnection(RESTMBeanServerConnection.java:1835)
at com.ibm.ws.jmx.connector.client.rest.internal.RESTMBeanServerConnection.getConnection(RESTMBeanServerConnection.java:1923)
at com.ibm.ws.jmx.connector.client.rest.internal.RESTMBeanServerConnection.getConnection(RESTMBeanServerConnection.java:1896)
at com.ibm.ws.jmx.connector.client.rest.internal.RESTMBeanServerConnection.getConnection(RESTMBeanServerConnection.java:1892)
at com.ibm.ws.jmx.connector.client.rest.internal.RESTMBeanServerConnection.loadJMXServerInfo(RESTMBeanServerConnection.java:231)
at com.ibm.ws.jmx.connector.client.rest.internal.RESTMBeanServerConnection.<init>(RESTMBeanServerConnection.java:155)
at com.ibm.ws.jmx.connector.client.rest.internal.Connector.connect(Connector.java:371)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:278)
at com.worklight.common.util.jmx.LibertyRuntimeMBeanHandler.getMBeanServerConnection(LibertyRuntimeMBeanHandler.java:84)
at com.worklight.common.util.jmx.MBeanConnectorFactory.getLocalMBeanProxy(MBeanConnectorFactory.java:139)
at com.worklight.core.jmx.ProjectSynchronizationBean.isReady(ProjectSynchronizationBean.java:126)
at com.worklight.core.init.WorklightServletInitializer.initialize(WorklightServletInitializer.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:613)
at com.worklight.server.bundle.project.JeeProjectActivator$1.run(JeeProjectActivator.java:227)
at com.worklight.server.bundle.project.JeeProjectActivator.contextInitialized(JeeProjectActivator.java:268)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:2374)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:1044)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:6342)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(DynamicVirtualHost.java:446)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApplication(DynamicVirtualHost.java:441)
at com.ibm.ws.webcontainer.osgi.WebContainer.startWebApplication(WebContainer.java:761)
at com.ibm.ws.webcontainer.osgi.WebContainer.startModule(WebContainer.java:739)
at com.ibm.ws.app.manager.web.internal.WebModuleHandlerImpl.deployModule(WebModuleHandlerImpl.java:106)
at com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployModule(DeployedAppInfoBase.java:538)
at com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployModules(DeployedAppInfoBase.java:457)
at com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployApp(DeployedAppInfoBase.java:411)
at com.ibm.ws.app.manager.war.internal.WARApplicationHandlerImpl.install(WARApplicationHandlerImpl.java:73)
at com.ibm.ws.app.manager.internal.statemachine.StartAction.execute(StartAction.java:139)
at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.enterState(ApplicationStateMachineImpl.java:1166)
at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.run(ApplicationStateMachineImpl.java:779)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:626)
... 1 more
[3/26/15 14:20:44:058 EST] 00000045 SystemErr R Exception in thread "Initialization thread for Worklight runtime worklight"
[3/26/15 14:20:44:058 EST] 00000045 SystemErr R java.lang.RuntimeException: Timeout while waiting for the management service to start up.120 secs.
[3/26/15 14:20:44:060 EST] 00000045 SystemErr R at com.worklight.core.init.WorklightServletInitializer$1.run(WorklightServletInitializer.java:144)
[3/26/15 14:20:44:061 EST] 00000045 SystemErr R at java.lang.Thread.run(Thread.java:780)
[3/26/15 14:22:45:591 EST] 0000004d com.ibm.worklight.admin.common.util.ContextPropertyUtil I Resource conf/jndi/default.properties not found. This is not an error. Context path is /worklightconsole
[3/26/15 14:22:46:078 EST] 0000005a SystemErr R 249960 WorklightManagementPU-db2 INFO [LargeThreadPool-thread-32] openjpa.Runtime - Starting OpenJPA 1.2.2
[3/26/15 14:22:46:084 EST] 0000005a SystemErr R 249966 WorklightManagementPU-db2 INFO [LargeThreadPool-thread-32] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DB2Dictionary" (DB2/LINUXX8664 SQL10053 ,IBM Data Server Driver for JDBC and SQLJ 4.17.29).
[3/26/15 14:22:46:182 EST] 0000005a com.worklight.common.util.jmx.LibertyRuntimeMBeanHandler I Establishing REST connection to service:jmx:rest://localhost:9443/IBMJMXConnectorREST
[3/26/15 14:22:46:189 EST] 0000005a com.ibm.worklight.admin.services.RuntimeService E Failed to obtain JMX connection to access an MBean.
There might be a JMX configuration error: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
[3/26/15 14:22:46:607 EST] 0000005a com.ibm.worklight.admin.services.RuntimeService W No running mxbeans found
Extract from console.log
[AUDIT ] CWWKF0011I: The server simpleServer is ready to run a smarter planet.
[err] dataBaseFromDataSource=true
[err] dataBaseUrl=jdbc:db2://mobilefirstdev7.local.com:50000/APPCNTR
[err] dataBaseDriver=IBM Data Server Driver for JDBC and SQLJ
[err] dataBaseDriverVersion=4.17
[err] dataBaseProduct=DB2/LINUXX8664
[err] dataBaseVersion=SQL10053
[err] dataBaseUser=db2inst1
[err] 153 appcenterdb-db2 INFO [LargeThreadPool-thread-14] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 360 appcenterdb-db2 INFO [LargeThreadPool-thread-14] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DB2Dictionary" (DB2/LINUXX8664 SQL10053 ,IBM Data Server Driver for JDBC and SQLJ 4.17.29).
[err] 376 WorklightManagementPU-db2 INFO [LargeThreadPool-thread-15] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 34 WorklightPU WARN [LargeThreadPool-thread-16] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightPU', root URL [file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[err] 1 WorklightReportsPU WARN [LargeThreadPool-thread-16] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightReportsPU', root URL [file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[err] 731 WorklightManagementPU-db2 INFO [LargeThreadPool-thread-15] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DB2Dictionary" (DB2/LINUXX8664 SQL10053 ,IBM Data Server Driver for JDBC and SQLJ 4.17.29).
[err] 2699 WorklightPU INFO [LargeThreadPool-thread-16] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 2861 WorklightPU INFO [LargeThreadPool-thread-16] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DB2Dictionary".
[err] 3567 WorklightManagementPU-db2 INFO [LargeThreadPool-thread-15] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
[AUDIT ] CWWKZ0001I: Application wladmin started in 38.705 seconds.
[AUDIT ] CWWKZ0001I: Application applicationcenter started in 39.095 seconds.
[AUDIT ] CWWKZ0001I: Application worklight started in 41.892 seconds.
[ERROR ] FWLSE0320E: Failed to check whether the admin services are ready. Caused by: [project worklight]
java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
[err] Exception in thread "Initialization thread for Worklight runtime worklight"
[err] java.lang.RuntimeException: Timeout while waiting for the management service to start up.120 secs.
[err] at com.worklight.core.init.WorklightServletInitializer$1.run(WorklightServletInitializer.java:144)
[err] at java.lang.Thread.run(Thread.java:780)
[err] 249960 WorklightManagementPU-db2 INFO [LargeThreadPool-thread-32] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 249966 WorklightManagementPU-db2 INFO [LargeThreadPool-thread-32] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DB2Dictionary" (DB2/LINUXX8664 SQL10053 ,IBM Data Server Driver for JDBC and SQLJ 4.17.29).
[ERROR ] Failed to obtain JMX connection to access an MBean.
There might be a JMX configuration error: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
[WARNING ] No running mxbeans found
Check this post - you cannot use full profile Java SDK by default with Liberty as it is configured to different SSLFactory.
You either need to:
- switch to Oracle JVM
- use separately downloadable IBM SDK for Liberty
- make following changes in the Liberty config:
Create jvm.options file with the following content:
-Djava.security.properties=./custom.java.security
Create custom.java.security in the same directory as jvm.options file you just need these two, nothing more:
ssl.SocketFactory.provider=
ssl.ServerSocketFactory.provider=
After some discussions about this error message, the suggestions to solve this are:
To either use a different JRE (Oracle JRE 6 or 7, or IBM JRE 6 or 7 outside of WAS Full Profile).
And/or follow the instructions in the doc link here:
http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.nd.doc/ae/rwlp_trouble.html?cp=SSAW57_8.5.5%2F1-17-0

WebSphere: incompatible with javax.resource.spi.ResourceAdapter

We are trying to deploy an .ear in WAS8.5 Application Server. During the application startup an error is thrown of incompatible ResourceAdapter. The complete stack trace is here.
What could be the possible cause of this? Any pointer would be of great help. Thanks in Advance.
J2CA0043E: An Exception occurred while trying to instantiate a ResourceAdapterJavaBean instance for the installed ResourceAdapter defined by key cells/ux9039Cell01/applications/globalmc-mq-ear.ear/deployments/globalmc-mq-ear/deployment.xml#J2CResourceAdapter_1423058973553.
The exception is: java.lang.ClassCastException: com.gdc.ps.frd.globalmc.ra.NextRecordResourceAdapterImpl incompatible with javax.resource.spi.ResourceAdapter**
at com.ibm.ejs.j2c.RAWrapperImpl.createAndConfigureRA(RAWrapperImpl.java:2236)
at com.ibm.ejs.j2c.RAWrapperImpl.startRA(RAWrapperImpl.java:712)
at com.ibm.ejs.j2c.RALifeCycleManagerImpl.startRA(RALifeCycleManagerImpl.java:1170)
...
FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDCIncident emitted on /apps/WAS8.5/IBM/WebSphere/AppServer/profiles/FFMNode/logs/ffdc/FFMUxSrvr_87506fa8_15.02.05_04.29.59.6196455942349878479476.txt com.ibm.ejs.j2c.RALifeCycleManagerImpl.startRA 1324
[2/5/15 4:29:59:700 CST] 0000007e RALifeCycleMa E J2CA0128E: An Exception occurred while trying to start ResourceAdapter cells/ux9039Cell01/applications/globalmc-mq-ear.ear/deployments/globalmc-mq-ear/deployment.xml#J2CResourceAdapter_1423058973553. T**he exception is: java.lang.ClassCastException:** com.gdc.ps.frd.globalmc.ra.NextRecordResourceAdapterImpl incompatible with javax.resource.spi.ResourceAdapter
at com.ibm.ejs.j2c.RAWrapperImpl.createAndConfigureRA(RAWrapperImpl.java:2236)
at com.ibm.ejs.j2c.RAWrapperImpl.startRA(RAWrapperImpl.java:712)
at com.ibm.ejs.j2c.RALifeCycleManagerImpl.startRA(RALifeCycleManagerImpl.java:1170)
at com.ibm.ejs.j2c.RALifeCycleManagerImpl.resourceProviderEvent(RALifeCycleManagerImpl.java:884)
The error indicates that com.gdc.ps.frd.globalmc.ra.NextRecordResourceAdapterImpl is not a javax.resource.spi.ResourceAdapter.
Has something in your configuration asserted that this class represents a JCA Resource Adapter? It would appear that it isn't.
I think you have multiple copies of class javax.resource.spi.ResourceAdapter. Basically, multiple jars has the same class which is causing the issue.

FileNotFound exception when launching an empty WebSphere server

There was no project deployed to the Websphere server, and I have yet to enable security feature on the WebSphere Server 7.0.
Could it be from previous attempts to create a server? I've not been successful. The directory C:\myworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\ does not exist because I deleted tmp1 folder in an attempt to clean my server environment. Repeat deleted and reinstalling the server does not help.
Here's the stacktrace:
[11/24/14 11:57:00:930 EST] 0000000e ApplicationMg E WSVR0100W: An error occurred initializing, MyApplication
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.NestedJarException: IWAE0008E An error occurred reading MyApplication.war from C:\myWorkspace
Stack trace of nested exception:
java.io.FileNotFoundException: C:\myworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\MyApplication (The system cannot find the path specified.)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:112)
at java.io.FileInputStream.<init>(FileInputStream.java:72)
at

Resources