Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.2.1
-
None
-
Building with maven and org.apache.servicemix.tooling plugin with jbi-maven-plugin. JDK 1.5 or 1.6 on MacOS X 10.5.2 from the command line.
Description
If I have an JSR181 annotated class with a method that is not annotated which returns java.sql.Connection I get "Failed to generate jbi.xml: org.apache.servicemix.maven.plugin.jbi.JbiPluginException: Unable to generate service unit descriptor!" while the SE is being built.
For example:
public java.sql.Connection abcdefg()
{
return null;
}
There is a simple work-around. Don't put a method that returns java.sql.Connection in the class or any super-class of the annotated service.
The full exception for the failure is:
[WARNING] Failed to generate jbi.xml: org.apache.servicemix.maven.plugin.jbi.JbiPluginException: Unable to generate service unit descriptor!
org.apache.servicemix.maven.plugin.jbi.JbiPluginException: Unable to generate service unit descriptor!
at org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojo.generateJbiDescriptor(GenerateServiceUnitDescriptorMojo.java:206)
at org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojo.execute(GenerateServiceUnitDescriptorMojo.java:143)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.RuntimeException: Unable to register JSR-181 service, <component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message">
<component-name>null</component-name>
<component-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg><msg-loc-info><loc-token/><loc-message>java.lang.NullPointerException</loc-message></msg-loc-info></task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<msg-loc-info>
<loc-token />
<loc-message>null</loc-message>
<stack-trace><![CDATA[java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at org.codehaus.xfire.aegis.type.java5.Java5TypeCreator.getOrCreateParameterizedType(Java5TypeCreator.java:162)
at org.codehaus.xfire.aegis.type.java5.Java5TypeCreator.getOrCreateMapKeyType(Java5TypeCreator.java:150)
at org.codehaus.xfire.aegis.type.AbstractTypeCreator.createMapType(AbstractTypeCreator.java:284)
at org.codehaus.xfire.aegis.type.AbstractTypeCreator.createTypeForClass(AbstractTypeCreator.java:109)
at org.codehaus.xfire.jaxws.type.JAXWSTypeCreator.createTypeForClass(JAXWSTypeCreator.java:38)
at org.codehaus.xfire.aegis.type.AbstractTypeCreator.createType(AbstractTypeCreator.java:376)
at org.codehaus.xfire.aegis.type.basic.BeanTypeInfo.getType(BeanTypeInfo.java:207)
at org.codehaus.xfire.aegis.type.basic.BeanType.getType(BeanType.java:609)
at org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:530)
at org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:230)
at org.codehaus.xfire.jaxb2.JaxbWSDLBuilder.addDependency(JaxbWSDLBuilder.java:54)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParametersSchema(WSDLBuilder.java:639)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocumentType(WSDLBuilder.java:613)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createWrappedOutputParts(WSDLBuilder.java:595)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createOutputMessage(WSDLBuilder.java:338)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createAbstractInterface(WSDLBuilder.java:243)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.write(WSDLBuilder.java:161)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilderAdapter.write(WSDLBuilderAdapter.java:40)
at org.codehaus.xfire.DefaultXFire.generateWSDL(DefaultXFire.java:104)
at org.apache.servicemix.jsr181.Jsr181Endpoint.generateWsdl(Jsr181Endpoint.java:444)
at org.apache.servicemix.jsr181.Jsr181Endpoint.createDescription(Jsr181Endpoint.java:334)
at org.apache.servicemix.jsr181.Jsr181Endpoint.registerService(Jsr181Endpoint.java:328)
at org.apache.servicemix.jsr181.Jsr181Endpoint.validate(Jsr181Endpoint.java:258)
at org.apache.servicemix.common.DefaultComponent.addEndpoint(DefaultComponent.java:300)
at org.apache.servicemix.common.DefaultComponent.doInit(DefaultComponent.java:288)
at org.apache.servicemix.jsr181.Jsr181Component.doInit(Jsr181Component.java:81)
at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:187)
at org.apache.servicemix.jsr181.packaging.Jsr181ServiceUnitAnalyzer.getProvides(Jsr181ServiceUnitAnalyzer.java:60)
at org.apache.servicemix.common.xbean.AbstractXBeanServiceUnitAnalyzer.init(AbstractXBeanServiceUnitAnalyzer.java:97)
at org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojo.generateJbiDescriptor(GenerateServiceUnitDescriptorMojo.java:185)
at org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojo.execute(GenerateServiceUnitDescriptorMojo.java:143)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
]]></stack-trace>
</msg-loc-info>
</exception-info>
</task-result-details>
</component-task-result-details>
</component-task-result>
at org.apache.servicemix.jsr181.packaging.Jsr181ServiceUnitAnalyzer.getProvides(Jsr181ServiceUnitAnalyzer.java:62)
at org.apache.servicemix.common.xbean.AbstractXBeanServiceUnitAnalyzer.init(AbstractXBeanServiceUnitAnalyzer.java:97)
at org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojo.generateJbiDescriptor(GenerateServiceUnitDescriptorMojo.java:185)
... 19 more
Caused by: javax.jbi.management.DeploymentException: <component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message">
<component-name>null</component-name>
<component-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg><msg-loc-info><loc-token/><loc-message>java.lang.NullPointerException</loc-message></msg-loc-info></task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<msg-loc-info>
<loc-token />
<loc-message>null</loc-message>
<stack-trace><![CDATA[java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at org.codehaus.xfire.aegis.type.java5.Java5TypeCreator.getOrCreateParameterizedType(Java5TypeCreator.java:162)
at org.codehaus.xfire.aegis.type.java5.Java5TypeCreator.getOrCreateMapKeyType(Java5TypeCreator.java:150)
at org.codehaus.xfire.aegis.type.AbstractTypeCreator.createMapType(AbstractTypeCreator.java:284)
at org.codehaus.xfire.aegis.type.AbstractTypeCreator.createTypeForClass(AbstractTypeCreator.java:109)
at org.codehaus.xfire.jaxws.type.JAXWSTypeCreator.createTypeForClass(JAXWSTypeCreator.java:38)
at org.codehaus.xfire.aegis.type.AbstractTypeCreator.createType(AbstractTypeCreator.java:376)
at org.codehaus.xfire.aegis.type.basic.BeanTypeInfo.getType(BeanTypeInfo.java:207)
at org.codehaus.xfire.aegis.type.basic.BeanType.getType(BeanType.java:609)
at org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:530)
at org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:230)
at org.codehaus.xfire.jaxb2.JaxbWSDLBuilder.addDependency(JaxbWSDLBuilder.java:54)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParametersSchema(WSDLBuilder.java:639)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocumentType(WSDLBuilder.java:613)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createWrappedOutputParts(WSDLBuilder.java:595)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createOutputMessage(WSDLBuilder.java:338)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createAbstractInterface(WSDLBuilder.java:243)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.write(WSDLBuilder.java:161)
at org.codehaus.xfire.wsdl11.builder.WSDLBuilderAdapter.write(WSDLBuilderAdapter.java:40)
at org.codehaus.xfire.DefaultXFire.generateWSDL(DefaultXFire.java:104)
at org.apache.servicemix.jsr181.Jsr181Endpoint.generateWsdl(Jsr181Endpoint.java:444)
at org.apache.servicemix.jsr181.Jsr181Endpoint.createDescription(Jsr181Endpoint.java:334)
at org.apache.servicemix.jsr181.Jsr181Endpoint.registerService(Jsr181Endpoint.java:328)
at org.apache.servicemix.jsr181.Jsr181Endpoint.validate(Jsr181Endpoint.java:258)
at org.apache.servicemix.common.DefaultComponent.addEndpoint(DefaultComponent.java:300)
at org.apache.servicemix.common.DefaultComponent.doInit(DefaultComponent.java:288)
at org.apache.servicemix.jsr181.Jsr181Component.doInit(Jsr181Component.java:81)
at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:187)
at org.apache.servicemix.jsr181.packaging.Jsr181ServiceUnitAnalyzer.getProvides(Jsr181ServiceUnitAnalyzer.java:60)
at org.apache.servicemix.common.xbean.AbstractXBeanServiceUnitAnalyzer.init(AbstractXBeanServiceUnitAnalyzer.java:97)
at org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojo.generateJbiDescriptor(GenerateServiceUnitDescriptorMojo.java:185)
at org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojo.execute(GenerateServiceUnitDescriptorMojo.java:143)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
]]></stack-trace>
</msg-loc-info>
</exception-info>
</task-result-details>
</component-task-result-details>
</component-task-result>
at org.apache.servicemix.common.ManagementSupport.failure(ManagementSupport.java:46)
at org.apache.servicemix.jsr181.Jsr181Endpoint.validate(Jsr181Endpoint.java:260)
at org.apache.servicemix.common.DefaultComponent.addEndpoint(DefaultComponent.java:300)
at org.apache.servicemix.common.DefaultComponent.doInit(DefaultComponent.java:288)
at org.apache.servicemix.jsr181.Jsr181Component.doInit(Jsr181Component.java:81)
at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:187)
at org.apache.servicemix.jsr181.packaging.Jsr181ServiceUnitAnalyzer.getProvides(Jsr181ServiceUnitAnalyzer.java:60)
... 21 more