cancel
Showing results for 
Search instead for 
Did you mean: 

SAX Transformation

DG
Active Contributor
0 Kudos

Hi,

I have a problem with creating a SAX Parser on the PI 7.1 server. I get the following error in the log when I test the code in the repository and in the message flow.

com.sap.aii.ib.server.mapping.execution.jaxpfactories.MappingTransformerFactory:sap.com/com.sap.xi.repository[AT]com.sap.engine.boot.loader.ResourceMultiParentClassLoader[AT]42c4e790[AT]alive incompatible with class javax.xml.transform.sax.SAXTransformerFactory:null

[AT]= @

When I run the code on my local computer I dont get any problems. Does anybody know how I set up a SAX parser.

I currently use the following code.


	public void execute(InputStream is, OutputStream out)
	throws StreamTransformationException {
		try{
	     	//setup output handler
			 SAXTransformerFactory factory = 
				    (SAXTransformerFactory) SAXTransformerFactory.newInstance();
			 
		   th = factory.newTransformerHandler();
		   Result r = new StreamResult(out);
		   
		   th.setResult(r);
			// create parser
			DefaultHandler handler = this;
			SAXParserFactory parserFactory = SAXParserFactory.newInstance();
		
			SAXParser saxParser = parserFactory.newSAXParser();
			
			saxParser.parse(is, handler);
		}catch(Exception e){
			trace.addWarning(e.toString());
		}
	}

Best regards

Daniel Graversen.

[Figaf|http://figaf.com]

Accepted Solutions (1)

Accepted Solutions (1)

DG
Active Contributor
0 Kudos

It seems like will work on PI 7.31 systems.

com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl

     factoryParser = new com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl();

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi, I am facing the same problem. I use java 1.5 settings in NWDS and no sapxmltookit library. Can you tell me how you solved the problem?

DG
Active Contributor
0 Kudos

I used xslt instead.

DG
Active Contributor
0 Kudos

Converted to use XSLT instead.

I'll have to figure how to use the standard JAva sax parsers.

stefan_grube
Active Contributor
0 Kudos

> I'll have to figure how to use the standard JAva sax parsers.

they work the same as sapxmltoolkit.

Just do not apply sapxmltoolkit as library and set Java version 1.5 in developer studio.

former_member181985
Active Contributor
0 Kudos

Are you using any third party SAX parser jars.

Its problem with class loader...........

DG
Active Contributor
0 Kudos

I hope that I'm using the build in SAX tools.

former_member181985
Active Contributor
0 Kudos

but you might have compiled the java code using external jar files. Hence incompatibility issue. Use SAP Sax jars for compiling.

- praveen.

stefan_grube
Active Contributor
0 Kudos

> but you might have compiled the java code using external jar files. Hence incompatibility issue. Use SAP Sax jars for compiling.

This is not valid for PI 7.1

Sapxmltoolkit is no longer used.

PI uses standard Java parsers.