I wish to use XMLC to implement the view in my struts application however I
am experiencing problems when I include the xmlc.jar inside my WEB-INF/lib
directory.
As far as I can make out this is due to having different versions of the
same XML parser & DOM classes in various jars.

When starting TomCat4.03 the following exceptions are reported:

javax.servlet.UnavailableException: Parsing error processing resource path
/WEB-INF/struts-config.xml
        at
org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.j
ava:780)
        at org.apache.struts.action.ActionServlet.init(ActionServlet.java:417)
        ..etc

and also:

javax.servlet.ServletException: Servlet.init() for servlet jsp threw
exception
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
5)
        ...etc
----- Root Cause -----
java.lang.NoClassDefFoundError: org/w3c/dom/range/DocumentRange
        at java.lang.ClassLoader.defineClass0(Native Method)
        ...etc

As the struts-config could not be parsed the application is dead. It seems
that enhydra extended an older version of xerces when they created xmlc and
struts tries to use these classes instead of the xerces in common/lib (btw:
is it supposed to be there or should it be in WEB-INF/lib too??).

I tried dumping a copy of xerces in my WEB-INF/lib which made struts work
again, but my page that uses xmlc (my trying to use an xmlc generated class
from a tag) dies with:

javax.servlet.ServletException: (class:
org/enhydra/xml/lazydom/LazyElementNoNS, method: expandAttributes signature:
()V) Incompatible object argument for function call
        at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:463)
        ..etc

(Incidentally I have a small snippet of code in a main() function that does
(roughly) the same thing as the other code in the tag and works fine when
run as a normal java class:
//The following being in doEndTag():
Test test = new Test(true); // Test being a 'hello world' type class
generated using xmlc
JspWriter out = pageContext.getOut();
out.write(test.toDocument());
)

Anyone can advice me as to the approach I should take towards resolving
this?

thanks
Andrew


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to