on 09-13-2006 2:53 PM
We are trying to use the SAXBuilder as part of a batch process. We had it working in a J2EE application, but are having issues in a Java DC.
We have used dcs of:
aii_util_misc.jar
aii_util_xml.jar
In the J2EE DC we had to add the following to the application-j2ee-engine.xml file for it to find everything correctly:
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="library">com.sap.aii.util.xml</reference-target>
</reference>
<provider-name>sap.com</provider-name>
We need to use the same code in a batch process so I need to know what to do.
Here is a snipet from the code:
(xml is a String containing an XML document.)
import com.sap.aii.util.xml.jdom.SAXBuilder;
import com.sap.aii.util.xml.jdom.Document;
SAXBuilder builder;
Document document;
builder = new SAXBuilder();
document = builder.build(new ByteArrayInputStream(xml.getBytes()));
I am getting the following error messages when I try to build the document as shown above:
INFO: using default logging implementation
INFO: using logging implementation "AII Logging"
INFO: log configuration file "C:\Documents and Settings\jonesv\.dtc\2\DCs\fe.com\reg\custweb_stmt_summary_j\_comp\log.properties" could not be read
INFO: using default log configuration
#0 2:03:44 PM [main] WARNING com.sap.aii.util.prop.api.PropertySourceFactory: PropertySource not set!
Thrown:
java.lang.Throwable: dummy Throwable for stack trace
at com.sap.aii.util.prop.api.PropertySourceFactory.getPropertySource(PropertySourceFactory.java:39)
at com.sap.aii.util.misc.api.AIIProperties.sync(AIIProperties.java:340)
at com.sap.aii.util.misc.api.AIIProperties.<init>(AIIProperties.java:233)
at com.sap.aii.util.misc.api.AIIProperties.<clinit>(AIIProperties.java:219)
at com.sap.aii.util.xml.api.XMLServices.getParserFactory(XMLServices.java:137)
at com.sap.aii.util.xml.xdom.io.XDOMInputter.parse(XDOMInputter.java:122)
at com.sap.aii.util.xml.xdom.io.XDOMInputter.read(XDOMInputter.java:92)
at com.sap.aii.util.xml.jdom.SAXBuilder.build(SAXBuilder.java:60)
at com.firstenergycorp.ebpp.xfer.sap.statements.summary.jdom.StmtSummaryFileJdom.setData(StmtSummaryFileJdom.java:642)
at com.firstenergycorp.batch.process.BatchProcessLoadXmlFile.process(BatchProcessLoadXmlFile.java:209)
at com.firstenergycorp.ebpp.xfer.sap.statements.summary.jdom.RunStmtSummaryFileJdom.main(RunStmtSummaryFileJdom.java:68)
#1 2:03:44 PM [main] ERROR com.sap.aii.util.prop.api.PropertySourceFactory: reading default properties file "C:\Documents and Settings\jonesv\.dtc\2\DCs\fe.com\reg\custweb_stmt_summary_j\_comp\aii.properties" failed - FileNotFoundException: C:\Documents and Settings\jonesv\.dtc\2\DCs\fe.com\reg\custweb_stmt_summary_j\_comp\aii.properties (The system cannot find the file specified)
#2 2:03:44 PM [main] FATAL com.sap.aii.util.prop.api.PropertySourceFactory: no PropertySource available!
Thrown:
java.lang.Throwable: dummy Throwable for stack trace
at com.sap.aii.util.prop.api.PropertySourceFactory.getPropertySource(PropertySourceFactory.java:39)
at com.sap.aii.util.misc.api.AIIProperties.sync(AIIProperties.java:340)
at com.sap.aii.util.misc.api.AIIProperties.<init>(AIIProperties.java:233)
at com.sap.aii.util.misc.api.AIIProperties.<clinit>(AIIProperties.java:219)
at com.sap.aii.util.xml.api.XMLServices.getParserFactory(XMLServices.java:137)
at com.sap.aii.util.xml.xdom.io.XDOMInputter.parse(XDOMInputter.java:122)
at com.sap.aii.util.xml.xdom.io.XDOMInputter.read(XDOMInputter.java:92)
at com.sap.aii.util.xml.jdom.SAXBuilder.build(SAXBuilder.java:60)
at com.firstenergycorp.ebpp.xfer.sap.statements.summary.jdom.StmtSummaryFileJdom.setData(StmtSummaryFileJdom.java:642)
at com.firstenergycorp.batch.process.BatchProcessLoadXmlFile.process(BatchProcessLoadXmlFile.java:209)
at com.firstenergycorp.ebpp.xfer.sap.statements.summary.jdom.RunStmtSummaryFileJdom.main(RunStmtSummaryFileJdom.java:68)
Hi Jennifer,
But here is the answer: <b>FileNotFoundException: C:\Documents and Settings\jonesv\.dtc\2\DCs\fe.com\reg\custweb_stmt_summary_j\_comp\aii.properties (The system cannot find the file specified)
</b>. Create file aii.properties and put it to specified location. It can be just empty because XMLService can use default values, like
props.getProperty("com.sap.aii.util.xml.parserFactory", "com.sap.engine.lib.jaxp.SAXParserFactoryImpl");
. Don`t forget to add sapxmltoolkit.jar to classpath of your application.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.