Hi Andriy, all

sending this again to the list as others might be affected/interested
as well. Especially Suat as he is currently fighting an very similar
issue in the CMS adapter

The assumption that Tika may miss XML Beans is wrong as Tika includes
xmlbeans 2.3.

    java.lang.NoClassDefFoundError: Could not initialize class
org.apache.xmlbeans.XmlBeans

Errors like that indicate that during the initialization of a Class.
This includes the initialization of static variables (or static
blocks) in the mentioned class and all super classes. Looking at the
source of XmlBeans shows that in this case nearly everything is called
during static initialization :(

However when it comes to external dependencies there are only two and
in that context only the dependency to
javax.xml.stream.XMLStreamReader seams relevant.

javax.xml.stream.XMLStreamReader is part of the "stax-api". This API
is included in JDK 1.6. Stanbol imports the stax-api twice

1. via the JDK because the Stanbol frameworkfragment lists all the
packages of the stax-api
2. via the 
org.apache.servicemix.specs:org.apache.servicemix.specs.stax-api-1.0:2.1.0

This could indeed cause the error you are expiriencing. I have created
a launcher with a preliminary fix for that. You can find it under [1].
Can you please try if this solves your issue.

Please use "-Xmx1024m -XX:MaxPermSize=256M" when staring the full launcher

best
Rupert

[1] http://dev.iks-project.eu/downloads/stanbol-launchers/tmp/stax-api-debug/

On Mon, Nov 19, 2012 at 1:19 PM, Andriy Nikolov
<[email protected]> wrote:
> Thanks a lot!
> The error message is attached (seems like XMLBeans is not on classpath - is
> this something to configure separately?).
>
> Best,
> Andriy
>
>
> On Mon, Nov 19, 2012 at 12:52 PM, Rupert Westenthaler
> <[email protected]> wrote:
>>
>> Hi Andriy,
>>
>> On Mon, Nov 19, 2012 at 10:25 AM, Andriy Nikolov
>> <[email protected]> wrote:
>> > Dear all,
>> >
>> > I have a question about the use of tika engine to detect the
>> > content-type
>> > of uploaded document. Does it require any special configuration of
>> > stanbol?
>>
>> No it does not as Stanbol directly forwards the parsed content to the
>> Tika Mime Magic Detction if the Content-Type header is not set in the
>> request.
>>
>> > <p>Problem accessing /enhancer/engine/tika. Reason:
>> > <pre>    Enhancement Chain failed because of required Engine 'tika'
>> > failed
>> > with Message: Unable to process ContentItem
>> > '&lt;urn:content-item-sha1-445158f36b9d4c42842c1f190950891524ba957f&gt;'
>> > with Enhancement Engine 'tika' because the engine is currently not
>> > active(Reason: Unexpected Exception while processing ContentItem
>> > &lt;urn:content-item-sha1-445158f36b9d4c42842c1f190950891524ba957f&gt;
>> > with
>> > EnhancementJobManager: class
>> >
>> > org.apache.stanbol.enhancer.jobmanager.event.impl.EventJobManagerImpl)!</pre></p><h3>Caused
>> > by:</h3><pre>org.apache.stanbol.enhancer.servicesapi.ChainException:
>> > Enhancement Chain failed because of required Engine 'tika' failed with
>> > Message: Unable to process ContentItem
>> > '&lt;urn:content-item-sha1-445158f36b9d4c42842c1f190950891524ba957f&gt;'
>> > with Enhancement Engine 'tika' because the engine is currently not
>> > active(Reason: Unexpected Exception while processing ContentItem
>> > &lt;urn:content-item-sha1-445158f36b9d4c42842c1f190950891524ba957f&gt;
>> > with
>> > EnhancementJobManager: class
>> > org.apache.stanbol.enhancer.jobmanager.event.impl.EventJobManagerImpl)!
>> >     at
>> >
>> > org.apache.stanbol.enhancer.jobmanager.event.impl.EventJobManagerImpl.enhanceContent(EventJobManagerImpl.java:153)
>> >     at
>> >
>> > org.apache.stanbol.enhancer.jersey.resource.AbstractEnhancerResource.enhance(AbstractEnhancerResource.java:233)
>> >     at
>> >
>> > org.apache.stanbol.enhancer.jersey.resource.AbstractEnhancerResource.enhanceFromData(AbstractEnhancerResource.java:215)
>> >
>>
>> This is the reason why it does not work for your. However to determine
>> the problem I would need the whole stack trace including all 'caused
>> by' sections.
>>
>> The other error referenced in your mail seems unrelated.
>>
>> best
>> Rupert
>>
>> --
>> | Rupert Westenthaler             [email protected]
>> | Bodenlehenstraße 11                             ++43-699-11108907
>> | A-5500 Bischofshofen
>
>
>
>
> --
>
> Dr Andriy Nikolov
>
> R&D Engineer
>
> F +49 6227 3849-565
>
> [email protected]
>
> http://www.fluidops.com
>
> fluid Operations AG
>
> Altrottstr. 31
>
> 69190 Walldorf, Germany
>
> Geschäftsführer/Managing Directors: Vasu Chandrasekhara, Dr. Andreas
> Eberhart, Dr. Stefan Kraus, Dr. Ulrich Walther
>
> Beirat/Advisory Board: Prof. Dr. Andreas Reuter, Thomas Reinhart
>
> Registergericht/Commercial Register: Mannheim, HRB 704027
>
> USt-Id Nr./VAT-No.: DE258759786
>
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorised copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden.
>
>
>



-- 
| Rupert Westenthaler             [email protected]
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen

Reply via email to