You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by steff aka sid <sr...@brockhaus-gruppe.de> on 2008/10/01 08:55:04 UTC
Re: Problem with SourceTransformer
Hi,
yes this looks like the right property. Can you give me some hint how to
configure it? In which script can I add this property? With startup script
you mean <SERVICEMIX_HOME>/bin/servicemix? But where and how to add it?
Regards
/Steffen
Gert Vanthienen wrote:
>
> /steffen,
>
> I think the property we're looking for here is
> http://xerces.apache.org/xerces2-j/features.html#nonvalidating.load-external-dtd.
> The default value is true (because the DTD can contain e.g. entity
> definitions), but we should set it to false for your use case. Could
> you try if setting a system property in the startup script can help with
> that? If not, please raise a JIRA so we can enhance SourceTransformer
> to look for this (it already looks for a property to set the encoding).
> As an intermediate workaround, you could try to configure JAXP with
> another SAX parser factory.
>
> Regards,
>
> Gert
>
> steff aka sid wrote:
>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>> In this post I have described a problem where ServiceMix was trying to
>> load
>> a dtd which is not existing (and should not be placed in the folder).
>> When I
>> look at the exception which is thrown it looks like that not ServiceMix
>> itself is the problem but xerces. So I am searching for a solution for
>> this
>> problem is there any possibility to configure xerces so that it doesn't
>> look
>> for the dtd or maybe create a patch or what ever to change this behavior?
>> If
>> not maybe I can remove the dtd from the files. But I think its not the
>> best
>> option.
>>
>> Here is the exception which is thrown:
>> ERROR - FileComponent - Failed to process file:
>> /home/smx/input/products/DE/test.xml. Reason:
>> javax.jbi.messaging.MessagingException:
>> javax.xml.transform.TransformerException: java.io.FileNotFoundException:
>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>> javax.jbi.messaging.MessagingException:
>> javax.xml.transform.TransformerException: java.io.FileNotFoundException:
>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>> at
>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:197)
>> at
>> org.apache.servicemix.jbi.util.MessageUtil.copy(MessageUtil.java:70)
>> at
>> org.apache.servicemix.eip.patterns.WireTap.sendToListenerAndTarget(WireTap.java:248)
>> at
>> org.apache.servicemix.eip.patterns.WireTap.processAsync(WireTap.java:205)
>> at
>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>> at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>> at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>> at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>> at java.lang.Thread.run(Thread.java:595)
>> Caused by: javax.xml.transform.TransformerException:
>> java.io.FileNotFoundException: /home/smx/input/products/DE/test.dtd (No
>> such
>> file or directory)
>> at
>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:505)
>> at
>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
>> at
>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
>> at
>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toString(SourceTransformer.java:140)
>> at
>> org.apache.servicemix.jbi.jaxp.SourceTransformer.contentToString(SourceTransformer.java:161)
>> at
>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:172)
>> ... 14 more
>> Caused by: java.io.FileNotFoundException:
>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>> at java.io.FileInputStream.open(Native Method)
>> at java.io.FileInputStream.<init>(FileInputStream.java:106)
>> at java.io.FileInputStream.<init>(FileInputStream.java:66)
>> at
>> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
>> at
>> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
>> at
>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>> at
>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
>> ... 19 more
>>
>>
>> Regards
>> /steffen
>>
>> -----
>> Brockhaus GmbH
>> COMPETITIVE THROUGH KNOWLEDGE
>>
>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>> http://www.brockhaus-group.com www.brockhaus-group.com
>>
>
>
>
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
>
-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE
Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
http://www.brockhaus-group.com www.brockhaus-group.com
--
View this message in context: http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19755452.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Problem with SourceTransformer
Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Hm,
I don't know on which object to set the features for xerces. I think the
right place must be the createTransformer()-Method. But do I have to set the
feature on the factory (here we have a method called setFeature(String,
boolean) - but this throws a exception when parsing in the feature named
above). Or do I have to use the transformer (here we have
setParameter(String, Object) and setOutputProperty(String, String) the last
one I tried but with not result. Currently I try something like the
following:
public Transformer createTransfomer()
throws TransformerConfigurationException {
TransformerFactory factory = getTransformerFactory();
Properties xercesFeatures = new Properties();
InputStream in = ClassLoader
.getSystemResourceAsStream("xerces.features.xml");
try {
xercesFeatures.loadFromXML(in);
} catch (IOException e) {
// be silent because xerces.features.xml is optional
}
Iterator featureKeys = xercesFeatures.keySet().iterator();
while (featureKeys.hasNext()) {
String key = (String) featureKeys.next();
factory.setFeature(key, Boolean.getBoolean(xercesFeatures
.getProperty(key)));
}
return factory.newTransformer();
}
My configuration file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Configuration file for Xerces Parser features.</comment>
<entry
key="http://apache.org/xml/features/nonvalidating/load-dtd-grammar">false</entry>
</properties>
Regards
/Steffen
steff aka sid wrote:
>
> Maybe it could be nice to attach the source format file to the wiki for
> importing sm into eclipse (
> http://servicemix.apache.org/importing-servicemix-into-eclipse.html
> http://servicemix.apache.org/importing-servicemix-into-eclipse.html ) I've
> attached my own (which should work for building sm components).
>
> Regards
> /Steffen
> http://www.nabble.com/file/p19853677/servicemix_code_style.xml
> servicemix_code_style.xml
>
>
> steff aka sid wrote:
>>
>> Ok,
>> I created a JIRA ( https://issues.apache.org/activemq/browse/SM-1613
>> https://issues.apache.org/activemq/browse/SM-1613 ) I hope this is all
>> right :). Currently I'am trying to build a solution for that. If I have
>> one I will post int as comment at the JIRA.
>>
>> Regards
>> /Steffen
>>
>>
>>
>> gnodet wrote:
>>>
>>> Yeah, I should have expected such a problem.
>>> These properties need to be set on the DocumentBuilderFactory or
>>> XMLReader as indicated in the code snipped and the page Gert pointed.
>>> At this point, I would suggest that you grab the sources from
>>> servicemix, modify the SourceTransformer code to set the needed
>>> features and rebuild.
>>> Please raise a JIRA for that, as we should come up with something
>>> better to support such use case.
>>>
>>> Of course, the primary workaround is to make your dtd available from a
>>> URL, but that's a different story.
>>>
>>> On Mon, Oct 6, 2008 at 6:01 PM, steff aka sid
>>> <sr...@brockhaus-gruppe.de> wrote:
>>>>
>>>> Thanky you,
>>>> I've tried that out, but it does not work. Here is what my servicemix
>>>> startup script looks like:
>>>>
>>>> exec $JAVA \
>>>> $JAVA_OPTS \
>>>> $SERVICEMIX_OPTS \
>>>> -classpath "$CLASSPATH" \
>>>> -Dclassworlds.conf="$CLASSWORLDS_CONF" \
>>>> -Dservicemix.home="$SERVICEMIX_HOME" \
>>>> -Dcygwin.user.home="$CYGHOME" \
>>>> -Djava.endorsed.dirs="$SERVICEMIX_HOME/lib/endorsed" \
>>>> -Dorg.apache.servicemix.preserveContent=true \
>>>>
>>>> -Dhttp://apache.org/xml/features/nonvalidating/load-dtd-grammar=false \
>>>> org.codehaus.classworlds.Launcher \
>>>> "$@"
>>>>
>>>> Regards
>>>> /Steffen
>>>>
>>>>
>>>> gnodet wrote:
>>>>>
>>>>> At the end of the bin/servicemix.bat file (or bin/servicemix.sh file),
>>>>> you'll see a call to the java executable.
>>>>> You need to append something like:
>>>>> -Dproperty=value
>>>>> on that command line with the correct values for "property" and
>>>>> "value".
>>>>>
>>>>> On Mon, Oct 6, 2008 at 12:16 PM, steff aka sid
>>>>> <sr...@brockhaus-gruppe.de> wrote:
>>>>>>
>>>>>> Can someone give me some information how to set the system property?
>>>>>>
>>>>>> Regards
>>>>>> /Steffen
>>>>>>
>>>>>>
>>>>>> steff aka sid wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>> yes this looks like the right property. Can you give me some hint
>>>>>>> how to
>>>>>>> configure it? In which script can I add this property? With startup
>>>>>>> script
>>>>>>> you mean <SERVICEMIX_HOME>/bin/servicemix? But where and how to add
>>>>>>> it?
>>>>>>>
>>>>>>> Regards
>>>>>>> /Steffen
>>>>>>>
>>>>>>>
>>>>>>> Gert Vanthienen wrote:
>>>>>>>>
>>>>>>>> /steffen,
>>>>>>>>
>>>>>>>> I think the property we're looking for here is
>>>>>>>> http://xerces.apache.org/xerces2-j/features.html#nonvalidating.load-external-dtd.
>>>>>>>> The default value is true (because the DTD can contain e.g. entity
>>>>>>>> definitions), but we should set it to false for your use case.
>>>>>>>> Could
>>>>>>>> you try if setting a system property in the startup script can help
>>>>>>>> with
>>>>>>>> that? If not, please raise a JIRA so we can enhance
>>>>>>>> SourceTransformer
>>>>>>>> to look for this (it already looks for a property to set the
>>>>>>>> encoding).
>>>>>>>> As an intermediate workaround, you could try to configure JAXP with
>>>>>>>> another SAX parser factory.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Gert
>>>>>>>>
>>>>>>>> steff aka sid wrote:
>>>>>>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>>>>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>>>>>>> In this post I have described a problem where ServiceMix was
>>>>>>>>> trying to
>>>>>>>>> load
>>>>>>>>> a dtd which is not existing (and should not be placed in the
>>>>>>>>> folder).
>>>>>>>>> When I
>>>>>>>>> look at the exception which is thrown it looks like that not
>>>>>>>>> ServiceMix
>>>>>>>>> itself is the problem but xerces. So I am searching for a solution
>>>>>>>>> for
>>>>>>>>> this
>>>>>>>>> problem is there any possibility to configure xerces so that it
>>>>>>>>> doesn't
>>>>>>>>> look
>>>>>>>>> for the dtd or maybe create a patch or what ever to change this
>>>>>>>>> behavior? If
>>>>>>>>> not maybe I can remove the dtd from the files. But I think its not
>>>>>>>>> the
>>>>>>>>> best
>>>>>>>>> option.
>>>>>>>>>
>>>>>>>>> Here is the exception which is thrown:
>>>>>>>>> ERROR - FileComponent - Failed to process file:
>>>>>>>>> /home/smx/input/products/DE/test.xml. Reason:
>>>>>>>>> javax.jbi.messaging.MessagingException:
>>>>>>>>> javax.xml.transform.TransformerException:
>>>>>>>>> java.io.FileNotFoundException:
>>>>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>>>>> javax.jbi.messaging.MessagingException:
>>>>>>>>> javax.xml.transform.TransformerException:
>>>>>>>>> java.io.FileNotFoundException:
>>>>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:197)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.util.MessageUtil.copy(MessageUtil.java:70)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.eip.patterns.WireTap.sendToListenerAndTarget(WireTap.java:248)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.eip.patterns.WireTap.processAsync(WireTap.java:205)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>>>>>>>> at
>>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>>>>>>>> at
>>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>>>>>>>> at java.lang.Thread.run(Thread.java:595)
>>>>>>>>> Caused by: javax.xml.transform.TransformerException:
>>>>>>>>> java.io.FileNotFoundException:
>>>>>>>>> /home/smx/input/products/DE/test.dtd
>>>>>>>>> (No
>>>>>>>>> such
>>>>>>>>> file or directory)
>>>>>>>>> at
>>>>>>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:505)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toString(SourceTransformer.java:140)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.contentToString(SourceTransformer.java:161)
>>>>>>>>> at
>>>>>>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:172)
>>>>>>>>> ... 14 more
>>>>>>>>> Caused by: java.io.FileNotFoundException:
>>>>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>>>>> at java.io.FileInputStream.open(Native Method)
>>>>>>>>> at
>>>>>>>>> java.io.FileInputStream.<init>(FileInputStream.java:106)
>>>>>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:66)
>>>>>>>>> at
>>>>>>>>> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
>>>>>>>>> at
>>>>>>>>> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
>>>>>>>>> at
>>>>>>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>>>>>>>>> Source)
>>>>>>>>> at
>>>>>>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>>>>>>>>> Source)
>>>>>>>>> at
>>>>>>>>> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>>>>>>>>> Source)
>>>>>>>>> at
>>>>>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>>>>>>>>> Source)
>>>>>>>>> at
>>>>>>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>>>>>>>>> Source)
>>>>>>>>> at
>>>>>>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>>>>>>>> Source)
>>>>>>>>> at
>>>>>>>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>>>>>>> Source)
>>>>>>>>> at
>>>>>>>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>>>>>>> Source)
>>>>>>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown
>>>>>>>>> Source)
>>>>>>>>> at
>>>>>>>>> org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>>>>>>>>> Source)
>>>>>>>>> at
>>>>>>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
>>>>>>>>> ... 19 more
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> /steffen
>>>>>>>>>
>>>>>>>>> -----
>>>>>>>>> Brockhaus GmbH
>>>>>>>>> COMPETITIVE THROUGH KNOWLEDGE
>>>>>>>>>
>>>>>>>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>>>>>>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -----
>>>>>>>> ---
>>>>>>>> Gert Vanthienen
>>>>>>>> http://www.anova.be
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> -----
>>>>>> Brockhaus GmbH
>>>>>> COMPETITIVE THROUGH KNOWLEDGE
>>>>>>
>>>>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>>>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19835210.html
>>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Cheers,
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Blog: http://gnodet.blogspot.com/
>>>>> ------------------------
>>>>> Open Source SOA
>>>>> http://open.iona.com
>>>>>
>>>>>
>>>>
>>>>
>>>> -----
>>>> Brockhaus GmbH
>>>> COMPETITIVE THROUGH KNOWLEDGE
>>>>
>>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19840830.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>> ------------------------
>>> Open Source SOA
>>> http://open.iona.com
>>>
>>>
>>
>>
>
>
-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE
Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
http://www.brockhaus-group.com www.brockhaus-group.com
--
View this message in context: http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19855071.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Problem with SourceTransformer
Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Maybe it could be nice to attach the source format file to the wiki for
importing sm into eclipse (
http://servicemix.apache.org/importing-servicemix-into-eclipse.html
http://servicemix.apache.org/importing-servicemix-into-eclipse.html ) I've
attached my own (which should work for building sm components).
Regards
/Steffen
http://www.nabble.com/file/p19853677/servicemix_code_style.xml
servicemix_code_style.xml
steff aka sid wrote:
>
> Ok,
> I created a JIRA ( https://issues.apache.org/activemq/browse/SM-1613
> https://issues.apache.org/activemq/browse/SM-1613 ) I hope this is all
> right :). Currently I'am trying to build a solution for that. If I have
> one I will post int as comment at the JIRA.
>
> Regards
> /Steffen
>
>
>
> gnodet wrote:
>>
>> Yeah, I should have expected such a problem.
>> These properties need to be set on the DocumentBuilderFactory or
>> XMLReader as indicated in the code snipped and the page Gert pointed.
>> At this point, I would suggest that you grab the sources from
>> servicemix, modify the SourceTransformer code to set the needed
>> features and rebuild.
>> Please raise a JIRA for that, as we should come up with something
>> better to support such use case.
>>
>> Of course, the primary workaround is to make your dtd available from a
>> URL, but that's a different story.
>>
>> On Mon, Oct 6, 2008 at 6:01 PM, steff aka sid
>> <sr...@brockhaus-gruppe.de> wrote:
>>>
>>> Thanky you,
>>> I've tried that out, but it does not work. Here is what my servicemix
>>> startup script looks like:
>>>
>>> exec $JAVA \
>>> $JAVA_OPTS \
>>> $SERVICEMIX_OPTS \
>>> -classpath "$CLASSPATH" \
>>> -Dclassworlds.conf="$CLASSWORLDS_CONF" \
>>> -Dservicemix.home="$SERVICEMIX_HOME" \
>>> -Dcygwin.user.home="$CYGHOME" \
>>> -Djava.endorsed.dirs="$SERVICEMIX_HOME/lib/endorsed" \
>>> -Dorg.apache.servicemix.preserveContent=true \
>>>
>>> -Dhttp://apache.org/xml/features/nonvalidating/load-dtd-grammar=false \
>>> org.codehaus.classworlds.Launcher \
>>> "$@"
>>>
>>> Regards
>>> /Steffen
>>>
>>>
>>> gnodet wrote:
>>>>
>>>> At the end of the bin/servicemix.bat file (or bin/servicemix.sh file),
>>>> you'll see a call to the java executable.
>>>> You need to append something like:
>>>> -Dproperty=value
>>>> on that command line with the correct values for "property" and
>>>> "value".
>>>>
>>>> On Mon, Oct 6, 2008 at 12:16 PM, steff aka sid
>>>> <sr...@brockhaus-gruppe.de> wrote:
>>>>>
>>>>> Can someone give me some information how to set the system property?
>>>>>
>>>>> Regards
>>>>> /Steffen
>>>>>
>>>>>
>>>>> steff aka sid wrote:
>>>>>>
>>>>>> Hi,
>>>>>> yes this looks like the right property. Can you give me some hint how
>>>>>> to
>>>>>> configure it? In which script can I add this property? With startup
>>>>>> script
>>>>>> you mean <SERVICEMIX_HOME>/bin/servicemix? But where and how to add
>>>>>> it?
>>>>>>
>>>>>> Regards
>>>>>> /Steffen
>>>>>>
>>>>>>
>>>>>> Gert Vanthienen wrote:
>>>>>>>
>>>>>>> /steffen,
>>>>>>>
>>>>>>> I think the property we're looking for here is
>>>>>>> http://xerces.apache.org/xerces2-j/features.html#nonvalidating.load-external-dtd.
>>>>>>> The default value is true (because the DTD can contain e.g. entity
>>>>>>> definitions), but we should set it to false for your use case.
>>>>>>> Could
>>>>>>> you try if setting a system property in the startup script can help
>>>>>>> with
>>>>>>> that? If not, please raise a JIRA so we can enhance
>>>>>>> SourceTransformer
>>>>>>> to look for this (it already looks for a property to set the
>>>>>>> encoding).
>>>>>>> As an intermediate workaround, you could try to configure JAXP with
>>>>>>> another SAX parser factory.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Gert
>>>>>>>
>>>>>>> steff aka sid wrote:
>>>>>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>>>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>>>>>> In this post I have described a problem where ServiceMix was trying
>>>>>>>> to
>>>>>>>> load
>>>>>>>> a dtd which is not existing (and should not be placed in the
>>>>>>>> folder).
>>>>>>>> When I
>>>>>>>> look at the exception which is thrown it looks like that not
>>>>>>>> ServiceMix
>>>>>>>> itself is the problem but xerces. So I am searching for a solution
>>>>>>>> for
>>>>>>>> this
>>>>>>>> problem is there any possibility to configure xerces so that it
>>>>>>>> doesn't
>>>>>>>> look
>>>>>>>> for the dtd or maybe create a patch or what ever to change this
>>>>>>>> behavior? If
>>>>>>>> not maybe I can remove the dtd from the files. But I think its not
>>>>>>>> the
>>>>>>>> best
>>>>>>>> option.
>>>>>>>>
>>>>>>>> Here is the exception which is thrown:
>>>>>>>> ERROR - FileComponent - Failed to process file:
>>>>>>>> /home/smx/input/products/DE/test.xml. Reason:
>>>>>>>> javax.jbi.messaging.MessagingException:
>>>>>>>> javax.xml.transform.TransformerException:
>>>>>>>> java.io.FileNotFoundException:
>>>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>>>> javax.jbi.messaging.MessagingException:
>>>>>>>> javax.xml.transform.TransformerException:
>>>>>>>> java.io.FileNotFoundException:
>>>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:197)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.util.MessageUtil.copy(MessageUtil.java:70)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.eip.patterns.WireTap.sendToListenerAndTarget(WireTap.java:248)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.eip.patterns.WireTap.processAsync(WireTap.java:205)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>>>>>>> at
>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>>>>>>> at
>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>>>>>>> at java.lang.Thread.run(Thread.java:595)
>>>>>>>> Caused by: javax.xml.transform.TransformerException:
>>>>>>>> java.io.FileNotFoundException: /home/smx/input/products/DE/test.dtd
>>>>>>>> (No
>>>>>>>> such
>>>>>>>> file or directory)
>>>>>>>> at
>>>>>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:505)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toString(SourceTransformer.java:140)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.contentToString(SourceTransformer.java:161)
>>>>>>>> at
>>>>>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:172)
>>>>>>>> ... 14 more
>>>>>>>> Caused by: java.io.FileNotFoundException:
>>>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>>>> at java.io.FileInputStream.open(Native Method)
>>>>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:106)
>>>>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:66)
>>>>>>>> at
>>>>>>>> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
>>>>>>>> at
>>>>>>>> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
>>>>>>>> at
>>>>>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
>>>>>>>> ... 19 more
>>>>>>>>
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> /steffen
>>>>>>>>
>>>>>>>> -----
>>>>>>>> Brockhaus GmbH
>>>>>>>> COMPETITIVE THROUGH KNOWLEDGE
>>>>>>>>
>>>>>>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>>>>>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -----
>>>>>>> ---
>>>>>>> Gert Vanthienen
>>>>>>> http://www.anova.be
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> -----
>>>>> Brockhaus GmbH
>>>>> COMPETITIVE THROUGH KNOWLEDGE
>>>>>
>>>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19835210.html
>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Cheers,
>>>> Guillaume Nodet
>>>> ------------------------
>>>> Blog: http://gnodet.blogspot.com/
>>>> ------------------------
>>>> Open Source SOA
>>>> http://open.iona.com
>>>>
>>>>
>>>
>>>
>>> -----
>>> Brockhaus GmbH
>>> COMPETITIVE THROUGH KNOWLEDGE
>>>
>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19840830.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://open.iona.com
>>
>>
>
>
-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE
Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
http://www.brockhaus-group.com www.brockhaus-group.com
--
View this message in context: http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19853677.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Problem with SourceTransformer
Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Ok,
I created a JIRA ( https://issues.apache.org/activemq/browse/SM-1613
https://issues.apache.org/activemq/browse/SM-1613 ) I hope this is all right
:). Currently I'am trying to build a solution for that. If I have one I will
post int as comment at the JIRA.
Regards
/Steffen
gnodet wrote:
>
> Yeah, I should have expected such a problem.
> These properties need to be set on the DocumentBuilderFactory or
> XMLReader as indicated in the code snipped and the page Gert pointed.
> At this point, I would suggest that you grab the sources from
> servicemix, modify the SourceTransformer code to set the needed
> features and rebuild.
> Please raise a JIRA for that, as we should come up with something
> better to support such use case.
>
> Of course, the primary workaround is to make your dtd available from a
> URL, but that's a different story.
>
> On Mon, Oct 6, 2008 at 6:01 PM, steff aka sid
> <sr...@brockhaus-gruppe.de> wrote:
>>
>> Thanky you,
>> I've tried that out, but it does not work. Here is what my servicemix
>> startup script looks like:
>>
>> exec $JAVA \
>> $JAVA_OPTS \
>> $SERVICEMIX_OPTS \
>> -classpath "$CLASSPATH" \
>> -Dclassworlds.conf="$CLASSWORLDS_CONF" \
>> -Dservicemix.home="$SERVICEMIX_HOME" \
>> -Dcygwin.user.home="$CYGHOME" \
>> -Djava.endorsed.dirs="$SERVICEMIX_HOME/lib/endorsed" \
>> -Dorg.apache.servicemix.preserveContent=true \
>>
>> -Dhttp://apache.org/xml/features/nonvalidating/load-dtd-grammar=false \
>> org.codehaus.classworlds.Launcher \
>> "$@"
>>
>> Regards
>> /Steffen
>>
>>
>> gnodet wrote:
>>>
>>> At the end of the bin/servicemix.bat file (or bin/servicemix.sh file),
>>> you'll see a call to the java executable.
>>> You need to append something like:
>>> -Dproperty=value
>>> on that command line with the correct values for "property" and "value".
>>>
>>> On Mon, Oct 6, 2008 at 12:16 PM, steff aka sid
>>> <sr...@brockhaus-gruppe.de> wrote:
>>>>
>>>> Can someone give me some information how to set the system property?
>>>>
>>>> Regards
>>>> /Steffen
>>>>
>>>>
>>>> steff aka sid wrote:
>>>>>
>>>>> Hi,
>>>>> yes this looks like the right property. Can you give me some hint how
>>>>> to
>>>>> configure it? In which script can I add this property? With startup
>>>>> script
>>>>> you mean <SERVICEMIX_HOME>/bin/servicemix? But where and how to add
>>>>> it?
>>>>>
>>>>> Regards
>>>>> /Steffen
>>>>>
>>>>>
>>>>> Gert Vanthienen wrote:
>>>>>>
>>>>>> /steffen,
>>>>>>
>>>>>> I think the property we're looking for here is
>>>>>> http://xerces.apache.org/xerces2-j/features.html#nonvalidating.load-external-dtd.
>>>>>> The default value is true (because the DTD can contain e.g. entity
>>>>>> definitions), but we should set it to false for your use case. Could
>>>>>> you try if setting a system property in the startup script can help
>>>>>> with
>>>>>> that? If not, please raise a JIRA so we can enhance
>>>>>> SourceTransformer
>>>>>> to look for this (it already looks for a property to set the
>>>>>> encoding).
>>>>>> As an intermediate workaround, you could try to configure JAXP with
>>>>>> another SAX parser factory.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Gert
>>>>>>
>>>>>> steff aka sid wrote:
>>>>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>>>>> In this post I have described a problem where ServiceMix was trying
>>>>>>> to
>>>>>>> load
>>>>>>> a dtd which is not existing (and should not be placed in the
>>>>>>> folder).
>>>>>>> When I
>>>>>>> look at the exception which is thrown it looks like that not
>>>>>>> ServiceMix
>>>>>>> itself is the problem but xerces. So I am searching for a solution
>>>>>>> for
>>>>>>> this
>>>>>>> problem is there any possibility to configure xerces so that it
>>>>>>> doesn't
>>>>>>> look
>>>>>>> for the dtd or maybe create a patch or what ever to change this
>>>>>>> behavior? If
>>>>>>> not maybe I can remove the dtd from the files. But I think its not
>>>>>>> the
>>>>>>> best
>>>>>>> option.
>>>>>>>
>>>>>>> Here is the exception which is thrown:
>>>>>>> ERROR - FileComponent - Failed to process file:
>>>>>>> /home/smx/input/products/DE/test.xml. Reason:
>>>>>>> javax.jbi.messaging.MessagingException:
>>>>>>> javax.xml.transform.TransformerException:
>>>>>>> java.io.FileNotFoundException:
>>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>>> javax.jbi.messaging.MessagingException:
>>>>>>> javax.xml.transform.TransformerException:
>>>>>>> java.io.FileNotFoundException:
>>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:197)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.util.MessageUtil.copy(MessageUtil.java:70)
>>>>>>> at
>>>>>>> org.apache.servicemix.eip.patterns.WireTap.sendToListenerAndTarget(WireTap.java:248)
>>>>>>> at
>>>>>>> org.apache.servicemix.eip.patterns.WireTap.processAsync(WireTap.java:205)
>>>>>>> at
>>>>>>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
>>>>>>> at
>>>>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>>>>>>> at
>>>>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>>>>>>> at
>>>>>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>>>>>> at
>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>>>>>> at
>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>>>>>> at java.lang.Thread.run(Thread.java:595)
>>>>>>> Caused by: javax.xml.transform.TransformerException:
>>>>>>> java.io.FileNotFoundException: /home/smx/input/products/DE/test.dtd
>>>>>>> (No
>>>>>>> such
>>>>>>> file or directory)
>>>>>>> at
>>>>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:505)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toString(SourceTransformer.java:140)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.contentToString(SourceTransformer.java:161)
>>>>>>> at
>>>>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:172)
>>>>>>> ... 14 more
>>>>>>> Caused by: java.io.FileNotFoundException:
>>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>>> at java.io.FileInputStream.open(Native Method)
>>>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:106)
>>>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:66)
>>>>>>> at
>>>>>>> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
>>>>>>> at
>>>>>>> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
>>>>>>> at
>>>>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>>>>> Source)
>>>>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>>>>>> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
>>>>>>> ... 19 more
>>>>>>>
>>>>>>>
>>>>>>> Regards
>>>>>>> /steffen
>>>>>>>
>>>>>>> -----
>>>>>>> Brockhaus GmbH
>>>>>>> COMPETITIVE THROUGH KNOWLEDGE
>>>>>>>
>>>>>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>>>>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----
>>>>>> ---
>>>>>> Gert Vanthienen
>>>>>> http://www.anova.be
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> -----
>>>> Brockhaus GmbH
>>>> COMPETITIVE THROUGH KNOWLEDGE
>>>>
>>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19835210.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>> ------------------------
>>> Open Source SOA
>>> http://open.iona.com
>>>
>>>
>>
>>
>> -----
>> Brockhaus GmbH
>> COMPETITIVE THROUGH KNOWLEDGE
>>
>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>> http://www.brockhaus-group.com www.brockhaus-group.com
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19840830.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://open.iona.com
>
>
-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE
Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
http://www.brockhaus-group.com www.brockhaus-group.com
--
View this message in context: http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19852877.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Problem with SourceTransformer
Posted by Guillaume Nodet <gn...@gmail.com>.
Yeah, I should have expected such a problem.
These properties need to be set on the DocumentBuilderFactory or
XMLReader as indicated in the code snipped and the page Gert pointed.
At this point, I would suggest that you grab the sources from
servicemix, modify the SourceTransformer code to set the needed
features and rebuild.
Please raise a JIRA for that, as we should come up with something
better to support such use case.
Of course, the primary workaround is to make your dtd available from a
URL, but that's a different story.
On Mon, Oct 6, 2008 at 6:01 PM, steff aka sid
<sr...@brockhaus-gruppe.de> wrote:
>
> Thanky you,
> I've tried that out, but it does not work. Here is what my servicemix
> startup script looks like:
>
> exec $JAVA \
> $JAVA_OPTS \
> $SERVICEMIX_OPTS \
> -classpath "$CLASSPATH" \
> -Dclassworlds.conf="$CLASSWORLDS_CONF" \
> -Dservicemix.home="$SERVICEMIX_HOME" \
> -Dcygwin.user.home="$CYGHOME" \
> -Djava.endorsed.dirs="$SERVICEMIX_HOME/lib/endorsed" \
> -Dorg.apache.servicemix.preserveContent=true \
>
> -Dhttp://apache.org/xml/features/nonvalidating/load-dtd-grammar=false \
> org.codehaus.classworlds.Launcher \
> "$@"
>
> Regards
> /Steffen
>
>
> gnodet wrote:
>>
>> At the end of the bin/servicemix.bat file (or bin/servicemix.sh file),
>> you'll see a call to the java executable.
>> You need to append something like:
>> -Dproperty=value
>> on that command line with the correct values for "property" and "value".
>>
>> On Mon, Oct 6, 2008 at 12:16 PM, steff aka sid
>> <sr...@brockhaus-gruppe.de> wrote:
>>>
>>> Can someone give me some information how to set the system property?
>>>
>>> Regards
>>> /Steffen
>>>
>>>
>>> steff aka sid wrote:
>>>>
>>>> Hi,
>>>> yes this looks like the right property. Can you give me some hint how to
>>>> configure it? In which script can I add this property? With startup
>>>> script
>>>> you mean <SERVICEMIX_HOME>/bin/servicemix? But where and how to add it?
>>>>
>>>> Regards
>>>> /Steffen
>>>>
>>>>
>>>> Gert Vanthienen wrote:
>>>>>
>>>>> /steffen,
>>>>>
>>>>> I think the property we're looking for here is
>>>>> http://xerces.apache.org/xerces2-j/features.html#nonvalidating.load-external-dtd.
>>>>> The default value is true (because the DTD can contain e.g. entity
>>>>> definitions), but we should set it to false for your use case. Could
>>>>> you try if setting a system property in the startup script can help
>>>>> with
>>>>> that? If not, please raise a JIRA so we can enhance SourceTransformer
>>>>> to look for this (it already looks for a property to set the encoding).
>>>>> As an intermediate workaround, you could try to configure JAXP with
>>>>> another SAX parser factory.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Gert
>>>>>
>>>>> steff aka sid wrote:
>>>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>>>> In this post I have described a problem where ServiceMix was trying to
>>>>>> load
>>>>>> a dtd which is not existing (and should not be placed in the folder).
>>>>>> When I
>>>>>> look at the exception which is thrown it looks like that not
>>>>>> ServiceMix
>>>>>> itself is the problem but xerces. So I am searching for a solution for
>>>>>> this
>>>>>> problem is there any possibility to configure xerces so that it
>>>>>> doesn't
>>>>>> look
>>>>>> for the dtd or maybe create a patch or what ever to change this
>>>>>> behavior? If
>>>>>> not maybe I can remove the dtd from the files. But I think its not the
>>>>>> best
>>>>>> option.
>>>>>>
>>>>>> Here is the exception which is thrown:
>>>>>> ERROR - FileComponent - Failed to process file:
>>>>>> /home/smx/input/products/DE/test.xml. Reason:
>>>>>> javax.jbi.messaging.MessagingException:
>>>>>> javax.xml.transform.TransformerException:
>>>>>> java.io.FileNotFoundException:
>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>> javax.jbi.messaging.MessagingException:
>>>>>> javax.xml.transform.TransformerException:
>>>>>> java.io.FileNotFoundException:
>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:197)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.util.MessageUtil.copy(MessageUtil.java:70)
>>>>>> at
>>>>>> org.apache.servicemix.eip.patterns.WireTap.sendToListenerAndTarget(WireTap.java:248)
>>>>>> at
>>>>>> org.apache.servicemix.eip.patterns.WireTap.processAsync(WireTap.java:205)
>>>>>> at
>>>>>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
>>>>>> at
>>>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>>>>>> at
>>>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>>>>>> at
>>>>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>>>>> at
>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>>>>> at
>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>>>>> at java.lang.Thread.run(Thread.java:595)
>>>>>> Caused by: javax.xml.transform.TransformerException:
>>>>>> java.io.FileNotFoundException: /home/smx/input/products/DE/test.dtd
>>>>>> (No
>>>>>> such
>>>>>> file or directory)
>>>>>> at
>>>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:505)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toString(SourceTransformer.java:140)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.contentToString(SourceTransformer.java:161)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:172)
>>>>>> ... 14 more
>>>>>> Caused by: java.io.FileNotFoundException:
>>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>>> at java.io.FileInputStream.open(Native Method)
>>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:106)
>>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:66)
>>>>>> at
>>>>>> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
>>>>>> at
>>>>>> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
>>>>>> at
>>>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>>>>>> Source)
>>>>>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>>>>> Source)
>>>>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>>>> Source)
>>>>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>>>> Source)
>>>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>>>>> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
>>>>>> ... 19 more
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>> /steffen
>>>>>>
>>>>>> -----
>>>>>> Brockhaus GmbH
>>>>>> COMPETITIVE THROUGH KNOWLEDGE
>>>>>>
>>>>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>>>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -----
>>>>> ---
>>>>> Gert Vanthienen
>>>>> http://www.anova.be
>>>>>
>>>>
>>>>
>>>
>>>
>>> -----
>>> Brockhaus GmbH
>>> COMPETITIVE THROUGH KNOWLEDGE
>>>
>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19835210.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://open.iona.com
>>
>>
>
>
> -----
> Brockhaus GmbH
> COMPETITIVE THROUGH KNOWLEDGE
>
> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
> http://www.brockhaus-group.com www.brockhaus-group.com
> --
> View this message in context: http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19840830.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://open.iona.com
Re: Problem with SourceTransformer
Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Thanky you,
I've tried that out, but it does not work. Here is what my servicemix
startup script looks like:
exec $JAVA \
$JAVA_OPTS \
$SERVICEMIX_OPTS \
-classpath "$CLASSPATH" \
-Dclassworlds.conf="$CLASSWORLDS_CONF" \
-Dservicemix.home="$SERVICEMIX_HOME" \
-Dcygwin.user.home="$CYGHOME" \
-Djava.endorsed.dirs="$SERVICEMIX_HOME/lib/endorsed" \
-Dorg.apache.servicemix.preserveContent=true \
-Dhttp://apache.org/xml/features/nonvalidating/load-dtd-grammar=false \
org.codehaus.classworlds.Launcher \
"$@"
Regards
/Steffen
gnodet wrote:
>
> At the end of the bin/servicemix.bat file (or bin/servicemix.sh file),
> you'll see a call to the java executable.
> You need to append something like:
> -Dproperty=value
> on that command line with the correct values for "property" and "value".
>
> On Mon, Oct 6, 2008 at 12:16 PM, steff aka sid
> <sr...@brockhaus-gruppe.de> wrote:
>>
>> Can someone give me some information how to set the system property?
>>
>> Regards
>> /Steffen
>>
>>
>> steff aka sid wrote:
>>>
>>> Hi,
>>> yes this looks like the right property. Can you give me some hint how to
>>> configure it? In which script can I add this property? With startup
>>> script
>>> you mean <SERVICEMIX_HOME>/bin/servicemix? But where and how to add it?
>>>
>>> Regards
>>> /Steffen
>>>
>>>
>>> Gert Vanthienen wrote:
>>>>
>>>> /steffen,
>>>>
>>>> I think the property we're looking for here is
>>>> http://xerces.apache.org/xerces2-j/features.html#nonvalidating.load-external-dtd.
>>>> The default value is true (because the DTD can contain e.g. entity
>>>> definitions), but we should set it to false for your use case. Could
>>>> you try if setting a system property in the startup script can help
>>>> with
>>>> that? If not, please raise a JIRA so we can enhance SourceTransformer
>>>> to look for this (it already looks for a property to set the encoding).
>>>> As an intermediate workaround, you could try to configure JAXP with
>>>> another SAX parser factory.
>>>>
>>>> Regards,
>>>>
>>>> Gert
>>>>
>>>> steff aka sid wrote:
>>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>>> In this post I have described a problem where ServiceMix was trying to
>>>>> load
>>>>> a dtd which is not existing (and should not be placed in the folder).
>>>>> When I
>>>>> look at the exception which is thrown it looks like that not
>>>>> ServiceMix
>>>>> itself is the problem but xerces. So I am searching for a solution for
>>>>> this
>>>>> problem is there any possibility to configure xerces so that it
>>>>> doesn't
>>>>> look
>>>>> for the dtd or maybe create a patch or what ever to change this
>>>>> behavior? If
>>>>> not maybe I can remove the dtd from the files. But I think its not the
>>>>> best
>>>>> option.
>>>>>
>>>>> Here is the exception which is thrown:
>>>>> ERROR - FileComponent - Failed to process file:
>>>>> /home/smx/input/products/DE/test.xml. Reason:
>>>>> javax.jbi.messaging.MessagingException:
>>>>> javax.xml.transform.TransformerException:
>>>>> java.io.FileNotFoundException:
>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>> javax.jbi.messaging.MessagingException:
>>>>> javax.xml.transform.TransformerException:
>>>>> java.io.FileNotFoundException:
>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>> at
>>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:197)
>>>>> at
>>>>> org.apache.servicemix.jbi.util.MessageUtil.copy(MessageUtil.java:70)
>>>>> at
>>>>> org.apache.servicemix.eip.patterns.WireTap.sendToListenerAndTarget(WireTap.java:248)
>>>>> at
>>>>> org.apache.servicemix.eip.patterns.WireTap.processAsync(WireTap.java:205)
>>>>> at
>>>>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
>>>>> at
>>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>>>>> at
>>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>>>>> at
>>>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>>>>> at
>>>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>>>>> at
>>>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>>>>> at
>>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>>>>> at
>>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>>>> at
>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>>>> at
>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>>>> at java.lang.Thread.run(Thread.java:595)
>>>>> Caused by: javax.xml.transform.TransformerException:
>>>>> java.io.FileNotFoundException: /home/smx/input/products/DE/test.dtd
>>>>> (No
>>>>> such
>>>>> file or directory)
>>>>> at
>>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:505)
>>>>> at
>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
>>>>> at
>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
>>>>> at
>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toString(SourceTransformer.java:140)
>>>>> at
>>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.contentToString(SourceTransformer.java:161)
>>>>> at
>>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:172)
>>>>> ... 14 more
>>>>> Caused by: java.io.FileNotFoundException:
>>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>>> at java.io.FileInputStream.open(Native Method)
>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:106)
>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:66)
>>>>> at
>>>>> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
>>>>> at
>>>>> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
>>>>> at
>>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>>>>> Source)
>>>>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>>>> Source)
>>>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>>> Source)
>>>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>>> Source)
>>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>>>> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
>>>>> ... 19 more
>>>>>
>>>>>
>>>>> Regards
>>>>> /steffen
>>>>>
>>>>> -----
>>>>> Brockhaus GmbH
>>>>> COMPETITIVE THROUGH KNOWLEDGE
>>>>>
>>>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>>>
>>>>
>>>>
>>>>
>>>> -----
>>>> ---
>>>> Gert Vanthienen
>>>> http://www.anova.be
>>>>
>>>
>>>
>>
>>
>> -----
>> Brockhaus GmbH
>> COMPETITIVE THROUGH KNOWLEDGE
>>
>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>> http://www.brockhaus-group.com www.brockhaus-group.com
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19835210.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://open.iona.com
>
>
-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE
Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
http://www.brockhaus-group.com www.brockhaus-group.com
--
View this message in context: http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19840830.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Problem with SourceTransformer
Posted by Guillaume Nodet <gn...@gmail.com>.
At the end of the bin/servicemix.bat file (or bin/servicemix.sh file),
you'll see a call to the java executable.
You need to append something like:
-Dproperty=value
on that command line with the correct values for "property" and "value".
On Mon, Oct 6, 2008 at 12:16 PM, steff aka sid
<sr...@brockhaus-gruppe.de> wrote:
>
> Can someone give me some information how to set the system property?
>
> Regards
> /Steffen
>
>
> steff aka sid wrote:
>>
>> Hi,
>> yes this looks like the right property. Can you give me some hint how to
>> configure it? In which script can I add this property? With startup script
>> you mean <SERVICEMIX_HOME>/bin/servicemix? But where and how to add it?
>>
>> Regards
>> /Steffen
>>
>>
>> Gert Vanthienen wrote:
>>>
>>> /steffen,
>>>
>>> I think the property we're looking for here is
>>> http://xerces.apache.org/xerces2-j/features.html#nonvalidating.load-external-dtd.
>>> The default value is true (because the DTD can contain e.g. entity
>>> definitions), but we should set it to false for your use case. Could
>>> you try if setting a system property in the startup script can help with
>>> that? If not, please raise a JIRA so we can enhance SourceTransformer
>>> to look for this (it already looks for a property to set the encoding).
>>> As an intermediate workaround, you could try to configure JAXP with
>>> another SAX parser factory.
>>>
>>> Regards,
>>>
>>> Gert
>>>
>>> steff aka sid wrote:
>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>>> In this post I have described a problem where ServiceMix was trying to
>>>> load
>>>> a dtd which is not existing (and should not be placed in the folder).
>>>> When I
>>>> look at the exception which is thrown it looks like that not ServiceMix
>>>> itself is the problem but xerces. So I am searching for a solution for
>>>> this
>>>> problem is there any possibility to configure xerces so that it doesn't
>>>> look
>>>> for the dtd or maybe create a patch or what ever to change this
>>>> behavior? If
>>>> not maybe I can remove the dtd from the files. But I think its not the
>>>> best
>>>> option.
>>>>
>>>> Here is the exception which is thrown:
>>>> ERROR - FileComponent - Failed to process file:
>>>> /home/smx/input/products/DE/test.xml. Reason:
>>>> javax.jbi.messaging.MessagingException:
>>>> javax.xml.transform.TransformerException: java.io.FileNotFoundException:
>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>> javax.jbi.messaging.MessagingException:
>>>> javax.xml.transform.TransformerException: java.io.FileNotFoundException:
>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>> at
>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:197)
>>>> at
>>>> org.apache.servicemix.jbi.util.MessageUtil.copy(MessageUtil.java:70)
>>>> at
>>>> org.apache.servicemix.eip.patterns.WireTap.sendToListenerAndTarget(WireTap.java:248)
>>>> at
>>>> org.apache.servicemix.eip.patterns.WireTap.processAsync(WireTap.java:205)
>>>> at
>>>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
>>>> at
>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>>>> at
>>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>>>> at
>>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>>>> at
>>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>>>> at
>>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>>>> at
>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>>>> at
>>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>>> at java.lang.Thread.run(Thread.java:595)
>>>> Caused by: javax.xml.transform.TransformerException:
>>>> java.io.FileNotFoundException: /home/smx/input/products/DE/test.dtd (No
>>>> such
>>>> file or directory)
>>>> at
>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:505)
>>>> at
>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
>>>> at
>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
>>>> at
>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toString(SourceTransformer.java:140)
>>>> at
>>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.contentToString(SourceTransformer.java:161)
>>>> at
>>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:172)
>>>> ... 14 more
>>>> Caused by: java.io.FileNotFoundException:
>>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>>> at java.io.FileInputStream.open(Native Method)
>>>> at java.io.FileInputStream.<init>(FileInputStream.java:106)
>>>> at java.io.FileInputStream.<init>(FileInputStream.java:66)
>>>> at
>>>> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
>>>> at
>>>> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
>>>> at
>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>>>> Source)
>>>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>>> Source)
>>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>> Source)
>>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>>> Source)
>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>>> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
>>>> ... 19 more
>>>>
>>>>
>>>> Regards
>>>> /steffen
>>>>
>>>> -----
>>>> Brockhaus GmbH
>>>> COMPETITIVE THROUGH KNOWLEDGE
>>>>
>>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>>
>>>
>>>
>>>
>>> -----
>>> ---
>>> Gert Vanthienen
>>> http://www.anova.be
>>>
>>
>>
>
>
> -----
> Brockhaus GmbH
> COMPETITIVE THROUGH KNOWLEDGE
>
> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
> http://www.brockhaus-group.com www.brockhaus-group.com
> --
> View this message in context: http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19835210.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://open.iona.com
Re: Problem with SourceTransformer
Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Can someone give me some information how to set the system property?
Regards
/Steffen
steff aka sid wrote:
>
> Hi,
> yes this looks like the right property. Can you give me some hint how to
> configure it? In which script can I add this property? With startup script
> you mean <SERVICEMIX_HOME>/bin/servicemix? But where and how to add it?
>
> Regards
> /Steffen
>
>
> Gert Vanthienen wrote:
>>
>> /steffen,
>>
>> I think the property we're looking for here is
>> http://xerces.apache.org/xerces2-j/features.html#nonvalidating.load-external-dtd.
>> The default value is true (because the DTD can contain e.g. entity
>> definitions), but we should set it to false for your use case. Could
>> you try if setting a system property in the startup script can help with
>> that? If not, please raise a JIRA so we can enhance SourceTransformer
>> to look for this (it already looks for a property to set the encoding).
>> As an intermediate workaround, you could try to configure JAXP with
>> another SAX parser factory.
>>
>> Regards,
>>
>> Gert
>>
>> steff aka sid wrote:
>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>> http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19273488.html
>>> In this post I have described a problem where ServiceMix was trying to
>>> load
>>> a dtd which is not existing (and should not be placed in the folder).
>>> When I
>>> look at the exception which is thrown it looks like that not ServiceMix
>>> itself is the problem but xerces. So I am searching for a solution for
>>> this
>>> problem is there any possibility to configure xerces so that it doesn't
>>> look
>>> for the dtd or maybe create a patch or what ever to change this
>>> behavior? If
>>> not maybe I can remove the dtd from the files. But I think its not the
>>> best
>>> option.
>>>
>>> Here is the exception which is thrown:
>>> ERROR - FileComponent - Failed to process file:
>>> /home/smx/input/products/DE/test.xml. Reason:
>>> javax.jbi.messaging.MessagingException:
>>> javax.xml.transform.TransformerException: java.io.FileNotFoundException:
>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>> javax.jbi.messaging.MessagingException:
>>> javax.xml.transform.TransformerException: java.io.FileNotFoundException:
>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>> at
>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:197)
>>> at
>>> org.apache.servicemix.jbi.util.MessageUtil.copy(MessageUtil.java:70)
>>> at
>>> org.apache.servicemix.eip.patterns.WireTap.sendToListenerAndTarget(WireTap.java:248)
>>> at
>>> org.apache.servicemix.eip.patterns.WireTap.processAsync(WireTap.java:205)
>>> at
>>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
>>> at
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>>> at
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>>> at
>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>>> at
>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>> at java.lang.Thread.run(Thread.java:595)
>>> Caused by: javax.xml.transform.TransformerException:
>>> java.io.FileNotFoundException: /home/smx/input/products/DE/test.dtd (No
>>> such
>>> file or directory)
>>> at
>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:505)
>>> at
>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
>>> at
>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
>>> at
>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.toString(SourceTransformer.java:140)
>>> at
>>> org.apache.servicemix.jbi.jaxp.SourceTransformer.contentToString(SourceTransformer.java:161)
>>> at
>>> org.apache.servicemix.jbi.util.MessageUtil$NormalizedMessageImpl.<init>(MessageUtil.java:172)
>>> ... 14 more
>>> Caused by: java.io.FileNotFoundException:
>>> /home/smx/input/products/DE/test.dtd (No such file or directory)
>>> at java.io.FileInputStream.open(Native Method)
>>> at java.io.FileInputStream.<init>(FileInputStream.java:106)
>>> at java.io.FileInputStream.<init>(FileInputStream.java:66)
>>> at
>>> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
>>> at
>>> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
>>> at
>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>>> Source)
>>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>> Source)
>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>> Source)
>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>> Source)
>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>>> Source)
>>> at
>>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
>>> ... 19 more
>>>
>>>
>>> Regards
>>> /steffen
>>>
>>> -----
>>> Brockhaus GmbH
>>> COMPETITIVE THROUGH KNOWLEDGE
>>>
>>> Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
>>> http://www.brockhaus-group.com www.brockhaus-group.com
>>>
>>
>>
>>
>> -----
>> ---
>> Gert Vanthienen
>> http://www.anova.be
>>
>
>
-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE
Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
http://www.brockhaus-group.com www.brockhaus-group.com
--
View this message in context: http://www.nabble.com/Problem-with-SourceTransformer-tp19741425p19835210.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.