aspose file tools*
The moose likes BEA/Weblogic and the fly likes IoException when opening stream from Url in WL 8.1 SP3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "IoException when opening stream from Url in WL 8.1 SP3" Watch "IoException when opening stream from Url in WL 8.1 SP3" New topic
Author

IoException when opening stream from Url in WL 8.1 SP3

meka toka
Ranch Hand

Joined: Dec 11, 2002
Posts: 75
Hi all,

I have an application perfectly deployed on WL 8.1 SP1 but when I deploy the same on WL 8.1 SP3 it fails.

It is failing when I try to open a stream from a Url, that in turn has been created from a String (path of the file). Now the required resource is inside a WAR. Following is sample of code

java.io.InputStream stream = new URL(resourcePath).openStream());

The resourcePath is path to a file properties.xml to which I am trying to open and it is located in a mywar.war

WL is trying to access the jar file as zip:C:/bea/user_projects/domains/mydomain/myserver/.wlnotdelete/myproj/mywar.war!/webapp/xml/common/properties.xml

I havent come across any change in SP3 that can lead to the above error.
[ March 16, 2005: Message edited by: meka toka ]

Thanks<br />MekaToka<br />SCJP 1.4
meka toka
Ranch Hand

Joined: Dec 11, 2002
Posts: 75
Ok it seems that its not an IOException, I am getting the following error

javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token.

when doing the following

javax.xml.transform.Templates templates = transFact.newTemplates(xslSource);

where transFact is a javax.xml.tranform.TransformFactory and xslSource is a InputSpurce created as said in the first post earlier.

On doing some research its says its because of some bug fixes in Xalan, but then some point its with JDK1.4.2

if any one experienced this please post how you solved it
meka toka
Ranch Hand

Joined: Dec 11, 2002
Posts: 75
Found the answer myself.

I had some XSL files which had the nodes selecting using something like below




Looks like the above way of selecting nodes was fine with JDK1.4.1 but with JDK 1.4.2 it wouldnt work as it was having problem finding a location path stop.

All I had to do was remove the trailing slash. SO I changed it to




When doing research for this, I came across alot of people looking for solutions in similar situations and are confused that its because of some problem with WL 8.1 SP3. But the main reason is because the working of the TransformerFactory has changed from JDK1.4.1 to JDK 1.4.2

Hope this helps
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: IoException when opening stream from Url in WL 8.1 SP3