3 Replies Latest reply on Jun 15, 2003 10:28 PM by Juha Lindfors

    NamingException to connecting from ouside Tomcat 4.2.1 to JB

    Ritchie Koh Newbie

      Dear all.

      I'm developing JBuilder and JBoss 3.2.1.
      After making .ear files with JBuilder, and then deployed to the JBoss.
      Starting tomcat in the jbuilder, there is no error, it runs well.
      But after deploying the web application to the Tomcat 4.1.24 that is outside JBoss,
      When can't lookup Remote Interface, there is a NamingException.

      I did copied the client jars(jboss-j2ee.jar, jboss-client.jar, jbosssx-client.jar, jnp-client.jar, jboss-common-client.jar and log4j.jar) from the JBoss client directory to the %TOMCAT_HOME%/common/lib directory.

      Please let me know how to do.

      And could you let me know how to integrate JBoss 3.2.x with Tomcat 4.1.x that is outside JBoss?

      Regards.

      # Ritchie

        • 1. Re: NamingException to connecting from ouside Tomcat 4.2.1 t
          Juha Lindfors Master

          > Please let me know how to do.

          whats the exception? are you looking up the global home proxy name? is there anything bound under that name in JNDIView?

          > And could you let me know how to integrate JBoss
          > 3.2.x with Tomcat 4.1.x that is outside JBoss?

          In general, you don't want to do this.

          • 2. Re: NamingException to connecting from ouside Tomcat 4.2.1 t
            Ritchie Koh Newbie

            Thanks for your rapid reply, Juha.

            Source code as following.

            -------------------------------------------------------
            Hashtable env = new Hashtable();
            env.put(Context.INITIAL_CONTEXT_FACTORY,
            "org.jnp.interfaces.NamingContextFactory");
            env.put(Context.PROVIDER_URL, "211.48.12.76:1099");
            env.put("java.naming.factory.url.pkgs",
            "org.jboss.naming:org.jnp.interfaces");

            try {

            ctx = new InitialContext(env);

            // JNDI Lookup
            ref = ctx.lookup("net/jbsn/training/session/TrainingSB"); // Occur Error

            --------------------------------------------

            Error Message as following.
            -----------------------------------------------------------
            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: Files/Apache
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
            at sun.rmi.transport.Transport$1.run(Transport.java:148)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            at java.lang.Thread.run(Thread.java:536)
            at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
            at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
            at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
            at javax.naming.InitialContext.lookup(InitialContext.java:347)
            at net.jbsn.training.delegate.TrainingDelegate.(TrainingDelegate.java:47)
            at net.jbsn.training.struts.TrainingListAction.execute(TrainingListAction.java:26)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:506)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:170)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
            at java.lang.Thread.run(Thread.java:536)Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.net.MalformedURLException: no protocol: Files/Apache
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:249)
            at sun.rmi.transport.Transport$1.run(Transport.java:148)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            ... 1 moreCaused by: java.net.MalformedURLException: no protocol: Files/Apache
            at java.net.URL.(URL.java:579)
            at java.net.URL.(URL.java:476)
            at java.net.URL.(URL.java:425)
            at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:743)
            at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:159)
            at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
            at org.jboss.system.JBossRMIClassLoader.loadClass(JBossRMIClassLoader.java:74)
            at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
            at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
            at javax.naming.CompoundName.readObject(CompoundName.java:554)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824)
            at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
            at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:246)
            ... 6 more

            Regards.

            # Ritchie

            • 3. Re: NamingException to connecting from ouside Tomcat 4.2.1 t
              Juha Lindfors Master

              This is your problem:
              java.net.MalformedURLException: no protocol: Files/Apache

              Software installed in directory with spaces in the name will fail more often than not.