Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Xalan installation failed...

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I installed the latest jdk version (j2sdk1.4.0) and installed xalan. My Classpath looks like this:
c:\xalan\xalan-j_2_4_1\bin\xercesImpl.jar; c:\xalan\xalan-j_2_4_1\bin\xalan.jar; c:\xalan\xalan-j_2_4_1\bin\bsf.jar; C:\xalan\xalan-j_2_4_1\bin\runtime.jar; C:\xalan\xalan-j_2_4_1\bin\xml-apis.jar; C:\xalan\xalan-j_2_4_1\bin\xsltc.jar; C:\workingdirectory; C:\xalan\xalan-j_2_4_1\bin\BCEL.jar; C:\xalan\xalan-j_2_4_1\bin\xalansamples.jar
Javahome:
C:\j2sdk1.4.0
and if I'm trying to start Xalan from the dos commandline I get the following error:
C:\xalan\XALAN-~1\bin>java org.apache.xalan.xslt.Process test.xml stylesheet.xsl test.html
Exception in thread "main" java.lang.ClassCastException: org.apache.xalan.res.XS
LTErrorResources_de
at org.apache.xalan.xslt.Process.main(Unknown Source)
Meanwhile I'm getting really sick of this but any help could stop me from trying to jump out of the window.
Thanks to everyone trying to help me...
Greetings
st
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe that Java 1.4 comes with some XML parser classes, perhaps these are interfering. The SDK classes will be found before the CLASSPATH classes - see the page in docs/tooldocs of your Java installation.
Bill
 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This topic is near and dear to my heart! I spent several days unsucessfully trying to get Xalan and/or Xerces to work and here is my advice:
Don't waste your time. There is really no proof that Xalan and/or Xerces actually works.
The run & install instructions for Xalan and/or Xerces are minimal to non-existant. Any legitimate piece of software would provide step by step install & run instructions.
Here is still yet another design flaw for BOTH Xaland and Xerces ==> Many of their sample programs have a long list of optional or required parameters. However, there is no documentation available for this. Which sample programs require a schema input file? Which sample programs require a dtd input file? What are the different types of validation?
Nobody knows! (Except of course the one person somewhere who wrote the program.)
Of course you could research and break apart each program in an attempt to try to figure it out - which is what I did until I realized my time was not being well spent.
But why devote hours/days of your valuable time to figure things out - when the people who put it all together lack the common sense to create step by step run and install instructions? And lack the common sense to create some sort of documentation for the entry parameters?
Software that lacks documentation for the user is really just for "pretend" use.
[ December 02, 2002: Message edited by: Kevin Thompson ]
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From this line quoted below, I see you either use a wrong dos, you should use CMD.exe, not command.exe, or you have old version of windows. In either case, the dos, you use, does not accept long file name; however your CLASSPATH is using long file name. It will not work. You need fix this problem first, my guess :roll:

C:\xalan\XALAN-~1\bin>java org.apache.xalan.xslt.Process test.xml stylesheet.xsl test.html

 
Stefan Linke
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to everybody.
I tried the hint with the commandline, though I already worked with cmd.exe but just used the short names, but it didn't help...
I also set Javahome to a Jdk1.3-installation, nothing...
Meanwhile I remember a running Xalan-installation on some computer at home (second thought was about the horror of installing it), maybe that will help me...
So, todays jumping out of the window is cancelled, but maybe tomorrow I'll be a little closer to the edge...
Thank all of you
Stefan
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,
The tricky bit as William suggests is than Xerces and Xalan clashes with a beta version of Xalan and Xerces than comes with the 1.4 SDK.
There is a easy workaround which is to use the boot classpath.
Use the following command line to run your application:

This should solve your problem.
[ December 03, 2002: Message edited by: Beno�t d'Oncieu ]
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
There are two tutorials at the IBM's dW site. They explain Installating the latest versions of Xalan & Xerces.
Refer to the link
http://www-106.ibm.com/developerworks/java/
In the left menu, if you click on the link "EDUCATION", these tutorials are listed first on that page.
Or you can view them here
http://www-105.ibm.com/developerworks/education.nsf/dw/java-onlinecourse-bynewest?OpenDocument&Count=500&loc=j
For JDK1.4 it is advised to place the xalan.jar and the xercesImpl.jar in the lib/endorsed directory of the JDK HOME. You have to create the endorsed directory under the lib dir urselves.
Hope it helps.
NKM
[ December 03, 2002: Message edited by: Mathusuthan NK ]
 
Stefan Linke
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
GREAT!!!
Finally something worked out...
But I had to modify Beno�t's hint:
The final code is
C:\DOKUME~1\xxx0053z\Desktop>java -Xbootclasspath/p:c:\xalan\xalan-j_2_4_1\bin\x
ercesImpl.jar;c:\xalan\xalan-j_2_4_1\bin\xalan.jar org.apache.xalan.xslt.Process
-in test.xml -xsl stylesheet.xsl -out test.html
I had to add the prefixes "-in", "-xsl" and "-out".
Thanks to everyone again!
Greetings
Stefan
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just thought I'd reply to Kevin
So, you think there is no documentation on Xalan/Xerces... well think again! If you happen to read the FAQ (Frequently Asked Questions) on the Xalan web site, everything is explained
Xalan Frequently asked questions
 
Kevin Thompson
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Apache documentation for Xalan and Xerces is riddled with outright errors and also errors of omission. I started making a list of errors - but then I got disgusted because why am I working for free to correct other people's errors?
I don't have time today, but I will go thru the IBM documentation that was suggested by Mathususuthan.
"How to install and configure Xalan" is dated 11/26/02.
"How to install and configure Xerces" is dated 11/20/02.
Because these are very recent dates, that could be what I (and possibly other people also) needs to correctly install Xalan and Xerces.
Thanks for everybody's links that were suggested here. Maybe after all, I will get it running!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic