• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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
 
expectation is the root of all heartache - shakespeare. tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic