Xml parsing in weblogic 6.0: can't build tree

Environment: weblogic 6.0
Using: xalan.jar, jaxp.jar and crimson.jar.
(but probably conflicting with other parsers included in weblogic??)
I have a component that reads xml file working on weblogic 5.1. When
migrated to 6.0, it seems it starts reading but doesnt build the whole
tree (it just reads the root node).I seems that its parsing the xml
file as its returning node name and number of children, but
it doesnt go further reading other nodes.
We placed in classpath our parser specific jars before weblogic's jars
also.
We have double-checked our source xml and dtd, and added an XML
Registry in weblogic's console
We dont know what xalan version this component uses. (1.X or 2.0.d6)
Is there any problem with xalan versions or xml registration in
weblogic?
Please--- HELP.. :) thanks so much in advance..

Please post this to the XML newsgroup.
-- Rob
seguia wrote:
Environment: weblogic 6.0
Using: xalan.jar, jaxp.jar and crimson.jar.
(but probably conflicting with other parsers included in weblogic??)
I have a component that reads xml file working on weblogic 5.1. When
migrated to 6.0, it seems it starts reading but doesnt build the whole
tree (it just reads the root node).I seems that its parsing the xml
file as its returning node name and number of children, but
it doesnt go further reading other nodes.
We placed in classpath our parser specific jars before weblogic's jars
also.
We have double-checked our source xml and dtd, and added an XML
Registry in weblogic's console
We dont know what xalan version this component uses. (1.X or 2.0.d6)
Is there any problem with xalan versions or xml registration in
weblogic?
Please--- HELP.. :) thanks so much in advance..

Similar Messages

  • XML Parsing in Weblogic

    Hi all,
    Am releatively new to weblogic and am migrating my web app from the tomcat container to weblogic 9.2
    I use a XerxesImpl jar to parse my XML using a DOMParser and I dont want to use any libraries provided by weblogic atleast now!!
    It always gives the SAXParserException, but the same bit of code works fine with the tomcat container.
    I have also checked for the well-formedness of the xml and the xml and the dtd looks fine.
    Any inputs on this would help!
    Thnx
    Cyrus

    The solution to this being that ---
    1. Whenever using the local jar file for any XML parsing such as XerxesImpl.jar the weblogic provided services may try to override it and hence must be added on to the classpath before the ap[plication is deployed.
    2.Also that somtimes the pageContext.getServletContext() returns a null and hence some other means mustbe found to find the corresponding xml file.(probably loading it as an initparam)
    3. Also make sure that your xml matches the dtd declarations since atomcat container doesnt validate this but the weblogic container.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • XML Parser on UTF8

    The project I am working with is involves with UTF8 chars (ie. japanese,chinese) stored in XML file. I tried to test and use the sample XML Parser on Weblogic 7 by putting Japanese character on order.xml and ran the OrderParser.jsp then I got weird characters instead of the Japanese word.
    I saved the xml file on utf8 coding and changed the OrderParser.jsp encoding tag=utf8 too.
    If anybody can help, I appreciated much.
    Nick

    Nick,
    What progam and on what plateform are you making the xml file ?
    What is the plateform for the Weblogic ?
    If Unix, have you checked the LOCALE values ?
    Thanks for the reply,
    Nohmenn
    "Nick" <[email protected]> a écrit dans le message de news:
    [email protected]..
    The project I am working with is involves with UTF8 chars (ie.japanese,chinese) stored in XML file. I tried to test and use the sample XML
    Parser on Weblogic 7 by putting Japanese character on order.xml and ran the
    OrderParser.jsp then I got weird characters instead of the Japanese word.
    >
    I saved the xml file on utf8 coding and changed the OrderParser.jspencoding tag=utf8 too.
    >
    If anybody can help, I appreciated much.
    Nick

  • ANN: Oracle XML Parser for Java v2.0.0.1

    A new maintenance release of the Oracle Parser for Java is
    available for download. It has the following fixes and changes:
    Bug fixes for #920536, i.e. Cannot access element attributes via
    XSLT; #898423. i.e. ElementDecl's in DTDs; #774774, i.e. DOM
    extensions using XSL pattern matching; #863890 i.e. SAX
    IOException not thrown.
    New APIs in the following new interface:
    1. oracle.xml.parser.v2.NSResolver
    - resolveNamespacePrefix( find the namespace definition in scope
    for a given namespace prefix )
    New APIs in the following classes:
    1. oracle.xml.parser.v2.XMLNode
    - selectNodes( Selects nodes from the tree which match the given
    pattern; client can provide an NSResolver implementation to
    resolve namespace prefixes in the pattern ).
    2. oracle.xml.parser.v2.ElementDecl
    - getParseTree( Returns the root Node of Content Model parse
    tree, which could then be traversed node by node using
    getFirstChild() and getLastChild(). The Node types are: PLUS,
    COMMA, ASTERISK, ELEMENT, QMARK ).
    This is the first beta patch release for v2.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

    unzip -l appsborg2.zip | grep 9.0.4
    0 04-18-03 20:10 .xdkjava_version_9.0.4.0.0_production
    do i still need to do that step?No, you do not have to since "XML Parser for Java v9.0.4" is already installed as part of appsborg2.zip

  • XML parser in embedded OC4J

    How can I add option to embedded OC4J, so it will take the xml parser I specified.
    example as following.
    -Dorg.xml.sax.driver=oracle.xml.parser.v2.SAXParser
    Where I can setup in Jdeveloper?
    or is some property files?

    You can set options on JDeveloper's embedded OC4J from the Tools menu option "Embedded OC4J Server Preferences". You can read the documentation on this in JDeveloper's online help from within the product or at
    http://helponline.oracle.com/jdeveloper/help/state?navSetId=jdeveloper&navId=4&vtTopicId=&vtTopicFile=jdeveloper/deploying/embedded_oc4j/eos_p_prefs.html
    -SteveA

  • Problem casting org.w3c.dom.Document to oracle.xml.parser.v2.XMLDocument

    I have the following problem:
    I get my xml-documents as an XMLType from the database and want to compare these using the supplied Oracle class oracle.xml.differ.XMLDiff (i use the java version supplied with Oracle 9i r2).
    XMLType.getDOM() returns the xml-document as a org.w3c.dom.Document,
    what i need for oracle.xml.differ.XMLDiff is a oracle.xml.parser.v2.XMLDocument.
    How can i cast/convert between these two formats?
    thanks!
    p.s. cross-posting with Re: Casting/Converting XMLType to XMLDocument? (but i think this forum is more relevant).

    Hi,
    thanks for the suggestion: i have written the code shown below. It results in a casting error.
    As far as i know, i don't use a oracle.xdb.dom.XDBDocument, i only use a oracle.xdb.XMLType as the input parameter for my conversion-method:
    any new suggestions ???
    p.s. the second method which is commented does work, but is a bit verbose.
       private static oracle.xml.parser.v2.XMLDocument convert2XMLDocument(XMLType xml) {
         // simple version (should work according to tech. doc. 9i r2/ 10g r1 database)
         oracle.xml.parser.v2.XMLDocument doc = null;
         try {
            // n.b. probleem is dat XMLType.getDOM() een w3c.Document object teruggeeft ipv een oracle.XMLDocument.
            System.out.println("convert2XMLDocument(): casting w3c.Document naar oracle.XMLDocument.");
            doc = (oracle.xml.parser.v2.XMLDocument) xml.getDOM(); // public org.w3c.dom.Document getDOM()
            System.out.println("convert2XMLDocument(): done casting w3c.Document naar oracle.XMLDocument.");
         catch (Exception e) {
            e.printStackTrace(System.out);
        return doc;
       private static XMLDocument convert2XMLDocument(XMLType xml) {
         // complex version: works ok !!!
         XMLDocument doc = null;
         try{
            DOMParser parser  = new DOMParser();
            parser.setValidationMode(oracle.xml.parser.v2.XMLParser.NONVALIDATING);
            parser.setPreserveWhitespace (true);   
            parser.parse(new StringReader(xml.getStringVal()));
            doc = parser.getDocument();
        catch ( XMLParseException e ) {
          e.printStackTrace(System.out);
        catch ( SQLException e ) {
          e.printStackTrace(System.out);
        catch ( Exception e ) {
          e.printStackTrace(System.out);
        return doc;
    convert2XMLDocument(): casting w3c.Document naar oracle.XMLDocument.
        java.lang.ClassCastException: oracle.xdb.dom.XDBDocument
         at pnb.bdb.xml.testJDBC.convert2XMLDocument(testJDBC.java:305)
         at pnb.bdb.xml.testJDBC.main(testJDBC.java:187)

  • Xml parser  configuration prooblem

    Hi
    The application I am running is trying to use the Following XML parser
    "org/apache/xerces/framework/XMLParser" . BUT i get a NoClassDefFoundError
    when i run it. I tam not sure which jar i have to use.
    Please can u suggest me ...
    1 > HOW to change the Default XML parser used by an application ...
    a > BY modifying some File provided by SUN for eg .
    b > BY adding JVM parameter before running app.
    2> List of Jars which contain this Class
    Basically i know that XML parser used by an APP can be changed .
    Please can u suggest a solution using point 1a ) or 1b
    Thanks
    sbelur

    According to the javadocs
    http://xml.apache.org/xerces2-j/javadocs/xerces2/index.html
    you want to use this:
    org.apache.xerces.parsers.XMLParser
    I suggest you study Xerces some more, or check out the examples that you get with the source package.

  • Cannot create controls/constants/indicators from XML parser

    Is there any reason I cannot create (by right clicking) a control/constant/indicator of a XML ref from the XML parser function? I need to make subvi's to build/read xml files, and that is really impossible without that ability.
    Labview 2012 f3
    Solved!
    Go to Solution.

    This bug has already been reported (CAR 357092), and is scheduled to be fixed in the next service pack release. For now, here's a workaround:
    1. Create a reference indicator from Functions » Programming » File I/O » XML » XML Parser » New.vi.
    2. Right click on the new "DOM Document Out" indicator terminal and select Create > Control (or Indicator).
    3. Right click on the new control/indicator and choose Select XML Parser Class. Then, you can select whatever class you need.
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • WebLogic's High-Performance XML parser

    I understand that 6.1's high performance XML parser is the replacement of 6.0's
    custom generated parser. Per the documentation, I need to set SAXParserFactory
    to weblogic.xml.babel.jaxp.SAXParserFactoryImpl, but I couldn't find weblogic/xml/babel/jaxp/SAXParserFactoryImpl
    in either weblogic.jar or xmlx.jar. There are bunch of weblogicx/xml/babel/* in
    xmlx.jar.
    When I call JAXP code, I got this error:
    javax.xml.parsers.FactoryConfigurationError: Failed to find SAXParserFactory.
    weblogic.xml.babel.jaxp.SAXParserFactoryImpl
    javax.xml.parsers.FactoryConfigurationError: Failed to find SAXParserFactory.
    weblogic.xml.babel.jaxp.SAXParserFactoryImpl
    Am I missing something, or the 6.1 beta download forget to include the *.babel.jaxp.*
    stuff?
    Jim Zhou.

    Jim,
    Please don't use System.setProperty() in any server code. This was intended
    as an example only. I think the XMLReaderFactory is not specified in
    JAXP1.1.
    Thanks,
    Chris
    "Chris Fry" <[email protected]> wrote in message
    news:[email protected]...
    Jim,
    Here is a code fragment to acess the parser:
    System.setProperty("javax.xml.parsers.SAXParserFactory","weblogic.xml.babel.
    jaxp.SAXParserFactoryImpl");
    SAXParserFactory factory = SAXParserFactory.newInstance();
    SAXParser parser = factory.newSAXParser();
    parser.parse("yourfile.xml",defaultHandler);
    "Jim Zhou" <[email protected]> wrote in message
    news:[email protected]...
    I just found out that XML Registry setting on SAXParserFactory does notapply to
    XMLReaderFactory() and XMLReader:
    XMLReader parser = XMLReaderFactory.createXMLReader();
    I have to use SAXParserFactory to get High Performance Parser kicked in:
    SAXParserFactory factory = SAXParserFactory.newInstance();
    SAXParser parser = factory.newSAXParser();
    Is this the right behavior? Thanks for the help.
    Jim Zhou.
    "Jim Zhou" <[email protected]> wrote:
    Chris,
    Thanks for the reply. It still doesn't work. I think the problem is
    that weblogic.jar
    and xmlx.jar both does not have eihter
    "weblogicx.xml.babel.jaxp.SAXParserFactoryImpl"
    or "weblogic.xml.babel.jaxp.SAXParserFactoryImpl". So the current Beta
    download
    forgot to include the above classes. I might try download Beta again
    to see if
    any difference.
    Regards,
    Jim Zhou.
    "Chris Fry" <[email protected]> wrote:
    Jim,
    This is a mismatch between our beta and the final place that the
    parser
    will
    live in the release, you should be able to get the parser by setting
    the
    SAXParserFactory to weblogicx.xml.babel.jaxp.SAXParserFactoryImpl (it
    will
    be weblogic.xml.babel.jaxp.SAXParserFactoryImpl in the final release).
    A couple notes:
    The parser only handles standalone documents, with no entityreferences
    and
    is optimized for small to midsize documents (IE soap and wsdl type
    documents).
    Pleas let me know if you can get it to work.
    Chris
    "Jim Zhou" <[email protected]> wrote in message
    news:[email protected]...
    I understand that 6.1's high performance XML parser is the
    replacement
    of
    6.0's
    custom generated parser. Per the documentation, I need to setSAXParserFactory
    to weblogic.xml.babel.jaxp.SAXParserFactoryImpl, but I couldn't findweblogic/xml/babel/jaxp/SAXParserFactoryImpl
    in either weblogic.jar or xmlx.jar. There are bunch ofweblogicx/xml/babel/* in
    xmlx.jar.
    When I call JAXP code, I got this error:
    javax.xml.parsers.FactoryConfigurationError: Failed to findSAXParserFactory.
    weblogic.xml.babel.jaxp.SAXParserFactoryImpl
    javax.xml.parsers.FactoryConfigurationError: Failed to findSAXParserFactory.
    weblogic.xml.babel.jaxp.SAXParserFactoryImpl
    Am I missing something, or the 6.1 beta download forget to includethe
    *.babel.jaxp.*
    stuff?
    Jim Zhou.

  • Weblogic 6.1 and xml parser empty elements

    FYI, It looks like Weblogic changed there xml parser in the transition from
    6.0sp2 to 6.1. Example : The empty Extra Info Class produced and error,
    because it is empty. Where in 6.0sp2 it did not produce and error:
    <taglib>
    <tag>
    <name>indexProperty</name>
    <info>
    some info..
    </info>
    <tagclass>com.pssg.jsp.tags.IndexPropertyTag</tagclass>
    <teiclass></teiclass>
    </tag>
    </taglib>
    ####<Aug 20, 2001 12:20:52 PM PDT> <Info> <HTTP> <devlwebejb1> <camserver>
    <ExecuteThread: '14' for queue: 'default'> <> <> <101047>
    <[WebAppServletContext(7008653,cam,/cam)] resolved taglib uri '/pssglibtags'
    to taglib-location /WEB-INF/tlds/pssgtaglib.tld:>
    ####<Aug 20, 2001 12:20:53 PM PDT> <Info> <HTTP> <devlwebejb1> <camserver>
    <ExecuteThread: '14' for queue: 'default'> <> <> <101160> <Deployment
    descriptor is malformed, check against the DTD:
    org.xml.sax.SAXParseException: The content of element type "tag" must match
    "(name,tagclass,teiclass?,bodycontent?,info?,attribute*)"..>
    ####<Aug 20, 2001 12:20:53 PM PDT> <Error> <HTTP> <devlwebejb1> <camserver>
    <ExecuteThread: '14' for queue: 'default'> <> <> <101020>
    <[WebAppServletContext(7008653,cam,/cam)] Servlet failed with Exception>
    weblogic.servlet.jsp.JspException: (line 1): Error in using tag library
    uri='/pssglibtags' prefix='pssglibtag': For tag 'indexProperty', cannot load
    extra info class ''
    at
    weblogic.servlet.jsp.StandardTagLib.tld_jspException(StandardTagLib.java:901
    -Scot

    hi,
    there are two versions of ldap supported in wls6.1 , ldapv1 and ldavp2
    ldap v1 only has the functionality of listing groups.
    but where ldapv2 doesn't have that functionality,
    by looking at your config , it seems you are using ldap v2..
    if u need that functionality u can use ldapv1.
    thanks
    kiran
    "Bert Cliche" <[email protected]> wrote in message
    news:[email protected]..
    Per a proof of concept, I am having trouble getting WL6.1 to see
    group members as defined in iPlanet LDAP. I can see the groups,
    but modifies to create groups only create them in the local DB.
    Created users also only get placed in the local DB. I can bind
    for searches as Directory Manager via ldapsearch and run queries,
    and the DS gateway works fine. I can dump the LDIF file and the
    entries look fine.
    I copied and modified the template for the Netscape server and
    have the realm setup per the GUI.
    For sanity, everything is very generic as:
    the Root DN is "o=test.org"
    and my "Configuration" part from the config.xml looks like:
    server.authprotocol=simple;
    server.host=localhost;
    membership.filter=(&(uniquemember=%M)(objectclass=groupofuniquenames));
    server.port=390;
    group.dn=o=test.org;
    group.filter=(&(cn=%g)(objectclass=groupofuniquenames));
    server.principal=cn=Directory Manager;
    user.dn=o=test.org;
    server.groupiscontext=false;
    user.filter=(&(uid=%u))
    I added the "authprotocol" as a guess. Note that the server is
    running on port 390, this is not a typo.
    Any ideas what is going wrong?

  • How can I use a 3rd party XML parser such as xerces with OC4J ?

    Hi all tech experts,
    I am using Oracle Application Server 10g Release 2 (10.1.2) and i have
    installed Portal and Wireless and OracleAS Infrastructure on the same
    computer.
    i tried all the solutions on this thread
    Use of Xerces Parser in out application with Oracle App Server 9.0.4
    but still fighting.
    I have also posted this query on OTN on following thread
    How can I use a 3rd party XML parser such as xerces with OC4J?
    but no reply....
    Please help me on this issue.
    Since OC4J is preconfigured to use the Oracle XML parser which is xmlparserv2.jar.
    i have read the following article which states that
    OC4J is preconfigured to use the Oracle XML parser. The Oracle XML parser is fully JAXP 1.1 compatible and will serve the needs of applications which require JAXP functionality. This approach does not require the download, installation, and configuration of additional XML parsers.
    The Oracle XML parser (xmlparserv2.jar) is configured to load as a system level library of OC4J through it's inclusion as an entry in the Class-Path entry of the oc4j.jar Manifest.mf file. This results in the Oracle XML parser being used for all common deployment and packaging situations. You are not permitted to modify the Manifest.mf file of oc4j.jar.
    It must be noted that configuring OC4J to run with any additional XML parser or JDBC library is not a supported configuration. We do know customers who have managed to successfully replace the system level XML parser and the Oracle JDBC drivers that ship with the product, but we do not support this type of configuration due to the possibility of unexpected system behavior and system errors that might occur from replacing the tested and certified libraries.
    If you absolutely must use an additional XML parser such as xerces, then you have to start OC4J such that the xerces.jar file is loaded at a level above the OC4J system classpath. This can be accomplished using the -Xbootclasspath flag of the JRE.
    i have also run the following command
    java -Xbootclasspath/a:d:\xerces\xerces.jar -jar oc4j.jar
    but no success.
    How could i utilize my jar's like xerces.jar and xalan.jar for parsing instead of OC4J in-built parser ?
    All reply will be highly appreciated.
    Thnx in advance to all.
    Neeraj Sidhaye
    try_catch_finally @ Y !

    Hi Neeraj Sidhaye,
    I am trying to deploy a sample xform application to the Oracle Application Server (10.1.3). However, I encountered the class loader issue that is similar to your stuation. I tried all the three solutions but the application is still use the Oracle xml paser class. I am wondering if you have any insight about this?
    Thanks for your help.
    Xingsheng Qian
    iPass Inc.
    Here is the error message I got.
    Message:
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
    Stack Trace:
    org.chiba.xml.xforms.exception.XFormsException: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.initModels(Unknown Source)
         at org.chiba.xml.xforms.Container.init(Unknown Source)
         at org.chiba.xml.xforms.ChibaBean.init(Unknown Source)
         at org.chiba.adapter.servlet.ServletAdapter.init(ServletAdapter.java:153)
         at org.chiba.adapter.servlet.ChibaServlet.doGet(ChibaServlet.java:303)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Instance.iterateModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.initializeModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.init(Unknown Source)
         at org.chiba.xml.xforms.Initializer.initializeBindElements(Unknown Source)
         at org.chiba.xml.xforms.Model.modelConstruct(Unknown Source)
         at org.chiba.xml.xforms.Model.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.dispatchEvent(Unknown Source)
         at org.apache.xerces.dom.NodeImpl.dispatchEvent(Unknown Source)
         ... 18 more

  • Can't convert oracle.xml.parser.DTD to oracle.xml.parser.v2.DTD.

    I am getting the following Error while trying
    to compile the SampleMain.java file(Generating an XML document from a given Employee.dtd).
    I have set my classpath to use xmlparser.jar.
    D:\XMls>javac SampleMain.java
    SampleMain.java:65: Can't convert oracle.xml.parser.DTD to oracle.xml.parser.v2.DTD.
    main(java.l
    ang.String[]).
    generator.generate(dtd, doctype_name);

    Would you check the java parser version you are using? If using java parser V2, the normal lib name is xmlparserv2.jar.
    null

  • Can't add a new account in FireFTP. Get XML Parsing Error: undefined entity Location: chrome://fireftp/content/accountManager.xul Line Number 216, Column 17:

    I'm having trouble adding an additional account to FireFTP. I keep getting a yellow box with this title:
    XML Parsing Error: undefined entity
    Location: chrome://fireftp/content/accountManager.xul
    Line Number 216, Column 17:
    <menu label="&charsetMenuMore1.label;" accesskey="&charsetMenuMore1.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserMore1CharsetMenuRoot">
    ----------------^
    Don't understand the problem, can anyone help please?

    Try updating FireFTP to the latest 2.0.20 version.
    ''An update for Firefox 32 compatibility.''
    https://addons.mozilla.org/en-US/firefox/addon/fireftp/

  • I have Dreamweaver CS5.5 and all of a sudden I can't open it says XML parsing fatel error.  Invalid Document Structure  What do I do?  Thanks

    I have Dreamweaver CS5.5 and all of a sudden I can't open it says XML parsing fatel error.  Invalid Document Structure  What do I do?  Thanks

    You need to rename the Configuration folder to Configuration_BU.
    The folder can be found by following this http://www.dmxzone.com/go/16740/clearing-dreamweaver-s-cache/

  • Can't parse xml file in jar file when  can't connect to web server

    My JNLP application throw ConnectException when trying to parse xml during web server offline.
    Steps,
    1. JNLP application has been launched once and all related jar and xml files are already downloaded to local cache.
    2. Then I close web server to test offline launch.I launch the JNLP application using shortcut with -offline parameter.
    3. However the JRE internal xml parser tries to connect to web server and report connection error as web server is down now.
    My concern is the file is already in the cache, why java still try to connect URL. This error happens in JRE 1.5, but it doesn't happen in JRE 1.6. It only happens when web server is down in JRE 1.5.
    I think it may be a bug of JRE, do any one can give me some hint about how to resolve?
    Thanks in advance!!
    I also moved the code piece to a simple web start example, following it the error and code pieces.
    Error Trace in Java console,
    ava.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.<init>(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
         at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
         at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
         at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
         at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
         at EntXmlUtil.buildDocument(EntXmlUtil.java:57)
         at Notepad.testParseXML(Notepad.java:870)
         at Notepad.main(Notepad.java:153)
         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.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Notepad.java
    public void testParseXML() {
         URL xmlURL=Notepad.class.getClassLoader().getResource("xml/Login.xml");
         try {
                   org.w3c.dom.Document doc = EntXmlUtil.buildDocument(xmlURL);
                   System.out.println("Test"+doc);
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    EntXMLUtil.java
    private static DocumentBuilderFactory dbf = null;
         static {
              dbf = DocumentBuilderFactory.newInstance();
              dbf.setNamespaceAware(true);
              dbf.setValidating(true);
              dbf.setIgnoringComments(true);
              dbf.setIgnoringElementContentWhitespace(true);
    public static DocumentBuilderFactory getDocBuilderFactory() {
              return EntXmlUtil.dbf;
    public static Document buildDocument(URL url, String systemId) throws Exception {
              DocumentBuilder db;
              Document doc;
              InputStream is;
              String sysId = null;
              if(systemId == null)
                   sysId = url.toExternalForm();
              else
                   sysId = systemId;
              db = EntXmlUtil.getDocBuilderFactory().newDocumentBuilder();
              is = url.openStream();
              doc = db.parse(is, sysId);
              is.close();
              return doc;
         }

    I finally got a temperary work around for this issue, using JRE5 version lower than update 16(not include update 16).
    i found Sun modify the URL which returned by XXX.class.getClassLoader().getResource("xml/Test.xml,") after update 15, previous it is related with the cache path, like C:\Users\epenwei\AppData\LocalLow\Sun\Java\Deployment\cache\javaws\http\Dlocalhost\P80\DMEntriView\DMapp\AMNotepad.jar!/xml/Test.xml, but after it changes to network path, like http://localhost/Notepad/app/notepad.jar!/xml/Test.xml. However, the latter address doesn't work in Sun's own class com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity if offline.It tried to create new URL then connect to web server. So exception is thrown since web server is down.
    if (reader == null) {
    stream = xmlInputSource.getByteStream();
    if(stream != null && encoding != null)
    declaredEncoding = true;
    if (stream == null) {
    URL location = new URL(expandedSystemId);
    URLConnection connect = location.openConnection();
    if (connect instanceof HttpURLConnection) {
         setHttpProperties(connect,xmlInputSource);
    I am not sure whether it is a Java new bug since I only read the codes and didn't debug Sun code. But I am very curious that I have already specify <j2se version="1.5.0_12" href="http://java.sun.com/products/autodl/j2se" /> to specify update 12 for my jws application. And I also see the Java console display like following
    Java Web Start 1.5.0_18
    Using JRE version 1.5.0_12 Java HotSpot(TM) Client VM
    Why java still uses my latest jre lib to run my application?
    Edited by: wei000 on May 22, 2009 5:32 AM

Maybe you are looking for

  • IPhoto and Mountain Lion 10.8.2

    Hi there, I had been working with the version of iPhoto that was originally installed on my late 2008 MacBook for quite some time before I decided to upgrade this week. I've installed the newest version from the app store, but now when I click on iPh

  • Possible to do a screen grab without "waking up" the CPU?

    Electric Sheep creates the coolest images ever...but it's like grabbing a soap bubble...touching any key wipes it out.  Is there a way to do a screen grab without waking up the CPU?

  • Buttons in nested MovieClips

    Forum, I'm making a zoomable and panable graphic and I have used four nested MCs as follows: main_mc->zoom_mc->pan_mc->content_mc. Main is top level and contains everything, zooming is done on zoom_mc, panning on pan_mc and my content is in content_m

  • Continue having the SIM error.This started when I downloaded the last software upgrade to improve battery life. Please create a new upgrade to solve this!

    SInce three weeks ago, exactly when I downloaded the new software upgrade to solve the battery short duration, I started to have problems with my iphone, every morning appears a SIM error and I have to reset the device to get internet signal. And the

  • CS4 Udates Problem

    Having just updated Adobe Master Collection CS4 there were several incomplete install issues. What is of most concern is that Photoshop crashed when attempting to open an existing PSD file, with a message indicating that the "Version Cue.DLL" could n