10 Replies Latest reply on Jun 3, 2005 7:08 PM by bandini

    com.sun.xml.messaging.saaj.util.ByteInputStream: class not f

    bandini

      com.sun.xml.messaging.saaj.util.ByteInputStream: class not found

      can anybody help me with this error....what classes to import for this and where in JBOSS can i find this...

        • 1. Re: com.sun.xml.messaging.saaj.util.ByteInputStream: class n
          anil.saldhana

          This is Sun's implementation of Saaj. Are you using JWSDP? If yes, then you may find jar files for Sun's Saaj implementation there. This does not belong to JBoss.

          • 2. Re: com.sun.xml.messaging.saaj.util.ByteInputStream: class n
            bandini

            No im not using Suns any implemenation..im simply using JBOSS:

            The full error stack is:

            java.lang.NoClassDefFoundError: com/sun/xml/messaging/saaj/util/ByteInputStream
             at com.sun.xml.rpc.client.dii.BasicCall.<init>(BasicCall.java:116)
             at com.sun.xml.rpc.client.dii.BasicCall.<init>(BasicCall.java:129)
             at com.sun.xml.rpc.client.BasicService.createCall(BasicService.java:158)
             at com.sun.xml.rpc.client.BasicService.createCall(BasicService.java:138)
             at com.tps.test.testWS1.testClient(testWS1.java:57)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
             at java.lang.reflect.Method.invoke(Unknown Source)
             at junit.framework.TestCase.runTest(TestCase.java:154)
             at junit.framework.TestCase.runBare(TestCase.java:127)
             at junit.framework.TestResult$1.protect(TestResult.java:106)
             at junit.framework.TestResult.runProtected(TestResult.java:124)
             at junit.framework.TestResult.run(TestResult.java:109)
             at junit.framework.TestCase.run(TestCase.java:118)
             at junit.framework.TestSuite.runTest(TestSuite.java:208)
             at junit.framework.TestSuite.run(TestSuite.java:203)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)
            
            
            
            


            Also im adding my client code:

            
            public void testServletContextExactAccess() throws Exception {
            
             log.debug("CLIENT COMPONENT TALKING TO SERVER: 1 ");
             URL url = new URL("http://localhost:8080/server-ejb/OrganizationServiceEJB?wsdl");
             QName qname = new QName("http://localhost:8080/ws4ee", "OrganizationServiceEJB");
            
             try {
             ServiceFactory factory = ServiceFactory.newInstance();
             Service service = factory.createService(url, qname);
             OrganizationEndpoint endpoint = (OrganizationEndpoint) service.getPort(OrganizationEndpoint.class);
            
             log.debug("CLIENT COMPONENT TALKING TO SERVER: 2 ");
             String info = endpoint.getContactInfo("TPS");
             log.debug("The boss is currently out of office, please call again." + info);
             log.debug("CLIENT COMPONENT TALKING TO SERVER: 3 ");
             } catch (Exception e) {
             log.error("Oops", e);
             }
             }
            
            



            Libraries i imported are:

            import com.sun.xml.*;
            import java.net.URL;
            import javax.xml.namespace.QName;
            import javax.xml.rpc.Service;
            import javax.xml.rpc.ServiceFactory;
            import javax.xml.rpc.Call;
            import javax.xml.namespace.QName;
            
            


            Also i have the requd files in my class path:

            I have added the axis.jar from the relevant axis distro to our classpath.

            I have copied the wsdl4j.jar to under jboss-home\server\default\deploy\jboss-ws4ee-sar

            I have axis-ws4ee.jar under jboss-home\server\default\deploy\jboss-ws4ee.sar

            I have jboss-jaxrpc.jar (under jboss-home\server\default\lib

            I have namespace.jar (under jboss-home/lib)

            Any help will be appreciated...

            Thanx


            • 3. Re: com.sun.xml.messaging.saaj.util.ByteInputStream: class n
              anil.saldhana

              why are u importing com.sun.*

              • 4. Re: com.sun.xml.messaging.saaj.util.ByteInputStream: class n
                bandini

                sorry my import files are as below:

                import java.net.URL;
                import javax.xml.namespace.QName;
                import javax.xml.rpc.Service;
                import javax.xml.rpc.ServiceFactory;
                import javax.xml.rpc.Call;


                it doesnt have anythin from sun

                Thnaks in advance

                • 5. Re: com.sun.xml.messaging.saaj.util.ByteInputStream: class n
                  anil.saldhana

                  Can you check whether "javax.xml.rpc.ServiceFactory" is present in your axis.jar or any other jar that does not belong to jboss?

                  The problem is that the javax.xml.rpc.ServiceFactory implementation is instantiating "com.sun.xml.rpc.client.BasicService" when it should be instantiating "org.jboss.webservice.client.ServiceFactoryImpl"

                  So my guess is that some jar that holds javax.xml.rpc.ServiceFactory implementation is conflicting with the one provided by jboss.

                  • 6. Re: com.sun.xml.messaging.saaj.util.ByteInputStream: class n
                    bandini

                    Thanx solved that problem above, I had an apache installation, and my code was using the sun.rmi.* from that..but i have one more problem pop up
                    The error is:

                    [ERROR] [main:62] com.tps.test.testWS1.testServletContextExactAccess():32 - Oops
                    java.lang.IllegalStateException: Cannot obtain client config
                     at org.jboss.webservice.client.ServiceImpl.getEngineConfiguration(ServiceImpl.java:323)
                     at org.jboss.webservice.client.ServiceImpl.getAxisClient(ServiceImpl.java:308)
                     at org.apache.axis.client.Service.<init>(Service.java:178)
                     at org.jboss.webservice.client.ServiceImpl.<init>(ServiceImpl.java:106)
                     at org.jboss.webservice.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:112)
                     at com.tps.test.testWS1.testServletContextExactAccess(testWS1.java:24)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at junit.framework.TestCase.runTest(TestCase.java:154)
                     at junit.framework.TestCase.runBare(TestCase.java:127)
                     at junit.framework.TestResult$1.protect(TestResult.java:106)
                     at junit.framework.TestResult.runProtected(TestResult.java:124)
                     at junit.framework.TestResult.run(TestResult.java:109)
                     at junit.framework.TestCase.run(TestCase.java:118)
                     at junit.framework.TestSuite.runTest(TestSuite.java:208)
                     at junit.framework.TestSuite.run(TestSuite.java:203)
                     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)
                     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)
                     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)
                    
                    


                    Thanx for the help in advance



                    • 7. Re: com.sun.xml.messaging.saaj.util.ByteInputStream: class n
                      anil.saldhana

                      Check if you have all the ws jar files from the client directory of jboss installation AND stop posting across various forums for the same problem.

                      • 8. Re: com.sun.xml.messaging.saaj.util.ByteInputStream: class n
                        bandini

                        sorry for the inconvinience...
                        I have 2 ws jar files in my directory
                        1> wsdl4j.jar
                        2> jboss-ws4ee.jar

                        and my jboss version is: 4.0.1sp1

                        • 9. Re: com.sun.xml.messaging.saaj.util.ByteInputStream: class n
                          bandini

                          Hi,

                          I was wondering is that the jar files needed, or im missig somethin...let me know

                          Thanx so much for ur support

                          • 10. Re: com.sun.xml.messaging.saaj.util.ByteInputStream: class n
                            bandini

                            Its up...thank you Anil for ur support....