Title: RE: [jBoss-User] Problem with ear/war with embeded tomcat

Put this

            System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
            System.setProperty("java.naming.provider.url", "localhost");
            System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming;");


before

   InitialContext ctx=new InitialContext();

in your jsp or servlet.


  Mare.

> -----Original Message-----
> From: Scot Bellamy [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 28, 2000 5:39 PM
> To: jBoss
> Subject: Re: [jBoss-User] Problem with ear/war with embeded tomcat
>
>
> I tried exporting the CLASSPATH, and tried modifying the
> run.sh script to
> add the jnp-client.jar to the classpath passed into the java
> command for
> starting jBoss.  Neither made a difference.  I have also placed the
> jnp-client.jar in the /library directory of my ear file. 
> None of these
> made a difference.  It does appear that it is not finding
> org.jnp.interfaces.NamingContextFactory (or is this really
> the problem?)
> but I don't know how else to resolve this. 
>
> Any other ideas?
>
> Thanks,
> Scot.
>
> >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
>
> On 11/28/00, 10:59:23 AM, Adrian K�pe <[EMAIL PROTECTED]>
> wrote regarding
> Re: [jBoss-User] Problem with ear/war with embeded tomcat:
>
>
> > Hi,
> > Put your jnp-client.jar from jboss/client folder in your
> classpath when
> you
> > start the jBoss ... it should solves your problems
> > bye.
>
>
> > Scot Bellamy wrote:
>
> > > I get the same problem with an ear or a war file.  Either
> one deploys
> > > successfully.  But when I attempt to talk to a bean
> through my JSP, I get
> > > a javax.naming.NoInitialContextException (see stack trace
> below).  What
> > > do I need to do to solve this?
> > >
> > > Thanks,
> > > Scot.
> > >
> > > [EmbeddedTomcat] javax.naming.NoInitialContextException:
> Need to specify
> > > class name in environment or system property, or as an
> applet parameter,
> > > or in an application resource file:  java.naming.factory.initial
> > >         at java.lang.Throwable.<init>(Throwable.java:96)
> > >         at java.lang.Exception.<init>(Exception.java:44)
> > >         at
> javax.naming.NamingException.<init>(NamingException.java:103)
> > >         at
> > >
> javax.naming.NoInitialContextException.<init>(NoInitialContext
Exception.
> > > java:55)
> > >         at
> > >
> javax.naming.spi.NamingManager.getInitialContext(NamingManager
> .java:647)
> > >         at
> > >
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
> > >         at
> > >
> javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialCont
ext.java:2
> > > 84)
> > >         at
> javax.naming.InitialContext.lookup(InitialContext.java:351)
> > >         at com.actsi.util.JNDI.lookup(JNDI.java:43)
> > >         at
> > >
> com.actsi.enterprise.EJBSessionMessageProcessor.processMessage
> (EJBSessio
> > > nMessageProcessor.java:62)
> > >         at
> > >
> com.actsi.enterprise.xml.MessagingResponseProvider.processDocu
> ment(Messa
> > > gingResponseProvider.java:55)
> > >         at
> > >
> com.actsi.enterprise.xml.JDOMResponseProvider.processXML(JDOMR
> esponsePro
> > > vider.java:59)
> > >         at
> > >
> com.actsi.enterprise.xml.JDOMResponseProvider.processXML(JDOMR
> esponsePro
> > > vider.java:39)
> > >         at
> com.actsi.enterprise.XMLServlet.doPost(XMLServlet.java:102)
> > >         at
> com.actsi.enterprise.XMLServlet.doGet(XMLServlet.java:61)
> > >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >         at
> > >
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper
.java:404)
> > >         at
> org.apache.tomcat.core.Handler.service(Handler.java:286)
> > >         at
> > >
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> > >         at
> > >
> org.apache.tomcat.core.ContextManager.internalService(ContextM
anager.jav
> > > a:799)
> > >         at
> > >
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:745)
> > >         at
> > >
> org.apache.tomcat.service.http.HttpConnectionHandler.processCo
> nnection(H
> > > ttpConnectionHandler.java:210)
> > >         at
> > >
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
t.java:407)
> > >         at
> > >
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
ol.java:49
> > > 8)
> > >         at java.lang.Thread.run(Thread.java:498)
> > >
> > > --
> > > --------------------------------------------------------------
> > > To subscribe:        [EMAIL PROTECTED]
> > > To unsubscribe:      [EMAIL PROTECTED]
> > > Problems?:           [EMAIL PROTECTED]
>
>
>
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Problems?:           [EMAIL PROTECTED]
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
>

Reply via email to