• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

IoException when opening stream from Url in WL 8.1 SP3

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
In the renaissance, how big were the dinosaurs? Did you have tiny ads?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic