4 Replies Latest reply on Sep 13, 2005 8:59 AM by rrawasi

    NoInitialContextException & could not create deployment:

    avinash4you

      Hi

      Iam getting this error when running the client. Client jar file is deployed successfully.

      "11:09:39,350 INFO [STDOUT] javax.naming.NoInitialContextException: Cannot insta
      ntiate class: org.jnp.interfaces.NamingcontextFactory. Root exception is
      11:09:39,350 INFO [STDOUT] java.lang.ClassNotFoundException: org.jnp.interfaces
      .NamingcontextFactory
      ..................."

      This error I assume is because it is not finding 'jnp-client.jar' in classpath.

      I tried setting this in run.bat, but it is then giving the error
      "11:14:00,265 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-4.
      0.0RC1/server/default/conf/jboss-service.xml
      org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect
      .UndeclaredThrowableException)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
      :139)......"

      How to set this. Is there anything Iam missing.

      Iam trying to deploy and run application which is successfully deployed and run in weblogic.
      Iam using JBOSS version 4.0.0RC1. Deployment in JBoss is successfull.

      Immediate help appreiciated. Thanks in advance

      - Avinash

        • 1. Re: NoInitialContextException & could not create deployment:
          darranl

          The jar that you need for the client is jbossall-client.jar

          • 2. Re: NoInitialContextException & could not create deployment:
            rrawasi

            Where can I find jboosall-client.jar and where should I put it.

            • 3. Re: NoInitialContextException & could not create deployment:
              darranl

              The jar is in the client folder of the JBoss installation.

              You do not need to put it anywhere you need to add it to the classpath of the client.

              I have just notices you are using JBoss 4.0.0 RC1, you need to upgrade to a later suitable release.

              The RC means 'Release Candidate', this was the first release candidate for JBoss 4.0.0 and was not considered suitable so a second release candidate was made before the final production release was made.

              On top of this there have a number of production release since JBoss 4.0.0

              • 4. Re: NoInitialContextException & could not create deployment:
                rrawasi

                I add that jbossall-client.jar file to my project but I get another error:

                javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
                 at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1399)
                 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
                 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
                 at javax.naming.InitialContext.lookup(Unknown Source)
                 at tutorial.client.ClientTest.go(ClientTest.java:30)
                 at tutorial.client.ClientTest.main(ClientTest.java:39)
                Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
                 at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:254)
                 at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1370)
                 ... 5 more
                Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
                 at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:228)
                 ... 6 more
                Caused by: java.net.ConnectException: Connection refused: connect
                 at java.net.PlainSocketImpl.socketConnect(Native Method)
                 at java.net.PlainSocketImpl.doConnect(Unknown Source)
                 at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
                 at java.net.PlainSocketImpl.connect(Unknown Source)
                 at java.net.Socket.connect(Unknown Source)
                 at java.net.Socket.connect(Unknown Source)
                 at java.net.Socket.<init>(Unknown Source)
                 at java.net.Socket.<init>(Unknown Source)
                 at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
                 at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
                 at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:224)
                 ... 6 more
                

                I use the latest one: jboss-4.0.3RC2 and Our production App server is Jboss 3.0 I , I wish my EJB2 work there too.