[PJUG Javamail] naming (init context) problem accessing EJBs on JBoss from glassfish - need help ASAP
Zack Radick
zack at crc-corp.com
Tue May 26 14:13:16 EDT 2009
Michael,
Are you setting up your initial context with all of the requisite
properties to connect to JBoss? The first three below are required,
the next two are probably required (depending on your security
settings), and the last three are optional but useful in our case
(and maybe yours).
put( Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory" );
put( Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" );
put( Context.PROVIDER_URL, "jnp://" + host + ":" + port );
put( Context.SECURITY_PRINCIPAL, principal );
put( Context.SECURITY_CREDENTIALS, credentials );
put( "jnp.disableDiscovery", Boolean.toString( jnpDisableDiscovery ) );
put( "jnp.timeout", Integer.toString( jnpTimeoutMillis ) );
put( "jnp.sotimeout", Integer.toString( jnpSoTimeoutMillis ) );
Cheers,
--Zack
At 11:06 AM 5/26/2009, Michael Phoenix wrote:
>I'm using a proprietary API to access EJBs on a jboss server. It works
>fine when I do it from a command line application on a host in our
>LAN, but when I access the same exact method from a Spring Web app
>running on Glassvish V2, I get what looks like a naming problem.
>Here's the pertinent part of the stack trace:
>
>2009-05-26 08:48:40,604 INFO
>(org.springframework.web.servlet.DispatcherServlet:250) -
>FrameworkServlet 'dispatch': initialization completed in 125 ms
>javax.naming.CommunicationException [Root exception is
>java.rmi.ServerException: RemoteException occurred in server thread;
>nested exception is:
> java.rmi.UnmarshalException: error unmarshalling arguments;
>nested exception is:
> java.net.MalformedURLException: no protocol: and]
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:780)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at com.attask.api.APISupport.getAPI(APISupport.java:46)
> at com.lingosys.burnside.api.NameConverter.go(NameConverter.java:50)
> at
> com.lingosys.burnsideweb.DispatchController.actionName(DispatchController.java:23
>
>
>And here's the call to the lookup that's dying:
>Object obj = __iniCtx.lookup(APIHome.JNDI_NAME);
>_______________________________________________
>Web Site - http://www.pjug.org/
>Javamail mailing list
>Javamail at pjug.org
>http://www.pjug.org/mailman/listinfo/javamail
More information about the Javamail
mailing list