Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Jakarta TagLib : XTags Library with Websphere

11 views
Skip to first unread message

Hassen AHLAMINE

unread,
Apr 14, 2003, 5:54:59 AM4/14/03
to
Hi,
- I have downloaded xtags library on
http://cvs.apache.org/builds/jakarta-taglibs/nightly/projects/xtags/jakarta-
taglibs-xtags-20030410.zip
- I have downloaded dom4j.jar, version 1.4, on
http://sourceforge.net/project/showfiles.php?group_id=16035
--> So we are working on a websphere 3.5 platform...

On "\WebSphere\AppServer\hosts\default_host\MyWebApp\lib", I've added :
- taglibs-xtags.jar
- dom4j.jar
- dom4j-full.jar
- xml-apis.jar
- crimson.jar
- saxon.jar
-->I've also added the classpath of each jar file on the administrative
console of websphere.

On "\WebSphere\AppServer\hosts\default_host\MyWebApp\web\WEB-INF", I've
added :
- taglibs-xtags.tld

So, I've written a JSP containing 2 lines of code :
<%@ taglib uri="http://jakarta.apache.org/taglibs/xtags-1.0"
prefix="xtags"%>
<xtags:parse uri="stocks.xml"/>

When I run it, the server catches an exception :
Servlet cible : JSP 1.1 Processor
Tra?age de pile :
----------------------------------------------------------------------------
----
Erreur root -1: Could not initialize a SAX Parser. Please add a SAX parser
to your classpath along with preferably jaxp.jar Nested exception: Could not
initialize a SAX Parser. Please add a SAX parser to your classpath along
with preferably jaxp.jar
org.dom4j.DocumentException: Could not initialize a SAX Parser. Please add a
SAX parser to your classpath along with preferably jaxp.jar Nested
exception: Could not initialize a SAX Parser. Please add a SAX parser to
your classpath along with preferably jaxp.jar
at org.dom4j.io.SAXReader.read(SAXReader.java:358)
at org.dom4j.io.SAXReader.read(SAXReader.java:233)
at org.apache.taglibs.xtags.xpath.ParseTag.doStartTag(ParseTag.java:116)
at site.AFP._test_jsp_0._jspService(_test_jsp_0.java:132)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:390)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:712)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:879)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

Please, help-me to resolve this error!
I'm looking for a way to display xml file content in a JSP...
I've tried with JSTL solution but we are on Websphere 3.5 which complaints
JSP 1.1 Processor not 1.2...

Waiting for your responses
THANKS!


Chris Smith

unread,
Apr 14, 2003, 8:19:26 AM4/14/03
to
Hassen AHLAMINE wrote ...
> [...]

>
> Erreur root -1: Could not initialize a SAX Parser. Please add a SAX parser
> to your classpath along with preferably jaxp.jar Nested exception: Could not
> initialize a SAX Parser. Please add a SAX parser to your classpath along
> with preferably jaxp.jar
> org.dom4j.DocumentException: Could not initialize a SAX Parser. Please add a
> SAX parser to your classpath along with preferably jaxp.jar Nested
> exception: Could not initialize a SAX Parser. Please add a SAX parser to
> your classpath along with preferably jaxp.jar

That's pretty much your answer right there. What do you not understand
about it, or what do you need help with? Presumably, you're using a
version of the JDK prior to 1.4, and even though you've got an XML
parser in the classpath, you don't have a valid JAXP setup.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Hassen AHLAMINE

unread,
Apr 14, 2003, 11:25:51 AM4/14/03
to
So?
What can I do to resolve this?
If I begin to upgrade my JDK, will websphere 3.5 still work?


"Chris Smith" <cds...@twu.net> a écrit dans le message de news:
MPG.19045530e...@news.altopia.com...

Chris Smith

unread,
Apr 14, 2003, 11:37:14 AM4/14/03
to
Hassen AHLAMINE wrote ...

> So?
> What can I do to resolve this?

