OC4J and Local (system) XML DTD files

I am in a situation where I am deploying a web application to an instance of 10.1.2 that is on a public-facing box that does not have the ability to access the outside world via the web due to security restrictions.
When I start the application, I'm getting connection refused errors because the XML parser is trying its hardest to validate the XML files for Spring and MyFaces by remotely fetching the DTD file. Is there a way I can get the application to read a local copy of the DTD without having to hard code a full path to the file?
I've tried changing the doctype declaration for MyFaces to look like this:
<!DOCTYPE faces-config SYSTEM "web-facesconfig_1_0.dtd">And I put the DTD in the same directory as the XML configuration file (in the WEB-INF directory). Eclipse seems to like that ok, but when I deploy that to 10.1.2, I get the following exception:
javax.faces.FacesException: java.net.MalformedURLException: no protocol: web-facesconfig_1_0.dtd
     at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:123)
     at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:63)
     at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:46)
     at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1009)
     at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:549)
     at com.evermind.server.Application.getHttpApplication(Application.java:890)
     at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:707)
     at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:625)
     at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:278)
     at com.evermind.server.http.HttpServer.setSites(HttpServer.java:278)
     at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:179)
     at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2394)
     at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1551)
     at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:92)
     at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.MalformedURLException: no protocol: web-facesconfig_1_0.dtd
     at java.net.URL.<init>(URL.java:567)
     at java.net.URL.<init>(URL.java:464)
     at java.net.URL.<init>(URL.java:413)
     at oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingParser.java:543)
     at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:468)
     at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:301)
     at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:280)
     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:196)
     at org.apache.commons.digester.Digester.parse(Digester.java:1548)
     at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getFacesConfig(DigesterFacesConfigUnmarshallerImpl.java:183)
     at org.apache.myfaces.config.FacesConfigurator.feedWebAppConfig(FacesConfigurator.java:387)
     at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:120)
     ... 14 moreI've tried variations like ./filename.dtd and ../filename.dtd to no avail. I'm sure I'm missing something fundamental here, but how can I get OC4J to read my local DTD?
Thanks in advance!

Avi, you're right, the parser is indeed wanting a real URL. So here's what I've done. I replaced the dtd filename with the complete path to the file, so it looks like this:
<pre>
<!DOCTYPE faces-config SYSTEM "file:///C:/path/to/dtd/web-facesconfig_1_0.dtd">
</pre>
I deployed, started the app, and it worked. This doesn't really feel like the right solution, however, because I'm going to have to rely on a hardcoded file location for the DTD on our production server. If our admins change that, then I'm out of luck and would have to redeploy the application. Does anyone know if there is a way to get this to be more relative?
One idea that someone gave me was to put the DTD files in a web-accessible location in the application and reference via http:// instead of file://. At least that way I wouldn't be dependent on the file system. I'd still have to hardcode a URL so I couldn't use the same files for all our development environments, but it might be a slightly cleaner solution. Another possible (yet really ugly) solution is to inline the DTD's in the XML file.
Asanka, I'm not quite sure I follow what you said. Where would I put such code to use Xerxes? In a servlet loaded on init?
Thanks for the help so far, everyone.

