javax.naming.NoInitialContextException in GWT Tomcat

133 views
Skip to first unread message

allioop70

unread,
Mar 20, 2007, 7:58:30 PM3/20/07
to Google Web Toolkit
I have code that works fine when deployed to a server, but when I try
to run within the GWT development shell I get this error:

javax.naming.NoInitialContextException: Cannot instantiate class:
org.jnp.interfaces.NamingContextFactory [Root exception is
java.lang.ClassNotFoundException:
org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)

This is on server-side of GWT while I am trying to access our session
beans.

Any ideas?

Thanks!

Dominik Steiner

unread,
Mar 21, 2007, 4:08:18 AM3/21/07
to Google Web Toolkit
Hi allioop70,

to me it sounds like a classpath issue.

How do you launch the development shell? In eclipse? By any means you
should make sure that the jar with the
org.jnp.interfaces.NamingContextFactory class is in the classpath. In
eclipse you would go to 'Run...' -> 'Classpath' tab -> add the jar to
the user entries.

Hope it helps and tell us if you could make any progress

Dominik

On 21 Mrz., 00:58, "allioop70" <allioo...@gmail.com> wrote:
> I have code that works fine when deployed to a server, but when I try

> to run within theGWTdevelopment shell I get this error:


>
> javax.naming.NoInitialContextException: Cannot instantiate class:
> org.jnp.interfaces.NamingContextFactory [Root exception is
> java.lang.ClassNotFoundException:
> org.jnp.interfaces.NamingContextFactory]
> at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
> at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
> at javax.naming.InitialContext.init(Unknown Source)
> at javax.naming.InitialContext.<init>(Unknown Source)
>

> This is on server-side ofGWTwhile I am trying to access our session
> beans.
>
> Any ideas?
>
> Thanks!

allioop70

unread,
Mar 21, 2007, 1:26:40 PM3/21/07
to Google Web Toolkit
Thanks. That fixed that problem.

But, why will the dev shell not stop at any break points when I run it
this way?


On Mar 21, 2:08 am, "Dominik Steiner" <Dominik.Stei...@partner.bmw-

Dominik Steiner

unread,
Mar 22, 2007, 2:29:57 AM3/22/07
to Google Web Toolkit
Hi allioop70,

well, if you execute 'Run...' it starts the application NOT in debug
mode. In order for the app to stop at breakpoints you have to go to
'Debug...' and do the same as above mentioned.

HTH

Dominik

Reply all
Reply to author
Forward
0 new messages