This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Hi , After adding operations to a Web Service ( project is a Web project for tomcat ) I encounter ACTUAL result: jaxws-build.xml:18: Error starting wsgen: Expected Result: jaxws-build.xml:18: Error starting wsgen: <put here the cause so that I can solve the problem> Thanks.
Reporter: unless you sure which component to use, please use 'ide' and your issue will get reassigned.
Please excuse my incorect component, I put something based on my best guess. I will go to ide from now on . Anyway using method of elimination I discovered what does always trigger this error: Configuration : Project A - Java class library - contains interface IA and class CA1 and CA2 and CA3: public interface IA{ public boolean accept(CA1 param); } Project B ( has Project A as dependency ) is a Web project conatining the web service. then adding folowing code in web service definition triggers the error without any clean message: @WebMethod(operationName = "getMyList") public List<CA2> getMyList( CA3 owner, IA filter) { throw new UnsupportedOperationException("Not supported yet."); } by removing filter parameter like below wsgen works corect again. @WebMethod(operationName = "getMyList") public List<CA2> getMyList( CA3 owner ) { throw new UnsupportedOperationException("Not supported yet."); } I am aware that wsgem may not suport interfaces as parameters but we are expecting a clean error message pointing to the cause of error. Thanks.
WSGEN really fails with a strange message. Please, report this to JAX-WS team at https://jax-ws.dev.java.net Nevertheless, I tried to help user as much as possible and removed unnecessary WSDL generation on project side : http://hg.netbeans.org/main?cmd=changeset;node=09da9ad75be2 Now, the Build project passes without problems, but the deployment fails with more descriptive message, like : 01-Apr-2009 15:57:04 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized SEVERE: WSSERVLET11: failed to parse runtime descriptor: javax.xml.ws.WebServiceException: Unable to create JAXBContext javax.xml.ws.WebServiceException: Unable to create JAXBContext at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:158) at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:87) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:262) at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147) at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1244) at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:374) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) 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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) 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:447) at java.lang.Thread.run(Thread.java:619) Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions hello.MyInterface is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at hello.MyInterface at public hello.MyInterface hello.jaxws.GetName.parameter at hello.jaxws.GetName hello.MyInterface does not have a no-arg default constructor. this problem is related to the following location: at hello.MyInterface at public hello.MyInterface hello.jaxws.GetName.parameter at hello.jaxws.GetName Note: I used hello.MyInterface, instead of IA interface.
It looks a bit hard to get observer status on JAX-WS team at https://jax-ws.dev.java.net until then the same ambiguos error ocurs when one parameter of a web method is a Map<String, String>. We are expecting to see some meaningful error.
It looks very long time to get observer status on jaxws. Meanwhile I look on their source and found further clues that may be considered. I look into the sources for jaxws and the only place where the error I encountered appears is in file WSGen2.java line 490 (see code snippet) The tool may show some exception (or place stack trace in a log file) but it seems not to reach Netbeans output. I think that it is desired to show the error as early as possible. I reopen to bring this in your attention and consideration. I hope this helps . package com.sun.tools.and.ws; .... } catch (Exception ex) { if (failonerror) { if (ex instanceof BuildException) { throw (BuildException) ex; } else { throw new BuildException("Error starting wsgen: ", ex, getLocation()); } } else { StringWriter sw = new StringWriter(); ex.printStackTrace(new PrintWriter(sw)); getProject().log(sw.toString(), Project.MSG_WARN); // continue }
I reassigned the issue to JAX-WS team. Netbeans cannot do much about that. See: https://jax-ws.dev.java.net/issues/show_bug.cgi?id=725