0 Replies Latest reply on Aug 27, 2008 7:15 AM by cnanda

    Problems with Java object that connects to a webservice

    cnanda
      First of all, I am pretty new to Coldfusion. I am primarily a .Net developer, but we are attempting to migrate to Livecycle DS for a lot of things, so therefore migrating to Java.

      So, I am using Netbeans as my Java IDE and Dreamweaver as my CF IDE. (Just given some overall info)
      I have built a java library which connects to a web service and does some processing. I added a driver to the project for testing purposes and it connects and runs fine both through Netbeans and via the command line.

      When I try to instantiate the object in Coldfusion, the custom object instantiates fine, but when I run the method that instantiates the jax-ws service class, I get a NoClassDefFoundError for the javax/xml/ws/Service class.

      Here is the stack trace that prints out:

      ROOT CAUSE:
      java.lang.NoClassDefFoundError: javax/xml/ws/Service
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:520)
      at com.compoundtheory.classloader.NetworkClassLoader.defineClass(NetworkClassLoader.java:283 )
      at com.compoundtheory.classloader.NetworkClassLoader.loadClass(NetworkClassLoader.java:322)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
      at com.onepos.auth.AuthService.login(AuthService.java:43)
      at com.onepos.auth.AuthService.authorizeClient(AuthService.java:32)
      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:585)
      at coldfusion.runtime.StructBean.invoke(StructBean.java:511)
      at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2300)
      at cfAuth2ecfm1215302202.runPage(/Applications/ColdFusion8/wwwroot/extranet/Auth.cfm:16)
      at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
      at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)
      at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
      at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
      at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
      at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
      at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
      at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
      at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
      at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
      at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
      at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
      at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
      at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
      at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
      at coldfusion.CfmServlet.service(CfmServlet.java:175)
      at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
      at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
      at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
      at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
      at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
      at jrun.servlet.FilterChain.service(FilterChain.java:101)
      at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
      at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
      at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
      at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
      at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
      at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
      at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
      at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
      at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


      javax.servlet.ServletException: ROOT CAUSE:
      java.lang.NoClassDefFoundError: javax/xml/ws/Service
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:520)
      at com.compoundtheory.classloader.NetworkClassLoader.defineClass(NetworkClassLoader.java:283 )
      at com.compoundtheory.classloader.NetworkClassLoader.loadClass(NetworkClassLoader.java:322)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
      at com.onepos.auth.AuthService.login(AuthService.java:43)
      at com.onepos.auth.AuthService.authorizeClient(AuthService.java:32)
      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:585)
      at coldfusion.runtime.StructBean.invoke(StructBean.java:511)
      at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2300)
      at cfAuth2ecfm1215302202.runPage(/Applications/ColdFusion8/wwwroot/extranet/Auth.cfm:16)
      at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
      at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)
      at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
      at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
      at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
      at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
      at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
      at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
      at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
      at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
      at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
      at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
      at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
      at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
      at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
      at coldfusion.CfmServlet.service(CfmServlet.java:175)
      at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
      at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
      at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
      at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
      at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
      at jrun.servlet.FilterChain.service(FilterChain.java:101)
      at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
      at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
      at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
      at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
      at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
      at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
      at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
      at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
      at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

      at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:70 )
      at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
      at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
      at jrun.servlet.FilterChain.service(FilterChain.java:101)
      at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
      at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
      at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
      at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
      at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
      at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
      at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
      at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
      at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


      Again, I am pretty new to this, and I have a feeling it has to do with a classpath issue. But, I have updated the jax-ws libraries in coldfusion (Coldfusion8 lib folder) to the same ones that were compiled with my jar file, and I am still getting this error.

      Oh, this is running on the default JRun Server on an install of Coldfusion 8 on OSX.