smani
Joined: Wed Feb 8, 2006 03:31 AM
Posts: smani
Location:
Posted: Wed Feb 8, 2006 09:18 AM Post subject: xml.transform fails when war
file is deployed in JBOSS 4.0.3
--------------------------------------------------------------------------------
Hi,
We have a small application written in java1.4.2 sdk deployed initially with
JBOSS 4.0.2. It was working fine. Now we have upgraded JBoss version to 4.0.3
SP1 and the application doesnot work anymore. After investigation, we found
that the code is failing in a xml.transform method.
This is the excetion thrown:
12:54:09,640 INFO [STDOUT] RB TransformerException java.io.FileNotFoundExceptio
n:
file:\C:\jboss-4.0.3SP1\server\default\tmp\deploy\tmp39595xsdgenerator-exp.wa
r\files\temp1139313249640\generated.xsd (The filename, directory name, or
volume
label syntax is incorrect)
and this is the code:
private File writeXmlFile(Document finalXsd, String name) {
try {
System.out.print("RB WriteXmlFile finalXsd/Name = " + finalXsd + "/" + name);
// Prepare the DOM document for writing
Source source = new DOMSource(finalXsd);
// Prepare the output file
if (tempDir == null) {
createTempDir();
}
File file = new File(tempDir.getAbsolutePath() +
System.getProperty("file.separator") + name + ".xsd");
System.out.print("File exists: " + file.getAbsolutePath());
file.deleteOnExit();
System.out.print("RB After DeleteOnExit: ");
Result result = new StreamResult(file);
// Write the DOM document to the file
Transformer xformer = TransformerFactory.newInstance() .newTransformer();
xformer.setOutputProperty(OutputKeys.INDENT, "yes");
xformer.setOutputProperty(
"{http://*xml*.apache.org/xslt}indent-amount<http://xml.apache.org/xslt%7Dindent-amount>",
"2");
System.out.println("Before Transformer File exists: " + file.exists());
xformer.transform(source, result); (Returns an error on this statement)
System.out.println("After Transformer File exists: " + file.exists());
return file;
} catch (TransformerConfigurationException e)
{
System.out.println("RB TransformerConfigurationException " + e.getMessage());
} catch (TransformerException e) {
System.out.println("RB TransformerException " + e.getMessage() );
}
return null;
}
Can someone tell me why the difference is between the 2 versions of JBoss? Does
it have anything to do with the new security features of JBoss 4.0.3SP1? How
can we overcome this error?
Any help is highly appreciated..
Thanks and Regards
Suchi
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922533#3922533
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922533
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user