You either:

a. Install the 1.4 JDK, OR
b. Install the JAXP package

I don't know if upgrading the JDK will break WebSphere. Do you have
documentation from them on supported configurations, or a support
contract to call and ask them? Alternatively, maybe someone else will
pipe up with an answer.

I'm pretty sure, on the other hand, that installing the Sun JAXP package
will not break WebSphere. If it does, then you can easily remove it
from the classpath again, and then look for other solutions.

Hassen AHLAMINE

unread,
Apr 14, 2003, 12:01:49 PM4/14/03
to
Thank you for your help, but before testing xtags, I have installed JAXP and
XSLT solution...
Both require a JSP Processor version at least 1.2
On websphere 3.5, JSP Processor is 1.1...


"Chris Smith" <cds...@twu.net> a écrit dans le message de news:

MPG.19048399a...@news.altopia.com...

Chris Smith

unread,
Apr 14, 2003, 12:14:53 PM4/14/03
to
Hassen AHLAMINE wrote ...

> Thank you for your help, but before testing xtags, I have installed JAXP and
> XSLT solution...
> Both require a JSP Processor version at least 1.2

No, JAXP doesn't require a "JSP Processor" at all. Have you made all
the JAXP jars available to your web application?

Hassen AHLAMINE

unread,
Apr 14, 2003, 12:18:34 PM4/14/03
to
I don't know...
I'm a newbie on the tag libs and I don't understand everything...
Where can I download all the JAXP Library please?

"Chris Smith" <cds...@twu.net> a écrit dans le message de news:

MPG.19048c69c...@news.altopia.com...

Chris Smith

unread,
Apr 14, 2003, 3:00:57 PM4/14/03
to
Hassen AHLAMINE wrote ...

> I don't know...
> I'm a newbie on the tag libs and I don't understand everything...
> Where can I download all the JAXP Library please?

Sigh... it appears to now be available only as part of the "web services
developer pack" at:

http://java.sun.com/webservices/downloads/webservicespack.html

I wish Sun would quit playing these games...

Hassen AHLAMINE

unread,
Apr 15, 2003, 5:57:25 AM4/15/03
to
Hi!

I have added jaxp.jar, but it still display the same error...
I'm going crazy!

"Chris Smith" <cds...@twu.net> a écrit dans le message de news:

MPG.1904b3534...@news.altopia.com...

Hassen AHLAMINE

unread,
Apr 15, 2003, 8:05:45 AM4/15/03
to
Hi!
 
I have a big problem with Websphere 3.5!
Indeed, I've tried many way to display the content of an xml file but without success...
 
I've tried 3 solutions :
1 - First, I've downloaded JSTL API, but JSP Processor 1.2 is needed to make it work and websphere 3.5 works with JSP Processor 1.1
2 - So, I've tried with Jakarta Project XTags Library, but I've encountered a problem with a class. Indeed, the server cannot locate the SAX Parser class and offer me to put JAXP. It is what I've done, but there were no better result.
3 - Finally, I've put another class using Parser, and then the server threw me the following error :
java.lang.Exception: org/apache/xerces/validators/schema/XSchemaValidator
 
Please Somebody help me because I don't understand everything about tag libs...

Francesca

unread,
Apr 15, 2003, 12:44:56 PM4/15/03
to
"Hassen AHLAMINE" <cain...@hotmail.com> wrote in message news:<b7dvn2$qkq$1...@reader1.imaginet.fr>...

> Hi,
> - I have downloaded xtags library on
> http://cvs.apache.org/builds/jakarta-taglibs/nightly/projects/xtags/jakarta-
> taglibs-xtags-20030410.zip
> - I have downloaded dom4j.jar, version 1.4, on
> http://sourceforge.net/project/showfiles.php?group_id=16035
> --> So we are working on a websphere 3.5 platform...
The minimun JSP level required is 1.2 and is available starting from WebSphere 5.0
0 new messages