Hi,

Did you ever try to start this endpoint with standalone cxf(not deploy it into servicemix)? Is it ok with standalone cxf?

If you can verify this issue is servicemix cxf se specific, please simplify your testcase, as you said the schema is too complex and I get over 2400 classes from the schema, a minimum testcase would be great.

Thanks
Freeman
On 2010-8-14, at 下午11:49, Dan Powell wrote:

I've stripped it down to just the single SU. If you remove the defaultBinding.xml the service assembly deploys without error, but with it the below IllegalStateException is thrown.

The schema is obviously more complex than necessary for this test case, but is the original schema I encountered the issue with. I can pare it down further to the minimum necessary type hierarchy to reproduce the issue if you need.

Information on this specific binding customization, if relevant, can be found at http://blogs.sun.com/mgrebac/entry/handling_extended_mixed_content_in .

I'm using the following Java/xjc versions on Linux x86_64:

java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)

xjc version "JAXB 2.1.10 in JDK 6"
JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB 2.1.10 in JDK 6)

Thanks!

Dan

<jaxb-bindings-test.tar.gz>

On Aug 13, 2010, at 4:27 AM, Freeman Fang wrote:

Hi,

Could you append a working testcase, not only the binary jar/zip, including the src which I can build and deploy? Also please tell me the smx version you are working with.
A working testcase is more helpful in this case.

Freeman
On 2010-8-13, at 上午3:13, Dan Powell wrote:

I need to use a binding file to customize the generated classes for my services (specifically generateMixedExtensions). The cxf- codegen-plugin correctly observes the binding file and generates the correct classes, but the cxf-se component throws an Exception deploying the SU. Without the binding file, my service deploys properly. I suspect it may have something to do with a version mismatch of the JAXB or XJC libraries at compile vs runtime creating some kind of a ClassNotFoundException processing the @XmlMixed annotation or something similar. I have tried explicitly including the jaxb-impl library in my SU but that didn't help. Any ideas on how to resolve this or at least how to get a more helpful error message?

Thanks!

java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management- message" version="1.0">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message ">
        <component-name>servicemix-cxf-se</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>Could not deploy xbean service unit</loc-message>
</msg-loc-info>
</task-status-msg>
                        <exception-info>
                                <nesting-level>1</nesting-level>
                                <msg-loc-info>
                                        <loc-token/>
<loc-message>java.lang.IllegalStateException: start tag has already been written</loc-message> <stack-trace><![CDATA[javax.xml.ws.WebServiceException: java.lang.IllegalStateException: start tag has already been written at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java: 275)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:209)
at org .apache.servicemix.cxfse.CxfSeEndpoint.validate(CxfSeEndpoint.java: 355) at org .apache .servicemix.common.AbstractDeployer.validate(AbstractDeployer.java: 58) at org .apache .servicemix .common.xbean.BaseXBeanDeployer.validate(BaseXBeanDeployer.java:55) at org .apache .servicemix .common .xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:97) at org .apache .servicemix .common .BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88) at org .apache .servicemix .common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java: 69) at org .apache .servicemix .jbi .framework .DeploymentService.deployServiceAssembly(DeploymentService.java:520) at org .apache .servicemix .jbi .framework .AutoDeploymentService.checkPendingSAs(AutoDeploymentService.java: 473) at org .apache .servicemix .jbi .framework .AutoDeploymentService.updateComponent(AutoDeploymentService.java: 289) at org .apache .servicemix .jbi .framework .AutoDeploymentService.updateArchive(AutoDeploymentService.java:251) at org .apache .servicemix .jbi .framework .AutoDeploymentService.monitorDirectory(AutoDeploymentService.java: 658) at org.apache.servicemix.jbi.framework.AutoDeploymentService.access $800(AutoDeploymentService.java:63) at org.apache.servicemix.jbi.framework.AutoDeploymentService $1.run(AutoDeploymentService.java:622)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.IllegalStateException: start tag has already been written at com .sun.xml.txw2.ContainerElement.checkStartTag(ContainerElement.java: 160) at com .sun.xml.txw2.ContainerElement.addAttribute(ContainerElement.java: 149) at com.sun.xml.txw2.ContainerElement.invoke(ContainerElement.java: 129)
        at $Proxy65.mixed(Unknown Source)
at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator $Namespace.writeClass(XmlSchemaGenerator.java:925) at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator $Namespace.writeTo(XmlSchemaGenerator.java:668) at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator $Namespace.access$700(XmlSchemaGenerator.java:493) at com .sun .xml .bind .v2.schemagen.XmlSchemaGenerator.write(XmlSchemaGenerator.java:475) at com .sun .xml .bind .v2.runtime.JAXBContextImpl.generateSchema(JAXBContextImpl.java:822) at org.apache.cxf.jaxb.JAXBUtils.generateJaxbSchemas(JAXBUtils.java: 699) at org .apache .cxf.jaxb.JAXBDataBinding.generateJaxbSchemas(JAXBDataBinding.java: 445) at org .apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java: 372) at org .apache .cxf .service .factory .ReflectionServiceFactoryBean .buildServiceFromClass(ReflectionServiceFactoryBean.java:467) at org .apache .cxf .jaxws .support .JaxWsServiceFactoryBean .buildServiceFromClass(JaxWsServiceFactoryBean.java:550) at org .apache .cxf .service .factory .ReflectionServiceFactoryBean .initializeServiceModel(ReflectionServiceFactoryBean.java:530) at org .apache .cxf .service .factory .ReflectionServiceFactoryBean .create(ReflectionServiceFactoryBean.java:278) at org .apache .cxf .jaxws .support .JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:178) at org .apache .cxf .frontend .AbstractWSDLBasedEndpointFactory .createEndpoint(AbstractWSDLBasedEndpointFactory.java:100) at org .apache .cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:105) at org .apache .cxf .jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java: 167) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java: 346) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java: 259)
        ... 16 more
]]></stack-trace>
                                </msg-loc-info>
                        </exception-info>
                </task-result-details>
        </component-task-result-details>
</component-task-result>
<component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message ">
        <component-name>servicemix-cxf-bc</component-name>
        <component-task-result-details>
                <task-result-details>
                        <task-id>deploy</task-id>
                        <task-result>SUCCESS</task-result>
                </task-result-details>
        </component-task-result-details>
</component-task-result>
</jbi-task-result>
</jbi-task>

at org .apache .servicemix .jbi.framework.ManagementSupport.failure(ManagementSupport.java:125) at org .apache .servicemix .jbi.framework.ManagementSupport.failure(ManagementSupport.java:111) at org .apache .servicemix .jbi .framework .DeploymentService.deployServiceAssembly(DeploymentService.java:555) at org .apache .servicemix .jbi .framework .AutoDeploymentService.checkPendingSAs(AutoDeploymentService.java: 473) at org .apache .servicemix .jbi .framework .AutoDeploymentService.updateComponent(AutoDeploymentService.java: 289) at org .apache .servicemix .jbi .framework .AutoDeploymentService.updateArchive(AutoDeploymentService.java:251) at org .apache .servicemix .jbi .framework .AutoDeploymentService.monitorDirectory(AutoDeploymentService.java: 658) at org.apache.servicemix.jbi.framework.AutoDeploymentService.access $800(AutoDeploymentService.java:63) at org.apache.servicemix.jbi.framework.AutoDeploymentService $1.run(AutoDeploymentService.java:622)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)



--
Freeman Fang

------------------------
Open Source SOA: http://fusesource.com
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org




--
Freeman Fang

------------------------
Open Source SOA: http://fusesource.com
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org

Reply via email to