9 Replies Latest reply on Sep 3, 2012 9:25 AM by giuliano.rap

    Which versions for eclipse + JBoss AS + JDK  + JBossWS

    giuliano.rap

      Hi,

       

      Where can I see the possible configuration supported to create web services?
      Like eclipse, jdk, JBossWS, JBoss AS, etc...

       

      I am asking because my company has a system in JBoss AS 4.2.2 with jdk 1.6.0_07 and I need to create a web service. But when I try to create the web service using the eclipse wizard, I get the message:

       

      Error: Could not generate. (use --show-traces to see full traces)
      java.lang.NoClassDefFoundError: com/sun/codemodel/JExpression

      at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProviderImpl.java:89)

      at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProviderImpl.java:123)

      at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:184)

      at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:77)
      Caused by: java.lang.ClassNotFoundException: com.sun.codemodel.JExpression

      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

      at java.security.AccessController.doPrivileged(Native Method)

      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

      ... 4 more

       

      I am using the JBossWS from the JBoss AS, at JBossWS Preferences I just appointed to JBoss AS folder...

       

      Any idea?

       

      Thanks!

        • 1. Re: Which versions for eclipse + JBoss AS + JDK  + JBossWS
          giuliano.rap

          I am trying with eclipse Indigo, JBoss AS 4.2.2 with jdk 1.6.0_07. Also I got the jboss-ws-3.0.5.GA.
          But when I try to generate the web service, I get this message:

          Exception in thread "main" java.lang.IllegalStateException: Failed to load: org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl

          at org.jboss.wsf.spi.util.ServiceLoader.loadDefault(ServiceLoader.java:203)

          at org.jboss.wsf.spi.util.ServiceLoader.loadFromSystemProperty(ServiceLoader.java:136)

          at org.jboss.wsf.spi.util.ServiceLoader.loadService(ServiceLoader.java:66)

          at org.jboss.wsf.spi.tools.WSContractProvider.newInstance(WSContractProvider.java:86)

          at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:169)

          at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:76)
          Caused by: java.lang.ClassNotFoundException: org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl

          at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

          at java.security.AccessController.doPrivileged(Native Method)

          at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

          at org.jboss.wsf.spi.util.ServiceLoader.loadDefault(ServiceLoader.java:198)


          Any idea?

          • 2. Re: Which versions for eclipse + JBoss AS + JDK  + JBossWS
            spyhunter99

            That's your problem right there, using eclipse with a plugin for web services. I have never gotten them to work, ever.

            download the distribution for jbossws for the variety and version that you're using on your production system.

             

            Then goto the deploy/bin folder and run wsconsume -k pathToYourWsdl.wsdl

            Grab the generated sources and drop them into your project's src folder.

            Implement the interface provided.

             

            I posted a complete how to not that long ago, source was attached.

            1 of 1 people found this helpful
            • 3. Re: Which versions for eclipse + JBoss AS + JDK  + JBossWS
              giuliano.rap

              Thanks for helping!

               

               

              For this command wsconsume I need to have the wsdl file?
              Because I have the interface from our consumer and I need to implement this interface, so it is a bottom-up development.
              Am I wrong?

              • 4. Re: Which versions for eclipse + JBoss AS + JDK  + JBossWS
                giuliano.rap

                Well, I tried a lot of times, but it doesn't work.

                As adviced by me boss, I used Axis2 instead of JBossWS and the web service was generated properly.

                So, no more JBossWS .
                Thanks spyhunter99!

                • 5. Re: Which versions for eclipse + JBoss AS + JDK  + JBossWS
                  asoldano

                  You should really evaluate moving to a more recent application server version. JBoss 4.2.2 is really old.

                  • 6. Re: Which versions for eclipse + JBoss AS + JDK  + JBossWS
                    giuliano.rap

                    That's true Alessio...it would be better to migrate to a new version of application server...
                    But the company is not thinking about it right now, it would take a lot of time, maybe in the future....let's see
                    Thanks!

                    • 7. Re: Which versions for eclipse + JBoss AS + JDK  + JBossWS
                      peterj

                      Grab the free chapter 9 from JBoss in Action, that should help you get started: http://www.manning.com/jamae/chapter_9.pdf

                      The chapter is about web services on AS 5.1.0, but from what I recall web services work the same on 4.2.x.

                      1 of 1 people found this helpful
                      • 8. Re: Which versions for eclipse + JBoss AS + JDK  + JBossWS
                        giuliano.rap

                        Thanks Peter! Your book is very good.

                         

                        But now I am using Axis2, I think it is working properly.
                        My problem now is not related to the versions I guess.

                         

                        In the service implementation, I need to call a seam component, like Component.getInstance(), but when I try it, it throws an error:

                         

                        13:37:20,074 INFO  [PhaseInterceptorChain] Interceptor has thrown exception, unwinding now

                        java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/jboss/seam/Component

                                  at org.jboss.wsf.stack.cxf.AbstractInvoker.handleException(AbstractInvoker.java:147)

                                  at org.jboss.wsf.stack.cxf.AbstractInvoker.invoke(AbstractInvoker.java:116)

                                  at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:56)

                                  at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)

                                  at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:92)

                                  at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)

                                  at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)

                                  at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)

                                  at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)

                                  at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:157)

                                  at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:61)

                                  at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:152)

                                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

                                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                                  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

                                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

                                  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)

                                  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

                                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                                  at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

                                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

                                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

                                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

                                  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

                                  at java.lang.Thread.run(Thread.java:619)

                        Caused by: java.lang.NoClassDefFoundError: org/jboss/seam/Component

                                  at at.prosigma.fujitsu.service.FujitsuIntegrationServiceImpl.getFujitsuIntegrationAction(FujitsuIntegrationServiceImpl.java:120)

                                  at at.prosigma.fujitsu.service.FujitsuIntegrationServiceImpl.createUsers(FujitsuIntegrationServiceImpl.java:65)

                                  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:597)

                                  at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:106)

                                  at org.jboss.wsf.stack.cxf.AbstractInvoker.invoke(AbstractInvoker.java:111)

                                  ... 29 more

                        Caused by: java.lang.ClassNotFoundException: org.jboss.seam.Component

                                  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)

                                  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)

                                  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

                                  ... 37 more

                         

                        The component is in the same project as the web service implementation.

                        So, we have a seam project and now I am implementing another project as a web service. The second project (web service) will handle the login stuffs for the first project. The web service will be a .war in the first project.

                         

                        Any idea?

                         

                        Thanks!

                        • 9. Re: Which versions for eclipse + JBoss AS + JDK  + JBossWS
                          giuliano.rap

                          I think it is better to open a new question about it on Seam Forum...because this is not related to the configuration of web services any more I guess...
                          Thanks who tried to help!