Re: defered parsing for WML and xHTML - Enhydra tests
Jacob Kjome <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.xmlc |
|---|---|
| Message-ID | <[email protected]> |
Hi Sinisa, Can you provide a copy of your options.xmlc that you are using? Also, not having looked over the stack trace extensively, here are a couple of interesting things to note about deferred parsing... 1. classes not compiled with deferred parsing support are able to be loaded by XMLCDeferredParsingFactory, but not converse is not true. XMLCStdFactory cannot load classes compiled for deferred parsing. Assuming there aren't extra bugs in deferred parsing (we'll figure that out and fix them if there are any), you should use the DeferredParsingFactory to load XMLC classes in all cases and never again bother using the XMLCStdFactory. 2. When classes are compiled for deferred parsing, the generated .xmlc files and the source files need to be available to deferred parsing for loading at runtime (unless you are loading directly from a file instead of a pre-compiled class). This is because deferred parsing doesn't store all the extra information in the class that normal XMLC compilation does (which gets around bugs with loading huge classes in certain VM's). You should always copy the generated.xmlc files and the source files to the same location as the generated .class files so that these can be picked up from the classpath. You can also override the resources on the classpath by providing configured resource dirs for loading the resources. That way, you can have a place to modify these files at runtime where the changes will be immediately picked up by deferred parsing, in which case deferred parsing will reload the template and you will immediately see the result at the next loading of the class associated with that file. If you have questions about this stuff or other issues about deferred parsing, let me know. In the mean time, I will take a look at the stack trace and see if I can determine what is happening. Make sure to let me know if one of the two notes above about deferred parsing provides information to fix the issue for you. If so, then no effort debugging will be necessary (that would be nice!). Jake At 03:55 PM 7/15/2003 +0200, you wrote: >Hi, > >We have a problem with defered parsing. When we set defered parsing for >WML and xHTML in options.xml file, application produces exeption. >When we test defered parsing with HTML and cHTML, everything is OK. > >Any ideas? > >Sinisa > >Exception: > >Reason: class org.enhydra.xml.xmlc.XMLCError: Couldn't load XMLC class >Java Call Stack: >org.enhydra.xml.xmlc.XMLCError: Couldn't load XMLC class >at org.enhydra.xml.xmlc.XMLCStdFactory.handleError(XMLCStdFactory.java:79) >at org.enhydra.xml.xmlc.XMLCStdFactory.create(XMLCStdFactory.java:142) >at test.presentation.WelcomePresentation.run(WelcomePresentation.java:30) >at >com.lutris.appserver.server.httpPresentation.HttpPresentationManager.runPres >entationObj(Unknown Source) >at >com.lutris.appserver.server.httpPresentation.HttpPresentationManager.Run(Unk >nown Source) >at >com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet >.serviceDirect(Unknown Source) >at >com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet >.service(Unknown Source) >at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >at org.apache.tomcat.core.ServiceInvocationHandler.method(Unknown Source) >at org.apache.tomcat.core.ServletWrapper.handleInvocation(Unknown Source) >at org.apache.tomcat.core.ServletWrapper.handleRequest(Unknown Source) >at org.apache.tomcat.core.Context.handleRequest(Unknown Source) >at org.enhydra.servlet.servletManager.ServletManager.service(Unknown >Source) >at >org.enhydra.servlet.connectionMethods.http.HttpHandler.doARequest(Unknown >Source) >at >org.enhydra.servlet.connectionMethods.http.HttpHandler.processRequests(Unkno >wn Source) >at org.enhydra.servlet.connectionMethods.http.HttpHandler.run(Unknown >Source) >at java.lang.Thread.run(Unknown Source) >Caused by: org.enhydra.xml.xmlc.XMLCRuntimeException: >java.lang.reflect.InvocationTargetException >at >org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.createObject >(XMLCDeferredParsingFactory.java:124) >at >org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.doCreate(XML >CDeferredParsingFactory.java:144) >at org.enhydra.xml.xmlc.XMLCStdFactory.create(XMLCStdFactory.java:139) >... 15 more >Caused by: java.lang.reflect.InvocationTargetException >at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) >at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown >Source) >at java.lang.reflect.Constructor.newInstance(Unknown Source) >at >org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.createObject >(XMLCDeferredParsingFactory.java:118) >... 17 more >Caused by: org.w3c.dom.DOMException: Node type being imported is not >supported >at >org.enhydra.apache.xerces.dom.CoreDocumentImpl.importNode(CoreDocumentImpl.j >ava:1051) >at >org.enhydra.apache.xerces.dom.CoreDocumentImpl.cloneNode(CoreDocumentImpl.ja >va:348) >at >org.enhydra.apache.xerces.dom.DocumentImpl.cloneNode(DocumentImpl.java:202) >at >org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getDocument(Document >LoaderImpl.java:225) >at test.presentation.WelcomeWML.buildDocument(WelcomeWML.java:108) >at test.presentation.WelcomeWML.(WelcomeWML.java:88) >at test.presentation.WelcomeWML.(WelcomeWML.java:100) >... 22 more >*** Caused by: >org.enhydra.xml.xmlc.XMLCRuntimeException: >java.lang.reflect.InvocationTargetException >at >org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.createObject >(XMLCDeferredParsingFactory.java:124) >at >org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.doCreate(XML >CDeferredParsingFactory.java:144) >at org.enhydra.xml.xmlc.XMLCStdFactory.create(XMLCStdFactory.java:139) >at test.presentation.WelcomePresentation.run(WelcomePresentation.java:30) >at >com.lutris.appserver.server.httpPresentation.HttpPresentationManager.runPres >entationObj(Unknown Source) >at >com.lutris.appserver.server.httpPresentation.HttpPresentationManager.Run(Unk >nown Source) >at >com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet >.serviceDirect(Unknown Source) >at >com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet >.service(Unknown Source) >at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >at org.apache.tomcat.core.ServiceInvocationHandler.method(Unknown Source) >at org.apache.tomcat.core.ServletWrapper.handleInvocation(Unknown Source) >at org.apache.tomcat.core.ServletWrapper.handleRequest(Unknown Source) >at org.apache.tomcat.core.Context.handleRequest(Unknown Source) >at org.enhydra.servlet.servletManager.ServletManager.service(Unknown >Source) >at >org.enhydra.servlet.connectionMethods.http.HttpHandler.doARequest(Unknown >Source) >at >org.enhydra.servlet.connectionMethods.http.HttpHandler.processRequests(Unkno >wn Source) >at org.enhydra.servlet.connectionMethods.http.HttpHandler.run(Unknown >Source) >at java.lang.Thread.run(Unknown Source) >Caused by: java.lang.reflect.InvocationTargetException >at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) >at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown >Source) >at java.lang.reflect.Constructor.newInstance(Unknown Source) >at >org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.createObject >(XMLCDeferredParsingFactory.java:118) >... 17 more >Caused by: org.w3c.dom.DOMException: Node type being imported is not >supported >at >org.enhydra.apache.xerces.dom.CoreDocumentImpl.importNode(CoreDocumentImpl.j >ava:1051) >at >org.enhydra.apache.xerces.dom.CoreDocumentImpl.cloneNode(CoreDocumentImpl.ja >va:348) >at >org.enhydra.apache.xerces.dom.DocumentImpl.cloneNode(DocumentImpl.java:202) >at >org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getDocument(Document >LoaderImpl.java:225) >at test.presentation.WelcomeWML.buildDocument(WelcomeWML.java:108) >at test.presentation.WelcomeWML.(WelcomeWML.java:88) >at test.presentation.WelcomeWML.(WelcomeWML.java:100) >... 22 more >*** Caused by: >java.lang.reflect.InvocationTargetException >at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) >at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown >Source) >at java.lang.reflect.Constructor.newInstance(Unknown Source) >at >org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.createObject >(XMLCDeferredParsingFactory.java:118) >at >org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.doCreate(XML >CDeferredParsingFactory.java:144) >at org.enhydra.xml.xmlc.XMLCStdFactory.create(XMLCStdFactory.java:139) >at test.presentation.WelcomePresentation.run(WelcomePresentation.java:30) >at >com.lutris.appserver.server.httpPresentation.HttpPresentationManager.runPres >entationObj(Unknown Source) >at >com.lutris.appserver.server.httpPresentation.HttpPresentationManager.Run(Unk >nown Source) >at >com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet >.serviceDirect(Unknown Source) >at >com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet >.service(Unknown Source) >at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >at org.apache.tomcat.core.ServiceInvocationHandler.method(Unknown Source) >at org.apache.tomcat.core.ServletWrapper.handleInvocation(Unknown Source) >at org.apache.tomcat.core.ServletWrapper.handleRequest(Unknown Source) >at org.apache.tomcat.core.Context.handleRequest(Unknown Source) >at org.enhydra.servlet.servletManager.ServletManager.service(Unknown >Source) >at >org.enhydra.servlet.connectionMethods.http.HttpHandler.doARequest(Unknown >Source) >at >org.enhydra.servlet.connectionMethods.http.HttpHandler.processRequests(Unkno >wn Source) >at org.enhydra.servlet.connectionMethods.http.HttpHandler.run(Unknown >Source) >at java.lang.Thread.run(Unknown Source) >Caused by: org.w3c.dom.DOMException: Node type being imported is not >supported >at >org.enhydra.apache.xerces.dom.CoreDocumentImpl.importNode(CoreDocumentImpl.j >ava:1051) >at >org.enhydra.apache.xerces.dom.CoreDocumentImpl.cloneNode(CoreDocumentImpl.ja >va:348) >at >org.enhydra.apache.xerces.dom.DocumentImpl.cloneNode(DocumentImpl.java:202) >at >org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getDocument(Document >LoaderImpl.java:225) >at test.presentation.WelcomeWML.buildDocument(WelcomeWML.java:108) >at test.presentation.WelcomeWML.(WelcomeWML.java:88) >at test.presentation.WelcomeWML.(WelcomeWML.java:100) >... 22 more >*** Caused by: >org.w3c.dom.DOMException: Node type being imported is not supported >at >org.enhydra.apache.xerces.dom.CoreDocumentImpl.importNode(CoreDocumentImpl.j >ava:1051) >at >org.enhydra.apache.xerces.dom.CoreDocumentImpl.cloneNode(CoreDocumentImpl.ja >va:348) >at >org.enhydra.apache.xerces.dom.DocumentImpl.cloneNode(DocumentImpl.java:202) >at >org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getDocument(Document >LoaderImpl.java:225) >at test.presentation.WelcomeWML.buildDocument(WelcomeWML.java:108) >at test.presentation.WelcomeWML.(WelcomeWML.java:88) >at test.presentation.WelcomeWML.(WelcomeWML.java:100) >at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) >at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown >Source) >at java.lang.reflect.Constructor.newInstance(Unknown Source) >at >org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.createObject >(XMLCDeferredParsingFactory.java:118) >at >org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.doCreate(XML >CDeferredParsingFactory.java:144) >at org.enhydra.xml.xmlc.XMLCStdFactory.create(XMLCStdFactory.java:139) >at test.presentation.WelcomePresentation.run(WelcomePresentation.java:30) >at >com.lutris.appserver.server.httpPresentation.HttpPresentationManager.runPres >entationObj(Unknown Source) >at >com.lutris.appserver.server.httpPresentation.HttpPresentationManager.Run(Unk >nown Source) >at >com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet >.serviceDirect(Unknown Source) >at >com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet >.service(Unknown Source) >at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >at org.apache.tomcat.core.ServiceInvocationHandler.method(Unknown Source) >at org.apache.tomcat.core.ServletWrapper.handleInvocation(Unknown Source) >at org.apache.tomcat.core.ServletWrapper.handleRequest(Unknown Source) >at org.apache.tomcat.core.Context.handleRequest(Unknown Source) >at org.enhydra.servlet.servletManager.ServletManager.service(Unknown >Source) >at >org.enhydra.servlet.connectionMethods.http.HttpHandler.doARequest(Unknown >Source) >at >org.enhydra.servlet.connectionMethods.http.HttpHandler.processRequests(Unkno >wn Source) >at org.enhydra.servlet.connectionMethods.http.HttpHandler.run(Unknown >Source) >at java.lang.Thread.run(Unknown Source)