Thursday, September 1, 2011

Re: No source code is available for type javax.xml.parsers.DocumentBuilderFactory

Hi I tried using XMLParser as u suggested. But getting this error.

The code is
public void onModuleLoad() {
    
        xmlstring = callquery.xmlget_capabilities();
        System.out.println(xmlstring);
        System.out.println(xmlstring.
length());

        
        xmldoc = XMLParser.parse(xmlstring); \\ Error at this line
        Element root = xmldoc.getDocumentElement();
        System.out.println("Element = "+ root.getNodeName());  
    }

See Development Mode for details.

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.xml.client.impl.DOMParseException: Failed to parse: 1.
at com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.onModuleLoad(TutorialDemo1.java:61)
... 9 more
Caused by: com.google.gwt.core.client.JavaScriptException: (Error): line 1, char 94:The character :GetCapabilities b < more 11 ... com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:278) at com.google.gwt.xml.client.impl.XMLParserImplIE6.parseImpl(XMLParserImplIE6.java) com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132) com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237) value. attribute an in used be cannot 1.
at com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.onModuleLoad(TutorialDemo1.java:61)



Caused by: com.google.gwt.core.client.JavaScriptException: (Error): line 1, char 94:The character ">
1. at com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280) at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47) at edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.onModuleLoad(TutorialDemo1.java:61) ... 9 more Caused by: com.google.gwt.core.client.JavaScriptException: (Error): line 1, char 94:The character :GetCapabilities>

Vrushali


On Thu, Sep 1, 2011 at 10:16 PM, Jens <jens.nehlmeier@gmail.com> wrote:
In general you can only use Java classes on the client side (everything that is in your client and shared package) listed in: http://code.google.com/intl/de-DE/webtoolkit/doc/latest/RefJreEmulation.html

So you can not use most of the classes in your code on client side. 

You have to:
- write your own client side string parser that converts the xml string to something you want to have 
- parse the XML on server side and ask the server for the information you need

I haven't used XMLParser yet but it seems to me that the xml string you want to parse isn't that long so I think it should work.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/aegt2NbIkfMJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment