Hello Christian,

I've tracked it down. It seems that mixing camel-cmis and camel-jaxb
for camel 2.11.0 creates this runtime issue when parsing a response
from Alfresco. Removing the dependency on camel-jaxb solved my issue.

I've tried with both java-7-oracle and OpenJDK-1.6 on Debian Wheezy
[1], [2]. I've added the mvn dependency:tree.

Thank you for your reply. I don't have time to write a patch right
now. Should we raise an issue? I wrote a test [A] to prove it but it
requires Alfresco Community installed. You cna get a relative quick
install of Alfresco using Vagrant and a few puppet modules [B], [C].

[A] https://github.com/ieugen/camel-cmis-jaxb-issue
[B] https://github.com/ieugen/puppet-sandbox
[C] https://github.com/jurgenlust/puppet-alfresco

Cheers,

[1]
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

[2]
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.4) (6b27-1.12.4-1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

[3]
[INFO] com.ieugen:processing-bus:bundle:0.0.1-SNAPSHOT
[INFO] +- org.apache.camel:camel-core:jar:2.11.0:compile
[INFO] +- org.apache.camel:camel-blueprint:jar:2.11.0:compile
[INFO] |  +- org.apache.camel:camel-core-xml:jar:2.11.0:compile
[INFO] |  \- org.apache.camel:camel-core-osgi:jar:2.11.0:compile
[INFO] +- org.apache.activemq:activemq-all:jar:5.8.0:compile
[INFO] |  \- org.apache.activemq:activemq-amqp:jar:5.8.0:compile
[INFO] |     +- org.apache.activemq:activemq-broker:jar:5.8.0:compile
[INFO] |     |  \-
org.apache.activemq:activemq-openwire-legacy:jar:5.8.0:compile
[INFO] |     +- org.apache.qpid:proton-jms:jar:0.3.0-fuse-2:compile
[INFO] |     |  \- org.apache.qpid:proton:jar:0.3.0-fuse-2:compile
[INFO] |     |     +- org.apache.qpid:proton-api:jar:0.3.0-fuse-2:compile
[INFO] |     |     \- org.bouncycastle:bcpkix-jdk15on:jar:1.47:compile
[INFO] |     |        \- org.bouncycastle:bcprov-jdk15on:jar:1.47:compile
[INFO] |     \- org.fusesource.hawtbuf:hawtbuf:jar:1.9:compile
[INFO] +- org.apache.activemq:activemq-pool:jar:5.8.0:compile
[INFO] |  +- org.apache.activemq:activemq-client:jar:5.8.0:compile
[INFO] |  |  +-
org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile
[INFO] |  |  \-
org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1:compile
[INFO] |  +- 
org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1:compile
[INFO] |  \- commons-pool:commons-pool:jar:1.6:compile
[INFO] +- org.apache.xbean:xbean-spring:jar:3.12:compile
[INFO] |  \- commons-logging:commons-logging:jar:1.0.3:compile
[INFO] +- org.apache.camel:camel-jaxb:jar:2.11.0:compile
[INFO] |  \- com.sun.xml.bind:jaxb-impl:jar:2.1.13:compile
[INFO] |     \- javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO] |        +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] |        \- javax.activation:activation:jar:1.1:compile
[INFO] +- org.apache.camel:camel-bindy:jar:2.11.0:compile
[INFO] +- org.apache.camel:camel-jetty:jar:2.11.0:compile
[INFO] |  +- org.apache.camel:camel-http:jar:2.11.0:compile
[INFO] |  |  +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] |  |  \- commons-codec:commons-codec:jar:1.6:compile
[INFO] |  +- org.apache.geronimo.specs:geronimo-servlet_2.5_spec:jar:1.2:compile
[INFO] |  +- org.eclipse.jetty:jetty-server:jar:7.6.8.v20121106:compile
[INFO] |  |  +-
org.eclipse.jetty.orbit:javax.servlet:jar:2.5.0.v201103041518:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-continuation:jar:7.6.8.v20121106:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-http:jar:7.6.8.v20121106:compile
[INFO] |  |     \- org.eclipse.jetty:jetty-io:jar:7.6.8.v20121106:compile
[INFO] |  +- org.eclipse.jetty:jetty-security:jar:7.6.8.v20121106:compile
[INFO] |  +- org.eclipse.jetty:jetty-servlet:jar:7.6.8.v20121106:compile
[INFO] |  +- org.eclipse.jetty:jetty-servlets:jar:7.6.8.v20121106:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-util:jar:7.6.8.v20121106:compile
[INFO] |  +- org.eclipse.jetty:jetty-client:jar:7.6.8.v20121106:compile
[INFO] |  \- org.eclipse.jetty:jetty-jmx:jar:7.6.8.v20121106:compile
[INFO] +- org.apache.camel:camel-jms:jar:2.11.0:compile
[INFO] |  +- org.apache.camel:camel-spring:jar:2.11.0:compile
[INFO] |  |  \- org.springframework:spring-aop:jar:3.1.4.RELEASE:compile
[INFO] |  +- org.springframework:spring-jms:jar:3.1.4.RELEASE:compile
[INFO] |  |  +- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  |  \- org.springframework:spring-core:jar:3.1.4.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:3.1.4.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-expression:jar:3.1.4.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-asm:jar:3.1.4.RELEASE:compile
[INFO] |  +- org.springframework:spring-tx:jar:3.1.4.RELEASE:compile
[INFO] |  \- org.springframework:spring-beans:jar:3.1.4.RELEASE:compile
[INFO] +- org.apache.camel:camel-fop:jar:2.11.0:compile
[INFO] |  \- org.apache.xmlgraphics:fop:jar:1.0:compile
[INFO] |     +- org.apache.xmlgraphics:xmlgraphics-commons:jar:1.4:compile
[INFO] |     +- org.apache.xmlgraphics:batik-svg-dom:jar:1.7:compile
[INFO] |     |  +- org.apache.xmlgraphics:batik-anim:jar:1.7:compile
[INFO] |     |  +- org.apache.xmlgraphics:batik-css:jar:1.7:compile
[INFO] |     |  +- org.apache.xmlgraphics:batik-dom:jar:1.7:compile
[INFO] |     |  +- org.apache.xmlgraphics:batik-parser:jar:1.7:compile
[INFO] |     |  +- org.apache.xmlgraphics:batik-util:jar:1.7:compile
[INFO] |     |  +- xml-apis:xml-apis:jar:1.3.04:compile
[INFO] |     |  \- xml-apis:xml-apis-ext:jar:1.3.04:compile
[INFO] |     +- org.apache.xmlgraphics:batik-bridge:jar:1.7:compile
[INFO] |     |  +- org.apache.xmlgraphics:batik-script:jar:1.7:compile
[INFO] |     |  +- org.apache.xmlgraphics:batik-xml:jar:1.7:compile
[INFO] |     |  \- xalan:xalan:jar:2.6.0:compile
[INFO] |     +- org.apache.xmlgraphics:batik-awt-util:jar:1.7:compile
[INFO] |     +- org.apache.xmlgraphics:batik-gvt:jar:1.7:compile
[INFO] |     +- org.apache.xmlgraphics:batik-transcoder:jar:1.7:compile
[INFO] |     |  \- org.apache.xmlgraphics:batik-svggen:jar:1.7:compile
[INFO] |     +- org.apache.xmlgraphics:batik-extension:jar:1.7:compile
[INFO] |     +- org.apache.xmlgraphics:batik-ext:jar:1.7:compile
[INFO] |     +- commons-io:commons-io:jar:1.3.1:compile
[INFO] |     +-
org.apache.avalon.framework:avalon-framework-api:jar:4.3.1:compile
[INFO] |     \-
org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1:compile
[INFO] +- org.apache.camel:camel-cmis:jar:2.11.0:compile
[INFO] |  \- 
org.apache.chemistry.opencmis:chemistry-opencmis-client-impl:jar:0.8.0:compile
[INFO] |     +-
org.apache.chemistry.opencmis:chemistry-opencmis-client-api:jar:0.8.0:compile
[INFO] |     +-
org.apache.chemistry.opencmis:chemistry-opencmis-commons-api:jar:0.8.0:compile
[INFO] |     +-
org.apache.chemistry.opencmis:chemistry-opencmis-commons-impl:jar:0.8.0:compile
[INFO] |     |  \- com.sun.xml.ws:jaxws-rt:jar:2.1.7:compile
[INFO] |     |     +- javax.xml.ws:jaxws-api:jar:2.1:compile
[INFO] |     |     +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.3.3:compile
[INFO] |     |     |  \- javax.xml.soap:saaj-api:jar:1.3:compile
[INFO] |     |     +- com.sun.xml.stream.buffer:streambuffer:jar:0.9:compile
[INFO] |     |     +- org.codehaus.woodstox:wstx-asl:jar:3.2.3:compile
[INFO] |     |     +- org.jvnet.staxex:stax-ex:jar:1.2:compile
[INFO] |     |     +-
com.sun.org.apache.xml.internal:resolver:jar:20050927:compile
[INFO] |     |     \- org.jvnet:mimepull:jar:1.3:compile
[INFO] |     +-
org.apache.chemistry.opencmis:chemistry-opencmis-client-bindings:jar:0.8.0:compile
[INFO] |     \- org.apache.felix:org.osgi.core:jar:1.0.0:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.6:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.apache.camel:camel-test-blueprint:jar:2.11.0:test
[INFO] |  +- org.apache.camel:camel-test:jar:2.11.0:test
[INFO] |  +- 
org.apache.aries.blueprint:org.apache.aries.blueprint:jar:1.1.0:test
[INFO] |  +- org.apache.aries:org.apache.aries.util:jar:1.1.0:test
[INFO] |  +- org.apache.aries.proxy:org.apache.aries.proxy.impl:jar:1.0.1:test
[INFO] |  +- org.apache.aries.proxy:org.apache.aries.proxy.api:jar:1.0.0:test
[INFO] |  +- com.googlecode.pojosr:de.kalpatec.pojosr.framework:jar:0.2.1:test
[INFO] |  +- org.ops4j.pax.swissbox:pax-swissbox-tinybundles:jar:1.3.1:test
[INFO] |  |  +- org.ops4j.base:ops4j-base-lang:jar:1.2.2:test
[INFO] |  |  +- org.ops4j.base:ops4j-base-io:jar:1.2.2:test
[INFO] |  |  |  \- org.ops4j.base:ops4j-base-monitors:jar:1.2.2:test
[INFO] |  |  +- org.ops4j.base:ops4j-base-store:jar:1.2.2:test
[INFO] |  |  \- org.ops4j.pax.swissbox:pax-swissbox-bnd:jar:1.3.1:test
[INFO] |  |     \- biz.aQute:bndlib:jar:0.0.357:test
[INFO] |  +- org.apache.felix:org.apache.felix.configadmin:jar:1.4.0:test
[INFO] |  \- org.apache.felix:org.apache.felix.fileinstall:jar:3.2.6:test
[INFO] \- com.google.guava:guava:jar:13.0:test

