Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't find SerialContextProvider - SOS!!!

Saeed Amer
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello there,

I am trying to solve this problem for the past few hours and nothing has helped so far

I am writing a client program to use an Entity Bean. I am using
JBoss-3.0.6_tomcat-4.1.18 on Windows 2000.

Here is how I seup the JNDI properties:
----------- JNDI Props ----------
props.setProperty ("java.naming.factory.url.pkgs", "org.jboss.naming rg.jnp.interfaces");
props.setProperty ("java.naming.provider.url", "localhost");

and when I do a "lookup" for the entity bean, I get following error:
----------- ERROR -----
javax.naming.CommunicationException: Can't find SerialContextProvider
at com.sun.enterprise.naming.SerialContext.getProvider(
at com.sun.enterprise.naming.SerialContext.lookup(
at javax.naming.InitialContext.lookup(
at Client_1.main(

If I use "org.jnp.interfaces.NamingContextFactory" instead of "com.sun.enterprise.naming.SerialInitContextFactory" for "java.naming.factory.initial", I get following error (error occurs during InitialContext() creation)
javax.naming.NoInitialContextException: Cannot instantiate class: java.naming.factory.initial [Root exception is java.lang.ClassNotFoundException: java.naming.factory.initial]
at javax.naming.spi.NamingManager.getInitialContext(
at javax.naming.InitialContext.getDefaultInitCtx(
at javax.naming.InitialContext.init(
at javax.naming.InitialContext.<init>(
at Client_1.getInitialContext(
at Client_1.main(
Caused by: java.lang.ClassNotFoundException: java.naming.factory.initial
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at com.sun.naming.internal.VersionHelper12.loadClass(
at javax.naming.spi.NamingManager.getInitialContext(
... 5 more

Any clues where I am making the mistake?


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic