logo       

Re: defered parsing for WML and xHTML - Enhydra tests: msg#00037

java.enhydra.xmlc

Subject: Re: defered parsing for WML and xHTML - Enhydra tests

Hi,

We attached all project which doesn't work (TestWML.zip), but we will try to
give you some explanations.
We call xmlc with ant task:

<target name="xmlc" depends="prepare, dods">
<xmlc srcdir="${xmlcresources.dir}"
sourceout="${dir.xmlc}"
packagename="${project.package}.presentation"
options="options.xmlc"
compile="true"
markup="WML"
includes="**/*.wml">
<arg value="-d" />
<arg value="${dir.classes}" />
<arg value="-urlmapping"/>
<arg value="Welcome.wml"/>
<arg value="RedirectPresentation.po"/>
<arg value="-domfactory"/>
<arg value="org.enhydra.wireless.wml.WMLDomFactory"/>
</xmlc>
</target>
options.xmlc has single line: -for-deferred-parsing

We attached separatly Welcome.wml(resource
file),options.xmlc,WelcomeWML.java and WelcomeWML.xmlc created by xmlc.

There is our presentation class:

// Enhydra SuperServlet imports
import com.lutris.appserver.server.httpPresentation.HttpPresentation;
import com.lutris.appserver.server.httpPresentation.HttpPresentationComms;
import
com.lutris.appserver.server.httpPresentation.HttpPresentationException;

// Standard imports
import java.io.IOException;
import java.util.Date;
import java.text.DateFormat;
import org.enhydra.xml.xmlc.deferredparsing.*;

public class WelcomePresentation implements HttpPresentation {

public void run(HttpPresentationComms comms)
throws HttpPresentationException, IOException {

WelcomeWML welcome;
String now;
welcome = (WelcomeWML)comms.xmlcFactory.create(WelcomeWML.class);
// we tried with casting with the same result
// welcome =
(WelcomeWML)((XMLCDeferredParsingFactory)comms.xmlcFactory).create(WelcomeWM
L.class);
now = DateFormat.getTimeInstance(DateFormat.MEDIUM).format(new
Date());
welcome.setTextTime(now);
comms.response.writeDOM(welcome);
}
}

I hope that these information will be useful.
Thanks in advance.

Regards,

Sinisa


----- Original Message -----
From: "Jacob Kjome" <hoju@xxxxxxxx>
To: <xmlc@xxxxxxxxxxx>
Cc: "Madl Alfred" <A.Madl@xxxxxxxxxxx>
Sent: Wednesday, July 23, 2003 7:09 PM
Subject: Re: Xmlc: defered parsing for WML and xHTML - Enhydra tests


> Hi Sinisa,
>
> Can you provide the codes you use to load the document for both WML and
> XHTML? The fact that you are getting the following error message suggests
> that you might be importing a node from an incompatible DOM...
>
> "Caused by: org.w3c.dom.DOMException: Node type being imported is not
> supported"
>
> This is the last issue holding up an XMLC release. If it is a real
> problem, it should be fixed. However, if we don't get any information
> about how to reproduce it, it limits our ability to track the bug down and
> fix it (assuming it is, in fact, an XMLC bug). We'd like to get XMLC
> released ASAP, so the sooner you can supply us with the information
> required to reproduce the issue, the better.
>
> 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.runPre
s
> >entationObj(Unknown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.HttpPresentationManager.Run(Un
k
> >nown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServle
t
> >.serviceDirect(Unknown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServle
t
> >.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(Unkn
o
> >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.createObjec
t
> >(XMLCDeferredParsingFactory.java:124)
> >at
>
>org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.doCreate(XM
L
> >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.createObjec
t
> >(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.j
a
> >va:348)
> >at
>
>org.enhydra.apache.xerces.dom.DocumentImpl.cloneNode(DocumentImpl.java:202)
> >at
>
>org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getDocument(Documen
t
> >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.createObjec
t
> >(XMLCDeferredParsingFactory.java:124)
> >at
>
>org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.doCreate(XM
L
> >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.runPre
s
> >entationObj(Unknown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.HttpPresentationManager.Run(Un
k
> >nown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServle
t
> >.serviceDirect(Unknown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServle
t
> >.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(Unkn
o
> >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.createObjec
t
> >(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.j
a
> >va:348)
> >at
>
>org.enhydra.apache.xerces.dom.DocumentImpl.cloneNode(DocumentImpl.java:202)
> >at
>
>org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getDocument(Documen
t
> >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.createObjec
t
> >(XMLCDeferredParsingFactory.java:118)
> >at
>
>org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.doCreate(XM
L
> >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.runPre
s
> >entationObj(Unknown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.HttpPresentationManager.Run(Un
k
> >nown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServle
t
> >.serviceDirect(Unknown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServle
t
> >.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(Unkn
o
> >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.j
a
> >va:348)
> >at
>
>org.enhydra.apache.xerces.dom.DocumentImpl.cloneNode(DocumentImpl.java:202)
> >at
>
>org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getDocument(Documen
t
> >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.j
a
> >va:348)
> >at
>
>org.enhydra.apache.xerces.dom.DocumentImpl.cloneNode(DocumentImpl.java:202)
> >at
>
>org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getDocument(Documen
t
> >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.createObjec
t
> >(XMLCDeferredParsingFactory.java:118)
> >at
>
>org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.doCreate(XM
L
> >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.runPre
s
> >entationObj(Unknown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.HttpPresentationManager.Run(Un
k
> >nown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServle
t
> >.serviceDirect(Unknown Source)
> >at
>
>com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServle
t
> >.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(Unkn
o
> >wn Source)
> >at org.enhydra.servlet.connectionMethods.http.HttpHandler.run(Unknown
> >Source)
> >at java.lang.Thread.run(Unknown Source)
>
> _______________________________________________
> XMLC mailing list
> XMLC@xxxxxxxxxxx
> http://www.enhydra.org/mailman/listinfo.cgi/xmlc
>

Attachment: options.xmlc
Description: Binary data

Attachment: TestWML.zip
Description: Binary data

Attachment: Welcome.wml
Description: Binary data

Attachment: WelcomeWML.java
Description: Binary data

Attachment: WelcomeWML.xmlc
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise