Hello,
I'm trying to create a simples stand alone EJB 3.0 client but it jut don't work.
The client woks fine when running on Servet class, but when running a class
with public static void main it does not work.
I'm doing something like this:
| public class SimpleClient {
| public static void main(String...args) throws Exception {
|
| Hashtable t = new Hashtable();
| t.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
| t.put(Context.PROVIDER_URL, "localhost");
|
|
| Context ic = new InitialContext(t);
| ProjectService projetService = (ProjectService) ic.lookup(
SaqueHome.class.getName());
|
| }
| }
|
And I got a ClassCastException: Proxy0
What am I doing wrong? Can anyone help me to wirte a simple EJB 3.0 client?
Thanks,
Fabricio Braga
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3917205#3917205
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3917205
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user