Problem by rnuning ./rar-info.sh my.rar

51 views
Skip to first unread message

chenw...@gmail.com

unread,
Aug 25, 2020, 5:12:57 AM8/25/20
to IronJacamar Users
Hi all,

I am going to upgrade my Jboss EAP 5 to 7. In the aplication deployed on Jboss EAP5 there is an adaptor call my.rar. As I run the command as follow:

 ./rar-info.sh my.rar --stdout

I got some exceptions as follow:
...
java.lang.ClassNotFoundException: org.jboss.resource.deployment.DummyResourceAdapter
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at org.jboss.jca.as.rarinfo.Main.getIntrospectedProperties(Main.java:1279)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:443)
java.lang.UnsatisfiedLinkError: no CPERF in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
        at java.lang.Runtime.loadLibrary0(Runtime.java:871)
        at java.lang.System.loadLibrary(System.java:1124)
        at de.pylon.ra.jni.CPFIF.<clinit>(CPFIF.java:24)
        at de.pylon.ra.connection.RAXAResource.<init>(RAXAResource.java:62)
        at de.pylon.ra.connection.RAManagedConnection.<init>(RAManagedConnection.java:57)
        at de.pylon.ra.connection.ManagedFactory.createManagedConnection(ManagedFactory.java:49)
        at org.jboss.jca.as.rarinfo.Main.hasMcInterface(Main.java:967)
        at org.jboss.jca.as.rarinfo.Main.hasDissociatableMcInterface(Main.java:938)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:519)
java.lang.NoClassDefFoundError: Could not initialize class de.pylon.ra.jni.CPFIF
        at de.pylon.ra.connection.RAXAResource.<init>(RAXAResource.java:62)
        at de.pylon.ra.connection.RAManagedConnection.<init>(RAManagedConnection.java:57)
        at de.pylon.ra.connection.ManagedFactory.createManagedConnection(ManagedFactory.java:49)
        at org.jboss.jca.as.rarinfo.Main.hasMcInterface(Main.java:967)
        at org.jboss.jca.as.rarinfo.Main.hasEnlistableMcInterface(Main.java:944)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:522)
...

But I found the class 'de.pylon.ra.jni.CPFIF' is already inside the my.rar. What could be the problem?



chenw...@gmail.com

unread,
Aug 25, 2020, 5:17:36 AM8/25/20
to IronJacamar Users
and the class ' org.jboss.resource.deployment.DummyResourceAdapter'  is inside the 'jboss-jca-deployer.jar' which is just under the same dir of rar-info.sh.

Tomasz Adamski

unread,
Aug 25, 2020, 11:21:10 AM8/25/20
to IronJacamar Users
Hi,

java.lang.NoClassDefFoundError may result from incorrect class initialization. Could you please check whether it is the case?

Regards,
Tomek


Wei Chen

unread,
Aug 26, 2020, 8:11:31 AM8/26/20
to Tomasz Adamski, IronJacamar Users
Hi,

How to check if the class initialized correctly or not? As I wrote the class is inside the RAR. I attach the RAR again. I am not sure if this has to do with the java version?

And here is the screenshot of my location:

image.png

Regards

Wei Chen



--
You received this message because you are subscribed to a topic in the Google Groups "IronJacamar Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ironjacamar-users/xIrayKbUc-Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ironjacamar-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ironjacamar-users/4d1fe9f3-86f5-4f2b-a360-c01e6d2c5e65n%40googlegroups.com.

Stefano Maestri

unread,
Aug 26, 2020, 8:21:16 AM8/26/20
to IronJacamar Users
it could be related to a static initialization. Basically getting some class loading problem in static method or block.

Coul d you attache the class code?

Best,
S.

chenw...@gmail.com

unread,
Aug 26, 2020, 8:46:18 AM8/26/20
to IronJacamar Users
You mean the code of  'de.pylon.ra.jni.CPFIF' ?

Regards

Wei

Stefano Maestri

unread,
Aug 26, 2020, 8:49:28 AM8/26/20
to chenw...@gmail.com, IronJacamar Users
yup

You received this message because you are subscribed to the Google Groups "IronJacamar Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ironjacamar-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ironjacamar-users/b11e723e-007a-42b8-b03e-4f5d925165c9n%40googlegroups.com.

chenw...@gmail.com

unread,
Aug 27, 2020, 4:14:54 AM8/27/20
to IronJacamar Users
Sorry, the class was created from a third party and I can't find them now. 

Meanwhile I did the following:

 ./converter.sh -ra  TEST-RaCPerf-xa-ds.xml  TEST-RaCPerf-xa-ds-new.xml

