Hello,

I have successfully configured derby data source in TomEE and accessed
through my EJB. However when I am trying to access the same datasource
through command client it throws following error

Aug 16, 2013 3:11:08 PM org.apache.openejb.client.EventLogger log
INFO:
RemoteInitialContextCreated{providerUri=http://localhost:8080/tomee/ejb}
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)



My command lien client is as follows - 

Properties props = new Properties();
                props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.RemoteInitialContextFactory");
                props.put(Context.PROVIDER_URL, 
"http://localhost:8080/tomee/ejb";);
                        
                
                InitialContext ctx = new InitialContext(props);
                DataSource dsn = (DataSource)ctx.lookup("DerbyDatabase");



Please help me.



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Error-while-looking-Derby-Datasource-from-Command-Client-in-TomEE-tp4664669.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to