Can't load sql file from inside jar file?

hi all
i have a sql file inside my jar file
and i want to get the path of the sql file to use it in runtime command to restore a sql dump file
i used the following but it doesn't work:
the path contains invalid characters such %20% instead of and?
URL url2=getClass().getResource("backup.sql");
String str1=url2.toString().substring(10);
String command="cmd.exe /c  c:\\wamp\\mysql\\bin\\mysql -u root --password=anasa library < "+str1;       
Runtime.getRuntime().exec(command);is this way is wrong?
or there's an alternative way?

How is the system to pull the data out of the jarfile?
That redirection symbol means to take the information from the file, or here document, or command output that comes after it, but you don't have any of those. It will read that String as if it is a file name, but a file under that name doesn't exist. And, after you've changed it like you have, it doesn't even reference anything inside of a jar file anymore (not that the command could have used that anyway).
If you insist on doing something like this, then you are going to need to read it with getInputStream and write it out somewhere (probably to a temp file) then use that tempfile and delete it when you're done.

Similar Messages

  • Reading an xml file from a jar file

    Short question:
    Is it possible to read an xml file from a jar file when the dtd is
    placed inside the jar file? I am using jdom (SAXBuilder) and the default
    sax parser which comes with it.
    Long Question:
    I am trying to create an enterprise archive file on Weblogic 6.1. We
    have a framework that is similar to the struts framework which uses it's
    own configuration files
    I could place the dtd files outside the jar ear file and specify the
    absolute path in an environment variable in web.xml which is
    configurable through the admin console.
    But I want to avoid this step and specify a relative path within the jar
    file.
    I have tried to use a class which implements the entityresolver as well
    as try to extend the saxparser and set the entity resolver within this
    class explicitly, but I always seem to sun into problems like:
    The setEntityresolver method does not get called or there is a
    classloader problem. i.e. JDOM complains that it cannot load My custom
    parser which is part of the application
    Vijay

    Please contact the main BEA Support team [email protected]
    They will need to check with product support to determine
    the interoperatablity of Weblogic Server with these other
    products.

  • How to read a text file from a Jar file

    Hi
    How can I read a text file from a Jar file?
    Thanx in advance..

    thanx
    helloWorld it works.damn, I didn't remove it fast enough. Even if it is urgent, it is best not to mention it, telling people just makes them take longer.

  • Executing .jar files from another .jar file.

    How would I run one .jar file from another .jar file. and is there anyway to call specific class arguments? Because I have one .jar file that reads a specified file and returns its contents.
    So how would I execute it and specify its arguments and how would I make it return something to the executing jar file?

    Because I have one .jar file that reads
    a specified file and returns its contents. Presumably you have a class that does that, and you have that class stored in a jar. And you want to know how to... um... do something with that class. I say "um..." because normally you don't execute a class, either, you either call its static methods or you create an instance of the class and call its instance methods.
    If you have been writing a whole lot of little classes each of which just has a static main method, then stop doing that. Write real Java classes instead. The tutorial is here:
    http://java.sun.com/docs/books/tutorial/java/index.html

  • Can't load any classes from infobus.jar (WL 6.0 SP1)

    Hi,
    I am deploying an .ear file, which has one .war file in it. The war file, has
    infobus.jar, inside it under \WEB-INF\lib. Whenever in my servlet code I try to
    load a class from infobus.jar, I get the following exception :
    About to load class javax.infobus.InfoBusDataConsumer<<<<<<<<<<java.lang.ClassNotFoundException: InfoBusDataConsumer
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:178)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:45)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at XDILoginForm.init(XDILoginForm.java:99)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:638)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:581)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:526)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1078)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:1022)
    at weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:499)
    at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)
    at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
    at weblogic.j2ee.Application.deploy(Application.java:175)
    at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:173)
    at weblogic.management.mbeans.custom.Application.setLocalDeployed(Application.java:217)
    at weblogic.management.mbeans.custom.Application.setDeployed(Application.java:187)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeSetter(DynamicMBeanImpl.java:1136)
    at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:773)
    at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:750)
    at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:256)
    at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
    at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
    at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:318)
    at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:259)
    at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
    at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
    at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:291)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:173)
    at $Proxy7.setDeployed(Unknown Source)
    at weblogic.management.console.pages._panels._mbean._application._jspService(_application.java:303)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    But if I put the infobus.jar on system classpath , everything works out fine.
    Can somebody tell me, what is going on

    Gseel is right: you try to instantiate an EJB with the BDK.
    Enterprise Java Beans are totally different from graphical/GUI beans. EJBs are thought for dealing with business logic like accessing a database, ldap directory and so on. They run on a application server (simply speaking - a java enabled webserver) and do some processing to handle user requests. Enterprise Java Beans usually don't interact directly with the user, they only do the work in the background and forward their results, which are then rendered for the user. Typically they are employed for handling web requests (a user with a browser), but they can also be used for awt/swing applications. Though - let me repeat - they don't appear visually on the screen.
    The only similarities between those two bean types are the following: they have getter/setter methods for their properties, they implement Serializeable (or a sub-interface like Externalizable, Remote) and they have a default no-argument constructor.
    If you want to run your been you need an application server (your bean is pre-packaged for the Bea Weblogic app-server). If you want to do something graphical, you'll need to search for GUI beans.
    dani3l

  • How to load SQL scripts from a text file.

    Hi, i tried several time to load a text file/SQL script with 10 different tables and data, but 10g Express doesen't allows me to do that, any one can direct me or point out to me what i should do or do i need to adopt any special method to to get this done. i am sure there must be some thing where you can upload SQL scripts from a text file (in SQL command editor!). thanks

    Hi,
    see my other answer here:
    SQL command editor doesn't take more than 1 insert command
    This seems to be a duplicate question, right? Or am I missing something?
    Regards,
    ~Dietmar.

  • How To Load Sound From Inside jar File?

    Hello There
    i've made a jar file that contains Images&Pictures But I Can't Use Them
    So I Used For Loading Images
      URL url = this.getClass().getResource("image.jpg");
             setIconImage(new ImageIcon(url).getImage());and for loading sound when i use
      URL url = this.getClass().getResource("Bond2.wav");         
           AudioInputStream stream = AudioSystem.getAudioInputStream(new File(url));there's an error That The file Constructor doesn't take url
    how can i fix it?

    First_knight wrote:
    and for loading sound when i use
      URL url = this.getClass().getResource("Bond2.wav");         
    AudioInputStream stream = AudioSystem.getAudioInputStream(new File(url));there's an error That The file Constructor doesn't take url
    how can i fix it?Remove the "new File()". There is a getAudioInputStream() method that takes a URL.
    AudioInputStream in = AudioSystem.getAudioInputStream(url);

  • Can javascript pass values to applet inside jar file?

    I have an applet that receives the computer name selected via javascript and then resolves the name with the name server and returns any available ip addresses (via a browser). When running this applet unsigned, I can only resolve my own local machine and I get security exception errors(access denied) for any other computer selections (this would be expected).
    I have created a jar file encompassing the class file and java file for this applet signing it with the designated signature. When using the jar file, the applet will start, but no names can be resolved (including the local machine) and there are no errors on the java console...(???)
    HTML code is as follows:
    <html>
    <body>
    <form>
    <fieldset style="width:100%"><legend>  ?</legend>
    <select name="CNList"
    onChange="var f = document.forms[0]
    if (f.CNList.options[f.CNList.selectedIndex].text=="") {
    alert("Please choose a computer name for this test.");
    f.CNList.focus();
    return false;
    }else{
    var cnv = f.CNList.options[f.CNList.selectedIndex].text;
    document.myApplet.newText(cnv);
    return false;"
    >
    <option value="-SELECT COMPUTER NAME-" selected>-SELECT COMPUTER NAME-
    <option value="BELKNAP">BELKNAP
    <option value="DOWNS">DOWNS
    <option value="GSIMS">GSIMS
    <option value="SPOTSYLVANIA">SPOTSYLVANIA
    <option value="CEDAR">CEDAR
    <option value="BELLMEAD">BELLMEAD
    <option value="ASHLAND">ASHLAND
    <option value="COMFORT">COMFORT
    <option value="ROSS">ROSS
    <option value="PUTNAM">PUTNAM
    <option value="CHARITY">CHARITY
    <option value="FRODO">FRODO
    <option value="PLUTO">PLUTO
    <option value="DENTON">DENTON
    <option value="HOOD">HOOD
    <option value="KODIAK">KODIAK
    <option value="SUNDOWN">SUNDOWN
    <option value="FROST">FROST
    <option value="TRINITY">TRINITY
    <option value="LOUDOUN">LOUDOUN
    <option value="MPAPE">MPAPE
    <option value="QUENTIN">QUENTIN
    <option value="DUNDEE">DUNDEE
    <option value="SIGMA">SIGMA
    <option value="PSI">PSI
    <option value="CUBE">CUBE
    <option value="ALOHA">ALOHA
    <option value="OBION">OBION
    </select>
    <br />
    <applet code=NSQuery2.class
            archive="NSQuery2.jar"
            width=400 height=250
         name="myApplet"
         id="myApplet"
         >
         <p>Sorry, you need a Java enabled browser to see the applet's info.</p>
    </applet>
    </form>
    </body>
    </html>JAVA Applet code is as follows:
    /* Gets ComputerName selected, returns IP Address(es)*/
    // Instead of importing just 1 or 2 parts of java.awt and java.applet classes,
    // we have chosen to import everything at once.
    // To do this we use the wildcard operator (*).
    import java.awt.*;
    import java.applet.*;
    import java.io.*;
    import java.lang.String;
    import java.net.InetAddress;
    public class NSQuery2 extends Applet {
    // This declares a string variable named computerName for future use.
    String computerName;
      public void init() {
      // Set background color of our applet to white.
      setBackground(Color.white);
      public void paint(Graphics g) {
        super.paint(g);
        try {
          g.drawString("Computer Name: " + this.computerName, 23, 43);
          String[] ips = new queryhost().getIPAddressArray(this.computerName);
            for (int j=0; j<ips.length; j++) {
          g.drawString("IP Address   : " + ips[j], 23, (12*j)+((j+10)+91));
        } catch (Exception e) {
                g.drawString("Can't detect selected host name.  Check Network settings.", 23, 60);
       public static void main(String[] args) { new NSQuery2(); }
       public static String[] getIPAddressArray(String computerName) {
       //create int which is (sRemoteHost.length() + 1)
       int sRemoteHostchars = computerName.length();
         sRemoteHostchars++;
        //below returns a array of type InetAddress which holds entries such as: hostname1/IPAddress1 etc
       InetAddress[] remoteHostName = null;
       try {
          remoteHostName = InetAddress.getAllByName(computerName); // get IP Address(es)
       catch (Exception e) {
          e.printStackTrace();
        // below creates an array of type string which holds entries such as : IPAddress1 etc
        String[] remoteIP = new String[ remoteHostName.length ] ;
        for (int i=0; i<remoteHostName.length; i++) {
           String iponly = remoteHostName.toString();
    iponly = iponly.substring(sRemoteHostchars);
    remoteIP[i] = iponly;
    return remoteIP;
    public void newText(String s){
    this.computerName = s;
    repaint();
    Anyone have any ideas as to why this can't be performed?
    Thanks in advance,
    Geoff-

    Hey thanks for the response (seems that most responses
    are gender specific around here :) )!No, they are not. Ask a good question (not "do my homework for me") and ask it specifically, and you will get good help whatever your gender. I am a girl; I make no attempt to hide this. I have always gotten good, solid advice from this forum without any reference to my gender, without any ascerbic remarks, without scorn from the respondant.
    You are probably referring to the "girl needs som help" thread or other recent threads from girls (well maybe girls, who knows).
    The content of these posts were:
    1) asking to help with blatant cheating on homework
    2) extremely vague
    3) used the OPs gender as an excuse for 1) and/or 2)
    Using your gender as an excuse for being unable to put code together and requesting help with cheating:
    -implies girls are too stupid to do math, programming, engineering
    -implies that girls who are in these fields are freaks/mutants/other
    -implies that gender is an exucse for laziness
    -implies that girls cannot think logically
    -implies that girls do not have to follow rules of integrity, or that girls have no integrity
    Such posts understandibly raise the ire of women software engineers who have worked hard to get where they are. (And also of male software engineers who can see through the request as a play on a stereotype)
    It is akin to a girl coming to my office hours and saying "I have my mechanics final exam tomorrow, but I didn't study all semester because I'm a girl and math is too haaaaard"
    Honestly, I would try to help the girl as much as I could, not because she's a girl, but because it is part of my duty, my responsibility, to help students.
    But before I could do it, I would have to count to ten a few times to get my temper under control.
    jen

  • Missing class file from tools.jar file!

    I have been playing around with the code:
    import com.sun.tools.javac.v8.JavaCompiler;
    import com.sun.tools.javac.v8.util.Context;
    import com.sun.tools.javac.v8.util.List;
    public class Compiler {
    public static void main(String[] args) {
    JavaCompiler compiler = new JavaCompiler(new Context());
    List list = new List();
    list = list.append("Hello.java");
    try {
    list = compiler.compile(list);
    } catch (Throwable t) {}
    I am running into a problem with the statements:
    import com.sun.tools.javac.v8.util.Context;
    JavaCompiler compiler = new JavaCompiler(new Context());
    The compiler tells me that Context does not exist. I checked the tools.jar file
    and sure enough Context did not exist! Can somebody point me in the right direction as to what I can do to fix this problem!
    Thanks

    Put the jar in your class path.

  • Include directive to include a JSP file from a JAR file

    I have an Eclipse project in which I have placed a JSP file in the package structure with the rest of my code. This is in fact only a code snippet page, not a full blown JSP file.
    I have a second project that is a Dynamic Web Project in Eclipse that incorporates the first project as a JAR in the /WEB-INF/lib directory.
    In this project I have a JSP file and I want to include the JSP file embedded in that JAR file.
    How do I do that?
    I'm thinking the only real solution is to rewrite the snippet portion as a custom tag.

    The JSP fragment page in question is actually a HTML form page. It is a form to be used specifically by a particular servlet. That is why they are "bundled" together in the same project, in the same package structure.
    I have multiple web applications that I want to include that form/servlet, so it gets added to these projects in the /WEB-INF/lib folder as a JAR library. But I don't want to recreate the form over and over again for each application. It would be nice if I could write a JSP page that wraps the fragment using an include directive to bring that fragment into the new page.
    So to do that with any other fragment I would write:
    <%@ include file="/WEB-INF/jsp/SOME_FORM.jsp" %>
    which works great if my fragment page is in the /WEB-INF/jsp subfolder. But if I want to access the JSP fragment as it is bundled in a JAR file, this:
    <%@ include file="/WEB-INF/lib/FORM.jar/SOME_FORM.jsp" %>
    doesn't work so good. It's just all wrong.
    I was wondering how I could just write one include statement to get what I need. There are work-arounds galore, but I thought if I could get this working it would be the simplest solution overall.

  • Is it possible to load classes from a jar file

    Using ClassLoader is it possible to load the classes from a jar file?

    URL[] u = new URL[1] ;
    u[0] = new URL( "file://" + jarLocation + jarFileName + "/" );
    URLClassLoader jLoader = new URLClassLoader( u );
    Object clsName = jLoader.loadClass( clsList.elementAt(i).toString() ).newInstance();
    I get this error message.
    java.lang.ClassNotFoundException: ExceptionTestCase
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    // "file://" + fileLocation + fileName + "/" This works fine from a browser.
    Is there anything I am missing? Thanks for the reply.

  • Why can't I load the image files in the Jar file?

    I make an application in a structure bellowing:
    A.class
    images\a.gif
    images\b.gif
    and I packed all of them(include the images directory) into a A.jar file.
    when I run the A.jar file,the application can't load the images in the Jar file.
    How can I do to solve this problem?

    It isn't working. The URL that is returned is blank. I tried rearanginf my stuff a little. Now it is set up like the other guys. So all the classes aren't in a package. so its:
    MyClass.class
    Sounds/mysound.wav
    all of this is in a .jar file. If it isnt in a .jar file it works. Bit I have mor than one class so I would really like it in a .jar file. But when it is MyClass.class.getResource("sounds/mysound.wav") returns nothing. Not null. Just blank.

  • Read images from external jar file (Sun's Java L&F Graphics repository)

    Hi!
    I don't know how to read images from an external jar file. Sun has a Java Look and Feel graphics repository that contains a lot of good images that can be used on buttons and so on. This repository is delivered as a jar file, containing only images, and I want to read the image files from that jar file directly without including them inside my application jar file. The application and image jar files will be in the same directory.
    I have absolutely no clue how to solve this. Is it necessary to include the images inside my application jar file or is it possible to have them separate as I want.
    Would really appreciate some help!
    Best regards
    Lars

    Hi,
    There is two ways :
    1) Add your jarfile to the classpath.
    Use the class loader :
    URL url = ClassLoader.getSystemResource("your/package/image.gif");
    Image im = (new ImageIcon(url)).getImage();
    or
    Image im = Toolkit.getDefaultToolkit().getImage(url);2)If you don't want to add the jar to the classpath you can use this (under jdk 1.4):
    import java.util.*;
    import java.util.jar.*;
    import java.awt.*;
    import java.io.*;
    import java.awt.image.*;
    import javax.imageio.*;
    public class ImageUtilities {
         public static Image getImage(String jarFileName, String fileName) {
              BufferedImage image = null;
              try {
                   JarFile jar = new JarFile(new File(jarFileName), false, JarFile.OPEN_READ);
                   JarEntry entry = jar.getJarEntry(fileName);
                   BufferedInputStream stream = new BufferedInputStream(jar.getInputStream(entry));
                   image = ImageIO.read(stream) ;
              catch (Exception ex) {
                   System.out.println(ex);
              return(image);
    }I hope this helps,
    Denis

  • Running scripts, bat files, etc from a jar file

    Hello,
    Does anyone know of a way, or even if it is possible to run a script or batch file from a jar file?
    For instance, lets say I have a batch file that I can run from the command prompt by typing :
    myBatchFile.bat
    and now I write a very simple java app that will do the same:
    public class Test {
    public static void main(String[] args) {
    try {
    Runtime rt = Runtime.getRuntime();
    Process p = rt.exec(�myBatchFile.bat�);
    } catch (Exception e) {
    e.getMessage();
    The above app will work as long as the batch file is in the current directory, but how or can I make it work if I stick the batch file in a jar file along with the app?
    I tried using the manifest file with no luck.
    I tried creating a URI to the jar file, wrapping it in a File and then passing that File to the exec method also with no luck.
    I searched all the forums on Sun but came up with nothing.
    I performed a google search also with no luck.
    Does anyone have the answer to this? Even if I can get a definitive �No it can�t be done� answer. Although I would think that it should be able to be done.
    Thanks

    Hi,
    you cannot execute anything being inside a jar-file. The OS doesn't know anythig about jar-files and cannot look inside one to find the program/script/batch you want to execute.
    You could do a workaround by extracting the file from the jar-file before calling exec(). But normally OS dependent files should not be inside a jar-file and remain in a own directiory.
    Andre

  • Urgent help for processing XML stream read from a JAR file

    Hi, everyone,
         Urgently need your help!
         I am reading an XML config file from a jar file. It can print out the result well when I use the following code:
    ===============================================
    InputStream is = getClass().getResourceAsStream("conf/config.xml");
    BufferedReader br = new BufferedReader(new InputStreamReader(is));
    String line;
    while ((line = br.readLine()) != null) {
    System.out.println(line); // It works fine here, which means that the inputstream is correct
    // process the XML stream I read from above
    NodeIterator ni = processXPath("//grid/gridinfo", is);
    Below is the processXPath() function I have written:
    public static NodeIterator processXPath(String xpath, InputStream byteStream) throws Exception {
    // Set up a DOM tree to query.
    InputSource in = new InputSource(byteStream);
    DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
    dfactory.setNamespaceAware(true);
    Document doc = dfactory.newDocumentBuilder().parse(in);
    // Use the simple XPath API to select a nodeIterator.
    System.out.println("Querying DOM using " + xpath);
    NodeIterator ni = XPathAPI.selectNodeIterator(doc, xpath);
    return ni;
    It gives me so much errors:
    org.xml.sax.SAXParseException: The root element is required in a well-formed doc
    ument.
    at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213
    at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XM
    LDocumentScanner.java:570)
    at org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.endO
    fInput(XMLDocumentScanner.java:790)
    at org.apache.xerces.framework.XMLDocumentScanner.endOfInput(XMLDocument
    Scanner.java:418)
    at org.apache.xerces.validators.common.XMLValidator.sendEndOfInputNotifi
    cations(XMLValidator.java:712)
    at org.apache.xerces.readers.DefaultEntityHandler.changeReaders(DefaultE
    ntityHandler.java:1031)
    at org.apache.xerces.readers.XMLEntityReader.changeReaders(XMLEntityRead
    er.java:168)
    at org.apache.xerces.readers.UTF8Reader.changeReaders(UTF8Reader.java:18
    2)
    at org.apache.xerces.readers.UTF8Reader.lookingAtChar(UTF8Reader.java:19
    7)
    at org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.disp
    atch(XMLDocumentScanner.java:686)
    at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
    canner.java:381)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.
    java:195)
    at processXPath(Unknown Source)
    Thank you very much!
    Sincerely Yours
    David

    org.xml.sax.SAXParseException: The root element is required in a well-formed document.This often means that the parser can't find the document. You think it should be able to find the document because your test code could. However if your test code was not in the same package as your real (failing) code, your test is no good because getResourceAsStream("conf/config.xml") is looking for that file name relative to the package of the class that contains that line of code.
    If your test code wasn't in any package, put a slash before the filename and see if that works.

Maybe you are looking for

  • Group Policy Management | No such interface supported

    Running Windows Server 2008 R2 as a Domain Controller and when I open Group Policy Management, click on a GPO, then click on the Settings tab, it pops up an error message that says "No such interface supported".  I've found several articles that talk

  • 5510L Locked Up on Home Screen

    Any ideas why this is happening?  Our customers can't access the MiFi, so they can't removed the battery and insert again to eliminate this issue. I need another troubleshooting tactic, please. We've had 67 of these returned to us with this issue. Wh

  • Flashing question mark/folder icon

    I have a PowerBook G4 17 " that I got in November, 2005. Tonight, trying to boot it up it went to a gray screen on which a folder icon alternates with a flashing question mark. Two things happened to the machine earlier today: 1) i installed the late

  • 1013 File Adpter pick .pdf, .doc files and make it available in Worklist

    Hi, I am using 10.1.3 version. I have a file adapter that polss on a directory and picks up any file dropped in the folder can doc, pdf. I have a Human Task that a user looks at a file and then APPROVE or REJECT or if possible make changes to a file

  • Upgrading from asa711-k8.bin to asa 721-k8.bin error

    when i am trying to upgrade to the new image i get this error test(config)# boot config disk0:/asa721-k8.bin ERROR: Unable to set this url, file has non-ASCII characters