The nrew created xml looks as follow:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<resource-adapters>
  <resource-adapter id="ID">
    <archive>RaCPerf.rar</archive>
    <config-property name="ConnectionURL">Oracle_XA+SqlNet=VGERT+Threads=true+Loose_Coupling=false</config-property>
    <config-property name="sessionTimeout">7200</config-property>
    <config-property name="UserName">pylon</config-property>
    <config-property name="Password">pylon</config-property>
    <transaction-support>XATransaction</transaction-support>
    <connection-definitions>
      <connection-definition class-name="FIXME" connectable="false" enabled="true" enlistment="true" jndi-name="java:jboss/adap_cperf" pool-name="adap_cperf" sharable="true" use-ccm="true" use-java-context="true">
        <config-property name="ConnectionURL">Oracle_XA+SqlNet=VGERT+Threads=true+Loose_Coupling=false</config-property>
        <config-property name="sessionTimeout">7200</config-property>
        <config-property name="UserName">pylon</config-property>
        <config-property name="Password">pylon</config-property>
        <xa-pool>
          <prefill>false</prefill>
          <use-strict-min>false</use-strict-min>
          <flush-strategy>FailingConnectionOnly</flush-strategy>
          <pad-xid>false</pad-xid>
          <wrap-xa-resource>true</wrap-xa-resource>
        </xa-pool>
        <security>
          <application/>
        </security>
        <timeout/>
        <validation>
          <validate-on-match>false</validate-on-match>
          <use-fast-fail>false</use-fast-fail>
        </validation>
        <recovery no-recovery="false">
          <recover-credential>
            <user-name>user</user-name>
            <password>password</password>
          </recover-credential>
        </recovery>
      </connection-definition>
    </connection-definitions>
  </resource-adapter>
</resource-adapters>


I copy and paste these into the standalone.xml. But as I start the Jboss I got exceptions in the server.log as follow:
...
2020-08-27 09:35:17,448 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0001: Bound data source [java:/ORGDataSource]
2020-08-27 09:35:18,026 WARN  [org.jboss.as.logging] (MSC service thread 1-2) WFLYLOG0015: The per-logging deployment property (org.jboss.as.logging.per-deployment) has been deprecated. Please use the use-deployment-logging-config attribute to enable/disable per-deployment logging.
2020-08-27 09:35:18,329 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 58) MSC000001: Failed to start service jboss.ra.deployer."RaCPerf.rar": org.jboss.msc.service.StartException in service jboss.ra.deployer."RaCPerf.rar": WFLYJCA0046: Failed to start RA deployment [RaCPerf.rar]
        at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$1.run(ResourceAdapterDeploymentService.java:174)
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1349)
        at java.lang.Thread.run(Thread.java:748)
        at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/opt/jboss-apps/vger-dev/tmp/vfs/temp/temp859b2436b89d821c/content-c1c3ef5b791b5771/contents/
        at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2058)
        at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$WildFLyRaDeployer.doDeploy(ResourceAdapterDeploymentService.java:226)
        at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:124)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
        at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1364)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR
Section: 5.3.1
Description: A ResourceAdapter must be a non-null instance.
Code: org.jboss.resource.deployment.DummyResourceAdapter (ModuleClassLoader for Module "deployment.RaCPerf.rar" from Service Module Loader)

        ... 11 more

2020-08-27 09:35:18,750 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-1) ISPN000128: Infinispan version: Infinispan 'Estrella Galicia' 9.3.8.Final-redhat-00001
2020-08-27 09:35:19,067 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 58) WFLYCLINF0002: Started client-mappings cache from ejb container
2020-08-27 09:35:19,146 INFO  [org.wildfly.security] (MSC service thread 1-2) ELY00001: WildFly Elytron version 1.6.5.Final-redhat-00001
2020-08-27 09:35:19,150 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "RaCPerf.rar")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.ra.deployer.\"RaCPerf.rar\"" => "WFLYJCA0046: Failed to start RA deployment [RaCPerf.rar]
    Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/opt/jboss-apps/vger-dev/tmp/vfs/temp/temp859b2436b89d821c/content-c1c3ef5b791b5771/contents/
    Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR
Section: 5.3.1
Description: A ResourceAdapter must be a non-null instance.
Code: org.jboss.resource.deployment.DummyResourceAdapter (ModuleClassLoader for Module \"deployment.RaCPerf.rar\" from Service Module Loader)
"}}
2020-08-27 09:35:19,155 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "RaCPerf.rar" (runtime-name : "RaCPerf.rar")
2020-08-27 09:35:19,195 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.ra.deployer."RaCPerf.rar": WFLYJCA0046: Failed to start RA deployment [RaCPerf.rar]

2020-08-27 09:35:19,302 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
2020-08-27 09:35:19,303 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://172.22.17.135:9990/management
2020-08-27 09:35:19,304 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://172.22.17.135:9990
2020-08-27 09:35:19,304 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: JBoss EAP 7.2.7.GA (WildFly Core 6.0.24.Final-redhat-00001) started (with errors) in 9286ms - Started 390 of 646 services (2 services failed or missing dependencies, 401 services are lazy, passive or on-demand)
...

Regards!

Tomasz Adamski

unread,
Aug 28, 2020, 5:40:37 AM8/28/20
to IronJacamar Users
It seems like  org.jboss.resource.deployment.DummyResourceAdapter class is not present in your rar archive.

Regards,
Tomek

Wei Chen

unread,
Aug 31, 2020, 4:19:43 AM8/31/20
to Tomasz Adamski, IronJacamar Users
Hi all,

Now I've put the 'jboss-jca-deployer.jar' into the RAR which contains the class of org.jboss.resource.deployment.DummyResourceAdapter. I run the command agin:
 ./rar-info.sh RaCPerf.rar --stdout

and this time I got less exceptions as follow:
...
]$ ./rar-info.sh RaCPerf.rar --stdout
Archive:        RaCPerf.rar
JCA version:    1.5
Type:           OutBound
Transaction:    XATransaction
Reauth:         Yes
Compliant:      No
Native:         No

Structure:
----------
META-INF/
META-INF/MANIFEST.MF
META-INF/ra.xml
jboss-jca-deployer.jar
ra.jar

Resource-adapter:
-----------------
Class: org.jboss.resource.deployment.DummyResourceAdapter

Managed-connection-factory:
---------------------------
Class: de.pylon.ra.connection.ManagedFactory
  Validating: No
  Association: No
  TransactionSupport: No
  Sharable: java.lang.UnsatisfiedLinkError: no CPERF in java.library.path

        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
        at java.lang.Runtime.loadLibrary0(Runtime.java:871)
        at java.lang.System.loadLibrary(System.java:1124)
        at de.pylon.ra.jni.CPFIF.<clinit>(CPFIF.java:24)
        at de.pylon.ra.connection.RAXAResource.<init>(RAXAResource.java:62)
        at de.pylon.ra.connection.RAManagedConnection.<init>(RAManagedConnection.java:57)
        at de.pylon.ra.connection.ManagedFactory.createManagedConnection(ManagedFactory.java:49)
        at org.jboss.jca.as.rarinfo.Main.hasMcInterface(Main.java:967)
        at org.jboss.jca.as.rarinfo.Main.hasDissociatableMcInterface(Main.java:938)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:519)
Unknown
  Enlistment: java.lang.NoClassDefFoundError: Could not initialize class de.pylon.ra.jni.CPFIF

        at de.pylon.ra.connection.RAXAResource.<init>(RAXAResource.java:62)
        at de.pylon.ra.connection.RAManagedConnection.<init>(RAManagedConnection.java:57)
        at de.pylon.ra.connection.ManagedFactory.createManagedConnection(ManagedFactory.java:49)
        at org.jboss.jca.as.rarinfo.Main.hasMcInterface(Main.java:967)
        at org.jboss.jca.as.rarinfo.Main.hasEnlistableMcInterface(Main.java:944)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:522)
Unknown
  CCI: Yes
  Config-property: ConnectionURL (java.lang.String)
  Config-property: UserName (java.lang.String)
  Config-property: Password (java.lang.String)
  Config-property: sessionTimeout (java.lang.Integer)
...

My RAR is an adaptor for the C/C++ and Java program. It seems it needs the C/C++ libraries (the so files). I have these .so files. But I don't know where to put them.

Now I got the source code of the 'de.pylon.ra.jni.CPFIF'. It looks as follow:

 

Regards
   

chenw...@gmail.com

unread,
Aug 31, 2020, 4:23:15 AM8/31/20
to IronJacamar Users
jca.jpg

Tomasz Adamski

unread,
Aug 31, 2020, 3:15:12 PM8/31/20
to IronJacamar Users
Hi,

Have you tried to set the  java.library.path system variable so that it points to the folder where you .so library is located?

Regards,
Tomek

chenw...@gmail.com

unread,
Sep 9, 2020, 10:38:06 AM9/9/20
to IronJacamar Users
Hi,

Sorry for the late reply.

After I insert the jar into the RAR, it is ok now.

Many thanks!

Reply all
Reply to author
Forward
0 new messages