On Sun, Apr 28, 2013 at 6:08 PM, Christian Müller
<christian.muel...@gmail.com> wrote:
> The error message says:
>
> Caused by: java.lang.
> IllegalStateException: You are running with
> invalid JAXP api or implementation. JAXP api/implementation of version
> 1.3.1 (included in JDK6) or higher is required
>
> It would really helpful if you provide some more details about this...
> Checkout [1].
>
> [1] http://camel.apache.org/support.html#Support-Howtogethelp
>
> Best,
> Christian
>
>
>
> On Sun, Apr 28, 2013 at 2:19 PM, Ioan Eugen Stan <stan.ieu...@gmail.com>wrote:
>
>> Hello,
>>
>> I'm trying to upload some files to Alfresco 4 using camel-cmis
>> component but I get some nasty XML parsing exception. Anyone knows how
>> to fix the issue or another way to upload files to Alfresco?
>>
>> The code that I use is:
>>
>> public class AlfrescoCmisLiveTest extends CamelTestSupport {
>>     @Override
>>     protected RouteBuilder createRouteBuilder() throws Exception {
>>         return new RouteBuilder() {
>>             @Override
>>             public void configure() throws Exception {
>>                 from("direct:start")
>>                         .setHeader("CamelCMISFolderPath", constant("/"))
>>                         .setHeader("cmis:name", constant("docprocess"))
>>                         .setHeader("cmis:objectTypeId",
>> constant("cmis:document"))
>>
>> .to("cmis://
>> http://172.16.32.11:8780/alfresco/cmisatom?username=admin&password=admin
>> ");
>>             }        };     }
>>     @Test
>>     public void testUploadToAlfresco() throws Exception {
>>         template.sendBody("direct:start", "Hello Alfresco docprocess");
>>         TimeUnit.SECONDS.sleep(5);
>>     } }
>>
>> and the error:
>>
>> ERROR DefaultErrorHandler - Failed delivery for (MessageId:
>> ID-daos-49015-1367150506757-0-1 on ExchangeId:
>> ID-daos-49015-1367150506757-0-2). Exhausted after delivery attempt: 1
>> caught:
>> org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException:
>> Parsing exception!
>> org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException:
>> Parsing exception!
>> at
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.parse(AbstractAtomPubService.java:531)
>> at
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getObjectInternal(AbstractAtomPubService.java:779)
>> at
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getObjectByPath(ObjectServiceImpl.java:524)
>> at
>> org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObjectByPath(SessionImpl.java:440)
>> at
>> org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObjectByPath(SessionImpl.java:418)
>> at
>> org.apache.camel.component.cmis.CMISSessionFacade.getObjectByPath(CMISSessionFacade.java:175)
>> at
>> org.apache.camel.component.cmis.CMISProducer.getFolderOnPath(CMISProducer.java:79)
>> at
>> org.apache.camel.component.cmis.CMISProducer.createNode(CMISProducer.java:61)
>> at
>> org.apache.camel.component.cmis.CMISProducer.process(CMISProducer.java:51)
>> ....
>> at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:175)
>> at
>> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:111)
>> at
>> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:124)
>> at
>> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:131)
>> at
>> ro.ieugen.web.camel.AlfrescoCmisLiveTest.testUploadToAlfresco(AlfrescoCmisLiveTest.java:28)
>> ....
>> Caused by: java.lang.IllegalStateException: You are running with
>> invalid JAXP api or implementation. JAXP api/implementation of version
>> 1.3.1 (included in JDK6) or higher is required. In case you are using
>> ant, make sure ant 1.7.0 or higher is used - older versions of ant
>> contain JAXP api/impl version 1.2 (in xml-apis.jar). If you want to
>> keep using older ant versions, you have to configure it to use higher
>> the JAXP api/impl versions.
>> at
>> com.sun.xml.bind.v2.util.XmlFactory.createTransformerFactory(XmlFactory.java:162)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.createTransformerHandler(JAXBContextImpl.java:747)
>> at
>> com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader$State.<init>(DomLoader.java:75)
>> at
>> com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader.startElement(DomLoader.java:118)
>> at
>> com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(ProxyLoader.java:60)
>> at
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:501)
>> at
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:480)
>> at
>> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:246)
>> at
>> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:180)
>> at
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:370)
>> at
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:349)
>> at
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AtomPubParser.unmarshalElement(AtomPubParser.java:397)
>> at
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AtomPubParser.parseElement(AtomPubParser.java:354)
>> at
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AtomPubParser.parseEntry(AtomPubParser.java:300)
>> at
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AtomPubParser.parse(AtomPubParser.java:125)
>> at
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.parse(AbstractAtomPubService.java:529)
>> ... 86 more
>> Caused by: java.lang.AbstractMethodError:
>> javax.xml.transform.TransformerFactory.setFeature(Ljava/lang/String;Z)V
>> at
>> com.sun.xml.bind.v2.util.XmlFactory.createTransformerFactory(XmlFactory.java:155)
>> ... 101 more
>>
>> Thanks,
>>
>> --
>> Ioan Eugen Stan
>>



-- 
Ioan Eugen Stan
0720 898 747

Reply via email to