Cannot parse persistent.xml or storage.xml....  NullPointerException

I have created an EAR with one WAR file and 3 EJB JAR.
in every ejb jar i have add the ejb-j2ee-engine.xml and in the war the web-j2ee-engine.xml
all the ejb are only BMP (bean persistent)
When i open the deploy tool, create a new project and try to load this ear, this error occurs reading the first ejb jar.
Error occured while trying to load ear fiel - incorrect EAR!
com.sap.engine.deploy.exceptions.BaseIOException: Cannot parse persistent.xml or storage.xml for JAR E:\sapproject\sapabs\deployer\temp\reader1108653530265\ABSEJBSRuntime.jar
Reason: java.lang.NullPointerException
why?
I get a lok to persistent.dtd and seem for only CMP entity.
I try to insert in every ejb jar a empty persistent.xml file, but nothing change.
Any idea ?
Thank You
Message was edited by: roberto roberto

Hi Roberto,
You are absolutely right - persistent.xml describes the O/R mapping and some other properties of CMP entity beans, it is not used for BMP.
Instead of using the deploy tool, I would suggest to deploy your application with the Shell console administrator or the Visual Administrator tool. Have a look at
http://help.sap.com/saphelp_nw04/helpdata/en/cb/6acf38422f0244b960236643e3cc46/frameset.htm
Server Administration -> J2EE Engine Administration Tools -> Shell Console Administrator
If you want not only to deploy your app but also to further develop it, it's better to use the NW Developer Studio - it is more sophisticated and provides more useful features than deploy tool.
Hope this helps,
Vladimir

