Matthew Broadhead
2018-07-17 00:06:58 UTC
i have a couple of problems...
i have not been able to upgrade from TomEE 7.0.3 to 7.0.4 or 7.0.5 due
to the error (it works fine in 7.0.3)
java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
cannot be cast to org.apache.xml.dtm.DTMManager
which occurs when i run the following code for Apache FOP
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
URL filepath = classLoader.getResource(xslPath);
Reader xsl = new InputStreamReader(filepath.openStream());
TransformerFactory transformerfactory = TransformerFactory.newInstance();
StreamSource ssXsl = new StreamSource(xsl);
Templates templates = transformerfactory.newTemplates(ssXsl);
Transformer transformer = templates.newTransformer();
StringReader reader = new StringReader(xml);
StringWriter writer = new StringWriter();
transformer.transform(new StreamSource(reader), new StreamResult(writer));
out = writer.toString();
writer.close();
reader.close();
My new problem is that I am using 7.0.5 in development and this code
(using a CXF webClient) works perfectly.
Collection<? extends Integer> leadids =
webClient.accept(MediaType.APPLICATION_JSON).getCollection(Integer.class);
List<Integer> leadids_ = new ArrayList<>(leadids);
But when I deployed it to 7.0.3 it does not work. Is there any way to
slurp some JSON formatted like this
[1,2,3,4]
I tried creating a wrapper like below but it didn't match
public class listWrapper {
private List<Integer> list;
// ...
}
i have not been able to upgrade from TomEE 7.0.3 to 7.0.4 or 7.0.5 due
to the error (it works fine in 7.0.3)
java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
cannot be cast to org.apache.xml.dtm.DTMManager
which occurs when i run the following code for Apache FOP
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
URL filepath = classLoader.getResource(xslPath);
Reader xsl = new InputStreamReader(filepath.openStream());
TransformerFactory transformerfactory = TransformerFactory.newInstance();
StreamSource ssXsl = new StreamSource(xsl);
Templates templates = transformerfactory.newTemplates(ssXsl);
Transformer transformer = templates.newTransformer();
StringReader reader = new StringReader(xml);
StringWriter writer = new StringWriter();
transformer.transform(new StreamSource(reader), new StreamResult(writer));
out = writer.toString();
writer.close();
reader.close();
My new problem is that I am using 7.0.5 in development and this code
(using a CXF webClient) works perfectly.
Collection<? extends Integer> leadids =
webClient.accept(MediaType.APPLICATION_JSON).getCollection(Integer.class);
List<Integer> leadids_ = new ArrayList<>(leadids);
But when I deployed it to 7.0.3 it does not work. Is there any way to
slurp some JSON formatted like this
[1,2,3,4]
I tried creating a wrapper like below but it didn't match
public class listWrapper {
private List<Integer> list;
// ...
}