Note that there are some explanatory texts on larger screens.

plurals
  1. POFailed to access data stream for resource in jboss 7.1.1
    primarykey
    data
    text
    <p>I am using smooks api for java-xml and xml-java converting.this code is working in jboss4.2.2 but to migrate jboss7.1.1 getting exception is "Failed to access data stream for resource"</p> <p>Sample Code:</p> <pre><code>private String runSmooksTransform(Object inputJavaObject) throws IOException, SAXException { Smooks smooks = new Smooks("/WEB-INF/smooks-config.xml"); try { ExecutionContext executionContext = smooks.createExecutionContext(); StringWriter writer = new StringWriter(); smooks.filterSource(executionContext, new org.milyn.payload.JavaSource(inputJavaObject), new StreamResult(writer)); return writer.toString(); } finally { smooks.close(); } } </code></pre> <p>smooks-config.xml</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd" &gt; &lt;resource-config selector="global-parameters"&gt; &lt;param name="stream.filter.type"&gt;SAX&lt;/param&gt; &lt;/resource-config&gt; &lt;/smooks-resource-list&gt; </code></pre> <p>module.xml </p> <pre><code>&lt;module xmlns="urn:jboss:module:1.1" name="org.milyn"&gt; &lt;resources&gt; &lt;resource-root path="milyn-smooks-all-1.4.jar"/&gt; &lt;/resources&gt; &lt;dependencies&gt; &lt;module name="javax.api"/&gt; &lt;module name="org.apache.commons.logging" /&gt; &lt;module name="org.jaxen" /&gt; &lt;module name="org.hibernate" slot="3" /&gt; &lt;/dependencies&gt; &lt;/module&gt; </code></pre> <p>Exception :</p> <pre><code> java.io.IOException: Failed to access data stream for resource [/WEB-INF/smooks-config.xml]. Tried (in order): 10:10:14,113 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) File System: E:\WEB-INF\smooks-config.xml 10:10:14,114 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) File System: E:\jboss-as-7.1.1.Final\bin\WEB-INF\smooks-config.xml 10:10:14,117 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) Classpath: /WEB-INF/smooks-config.xml 10:10:14,125 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) 10:10:14,126 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.milyn.resource.URIResourceLocator.getResource(URIResourceLocator.java:130) 10:10:14,128 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.milyn.resource.URIResourceLocator.getResource(URIResourceLocator.java:84) 10:10:14,129 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.milyn.Smooks.addConfigurations(Smooks.java:307) 10:10:14,131 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.milyn.Smooks.&lt;init&gt;(Smooks.java:151) 10:10:14,133 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at com.manam.mobee.customer.MobeeCustomerHome.runSmooksTransform(MobeeCustomerHome.java:644) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload