5 Replies Latest reply on Aug 24, 2005 1:45 AM by jason zhengjun

    jnlp requires javax.servlet.InputStream?

    Jens Elkner Apprentice

      Just continue testing 4.0.3RC2 with a rich client using JNLP and get the following exception:

      java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:164)
       at org.jboss.remoting.InvokerRegistry.class$(InvokerRegistry.java:46)
       at org.jboss.remoting.InvokerRegistry.<clinit>(InvokerRegistry.java:64)
       at org.jboss.remoting.Client.<init>(Client.java:74)
       at org.jboss.remoting.Client.<init>(Client.java:68)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:40)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:41)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:88)
       at $Proxy0.testNormalUser(Unknown Source)
       at foo.gui.GuiController.action_JbossConnect(GuiController.java:937)


      Just for completeness - the client uses:
      @Remote public interface Login { public boolean testNormalUser(); }
      which does actually just a security role check, i.e. returns true or an Exception.

      Hmm, ... any hints ?

        • 1. Re: jnlp requires javax.servlet.InputStream?
          Adrian Pitulac Newbie

          Same problem here... What's happening? How can we solve this?

          • 2. Re: jnlp requires javax.servlet.InputStream?
            Martin Donaghy Newbie

            Guys,

            I have just had the same error. If you add the file C:\jboss\jboss-4.0.3RC2\server\all\lib\javax.servlet.jar to the client's classpath it will solve the problem.

            BTW the client jars I use are:

            jbossall-client.jar
            jboss-aop-jdk50.jar
            jboss-aspect-library-jdk50.jar
            jboss-remoting.jar
            javax.servlet.jar

            Martin

            • 3. Re: jnlp requires javax.servlet.InputStream?
              Jens Elkner Apprentice

              Yes, one needs javax.servlet.jar now, too. Actually the subject should be named "Needs a client to be a server?" At the moment my rich client application requires:

              ./server/all/deploy/jboss-hibernate.deployer/ejb3-persistence.jar
              ./server/all/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar
              ./server/all/deploy/jboss-aop-jdk50.deployer/jboss-aspect-library-jdk50.jar
              ./server/all/deploy/ejb3.deployer/jboss-ejb3.jar
              ./server/all/deploy/ejb3.deployer/jboss-ejb3x.jar
              ./server/all/lib/jboss-remoting.jar
              ./server/all/lib/jboss-j2ee.jar
              ./server/all/lib/javax.servlet.jar
              ./client/jboss-client.jar
              ./client/jboss-common-client.jar
              ./client/jboss-transaction-client.jar
              ./client/jbossmq-client.jar
              ./client/jbosssx-client.jar
              ./client/jmx-invoker-adaptor-client.jar
              ./client/jnp-client.jar
              ./lib/concurrent.jar
              ./server/all/deploy/jboss-hibernate.deployer/hibernate3.jar
              ./server/all/deploy/jboss-hibernate.deployer/asm-attrs.jar
              ./server/all/deploy/jboss-hibernate.deployer/asm.jar
              ./server/all/deploy/jboss-hibernate.deployer/cglib-2.1.1.jar

              So about 6 MB - this is almost unbelievable - remember - this is a client app and not a server! Actually the server should do all the work. The client should just have the required stuff to connect/authenticate and send stuff to/receive stuff from the server and I can hardly understand, why there is such a lot of overhead/redundant/never used stuff in those archives. Probably poor design or the lazyness of developers to properly separate client and server stuff ...

              • 4. Re: jnlp requires javax.servlet.InputStream?
                Adrian Pitulac Newbie


                :elkner thanksss a lot.. you're the man..

                I've solved my problems...

                • 5. Re: jnlp requires javax.servlet.InputStream?
                  jason zhengjun Newbie

                  if 4.0.3RC1 also add:
                  server/all/deploy/ejb3.deployer/commons-httpclient.jar