Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: GroovyWS
-
Labels:None
-
Environment:Grails on Cygwin on Windows XP
-
Number of attachments :
Description
I'm using GroovyWS to integrate a third party WSDL into my Grails project, and my Grails project has to be able to service multiple requests at the same time. So this is the use case:
- User's browser sends a HTTP request to a Grails Controller
- Controller calls a Grails Service
- Grails Service creates a new WSClient using the 3rd party WSDL for the request, then makes calls to the 3rd party webservice, then returns the results to the user facing gui as XML
If I do one request at a time, everything works fine. However, if I do multiple requests at the same time (i.e. my browser has the site open in multiple tabs, and I "Refresh All" tabs), it looks like my code breaks when creating a new WSClient (calling its constructor).
Is this because I'm creating multiple WSClients (one for each request) at the same time? Below are the details of the error I get:
[21472] errors.GrailsExceptionResolver java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.dv.DefaultValuePlugin not found org.codehaus.groovy.runtime.InvokerInvocationException: java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.dv.DefaultValuePlugin not found
at
org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:49)
at
org.jsecurity.web.servlet.WebInterceptorFilter.doFilter(WebInterceptorFilter.java:66)
at
org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:54)
at
org.jsecurity.web.servlet.WebInterceptorFilter.doFilter(WebInterceptorFilter.java:66)
at
org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:54)
at
org.jsecurity.web.servlet.WebInterceptorFilter.doFilter(WebInterceptorFilter.java:66)
at
org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:54)
at
org.jsecurity.web.servlet.WebInterceptorFilter.doFilter(WebInterceptorFilter.java:66)
at
org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:54)
at
org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:519)
at
org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
Caused by: java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin:
Provider org.apache.cxf.xjc.dv.DefaultValuePlugin not found
at java.util.ServiceLoader.fail(ServiceLoader.java:214)
at java.util.ServiceLoader.access$400(ServiceLoader.java:164)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:350)
at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
at com.sun.tools.xjc.Options.findServices(Options.java:884)
at com.sun.tools.xjc.Options.getAllPlugins(Options.java:336)
at
com.sun.tools.xjc.reader.AbstractExtensionBindingChecker.<init>(AbstractExtensionBindingChecker.java:94)
at
com.sun.tools.xjc.reader.ExtensionBindingChecker.<init>(ExtensionBindingChecker.java:77)
at
com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:257)
at
com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:301)
at
com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:88)
at
com.sun.xml.xsom.impl.parser.ParserContext.<init>(ParserContext.java:60)
at com.sun.xml.xsom.parser.XSOMParser.<init>(XSOMParser.java:89)
at
com.sun.tools.xjc.ModelLoader.createXSOMParser(ModelLoader.java:420)
at
com.sun.tools.xjc.ModelLoader.createXSOMParser(ModelLoader.java:428)
at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:509)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:232)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:172)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:143)
at groovyx.net.ws.WSClient.<init>(WSClient.java:199)
... my Grails Service code which creates a new WSClient object
More info on this:
I tried importing org.apache.cxf.xjc.dv.DefaultValuePlugin in my Grails Service class, then on multiple concurrent requests it gave a similar error saying it couldn't find org.apache.cxf.xjc.ts.ToStringPlugin.
I then also imported org.apache.cxf.xjc.ts.ToStringPlugin in my Grails Service class. Now it's giving the following:
[128294] errors.GrailsExceptionResolver java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.dv.DefaultValuePlugin could not be instantiated: java.lang.IllegalArgumentException: org.apache.cxf.xjc.dv
org.codehaus.groovy.runtime.InvokerInvocationException: java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.dv.DefaultValuePlugin could not be instantiated: java.lang.IllegalArgumentException: org.apache.cxf.xjc.dv
at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:49)
at org.jsecurity.web.servlet.WebInterceptorFilter.doFilter(WebInterceptorFilter.java:66)
at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:54)
at org.jsecurity.web.servlet.WebInterceptorFilter.doFilter(WebInterceptorFilter.java:66)
at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:54)
at org.jsecurity.web.servlet.WebInterceptorFilter.doFilter(WebInterceptorFilter.java:66)
at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:54)
at org.jsecurity.web.servlet.WebInterceptorFilter.doFilter(WebInterceptorFilter.java:66)
at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:54)
at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:519)
at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
Caused by: java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.dv.DefaultValuePlugin could not be instantiated: java.lang.IllegalArgumentException: org.apache.cxf.xjc.dv
at java.util.ServiceLoader.fail(ServiceLoader.java:207)
at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
at com.sun.tools.xjc.Options.findServices(Options.java:884)
at com.sun.tools.xjc.Options.getAllPlugins(Options.java:336)
at com.sun.tools.xjc.reader.AbstractExtensionBindingChecker.<init>(AbstractExtensionBindingChecker.java:94)
at com.sun.tools.xjc.reader.ExtensionBindingChecker.<init>(ExtensionBindingChecker.java:77)
at com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:257)
at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:301)
at com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:88)
at com.sun.xml.xsom.impl.parser.ParserContext.<init>(ParserContext.java:60)
at com.sun.xml.xsom.parser.XSOMParser.<init>(XSOMParser.java:89)
at com.sun.tools.xjc.ModelLoader.createXSOMParser(ModelLoader.java:420)
at com.sun.tools.xjc.ModelLoader.createXSOMParser(ModelLoader.java:428)
at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:509)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:232)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:172)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:143)
at groovyx.net.ws.WSClient.<init>(WSClient.java:199)
at WSCustClient.<init>(WSCustClient.java:16)
at ChromeIntegrationService.initChromeProxy(ChromeIntegrationService.groovy:30)
at ChromeIntegrationService.chromeModels(ChromeIntegrationService.groovy:162)
at ChromeController$_closure4.doCall(ChromeController.groovy:24)
at ChromeController$_closure4.doCall(ChromeController.groovy)
... 11 more
Caused by: java.lang.IllegalArgumentException: org.apache.cxf.xjc.dv
at java.lang.ClassLoader.definePackage(ClassLoader.java:1418)
at java.net.URLClassLoader.definePackage(URLClassLoader.java:325)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:242)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:142)
at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:114)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
... 34 more