Exceptions by running the rar-info.sh

52 views
Skip to first unread message

Wei Chen

unread,
May 11, 2015, 9:01:46 AM5/11/15
to ironjaca...@googlegroups.com
Hi,

I want to figure out the infomation of an RAR file. But as I run the 'rar-info.sh' against the RAR, I got some exceptions as follow:

...
]# ./rar-info.sh RaCPerf.rar
java.lang.ClassNotFoundException: org.jboss.resource.deployment.DummyResourceAdapter
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:274)
        at org.jboss.jca.as.rarinfo.Main.getIntrospectedProperties(Main.java:1150)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:376)
java.lang.UnsatisfiedLinkError: no CPERF in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
        at java.lang.Runtime.loadLibrary0(Runtime.java:849)
        at java.lang.System.loadLibrary(System.java:1088)
        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:863)
        at org.jboss.jca.as.rarinfo.Main.hasDissociatableMcInterface(Main.java:834)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:449)
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:863)
        at org.jboss.jca.as.rarinfo.Main.hasEnlistableMcInterface(Main.java:840)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:452)
Done.


But the NotFoundClass 'de.pylon.ra.jni.CPFIF' is inside the RAR. What could be the problem?


Regards!

Jesper Pedersen

unread,
May 11, 2015, 2:19:51 PM5/11/15
to ironjaca...@googlegroups.com, chenw...@gmail.com
org.jboss.resource.deployment.DummyResourceAdapter doesn't exists anymore, maybe the resource adapter is hard coded against that class. Check your META-INF/ra.xml file.

You could also check what RAXAResource.java:62 does - maybe it assumes something about classloading.

HTH

Wei Chen

unread,
May 12, 2015, 1:27:53 AM5/12/15
to ironjaca...@googlegroups.com
Hi,

I just attached the ra.xml in my other post. The "org.jboss.resource.deployment.DummyResourceAdapter" is realy coded in the ra.xml.


How to check the "what RAXAResource.java:62 does"?

Wei Chen

unread,
May 12, 2015, 2:50:20 AM5/12/15
to ironjaca...@googlegroups.com
Hi,

Now I run the 'rar-info.sh again as follow:

./rar-info.sh -classpath ./lib/* RaCPerf.rar

The error message "java.lang.ClassNotFoundException: org.jboss.resource.deployment.DummyResourceAdapter" is gone since this class is defined in 'jboss-jca.jar' and I copied this to the ./lib.

But how about the other two exceptions?



Am Montag, 11. Mai 2015 15:01:46 UTC+2 schrieb Wei Chen:

Wei Chen

unread,
May 12, 2015, 3:39:57 AM5/12/15
to ironjaca...@googlegroups.com
Further info:

I find the class 'de.pylon.ra.jni.CPFIF' is inside the RAR. But how to find out why this couldn't be initialized?

Wei Chen

unread,
May 12, 2015, 5:00:03 AM5/12/15
to ironjaca...@googlegroups.com
Now, I insert the 'jboss-jca.jar' into the RAR and start the Jboss again. I got another error now as follow:
...
Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public int hashCode()" method.
Code: org.jboss.resource.deployment.DummyResourceAdapter

Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public boolean equals(Object)" method.
Code: org.jboss.resource.deployment.DummyResourceAdapter
...

According the document of Ironjacamar "http://www.ironjacamar.org/doc/userguide/1.1/en-US/html/ch07.html#validator_reports", this means that org.jboss.resource.deployment.DummyResourceAdapter is missing an equals and hashCode implementation.

I am not sure I can't use the old jar from Jboss EAP 5 and have to build a new RAR myself?




Am Montag, 11. Mai 2015 15:01:46 UTC+2 schrieb Wei Chen:

Jesper Pedersen

unread,
May 12, 2015, 10:36:54 AM5/12/15
to ironjaca...@googlegroups.com, chenw...@gmail.com
Don't insert jboss-jca.jar into the .rar -- that is not the way forward.

See the other thread, and then rerun the tool

Jesper Pedersen

unread,
May 12, 2015, 11:47:31 AM5/12/15
to ironjaca...@googlegroups.com, jesper....@comcast.net, chenw...@gmail.com
java.lang.UnsatisfiedLinkError: no CPERF in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
        at java.lang.Runtime.loadLibrary0(Runtime.java:849)
        at java.lang.System.loadLibrary(System.java:1088)
        at de.pylon.ra.jni.CPFIF.<clinit>(CPFIF.java:24)
        at de.pylon.ra.connection.RAXAResource.<init>(RAXAResource.java:62)

for this the resource adapter needs to contain

  • CPERF.dll
  • CPERF.a
  • CPERF.so

Otherwise you have to deploy the resource adapter as <transaction-support>LocalTransaction</> or <transaction-support>NoTransaction</> based on your stack trace...

HTH

Message has been deleted

Wei Chen

unread,
May 13, 2015, 3:10:30 AM5/13/15
to ironjaca...@googlegroups.com, chenw...@gmail.com
Sorry, please ignore my last post. 

Now I've found the other *.so files and put them in the java.library.path. As I run it again, I got other exceptions as follow:
...
]#  ./rar-info.sh -classpath ./lib/* RaCPerf.rar
java.lang.NullPointerException
        at de.pylon.ra.connection.RAManagedConnection.<init>(RAManagedConnection.java:60)
        at de.pylon.ra.connection.ManagedFactory.createManagedConnection(ManagedFactory.java:49)
        at org.jboss.jca.as.rarinfo.Main.hasMcInterface(Main.java:863)
        at org.jboss.jca.as.rarinfo.Main.hasDissociatableMcInterface(Main.java:834)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:449)
java.lang.NullPointerException
        at de.pylon.ra.connection.RAManagedConnection.<init>(RAManagedConnection.java:60)
        at de.pylon.ra.connection.ManagedFactory.createManagedConnection(ManagedFactory.java:49)
        at org.jboss.jca.as.rarinfo.Main.hasMcInterface(Main.java:863)
        at org.jboss.jca.as.rarinfo.Main.hasEnlistableMcInterface(Main.java:840)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:452)
Done.

What could be the reason now?

Jesper Pedersen

unread,
May 13, 2015, 7:47:47 AM5/13/15
to ironjaca...@googlegroups.com, chenw...@gmail.com

Maybe due to https://issues.jboss.org/browse/JBJCA-1270 - you would need to check the source code of the resource adapter to verify.

But the report should be there, and you can use the sample deployment descriptor as a baseline.

HTH
Reply all
Reply to author
Forward
0 new messages