5

I am trying to run connectorZ JCA 1.6 Executor implementation,
For that I downloaded Zip from github and try to execute the client,
(Work Manager: JCA implementation of java.util.concurrent.Executor)

I am able to run the application in Eclipse, (after solving some of dependency issues)
the jsp page loading fine with the link "Execute 5 blocking tasks",
when I click on particular link I am getting below Exception:

Caused by: java.lang.NullPointerException
    at org.connectorz.threading.ThreadsResource.overload(ThreadsResource.java:72) [classes:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_40]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_40]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_40]
    at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_40]

Here the Issues is executorFactory is null, I am not sure about jndi_name "jca/workmanager".

@Resource(name="jca/workmanager")
WorkExecutorFactory executorFactory; //NPE at executorFactory(not injecting).


Whether I am missing any configuration related to jndi or any resource file?
How can I solve this Issue?

Chandra Sekhar
  • 16,256
  • 10
  • 67
  • 90

1 Answers1

0

Accessing a JCA Module from another deployed module needs three steps:

  1. Deploy the JCA Module to your application server
  2. Create a Connection-Pool for the formerly deployed JCA Module
  3. Create a JNDI Entry for the JCA Module which specifies which Connection-Pool to use.

In your case I think you didn't do step 2 and 3.

The JNDI-Name for the Connection-Pool can be choosen free, but the JNDI-Name for the third step must be the same as the one given by your @Resource-Annotation (= jca/workmanager).

How you execute the above steps depends on your ApplicationServer.

Please note that currently there is a bug containing the @Size-Annotation in the ConnectionFactory class of the RAR module. For Fixing this just comment it out.

  • I am able to deploy JCA module(RAR) in my server, when I try to execute client it's getting same exception (java.lang.NullPointerException at WorkExecutorFactory instance of ThreadsResource class) , could you please explain the way to deploy and run work-manager in connectorz using JBoss EAP 6.1. – Chandra Sekhar Feb 17 '14 at 07:07