|
|
Re: XMLC and Sun Stuido One IDE: msg#00011
java.enhydra.xmlc
|
Subject: |
Re: XMLC and Sun Stuido One IDE |
Looks like you are using Tomcat. Here are instructions for
Tomcat-4.1.12 (latest release version), you can do one of two
things:
1. Put Xerces that comes with XMLC-2.1 in
CATALINA_HOME/shared/lib. This should work even if you have a newer
Xerces version (2.x.x) in common/endorsed.
2. Put Xerces that comes with XMLC-2.1 in common/endorsed and
remove the existing Xerces version
Note that you shouldn't put Xerces in WEB-INF/lib. You end up
getting weird classloader behavior. Normally what happens in
classloaders is that the XML parser highest in the classloader tree (a
parent classloader) is used. Only if it isn't found does it use a
child classloader. This behavior is slightly different for webapps
where the webapp, preferentially, loads libraries from the child
classloader (the WebappClassloader). But when the server and the
webapp are using different XML parsers, things get a bit hairy and you
end up with weird exceptions. There were bugs on Tomcat about this
and they made it so Tomcat won't allow a webapp to override the XML
parser when one is put in WEB-INF/lib. This is special behavior for
dealing with the problem of XML parsers...especially since j2sdk1.4.x now
contains an XML parser. The same goes for DOM libraries.
If you want, you can keep gnu-regexp.jar, jtidy.jar and xmlc.jar in
WEB-INF/lib or put them in shared/lib. Whichever you
want.
Let me know if that works for you.
Jake
At 03:24 PM 12/5/2002 +0000, you wrote:
Hi,
I'm trying to run XmlC generated classes through the Sun Studio One IDE
and have found a weird problem.
When trying to instantiate an XMLC object (ie "test.HomePage fred =
new test.Homepage();") using a conventional "main" class,
everything works fine. If however, I try the same line from with a
JSP/Servlet I get the following error:
java.lang.ClassCastException
at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:93)
at
org.netbeans.modules.schema2beans.GraphManager.createXmlDocument(GraphManager.java:697)
at
org.netbeans.modules.schema2beans.GraphManager.createXmlDocument(GraphManager.java:675)
at
org.netbeans.modules.schema2beans.GraphManager.createXmlDocument(GraphManager.java:642)
at
org.netbeans.modules.schema2beans.GraphManager.createRootElementNode(GraphManager.java:104)
at
org.netbeans.modules.web.monitor.data.MonitorData.(MonitorData.java:47)
at
org.netbeans.modules.web.monitor.data.MonitorData.(MonitorData.java:40)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:164)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:142)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at
java.lang.Thread.run(Thread.java:536)
I'm using XMLC version 2.1 and I've included all the required JAR files
into the WEB-INF/lib directory.
Can anyone help?
Thanks,
Ads
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
_______________________________________________
XMLC mailing list
XMLC@xxxxxxxxxxx
http://www.enhydra.org/mailman/listinfo.cgi/xmlc
| |