Similar Messages

  • Cannot parse persistent.xml storage.xml... null pointer exception

    hi,
    i have an EAR with a WAR and an EJB jar. i only have session beans. no entity beans. my EJB jar does not have a persistent.xml or storage.xml. i build my EAR using ant and deploy using visual administrator (thanks to Vladimir Pavlov). i get this huge stack that says
    "com.sap.engine.deploy.exceptions.BaseIOException: Cannot parse persistent.xml or storage.xml for JAR F:\usr\sap\J2E\JC00\j2ee\admin\.\temp\deploying\deploy_temp\reader1115328611113\tap-ejb.jar.
    Reason: java.lang.NullPointerException."
    i get this only when i have <security-permission> in the ejb-j2ee-engine.xml. does this tag need one of these files. the application deploys just fine if i dont have the <security-permission>. i need to map the users to the roles in the application for EJBs.
    can someone please tell me what is happening here.
    thanks
    - RD

    It is not only with Deploy tool and visual admin tool. i tried the console too. gave me an error saying "cannot parse ejb-j2ee-engine.xml". it did not mention the persistent.xml or storage.xml though.
    i checked the validity of the xml with the dtd using altova xml spy. it passed.
    can you please tell me how I report an OSS message?
    thanks
    - RD

  • Error "Cannot parse appinfo xml file."

    Periodically my users are getting the error below when trying to launch BPC for Excel:
    "Cannot parse appinfo xml file."
    Seems this file is getting corrupted somehow. If I remove the file from their citrix profile and they relogin, the file is recreated and then they can launch BPC for Excel. Until then though, they get this error and sometimes it says the Web App server is unavailable, when it indeed is available.
    Anyone experience this, or have any ideas as to the problem?
    Thanks,
    Greg

    Please notice that inquiries related to BPC topics should now be posted to dedicated forums.
    Business Planning and Consolidations, version for SAP NetWeaver
    <a class="jive_macro jive_macro_community" href="" __jive_macro_name="community" modifiedtitle="true" __default_attr="2065"></a>
    Business Planning and Consolidations, version for the Microsoft Platform
    <a class="jive_macro jive_macro_community" href="" __jive_macro_name="community" modifiedtitle="true" __default_attr="2066"></a>
    Please adjust any bookmarks or shortcuts you may have set previously to point to this forum.
    Best regards,
    [Jeffrey Holdeman|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/jeffrey+holdeman]
    SAP BusinessObjects
    Enterprise Performance Management
    Regional Implementation Group

  • Cannot parse Yahoo search results XML

    I am trying to create an application that will query yahoo and return XML to parse and display on the screen. For some reason I cannot parse the XML. I have done it this way before, but for some reason it is not working now. Does anyone have any idea how to get this to work?
    When I debug the data I can see the XML values in the searchXML object, but I cannot retrieve them. I have attached the XML that is returned. It appears to be messing up with I copy and paste it from IE into a file.
    Also I have removed my appId from this application.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        <mx:Script>
        <![CDATA[
        import mx.rpc.events.ResultEvent;
        import mx.core.IUIComponent;
        import mx.collections.XMLListCollection;
        [Bindable]
        private var searchURL:String = "";
        [Bindable]
        private var searchXML:XML = new XML();
        private function send_data():void
            searchURL ="http://boss.yahooapis.com/ysearch/web/v1/"+searchTerm.text+"?appid=APPID&format=xml";
            var str:String = searchURL;
            userRequest.send();
        private function resultHandler(event:ResultEvent):void
            searchXML = event.result as XML;
            dgUserRequest.dataProvider =searchXML.resultset_web;
        ]]>
        </mx:Script>
        <mx:HTTPService id="userRequest" url="{searchURL}" method="POST" result="resultHandler(event)" resultFormat="e4x"/>
        <!--http://boss.yahooapis.com/ysearch/web/v1/foo?appid=ApPID&format=xml-->
        <mx:VBox>
            <mx:Label text="Enter Search Term" />
            <mx:TextInput id="searchTerm" />
            <mx:Button id="submit" label="Submit" click="send_data()"/>
            <mx:Label text="{searchURL}"/>
            <mx:Label id="thislabel" text="{searchXML.@responsecode}"/>
            <mx:Label text="{searchXML.resultset_web.@count}"/>
            <mx:DataGrid id="dgUserRequest" >
                <mx:columns>
                    <mx:DataGridColumn dataField="abstract" headerText="About" width="300"/>
                    <mx:DataGridColumn dataField="clickurl" headerText="URL" width="300"/>
                </mx:columns>
            </mx:DataGrid>
        </mx:VBox>
        </mx:Application>

    Thanks for your help, but I have found a much easier way to do what I was trying to do. Yahoo comes with a search API built specifically for Flex http://developer.yahoo.com/flash/tutorials/as3/search.html

  • Cannot parse ejb-j2ee-engine.xml

    During installation of XI3.0 I get this error in the "Online deployment adapter framwork". Has anyone else seen this error? Here's the complete error:
    Error: Aborted: development component 'com.sap.xi.mdt'/'sap.com'/'SAP AG'/'3.0.20040129102613.0000':
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application sap.com/com.sap.xi.mdt..
    Reason: Cannot parse ejb-j2ee-engine.xml.; nested exception is:
            com.sap.engine.services.ejb.exceptions.deployment.EJBXMLParserException: Cannot parse ejb-j2ee-engine.xml.
    Any help will be apreciated!

    Hello Dankertsen
    This is a standard error in SAP XML Deployment file, you need to check the file ejb-j2ee-engine.xml if it starts with a space (first line) you must remove it and then update the file aii_mdt_bean.jar. and then retry again.
    Hope this will help.
    Regards,
    M. Zehana

  • Cannot close an XML file used for parsing

    Hi All,
    I appears to have difficulty closing (possibly flushing it first) an XML file that was subsequently being parsed without success. The error generated is:
    org.jdom.input.JDOMParseException: Error on line 23: The element type "form" must be terminated by the matching end-tag "</form>".
    Below is the code snippets of readData() to retrieve (HTML) data from a website, save it to a file, then convert to XML format before returning the new filename:
    public String readData() {
        try {
              URL url  = new URL("http://www.abc.com");
              URLConnection connection = url.openConnection();      
              InputStream isInHtml = url.openStream();   // throws an IOException    
              disInHtml = new DataInputStream(new BufferedInputStream(isInHtml));         
              System.out.flush();
              FileOutputStream fosOutHtml = null;
              fosOutHtml = new FileOutputStream("C:\\Temp\\ABC.html");
              int oneChar, count=0;
              while ((oneChar=disInHtml.read()) != -1)
                  fosOutHtml.write(oneChar);
              isInHtml.close();
              disInHtml.close();
              fosOutHtml.flush();    // optional
              fosOutHtml.close();
        try {
              File fileInHtml = new File("C:\\Temp\\ABC.html");
              FileReader frInHtml = new FileReader(fileInHtml);
              BufferedReader brInHtml = new BufferedReader(frInHtml);
              String string = "";
              while (brInHtml.ready())
                  string += brInHtml.readLine() + "\n";
              fwOutXml  = new FileWriter("C:\\Temp\\ABC.xml");
              pwOutXml  = new PrintWriter(fwOutXml);
              light_html2xml html2xml = new light_html2xml();
              pwOutXml.print(html2xml.Html2Xml(string));
              system.out.flush()     // optional
              fwOutXml.flush();      // optional
              fwOutXml.close();
              pwOutXml.flush();      // optional
              pwOutXml.close();
              return fileInHtml.getAbsolutePath();
    // parseData reads the XML file using the name returned by readData()
    public void parseData(String XMLFilename)
        try
            FileReader frInXml = new FileReader(FileName);
            BufferedReader brInXml = new BufferedReader(frInXml);
            SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser"); // JDOMParseException generated.
    }These codes would worked when they were in a single method but I have since placed some structure around them using a number methods.
    This issue has risen in th past where I have been able to close the XML file prior to reading them again. However, I don't have a solution for it this time round.
    I am running JDK 1.6.0_10, Netbeans 6.1, JDOM 1.1 on Windows XP platform.
    Any assistance would be appreciated.
    Many thanks,
    Jack

    Hi Alain,
    I have added the additional I/O statements in the finally clause as follows but the problem still persisted:
    readData()
    // reading data (html) from the webpage and save it in html format.
    try {
    catch { …. }
    finally {
           System.out.flush();
           isInHtml.close();
           disInHtml.close();
           fosOutHtml.flush();
           fosOutHtml.getFD().sync();
           fosOutHtml.close();
    // convert the html webpage format to xml format
    try {
    catch { …. }
    finally {
           System.out.flush();
           fwOutXml.flush();
           fwOutXml.close();
           pwOutXml.flush();
           pwOutXml.close();
    Below is a short listing of the new XML file:
      <?xml version="1.0" encoding="iso-8859-1" ?>
    - <html>
    - <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <meta name="keywords" content="California, cities, towns, villages, list, zipcodes, postal codes, united states, ca" />
      <meta name="description" content="Cities, towns and suburbs in California, United States (CA) starting with A" />
      <title>Cities and Towns in California starting with A – ABC Company</title>
      <link rel="stylesheet" href="http://www.abc.com/style.css" type="text/css" media="screen" />
      </head>
    - <body>
      <a name="top" />
    - <div id="container">
    - <div id="header">
      <div id="postmark" />
    - <a href="http://www.abc.com/" class="imglink">
      <img id="logoimg" src="http://www.abc.com/images/zipcodes.gif" width="192" height="33" alt="Zipcodes America Logo" />
      </a>
      <hr />
      </div>
    - <div id="nav">
    - <ul>
    - <li>
      <a href="http://www.abc.com/" title="Home Page">Home</a>
      </li>
    - <li>
      <strong>Search</strong>
      (zipcode or suburb)
    - <div class="hide">
      <form method="post" action="http://www.abc.com/search" />        // line 23
      </div>
      <input type="text" name="q" class="searchbox" alt="Search query" />
      <br />
      <input type="submit" value="find!" class="searchbutton" alt="Perform search" />
      <div class="hide" />
      </li>
    …What I find it interesting is that it is possible to parse the above XML file with the same parseData() from another class without any problem. As a result, I have come to the following conclusion so far:
    ( i ) There is some file locking that is prevent saxBuilder from parsing the XML file at the time.
    ( ii ) The light_html2xml does not appears to have correctly converted over the orginal Html to Xml but some how it has been picked up by the parser in the same class, but not by the same parser from another class.
    ( iii ) I would like to use another conversion tool such as Tagsoup in place of light_html2xml to determine where the cause of this issue is coming from. As a result, would you or anyone be able to assist me coming up with a few lines of conversion statements using Tagsoup since I am not familiar with using this tool?
    ( iv ) light_html2xml is good as it strip out all namespace, DTD, Entity Resolver, etc and only return what I need. JTidy does correct conversion but include namespace, DTD, Entity Resolver which makes parsing difficulty.
    Many thanks again,
    Jack

  • Cannot change table-name in persistent.xml

    I've successful deployed a Entity EJB on "SAP Enterprise Portal 6.0 SP4 NetWeaver Developer Sneak Preview"
    After changing the Table Name in persistent.xml and re-deploying the new EAR, the Entity EJB still writes to the old table.
    How can I get SAP Web AS to accept the new persistent.xml/persistent-ejb-map/entity-beans/entity-bean/table-name entry ?
    I've already tried:
    1) Re-deploy EAR and re-boot the server
    2) Delete all old copies of EAR directories and temporary files, reboot and re-deploy.
    Note: Expanding new EAR confirms that persistent.xml/table-name has been updated on the SAP Web AS.  However, EJB still writes to the old table.
    Alton

    In Web AS 6.40 the application data is stored in the database, therefore it is restored even if you delete the folders in the file system.
    To undeploy the application, you can use the Deploy Service runtime in Visual Administrator. Start the Visual Administrator using the <i>go</i> script file in <drive>:\usr\sap\<SID>\JC00\j2ee\admin. Then expand the <i>Services</i> tree under the server node, and choose <i>Deploy</i>. On the right-hand side of the screen switch to <i>Application</i> view, select your application, and choose <i>Remove</i>.
    Zornitsa

  • Cannot parse xml from applet

    I really hope that somebody can help me with this.....
    I'm trying to simply parse an xml document into an applet so that the info can be used later on. I just need the tag, attribute and value.
    So far, all that I can do is get the "access denied" java.util.propertypermission user.dir read error that I see tons of people complaining about. here's my code:
    public StageInfo getNextStage() throws Exception
            handler = new GameXMLHandler(m_imageGiver, m_codeBase);
            spf = SAXParserFactory.newInstance();
            parser = spf.newSAXParser();
            parser.parse("Loader.xml", handler);
            return handler.getStageInfo();
        }is there a way to parse an xml file in an applet? everywhere I look, somebody is saying that it can be done, but never have they done it. I'm starting to think that there is something beyond my control that is stopping this from working. Please help!!!!

    If I read your post correctly, your applet is trying to read xml file from the user's local drive? This must be done with a signed (trusted) applet. Otherwise normal run-of-the-mill applets can't access drives. Java security feature. You can use Frame, it can access local drives.

  • ServletExec: failed to parse servletexec.xml

    Hello
    One of my users reported the BLS editor not displaying correctly, so after a quick investigation I figured it was a java problem and stopped the ServletExec-xMII service. 
    1.  Now double-clicking StartServletExec.bat to start it up works, java.exe stays active and I can log into xMII with IE.
    2.  However, java.exe quits unexpectedly when I try to start it up it with the servlet exec service.
    3.  I've deleted and re-installed the servlet exec service using deletentservice.exe and installntservice.exe
    4.  ServletExec.log reports the following:
    \[Mon Aug 11 23:26:22 CDT 2008\] ServletExec:  failed to parse servletexec.xml
    \[Mon Aug 11 23:26:22 CDT 2008\] ServletExec: caught exception - java.lang.NullPointerException
    \[Mon Aug 11 23:26:22 CDT 2008\] java.lang.NullPointerException
    I have a valid and viewable servletexec.xml file in ServletExecData identical to the file on our other systems. Does anyone know what's going on here?
    xMII Product Version: 11.5.3 b66
    Java Plugin Version: Sun Microsystems Inc. 1.4.2_13
    Thanks

    Rob, when ServletExec runs as a service, it is probably running under the "System Account" or some other account (you can check this from the Services control panel applet in Windows).  What you (or your IT team) might have done is accidentally change the permissions on some folders/files so that this account cannot open the .xml file when running as a service.   That's the first thing I'd check.

  • "Error while parsing SOAP XML payload: no element found" received when invoking Web Service

    Running PB 12.1 Build 7000.  Using Easysoap.  Error ""Error while parsing SOAP XML payload: no element found" received when invoking Web Service".  This error does not appear to be coming from the application code.  Noticed that there were some erroneous characters showing up within the header portion of the XML ("&Quot;").  Not sure where these are coming from.  When I do a find within the PB code for ""&quot;" it gets located within two objects, whereas they both reference a "temp_xml_letter".  Not sure where or what temp_xml_letter resides???   The developer of this is no longer with us and my exposure to WSDL and Web Services is rather limited.  Need to get this resolved...please.
    This is the result of the search.  Notice the extraneous characters ("&quot;"):
    dar1main.pbl(d_as400_mq_xml)
    darlettr.pbl(d_email_xml)
    ---------- Search: Searching Target darwin for 'temp_xml'    (9:52:41 AM)
    ---------- 2 Matches Found On "temp_xml":
    dar1main.pbl(d_as400_mq_xml).d_as400_mq_xml:  export.xml(usetemplate="temp_xml_letter" headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0  template=(comment="" encoding="UTF-8" name="temp_xml_letter" xml="<?xml version=~"1.0~" encoding=~"UTF-16LE~" standalone=~"yes~"?><EmailServiceTransaction xmlns=~"http://xml.xxnamespace.com/Utility/Email/EmailService" ~" xmlns:imc=~"http://xml.xxnamespace.com/IMC~" xmlns:xsi=~"http://www.w3.org/2001/XMLSchema-instance~" xmlns:root=~"http://xml.xxnamespace.com/RootTypes~" xmlns:email=~"http://xml.xxnamespace.com/Utility/Email~" xsi:schemaLocation=~"http://xml.xxnamespace.com/Utility/Email/EmailService http://dev.xxnamespace.com/Utility/Email/EmailService/V10-TRX-EmailService.xsd~"><EmailServiceInformation><EmailServiceDetail __pbband=~"detail~"><ApplicationIdentifier> applicationidentifier </ApplicationIdentifier><AddresseeInformation><AddresseeDetail><Number> number </Number></AddresseeDetail></AddresseeInformation><EmailMessageInformation><Ema
    darlettr.pbl(d_email_xml).d_email_xml:  export.xml(usetemplate="temp_xml_letter" headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0  template=(comment="" encoding="UTF-8" name="temp_xml_letter" xml="<?xml version=~"1.0~" encoding=~"UTF-16LE~" standalone=~"yes~"?><EmailServiceTransaction xmlns=~"http://xml.xxnamespace.com/Utility/Email/EmailService" ~" xmlns:imc=~"http://xml.xxnamespace.com/IMC~" xmlns:xsi=~"http://www.w3.org/2001/XMLSchema-instance~" xmlns:root=~"http://xml.xxnamespace.com/RootTypes~" xmlns:email=~"http://xml.xxnamespace.com/Utility/Email~" xsi:schemaLocation=~"http://xml.xxnamespace.com/Utility/Email/EmailService http://dev.xxnamespace.com/Utility/Email/EmailService/V10-TRX-EmailService.xsd~"><EmailServiceInformation><EmailServiceDetail __pbband=~"detail~"><ApplicationIdentifier> applicationidentifier </ApplicationIdentifier><AddresseeInformation><AddresseeDetail><Number> imcnumber </Number></AddresseeDetail></AddresseeInformation><EmailMessageInformation><Ema
    ---------- Done 2 Matches Found On "temp_xml":
    ---------- Finished Searching Target darwin for 'temp_xml'    (9:52:41 AM)

    Maybe "extraneous" is an incorrect term.  Apparantly, based upon the writeup within Wiki, the parser I am using does not interpret the "&quot;"?  How do I find which parser is being utilized and how to control it?
    <<<
    If the document is read by an XML parser that does not or cannot read external entities, then only the five built-in XML character entities (see above) can safely be used, although other entities may be used if they are declared in the internal DTD subset.
    If the document is read by an XML parser that does read external entities, then the five built-in XML character entities can safely be used. The other 248 HTML character entities can be used as long as the XHTML DTD is accessible to the parser at the time the document is read. Other entities may also be used if they are declared in the internal DTD subset.
    >>>

  • Can someone help me with a problem of parsing an XML file?

    Hello,
    I'm having some problems parsing an xml file. I get a SAXNotSupportedException when setting a property value.
    Here is the piece of code where I have the problem:
    SAXParserFactory spf = SAXParserFactory.newInstance();
    spf.setNamespaceAware(true);
    SAXParser saxParser = spf.newSAXParser();
    XMLReader xmlReader = saxParser.getXMLReader();
    DefaultHandler defHandler = new DefaultHandler();
    xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", defHandler);
    and the log is:
    Problem with the parser org.xml.sax.SAXNotSupportedException: PAR012 For propertyID "http://xml.org/sax/properties/lexical-handler", the value "org.xml.sax.helpers.DefaultHandler@4ff4f74a" cannot be cast to LexicalHandler.
    http://xml.org/sax/properties/lexical-handler org.xml.sax.helpers.DefaultHandler@4ff4f74a LexicalHandler
    I've been working on this problem but I can't find the error.
    Does anyone have an idea of what to do to solve it?
    Thanx in advance,
    M@G

    before deciding which XML technology to use, you should see if your application fit in the category below:
    use SAX:
    1. The XML file is rather large (30 or 40+ MB)
    2. I don't need the xml document in memory. I will parse the document and store the data in my own object.
    use DOM or JDOM
    1. The XML file is relatively small (less than 30 MB) or I can increase the runtime memory for larger xml file.
    2. I will need to walk up and down the xml document tree severals time.
    3. My application is in Java and it's not going to be rewritten in C++, etc (use JDOM)
    NOTE:
    JDOM is rather easier to use (for Java developer), but it's not an www.org.com standardlized xml parser.
    personally, i like JDOM for traversing the DOM.

  • Parsing an XML using DOM parser in Java in Recursive fashion

    I need to parse an XML using DOM parser in Java. New tags can be added to the XML in future. Code should be written in such a way that even with new tags added there should not be any code change. I felt that parsing the XML recursively can solve this problem. Can any one please share sample Java code that parses XML recursively. Thanks in Advance.

    Actually, if you are planning to use DOM then you will be doing that task after you parse the data. But anyway, have you read any tutorials or books about how to process XML in Java? If not, my suggestion would be to start by doing that. You cannot learn that by fishing on forums. Try this one for example:
    http://www.cafeconleche.org/books/xmljava/chapters/index.html

  • Can Document Builder parse an XML file from a URL?

    Warning: Java newbie here...
    My problem is that I am able to parse an XML file if it is copied into my project, but not if it is a full URL. Here is what I got so far, that works.
    import java.io.*;
    import java.net.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    try {
        File file = new File("path/to/file.xml");
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        DocumentBuilder db = dbf.newDocumentBuilder();
        Document doc = db.parse(file);
        doc.getDocumentElement().normalize();
        NodeList nodeLst = doc.getElementsByTagName("Names");
        for (int s = 0; s < nodeLst.getLength(); s++) {
            Node parentNode = nodeLst.item(s);
            if (parentNode.getNodeType() == Node.ELEMENT_NODE) {
                Element parentElmnt = (Element) parentNode;
                NodeList nameElmntLst = parentElmnt.getElementsByTagName("Name");
                //etc.
    } catch (Exception e){
        e.printStackTrace();
    }So building off of this I have tried to parse an input stream like this:
    URL url = new URL("http://example.com/file.xml");
    InputStream is = url.getInputStream();
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(is);which gives me the following error
    [Fatal Error] :-1:-1: Premature end of file.
    LOG: HME receiver connected
    org.xml.sax.SAXParseException: Premature end of file.
    I also even tried to write the file locally like this:
    URL url = new URL("http://example.com/file.xml");
    HttpURLConnection urlcon = (HttpURLConnection) url.openConnection();
    urlcon.connect();
    InputStream is = urlcon.getInputStream();
    File file = new File("path/to/file.xml");
    OutputStream out = new FileOutputStream(file);
    byte buf[] = new byte[1024];
    int len;
    while((len=is.read(buf))>0)
        out.write(buf,0,len);
    out.close();
    is.close();
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(file);This gives the same error.
    If anyone can point me in the right direction I would forever thankful. I've tried search Google and the Sun forums, but haven't quite found the solution. I think it is because I need to try something else completely. Thank you for reading.
    ~~~~ Jeremy

    jmose wrote:
    If I copy the page, it works as shown in the first code block. In the third codeblock the file is never even created, so I cannot tell if that works or not.So: having the parser access the URL fails, and having some other Java code access the URL also fails in the identical way? That suggests the problem is simply accessing the URL via Java code. Presumably when you downloaded the data from the URL, you used a browser to do it and not wget or something like that?

  • How to parse thus XML data?

    Hi,experts:
    In below thread:
    Receiving .Net dataset with deployed proxies
    i asked how to create a external definition in IR base on above XML data.
    Now,i have created a XSD file base on the XML data.And importing it into IR successfully.
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:Locale="zh-CN">
    <xs:complexType>
    <xs:choice maxOccurs="unbounded">
    <xs:element name="Status">
    <xs:complexType>
    <xs:attribute name="Result" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    And now,the question is how to parse the XML data in diffgr:diffgram  segment.It seems a MS-XML syntax.Can it be parsed by XI?
    I tried,but the following error occurs:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:ZMT_SD_ORDER01_RESULT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start

    Hi,
    The above Exception seems to be because of mapping error.
    Check your mapping for all the mandatory 1-1 mapping, also the 1-unbounded parent node mapping.
    Once when you import the XSD and activate your External Definition if it does without any error then there is no problem with your External Definition.
    If this error occurs only when you test your mapping then this is mapping error and not because of XSD.
    Please check the parent node mapping like 1-unbounded.
    Reward Points if useful
    Regards
    Ashmi.

  • MissingResourceException: Error parsing jdbcdrivers.xml

    java.io.IOException: Unable to resolve input source.
    Error: writeDomain() failed. Do dumpStack() to see details.
    Problem invoking WLST - Traceback (innermost last):
    File "D:\release\7420WLS\SCPO\weblogic\config\weblogic\setup\createManuWLSDomain.py", line 222, in ?
    File "C:\Documents and Settings\j1007353\Local Settings\Temp\WLSTOfflineIni2466.py", line 70, in writeDomain
    com.bea.plateng.domain.script.jython.WLSTException: java.util.MissingResourceException: Error parsing jdbcdrivers.xml
    at com.bea.plateng.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:51)
    at com.bea.plateng.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1373)
    at com.bea.plateng.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:712)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
    at org.python.core.PyMethod.__call__(PyMethod.java:96)
    at org.python.core.PyObject.__call__(PyObject.java:270)
    at org.python.core.PyInstance.invoke(PyInstance.java:261)
    at org.python.pycode._pyx5.writeDomain$14(C:\Documents and Settings\j1007353\Local Settings\Temp\WLSTOfflineIni2466.py:70)
    at org.python.pycode._pyx5.call_function(C:\Documents and Settings\j1007353\Local Settings\Temp\WLSTOfflineIni2466.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:208)
    at org.python.core.PyTableCode.call(PyTableCode.java:267)
    at org.python.core.PyFunction.__call__(PyFunction.java:172)
    at org.python.pycode._pyx18.f$0(D:\release\7420WLS\SCPO\weblogic\config\weblogic\setup\createManuWLSDomain.py:222)
    at org.python.pycode._pyx18.call_function(D:\release\7420WLS\SCPO\weblogic\config\weblogic\setup\createManuWLSDomain.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:208)
    at org.python.core.PyCode.call(PyCode.java:14)
    at org.python.core.Py.runCode(Py.java:1135)
    at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:167)
    at weblogic.management.scripting.WLST.main(WLST.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at weblogic.WLST.main(WLST.java:29)
    Caused by: java.util.MissingResourceException: Error parsing jdbcdrivers.xml
    at com.bea.plateng.domain.jdbc.JDBCAspectHelper.getGenericJDBCDriverInfo(JDBCAspectHelper.java:850)
    at com.bea.plateng.domain.jdbc.JDBCAspectHelper.getGenericJDBCDriverInfo(JDBCAspectHelper.java:223)
    at com.bea.plateng.domain.aspect.XBeanJDBCConnectionPoolDriverNameConfigAspect.decompose(XBeanJDBCConnectionPoolDriverNameConfigAspect.java:56)
    at com.bea.plateng.domain.aspect.AbstractConfigAspect.setDelegate(AbstractConfigAspect.java:550)
    at com.bea.plateng.domain.aspect.FilteredConfigAspect.setDelegate(FilteredConfigAspect.java:333)
    at com.bea.plateng.domain.aspect.XBeanConfigAspectBuilder.createJDBCConnectionPoolSimpleAspect(XBeanConfigAspectBuilder.java:300)
    at com.bea.plateng.domain.aspect.AbstractConfigAspectBuilder.createJDBCConnectionPoolSimpleAspects(AbstractConfigAspectBuilder.java:288)
    at com.bea.plateng.domain.operation.config.ConfigJDBCConnectionPool.createInitialSimpleAspects(ConfigJDBCConnectionPool.java:115)
    at com.bea.plateng.domain.operation.HTableEditOperation.createSimpleTableModel(HTableEditOperation.java:784)
    at com.bea.plateng.domain.operation.HTableEditOperation.getSimpleTableModel(HTableEditOperation.java:348)
    at com.bea.plateng.domain.operation.HTableEditOperation.initSimpleTableModel(HTableEditOperation.java:654)
    at com.bea.plateng.domain.DomainChecker.isOperationValid(DomainChecker.java:726)
    at com.bea.plateng.domain.DomainChecker.getInvalidSection(DomainChecker.java:168)
    at com.bea.plateng.domain.GeneratorHelper.validateConfig(GeneratorHelper.java:257)
    at com.bea.plateng.domain.GeneratorHelper.validateDomainCreation(GeneratorHelper.java:235)
    at com.bea.plateng.domain.script.ScriptExecutor.writeDomain(ScriptExecutor.java:580)
    at com.bea.plateng.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:704)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
    at org.python.core.PyMethod.__call__(PyMethod.java:96)
    at org.python.core.PyObject.__call__(PyObject.java:270)
    at org.python.core.PyInstance.invoke(PyInstance.java:261)
    at org.python.pycode._pyx5.writeDomain$14(C:\Documents and Settings\j1007353\Local Settings\Temp\WLSTOfflineIni2466.py:70)
    at org.python.pycode._pyx5.call_function(C:\Documents and Settings\j1007353\Local Settings\Temp\WLSTOfflineIni2466.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:208)
    at org.python.core.PyTableCode.call(PyTableCode.java:267)
    at org.python.core.PyFunction.__call__(PyFunction.java:172)
    com.bea.plateng.domain.script.jython.WLSTException: com.bea.plateng.domain.script.jython.WLSTException: java.util.MissingResourceException: Error parsing jdbcdrivers.xml
    The system cannot find the path specified.
    0 file(s) copied.
    Attempting to shutdown server ...
    Checking JSP Precompilation ...
    Thanks

    java.io.IOException: Unable to resolve input source.
    Error: writeDomain() failed. Do dumpStack() to see details.
    Problem invoking WLST - Traceback (innermost last):
    File "D:\release\7420WLS\SCPO\weblogic\config\weblogic\setup\createManuWLSDomain.py", line 222, in ?
    File "C:\Documents and Settings\j1007353\Local Settings\Temp\WLSTOfflineIni2466.py", line 70, in writeDomain
    com.bea.plateng.domain.script.jython.WLSTException: java.util.MissingResourceException: Error parsing jdbcdrivers.xml
    at com.bea.plateng.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:51)
    at com.bea.plateng.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1373)
    at com.bea.plateng.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:712)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
    at org.python.core.PyMethod.__call__(PyMethod.java:96)
    at org.python.core.PyObject.__call__(PyObject.java:270)
    at org.python.core.PyInstance.invoke(PyInstance.java:261)
    at org.python.pycode._pyx5.writeDomain$14(C:\Documents and Settings\j1007353\Local Settings\Temp\WLSTOfflineIni2466.py:70)
    at org.python.pycode._pyx5.call_function(C:\Documents and Settings\j1007353\Local Settings\Temp\WLSTOfflineIni2466.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:208)
    at org.python.core.PyTableCode.call(PyTableCode.java:267)
    at org.python.core.PyFunction.__call__(PyFunction.java:172)
    at org.python.pycode._pyx18.f$0(D:\release\7420WLS\SCPO\weblogic\config\weblogic\setup\createManuWLSDomain.py:222)
    at org.python.pycode._pyx18.call_function(D:\release\7420WLS\SCPO\weblogic\config\weblogic\setup\createManuWLSDomain.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:208)
    at org.python.core.PyCode.call(PyCode.java:14)
    at org.python.core.Py.runCode(Py.java:1135)
    at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:167)
    at weblogic.management.scripting.WLST.main(WLST.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at weblogic.WLST.main(WLST.java:29)
    Caused by: java.util.MissingResourceException: Error parsing jdbcdrivers.xml
    at com.bea.plateng.domain.jdbc.JDBCAspectHelper.getGenericJDBCDriverInfo(JDBCAspectHelper.java:850)
    at com.bea.plateng.domain.jdbc.JDBCAspectHelper.getGenericJDBCDriverInfo(JDBCAspectHelper.java:223)
    at com.bea.plateng.domain.aspect.XBeanJDBCConnectionPoolDriverNameConfigAspect.decompose(XBeanJDBCConnectionPoolDriverNameConfigAspect.java:56)
    at com.bea.plateng.domain.aspect.AbstractConfigAspect.setDelegate(AbstractConfigAspect.java:550)
    at com.bea.plateng.domain.aspect.FilteredConfigAspect.setDelegate(FilteredConfigAspect.java:333)
    at com.bea.plateng.domain.aspect.XBeanConfigAspectBuilder.createJDBCConnectionPoolSimpleAspect(XBeanConfigAspectBuilder.java:300)
    at com.bea.plateng.domain.aspect.AbstractConfigAspectBuilder.createJDBCConnectionPoolSimpleAspects(AbstractConfigAspectBuilder.java:288)
    at com.bea.plateng.domain.operation.config.ConfigJDBCConnectionPool.createInitialSimpleAspects(ConfigJDBCConnectionPool.java:115)
    at com.bea.plateng.domain.operation.HTableEditOperation.createSimpleTableModel(HTableEditOperation.java:784)
    at com.bea.plateng.domain.operation.HTableEditOperation.getSimpleTableModel(HTableEditOperation.java:348)
    at com.bea.plateng.domain.operation.HTableEditOperation.initSimpleTableModel(HTableEditOperation.java:654)
    at com.bea.plateng.domain.DomainChecker.isOperationValid(DomainChecker.java:726)
    at com.bea.plateng.domain.DomainChecker.getInvalidSection(DomainChecker.java:168)
    at com.bea.plateng.domain.GeneratorHelper.validateConfig(GeneratorHelper.java:257)
    at com.bea.plateng.domain.GeneratorHelper.validateDomainCreation(GeneratorHelper.java:235)
    at com.bea.plateng.domain.script.ScriptExecutor.writeDomain(ScriptExecutor.java:580)
    at com.bea.plateng.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:704)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
    at org.python.core.PyMethod.__call__(PyMethod.java:96)
    at org.python.core.PyObject.__call__(PyObject.java:270)
    at org.python.core.PyInstance.invoke(PyInstance.java:261)
    at org.python.pycode._pyx5.writeDomain$14(C:\Documents and Settings\j1007353\Local Settings\Temp\WLSTOfflineIni2466.py:70)
    at org.python.pycode._pyx5.call_function(C:\Documents and Settings\j1007353\Local Settings\Temp\WLSTOfflineIni2466.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:208)
    at org.python.core.PyTableCode.call(PyTableCode.java:267)
    at org.python.core.PyFunction.__call__(PyFunction.java:172)
    com.bea.plateng.domain.script.jython.WLSTException: com.bea.plateng.domain.script.jython.WLSTException: java.util.MissingResourceException: Error parsing jdbcdrivers.xml
    The system cannot find the path specified.
    0 file(s) copied.
    Attempting to shutdown server ...
    Checking JSP Precompilation ...
    Thanks

Maybe you are looking for

  • Bex Query Not Running

    Hello I have built BI7 Query and run it. It goes to the portal where I use my user password and it comes back with the following results Portal Runtime Error An exception occurred while processing a request for : iView : N/A Component Name : N/A com.

  • NSS326 SFTP and SSH Key

    Hi, anyone have idea how to configure SFTP with SSH public/private key (without promt password) for non admin accounts on NAS NSS326 ? I have tried to generate with Putty and Puttygen a key but works only for admin user. Pls help me. Thanks Rudi

  • Connecting two gpib-boards

    hi, i have 2 gpib-boards on two different machines. i am trying to communicate between the cards. unfortunately i have timing problems. the boards will lock up after a very short time. does anybody have programmed something like this in an ms c++ env

  • NoSuchMethodException in Struts using DispatchAction

    Hi, I have wriiten a sample code using the DispatchAction Class(Subclass name is UserDispatchAction) It has 3 methods funct_save() ,funct_remove(), funct_delete() however whenever i give a call the funct_remove it gets invoked but the rest two doesn'

  • RE:Condition types

    Hi All, Is it possible to create our own condition records ,Access sequences,Condition types,and condition tables. or just copy from standard one and changing the name your help would be appreciated Thanks & Regards Ramesh chandra