1

I am trying to create a connection pool and trying to consume the Datasource remotely using tomee. I am getting an Exception when i try to do this.

I have defined the DataSource resource in tomee.xml. Then I am trying to access this resource remotely using standard boiler plate code for getting the initialContext (props). I tried for a sample resource like, javax.jms.Queue which works fine, gives no error. but when i try to consume the DataSource resource, getting an exception at the client side. When tomee is started, there is no error in the logs. I can see status 200 in the localhost access log for every request to consume the DataSource resource. I did a research and i read somewhere, that this is a bug. Has anyone done this before ? Thanks in advance.

below is the exception i am getting at the client side.

Exception in thread "main" java.lang.ClassCastException: 
org.apache.openejb.client.ThrowableArtifact cannot be cast to 
java.lang.Error at 
org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:294)


URL used to connect to the server remotely,

http:localhost:8080/demo/tomee/ejb

When i define this resources on the server.xml and contex.xml, and try to access it locally, it works fine. Any help is appreciated.

Jishnu S
  • 71
  • 7

0 Answers0