Similar Messages

  • How to include the characters " " and " " in a XML properties file.

    hi
    including the following prop entry gives me the error "Element is not closed" error message.
    <entry key="test">can't include chars < and ></entry>
    But i need to include the chars "<" and ">" in my xml properties file.
    please help.
    thanks

    Try &lt; and &gt;
    Dave Patterson

  • Import XML/DTD files into iStudio

    I am having Spect Generator files with extension .ecs files
    I need to import these files into iStudio to create commonview. iStudio accepts either XML or DTD formats
    How can I convert these files to XML or DTD files without losing the Structure layout or EDI format ?
    Let me know ASAP.

    Hi,
    I don't know what ".ecs" files are, but it sounds that you may need to create / use D3L dtd's.
    Please look at
    Oracle Application Server InterConnect User’s Guide 10 g (9.0.4)
    Part No. B10404-01
    and especially Appendix B for more information.
    You can download it from
    http://download-east.oracle.com/docs/cd/B10465_01/integrate.904/b10404.pdf

  • Synchronisation between server and local systems

    Hello guys,
    I hired a Vserver running with Debian and would like to synchronise it spaced (after/before start/shutdown of my local systems and in between every 30 minutes or so) with my local systems, more precisely with my home directories or some directories I define and not the complete system.
    How could that be realised best?
    Should I take some programs or are there any small scripts as well that do that work?
    I apologise for that stupid question but I have not any experiences with issues like backup and synchronisation.
    Thank you in advance.
    Last edited by orschiro (2009-06-04 23:28:31)

    Hello tkdfighter,
    sorry but I can't follow you. Could you please be more detailed because I don't know how the functions you speak from can help me in my case.
    Basically I just have that problem because I synchronise the server from two different machines and so the archive name differ from machine to machine. I already took a look on the Wikipage but unfortunately it helped me not with that problem.
    Greets
    Last edited by orschiro (2009-06-16 17:56:24)

  • Remapping modifier keys and others via XML .keylayout file

    I have a video editing keyboard that requires some keys to be remapped to work correctly on my mac. Specifically I need to remap the modifier keys on the keyboard. The first thing I need to do is remap key 50 to be command instead of ~. I am trying to do this via a custom XML .keylayout file. I have read the documentation on .keylayout files and can't make sense of what it says to do. Also, I've tried many of the keymapping tools that people have recommended and they don't work for remapping modifier keys.
    Any help with this would be much appreciated. Thanks.

    Hi cstrouse,
    I think you should try the link below and use Ukelele; it does exactly what you need with a gorgeous graphic UI.
    I would'nt mess with XML...
    http://scripts.sil.org/cms/scripts/render_download.php?site_id=nrsi&format=file& media_id=Ukelele_2.2.4&filename=Ukelele_2.2.4.dmg

  • Local System Application Launching

    Our JWS application needs to be launched locally from a Win32 application with command line options.
    I successfully deployed a JSP page that dynamically builds a JNLP file passing <argument>'s. Works great.
    Unfortunately the only local launching method is hitting our JSP page with a Web Browser with the plug in installed.
    And that can be automatic (programmatic) or manual (user driven) - but in both cases this leaves an empty browser window open after serving the JNLP file.
    And so both options, as I can see, are just plain ugly.
    The end result is great - params passed and install all from a click in a win32 app. But the empty browser window sucks.
    Any considerations for a different method for passing args and local system launching?
    Any thoughts are appreciated.
    Jodi

    I have an alternate solution that I'm running down.
    Looks like javaws takes at least one command line parameter itself. A url.
    So:
    javaws http://www.somepage.com/jnlp/getProduct.jsp?dir=c:\temp\fredWill run a JSP page passing the parameter dir, delivering a JNLP document.
    Only trick is to query the registry to find the location of javaws.
    Sun looks to publish a COM object and a Shell command - so running the above command from Start run gives the same experience.
    Come to think of it :
    explorer "http://register.industrialinfo.com/jnlp/getProduct.jsp?dir=c:\temp\fred"works as well. But that assumes IE is used on a Win32 box.
    Jodi

  • Filling PDF Form with XML data file

    Hello everybody.
    I need help.
    I created a form with LiveCycle Designer. I filled it and generated a XML data files. Now, I would like to fill the same blank PDF form with this XML data file.
    I know that I can do it with Adobe 8.0 but I must do it in an C# / .NET application that I have to create.
    (Forms I'm creating are not for me, I create the forms. Client uses them form but he don't have Adobe Acrobat 8.0, so he can't realise the automatic PDF filling with Adobe Acrobat 8.0)
    So I am looking for help with ".NET" "COM" or other library to help me to do it. If someone has other idea just give it.
    Thanks for your reply
    Jean Pierre (sorry for my bad English)

    Hello Mike
    Thank's for your reply. I used XPAAJ and it works very well but my company his develloping software with C# langage.
    I tried to convert XPPAJ to C#, I did it with the Java Langage Conversion Assistant but "Adobe Library" included in jar files cannot be translated to C#/.NET library. So, I can't use it.
    I found some C#/.NET API on the NET but they are very expensive and my company don't want to pay. They want me to create my own solution with library given by Adobe when you buy Adobe 8. So I am looking for this library.
    Is there an Adobe LiveCycle Designer SDK to help me.
    Thank you in advance for your reply
    Jean Pierre (student developing with LiveCycle Designer)

  • Parent  changes between save and load of a PDF file

    I am using LiveCycle 8.2 and Acrobat 9.2 - and Reader 9.2
    I have an automated process that uses a plug-in to fill out and save a PDF form using XML data.
    This works well - saves time , etc.
    I have a problem where a certain data element seems to have a different heirarchical relationship in the Reader  than in Acrobat..
    I have added some xfa.host.MessageBox() statements to print out data as the form is being saved  and then when it is loaded into the Reader - these  values are not the same -
    but i have checked and when I laod it using Acroabt everyhting is the same as when the data was saved - but there a different relationship apparently exists when I load the form using the reader.
    Has anyone seen this before ?
    Is there anything that I can do about it ?
    Any help is appreciated - thanks

    a snippet of the code involved is listed here :
    Provider.page2.Practice.Associatec.AssociateType.AssociateTypeDescription::initialize - (JavaScript, client)
     var CovgYN;
    var msg; var lineofdata; 
    var assttype = this.rawValue;msg
    = "Check1 : " + assttype + " = " + this.parent.parent.AssociateLastName.rawValue;xfa.host.messageBox(msg);
    lineofdata= this.parent.parent.AssociateFirstName.rawValue + " " + this.parent.parent.AssociateLastName.rawValue + " " + assttype + " -" + CovgYN; 
    The data contained in the msg and lineofdata variables - is different in Acrobat 9.2 and The Reader ... It is correct in Acrobat when I load the form and Import the XML data file.
    When the correct data Form is saved and loaded using the reader the values "parent" is different so - the values are not the same -=
    This is a serious problem !.
    Is this a known bug or issue  ?
     

  • Open And Edit Word File In SharePoint Site Programmatically (Without Save On Local system)

    Hi Sir ,
             I am working as sharepoint developer. I have face some problem in Edit and open document file in sharepoint site programmatically. I want to open file and edit directly in sahrepoint site without save in local system,
         Issue:   I have upload one doc file then try to edit and open but In that case file is dowanload and save in local save.

    Hello,
    As i understand you want to open and update word file. Please have a look at below links:
    http://mysharepointwork.blogspot.ca/2010/06/programmatically-open-and-save.html
    http://howtosharepoint.blogspot.ca/2010/05/programmatically-edit-and-save-file.html
    It is good place to start.
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Named file entity do not load in from xml files(eg., !DOCTYPE PURANA SYSTEM "purana.dtd" [ !ENTITY CHAPTER_1 SYSTEM "./chapter_1.xml" ] ?xml-stylesheet type="text/xsl" href="purana.xsl"? PURANA TITLE /TITLE &CHAPTER_1; /PURANA )

    I create several file name entities in an external DTD.
    It used to work sometimes back but I don't remember now when it begun to fail.
    typical document for eg., is given below:
    <!DOCTYPE PURANA SYSTEM "purana.dtd" [ <!ENTITY CHAPTER_1 SYSTEM "./chapter_1.xml"> ]>
    <?xml-stylesheet type="text/xsl" href="purana.xsl"?> <PURANA>
    <TITLE>
    </TITLE>
    &CHAPTER_1;
    </PURANA>)
    the abbreviation used to work by loading the file using XSL script,
    but now it does not even work when the entity is defined within the XML document itself.

    Too difficult???
    Please helped me.
    Thank you, Theo

  • How to get rid of .dtd file in XML file?

    If there is "<!DOCTYPE xxx SYSTEM "xxx.dtd">" in a XML file and there is no xxx.dtd file, there will be wrong while parsing in Java using JAXP, and the function: setValidating(false) is no use. I can't modify original XML file containing "<!DOCTYPE xxx SYSTEM "xxx.dtd">" and Maybe I have not that xxx.dtd file.
    Please tell me how to solve it if you know, thanks a million.

    You're stuck. You've either got to find that .dtd file, or remove the line from the XML. Your only other option is to reimplement the DTD file so that the XML can use it, or you can just redo everything

  • XML load using PL/SQL (XSU) problem with dtd file.

    Hi,
    I'm trying to load a xml file and receives this errormassage:
    SQL> exec loadxml;
    In Exception
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException: Error opening external DTD
    'Businesscard.DTD'.
    Any idea what I can change? Below is the things I've done and also how the xml file looks
    and the dtd file.
    Regards
    Jorgen
    CREATE DIRECTORY XML_DIR AS 'C:\XML';
    CREATE TABLE XML_TEMP (key NUMBER, f_lob BFILE);
    INSERT INTO XML_TEMP VALUES (1,BFILENAME('XML_DIR','TeleAdressVKI0209021728.xml'));
    CREATE TABLE XML_DOC (
    Key1 VARCHAR2(32),
    Key2     VARCHAR2(32),
    Key3 VARCHAR2(32),
    Terminate     VARCHAR2(3),
    LegalName     VARCHAR2(420),
    PopName          VARCHAR2(420),
    StreetName     VARCHAR2(60),
    StreetNumber     VARCHAR2(10),
    PostNumber     VARCHAR2(10),
    PostAdress VARCHAR2(30),
    CordinateLevel     VARCHAR2(32),
    xCor          VARCHAR2(10),
    yCor VARCHAR2(10),
    PoiCategory VARCHAR2(32),
    Telephone VARCHAR2(30));
    CREATE OR REPLACE PROCEDURE loadxml AS
    fil BFILE;
    buffer RAW(32767);
    len INTEGER;
    insrow INTEGER;
    BEGIN
    SELECT f_lob INTO fil FROM xml_temp WHERE key = 1;
    DBMS_LOB.FILEOPEN(fil,DBMS_LOB.FILE_READONLY);
    len := DBMS_LOB.GETLENGTH(fil);
    DBMS_LOB.READ(fil,len,1,buffer);
    xmlgen.resetOptions;
    insrow := xmlgen.insertXML('xml_doc',UTL_RAW.CAST_TO_VARCHAR2(buffer));
    DBMS_OUTPUT.PUT_LINE(insrow);
    IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    DBMS_LOB.FILECLOSE(fil);
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('In Exception');
    DBMS_OUTPUT.PUT_LINE(SQLERRM(SQLCODE));
    IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    DBMS_LOB.FILECLOSE(fil);
    END IF;
    end;
    The xml file look like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE Cards SYSTEM 'Businesscard.DTD'>
    <Cards>
    <Comment>TeleAdress initial</Comment>
    <OldFile>xxxx</OldFile>
    <NewFile>xxxx</NewFile>
    <Card>
    <Key1>95352</Key1>
    <Key2>159651</Key2>
    <Key3>3807868</Key3>
    <Terminate>no</Terminate>
    <Cardholder>
    <LegalName>
    <Name>
    <Full>AXFOOD DIREKT AB</Full>
    </Name>
    </LegalName>
    <PopName>
    <Name>
    <Full>WILLYS LEGPRIS AB</Full>
    </Name>
    </PopName>
    </Cardholder>
    <Location>
    <Address>
    <StreetInfo>
    <StreetName>BAGARBYVDGEN</StreetName>
    <StreetNumber>61</StreetNumber>
    </StreetInfo>
    <ZipCode>19134</ZipCode>
    <City>SOLLENTUNA</City>
    <Coordinate>
    <Level>1</Level>
    <xCor>1620480</xCor>
    <yCor>6592717</yCor>
    </Coordinate>
    </Address>
    <Business>
    <POI>
    <POIId>46</POIId>
    <POIId>84</POIId>
    </POI>
    <InfoRow>
    <Subscriptions>
    <TelAddress>08 6234540</TelAddress>
    </Subscriptions>
    </InfoRow>
    </Business>
    </Location>
    </Card>
    <Card_Count>1</Card_Count>
    </Cards>
    the dtd file looks like this:
    <!-- BusinessCard.dtd -->
    <!-- History:          See end of this file -->
    <!-- Description:      This DTD is used for transferring business cards-->
    <!--               from TeleAdress Information AB to its customers. -->
    <!--===================== Root Element ===========================-->
    <!ELEMENT     Cards     (Comment,OldFile?,NewFile,Card*,Card_Count)>
         <!ELEMENT     Comment                         (#PCDATA)>
         <!ELEMENT     OldFile                         (#PCDATA)>
         <!ELEMENT     NewFile                         (#PCDATA)>
    <!--===================== Card ============================-->
    <!ELEMENT     Card     (Key1, Key2, Key3, Terminate, (RegNo?, Cardholder, Row*)?)>
         <!ELEMENT     Key1          (#PCDATA)>
         <!ELEMENT     Key2          (#PCDATA)>
         <!ELEMENT     Key3          (#PCDATA)>
         <!ELEMENT     Terminate     (#PCDATA)> <!-- Values can be yes or no-->
    <!--====================== Cardholder ============================-->
    <!ELEMENT     Cardholder     (RegNo, OrgType, LegalName, PopName?, Location)     >
         <!ELEMENT     RegNo          (#PCDATA)>
         <!ELEMENT     OrgType          (#PCDATA) >
    <!--====================== RegName ==================================-->
    <!ELEMENT     LegalName          (Name)>
    <!--====================== PopName ==================================-->
    <!ELEMENT     PopName          (Name+)>
    <!--====================== Location ==================================-->
    <!ELEMENT     Location          (Adress+, Unit*, Business)>
    <!--====================== Unit ==================================-->
    <!ELEMENT     Unit          (UnitNo, UnitName?, Status, HQ, SNI1?, SNI2?, SNI3?, WorkPlaceNo, WorkPlaceName?)>
         <!ELEMENT     UnitNo          (#PCDATA)>
         <!ELEMENT     UnitName     (#PCDATA)>
         <!ELEMENT     Status          (#PCDATA)>
         <!ELEMENT     HQ          (#PCDATA)> <!-- Values can be yes or no-->
         <!ELEMENT     SNI1          (#PCDATA)>
         <!ELEMENT     SNI2          (#PCDATA)>
         <!ELEMENT     SNI3          (#PCDATA)>
         <!ELEMENT     WorkPlaceNo     (#PCDATA)>
         <!ELEMENT     WorkPlaceName     (#PCDATA)>
    <!--====================== Business ==================================-->
    <!ELEMENT     Business          (POI?, InfoRow*)>
    <!--====================== POI =======================================-->
    <!ELEMENT     POI          (POIId+)>
         <!ELEMENT     POIId          (#PCDATA)>
    <!--====================== InfoRow ===================================-->
    <!ELEMENT     InfoRow          (Number,Heading*,Name?, Address?, Text?, HomePageAddresses?, EMailAddresses?, Subscriptions?)>
         <!ELEMENT     Number          (#PCDATA)>
    <!--====================== Heading =================================-->
    <!ELEMENT     Heading          (LevelNo, LevelName)>
         <!ELEMENT      LevelNo          (#PCDATA)>
         <!ELEMENT     LevelName     (#PCDATA)>
    <!--====================== Name =================================-->
    <!ELEMENT     Name          (Full,First?,Middle?,Last?)>
         <!ELEMENT      Full          (#PCDATA)>
         <!ELEMENT     First          (#PCDATA)>
         <!ELEMENT     Middle          (#PCDATA)>
         <!ELEMENT     Last          (#PCDATA)>
    <!--====================== Address ==============================-->
    <!ELEMENT     Address               (Type, StreetInfo?,TextBeforeZipCode?,ZipCode?,City?,AReg?,
                             Municipality?,County?,Country?,Coordinate?)>
         <!ELEMENT     Type               (#PCDATA)>     
         <!--====================== StreetInfo ==============================-->
         <!ELEMENT     StreetInfo          (PostBox?, StreetName?,StreetNumber?,Entrance?, CO?)>
              <!ELEMENT     PostBox               (#PCDATA)>
              <!ELEMENT     StreetName          (#PCDATA)>
              <!ELEMENT     StreetNumber          (#PCDATA)>
              <!ELEMENT     Entrance          (#PCDATA)>
              <!ELEMENT     Co               (#PCDATA)>
         <!ELEMENT     TextBeforeZipCode     (#PCDATA)>
         <!ELEMENT     ZipCode               (#PCDATA)>
         <!ELEMENT     City               (#PCDATA)>
         <!ELEMENT     AReg               (#PCDATA)>     
         <!ELEMENT     Municipality          (#PCDATA)>
         <!ELEMENT     County               (#PCDATA)>
         <!ELEMENT     Country               (#PCDATA)>
         <!--====================== Coordinate ==============================-->
         <!ELEMENT     Coordinate          (Level, xCor,yCor)>
              <!ELEMENT     Level          (#PCDATA)>
              <!ELEMENT     xCor          (#PCDATA)>
              <!ELEMENT     yCor          (#PCDATA)>
    <!--====================== Text =================================-->
    <!ELEMENT     Text          (InfoText+)>
         <!ELEMENT     InfoText          (#PCDATA)>     
    <!--====================== HomePageAddresses =================================-->
    <!ELEMENT     HomePageAddresses          (HomePage+)>
         <!ELEMENT     HomePage          (#PCDATA)>     
    <!--====================== EMailAddresses =================================-->
    <!ELEMENT     EMailAddresses          (EMail+)>
         <!ELEMENT     EMail          (#PCDATA)>     
    <!--======================= Subscriptions ===========================-->
    <!ELEMENT     Subscriptions     (ClassifiedCode?, Type, TelAddress, TextAfter?)     >
         <!ELEMENT     TelAddress     (#PCDATA)>
         <!ELEMENT     TextAfter     (#PCDATA)>
    <!ELEMENT     Card_Count               (#PCDATA)>
    <!--==============================================================-->
    <!-- History:          2002-06-06 created this file -->
    <!--                2002-07-04 Added Source on Coordinates -->
    <!--               2002-08-15 Changed Source to Level -->
    <!--               2002-08-15 Changed RegName to LegalName-->

    I've got the same problem,
    How to define the directory in witch the DTD is????
    We need something like DBMS_XMLSave.setdirectoryDTD, that doesn't exist.
    ben
    ERREUR ` la ligne 1 :
    ORA-29532: appel Java arrjti par une exception Java non interceptie :
    oracle.xml.sql.OracleXMLSQLException: Error opening external DTD
    'annoncesv22.dtd'.
    ORA-06512: ` "SDEV.SIMPORT", ligne 205
    ORA-06512: ` ligne 1

  • How to mention the "dtd" file when loading xml file

    i am using the JAXP parser for parsing and loading my xml file.In the file i have mentioned the dtd like
    <!DOCTYPE screensmanagement SYSTEM "scrReg.dtd">
    But after doing some manipulations, when i save the file through JAXP parser at the same location from where i loaded, then "dtd header" is not saved with my xml File and when i again parse the xml file then parser does not find the "dtd" file coz it is not been saved with xml source.
    How can i get aroud this problem.
    Merry Chrismis

    when serializing the DOM, use this: transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, scrReg.dtd");
    Merry Chrasmas too ;-)

  • Where to put local DTD files in Java projects

    I'm working on a Netbeans project where the program funcion is driven by an XML configuration file, which will be distributed with the program.
    It's structured enough to warrant a DTD. The problem is, accesing it.
    I'm currently accessing the XML as a resource, in the same directory as Main.class, which is in a package directory. Using a system <!DOCTYPE with a simple filename for the DTD works fine in the Netbeans XML editor, but, of course, when I run the program it runs with the project base as the current directory and can't find it. And the situation will be even worse when I prepare the program for distribution.
    Anyone found a tidy approach to this? Is there some way of modifying the way the DocumentBuilder accesses DTDs?

    Thanks - that works fine and is quite neat.
                builder.setEntityResolver(new EntityResolver() {
                    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
                        if(systemId.endsWith("lapsync.dtd")) {
                            return new InputSource(getClass().getResourceAsStream("lapsync.dtd"));
                        } else
                            throw new SAXException("Unknown entity " + publicId + " - " +
                                    systemId);
                });

  • Cannot Retrieve referenced URL in wscript file from Local System Account, but not other accounts on the computer.

    Hello,
    I have a WScript File that includes an external resource (js file).
    It works on one computer and it does not work on another computer.
    If I run this file from a normal admin command prompt everything runs fine on both computers.
    If I run this file from the Local System account using PsExec it runs fine on one of the computers and throws an error "Cannot Retrieve referenced URL" on the other computer.
    The reason I want it to run from the Local System account is that it is executed from a Windows Service.
    Is there some setting or some way for the IE cache to get corrupt on the Local System account or something like that?

    JRV,
    You are by far the worst 'support' person I've ever seen. If you aren't going to be thoughtful in providing support, don't pretend. If you're going to pretend, leave your condescension on the shelf. You have provided no thoughtfulness whatsoever to his issue,
    and have in no way improved the discourse. You are arrogant and condescending without exhibiting any intelligence whatsoever. I'm impressed Matt kept calm through your demeaning, counterproductive diatribes.
    Matt,
    First I'd check UAC settings, because I believe that can change how elevation works substantially.
    Second, I would check the versions of wscript.exe on both machines, both in System32 and SysWow, and I'd check for updates bypassing WSUS to make sure there's not something silly going on there (totally a shot in the dark, catch-all theory).
    Have you made any headway in the last few weeks?
    -John
    This is not a support forum and it is not for assistance in fixing broken configurations.  It is a scripting forum. The OP proved that the issue is not the script but the environment it is running in.  You should not get mad just because you are
    not getting satisfaction.
    ¯\_(ツ)_/¯

Maybe you are looking for

  • Memory leak? Firefox won't load pages/open.

    Ok, I believe there is a memory leak. I am surfing ok then a page wont load. I go to taskmgr and I show that one firefox has 104,990 K of memory. The rest have at most 3,000K. After the page won't load I close Firefox. It won't open. I have to turn o

  • How do I keep an incorrect username from coming up with a click on the box?

    I typed in an incorrect username. Now, when I click on the username box to bring up my username, it shows the incorrect name as a choice, but I don't want that to show. Is there some way to delete that name?

  • Some fields in form not printing but do print when printing fields only

    Hope that someone can help with this. I have filled in some forms (supplied by a third party) and when I print these forms the content of some fields are printed, and some are not. I have found out that if I cut a field's content, then paste into the

  • Apache + mod_ssl config

    I'm trying to config apache + mod_ssl for a project. The server has to only accept https connections, and validate users based on certificates. I configured my /etc/httpd/conf/extra/httpd-ssl.conf like this: <VirtualHost> DocumentRoot "/home/httpd/ht

  • Sales Order Reason for Rejection Worklist - Report

    Dear Gurus, Is there any standard worklist or report where I can have a list, where I can see the list of sales order have "Reason for rejection" status set. Looking for the gurus response. Regards,