Strange ClassNotFoundException from jar

Recently, our customer support found some ClassNotFoundException informations in log files, they sent the log files to me,
and I found that these classes are exist in jar, and they told me these exceptions only show when our program was busy.
The log file was generated by log4j, these jars were what we developed, and these not found classes are business objects, the class not found exception made
our webservice application can not process business any more. the strange thing is ,when we regenerate jar and replace old ones, the exception no longer appeared.
Is anyone know the reason or how to resolve the problem?
Or , is the server low memery can cause the exception?

WilliamRyan wrote:
Recently, our customer found some ClassNotFoundException informations in log files, they sent the log files to me,
and I found that these classes are exist in jar, and they told me these exceptions only show when our program was busy.
Is anyone know the reason or how to resolve the problem?
How to resolve what problem? You haven't posted any problem that necessarily needs to be resolved.
Nor have you posted ANY information about:
1. what log files you are talking about
2. why you think those log messages indicate a problem of some kind.
3. what class files you are talking about
4. what jar files those class file are in
5. where those jar files came from.
6. what application you are even talking about
7. what that application even does
8. why your customers are digging around in the log files to begin with
9. why you are even concerned about this at all
You haven't said one word about any appilcation working incorrectly or producing incorrect results.

Similar Messages

  • ClassNotFound in case of class from jar in lib folder

    Hello,
    I get an application that I have to deploy on Weblogic AS. It is big ear with couple of wars inside. Let's say it is bigApp.ear.
    It is deployed and state is Active. When go to browser and try to run an application I get an error. In logs I found ClassNotFoundException. The error is related to a class, let's say: com.some.package.Abc - I have this class in a jar file, let's say someFile.jar and it is in a folder WLS_FOLDER\samples\domains\wl_server\lib where:
    - WLS_FOLDER is my WLS installation folder
    - wl_server - name of my domain where I deploy an application.
    I wrote a small application (simple form), let's say simpleApp.war. The application uses the class com.some.package.Abc, but the class is not put into the war (WEB-INF/lib) of my small aplication (I use Maven and dependency to someFile.jar has scope provided, so simpleApp.war does not contain it). The result is that simpleApp works fine and there is no error in logs. It creates an instance of com.some.package.Abc and correctly display toString() of the instance of the class in a browser. So this means that application simpleApp is able to see and use classes that are inside jars in WLS_FOLDER\samples\domains\wl_server\lib folder.
    So my guess is that there is something in bigApp.ear but I don't know where to search. I read about class loaders hierarchy in Weblogic and Class Loader Filtering. But I have looked inside every weblogic.xml in bigApp.ear and wars that are inside and there is no filter on "com.some.package" or "com.some" or "com" only different packages.
    Is there any other mechanism in Weblogic that could block the visibility of classes from jars from lib folder of domain to the applications that are deployed in that domain??
    Regards

    Hi,
    Place that something.jar file under Domain_Home / lib folder and restart the server it will included with in the classpath and your app will able to pick the class without any issue.
    Regards,
    Kal

  • Importing bc4j from jar in project

    Hi,
    since we have a complex application, we want to group application modules logically into smaller modules (submodules), which must be combined to yield more complex modules. Every submodule lives in its own project, so reusing a submodule in a more complex project implies that that submodule must be imported into the project hosting the more complex appmodule.
    Within a project, as soon as a BC4J module has been created (call it the "base module"), the "import business components" option becomes avaiable. With this, BC4J can be imported, e.g. from a jar file.
    Everything works fine, as long as JDeveoper is not exited. The imported views, viewlinks, etc. can be used in the datamodel of the base module, and the tester runs neatly on the compex applicatoin module, as well for the native as for the imported views.
    After the project has been rebuilt, everything has been saved, and JDev is exited, on restart, the imported BC package is still visible, but all views and links belonging to it are now gone, since an error occurs loading the BC4J xml file (strange since at first the xml file could obviously be parsed without problem). I include the error trace at the end of this message.
    Even though an additional classpath to the imported jar file has been set, and a library containing the imported jar has been defined and added to the new project, the load error persists.
    If the bc4j are not imported from jar, but directly, no such error occurs!
    Is this a known problem (in Jdev 9.0.3.1035) and are there any workarounds?
    Alex
    Error trace:
    oracle.jbo.dt.objects.JboException: XML load error. Line number: 1
    Object: [name of imported bc4j xml file]
    Project: [name of project files are imported to ]
    Start of root element expected.
         void oracle.jbo.dt.objects.JboException.throwException(java.lang.String, oracle.jbo.dt.objects.JboNamedObject, java.lang.Throwable)
              JboException.java:81
         void oracle.jbo.dt.objects.JboPackage.loadFromXMLFile(java.net.URL, java.io.InputStream)
              JboPackage.java:727
         void oracle.jbo.dt.objects.JboBaseObject.loadFromXMLFile()
              JboBaseObject.java:1874
         void oracle.jbo.dt.objects.JboPackage.loadFromXMLFile()
              JboPackage.java:675
         void oracle.jbo.dt.objects.JboPackage.checkForLoad()
              JboPackage.java:363
         oracle.jbo.dt.objects.JboNamedObject oracle.jbo.dt.objects.JboPackage.findContainedObjectByName(java.lang.String)
              JboPackage.java:352
         oracle.jbo.dt.objects.JboNamedObject oracle.jbo.dt.objects.JboPackage.findObjectByName(java.lang.String)
              JboPackage.java:1480
         oracle.jbo.dt.objects.JboNamedObject oracle.jbo.dt.objects.JboApplication.findContainerChildObject(oracle.jbo.dt.objects.JboPackage, java.lang.String)
              JboApplication.java:733
         oracle.jbo.dt.objects.JboNamedObject oracle.jbo.dt.objects.JboApplication.findObjectByName(java.lang.String)
              JboApplication.java:642
         oracle.jbo.dt.objects.JboNamedObject oracle.jbo.dt.objects.JboApplication.findObjectByName(java.lang.String, oracle.jbo.dt.objects.JboPackage)
              JboApplication.java:614
         void oracle.jbo.dt.objects.JboObjectReference.loadResolveReferencesXML(oracle.jbo.dt.objects.JboBaseObject)
              JboObjectReference.java:179
         oracle.jbo.dt.objects.JboNamedObject oracle.jbo.dt.objects.JboObjectReference.getReferencedObjectInternal(oracle.jbo.dt.objects.JboBaseObject)
              JboObjectReference.java:89
         oracle.jbo.dt.objects.JboView oracle.jbo.dt.objects.JboViewReference.getView()
              JboViewReference.java:53
         java.lang.String oracle.jbo.dt.objects.JboViewReference.getImageLoc(boolean)
              JboViewReference.java:205
         void oracle.jbo.dt.objects.JboAppModule.addStructurePaneNodes(oracle.jbo.dt.system.SysStructureNode)
              JboAppModule.java:1372
         oracle.jbo.dt.system.SysStructureNode oracle.jbo.dt.objects.JboBaseObject.getStructurePaneNode()
              JboBaseObject.java:1627
         void oracle.jbo.dt.ui.main.bced.BceDefTree.addDefTreeObjectNodes(oracle.jbo.dt.objects.JboBaseObject, javax.swing.tree.MutableTreeNode)
              BceDefTree.java:80
         void oracle.jbo.dt.ui.main.bced.BceDefTree.setJboObject(oracle.jbo.dt.objects.JboBaseObject)
              BceDefTree.java:53
         void oracle.jbo.dt.jdevx.ui.JdxExplorer.setContext(oracle.ide.addin.Context)
              JdxExplorer.java:113
         oracle.ide.explorer.Explorer oracle.ideimpl.explorer.ExplorerManagerImpl.getExplorerForHost(oracle.ide.addin.View, oracle.ide.addin.Context)
              ExplorerManagerImpl.java:571
         void oracle.ideimpl.explorer.ExplorerWindowImpl.viewSelectionChanged(oracle.ide.addin.Context)
              ExplorerWindowImpl.java:222
         void oracle.ide.addin.AbstractPinnable.viewSelectionChanged(oracle.ide.addin.ViewSelectionEvent)
              AbstractPinnable.java:179
         void oracle.ideimpl.explorer.ExplorerWindowImpl.viewSelectionChanged(oracle.ide.addin.ViewSelectionEvent)
              ExplorerWindowImpl.java:207
         void oracle.ide.addin.AbstractView.fireViewSelectionChanged(oracle.ide.addin.ViewSelectionEvent)
              AbstractView.java:413
         void oracle.ideimpl.navigator.NavigatorWindowImpl.fireViewSelectionChanged(oracle.ide.addin.ViewSelectionEvent)
              NavigatorWindowImpl.java:717
         void oracle.ideimpl.navigator.NavigatorWindowImpl$3.viewSelectionChanged(oracle.ide.addin.ViewSelectionEvent)
              NavigatorWindowImpl.java:997
         void oracle.ide.addin.AbstractView.fireViewSelectionChanged(oracle.ide.addin.ViewSelectionEvent)
              AbstractView.java:413
         void oracle.ideimpl.explorer.BaseTreeExplorer.actionPerformed(java.awt.event.ActionEvent)
              BaseTreeExplorer.java:1677
         void javax.swing.Timer.fireActionPerformed(java.awt.event.ActionEvent)
              Timer.java:150
         void javax.swing.Timer$DoPostEvent.run()
              Timer.java:108
         void java.awt.event.InvocationEvent.dispatch()
              InvocationEvent.java:154
         void java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
              EventQueue.java:337
         boolean java.awt.EventDispatchThread.pumpOneEventForHierarchy(java.awt.Component)
              EventDispatchThread.java:131
         void java.awt.EventDispatchThread.pumpEventsForHierarchy(java.awt.Conditional, java.awt.Component)
              EventDispatchThread.java:98
         void java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
              EventDispatchThread.java:93
         void java.awt.EventDispatchThread.run()
              EventDispatchThread.java:85

    There is a bug in 9.0.3 that occurs if the jar file you are importing is on a different drive letter than the one that your project is on. If the jar and your project are on the same drive then everything works ok. If they are not, the symptoms match the ones you are describing. The workaround is to relocate the jar file to the same drive. This has been fixed for future releases.
    Hope this helps.
    Ray

  • Loading file from jar in webstart 1.5.0_16

    Hello all,
    We have recently updated form 1.5.0_15 to 1.5.0_16. Since the update, our application is bombing when it attempts to read an xml file from a jar in cache.
    JDOModin.xml.XMLFileReaderError in building: C:\Documents and Settings\dave.frank\Desktop\jar:lookups\version.xml (The filename, directory name, or volume label syntax is incorrect)
    org.jdom.JDOMException: Error in building: C:\Documents and Settings\dave.frank\Desktop\jar:lookups\version.xml (The filename, directory name, or volume label syntax is incorrect)
         at org.jdom.input.SAXBuilder.build(SAXBuilder.java:306)
         at org.jdom.input.SAXBuilder.build(SAXBuilder.java:617)
         at odin.xml.XMLFileReader.readFile(XMLFileReader.java:53)
         at odin.xml.XMLFileReader.<init>(XMLFileReader.java:40)
    Clearly the path to the jar file is incorrect.
    The url is retrieved like this:
    private URL getURL(String filePath)
            URL url = getClass().getResource(filePath); // relative path "/lookups/version.xml"
            return url;
    } This worked fine in the previous version. Any help would be much appreciated.

    Hi Andrew,
    We are having huge problems fixing this, and have spent quite a while searching the forums for info about it. The closest I've got is two posts where you mention that there are other posts. I can't find them.... Bloody annoying that Sun hasn't updated the webstart FAQ to tell people how to get around this very annoying problem.
    By the way, if you google 1.5.0_16, your post comes up as the second hit.
    Any pointers to threads that offer solutions to resource loading from Jars (images, auth.conf etc) when using webstart, now that it's broken in 1.5.0_16??
    Any help would be greatly appreciated!
    Thanks,
    Craig

  • Get Images from jar. getResource() not working

    I've read some of the posts in the forum and I've tried the solutions but still cant get the images in my program.
    I'll write all the things I've tried (All of them works fine when I run them from bluej):
    1- The code used in the jar files in demo folder of jdk:
    /** Inside the main class: */
    private static ResourceBundle resources;  
        static {
            try {
                resources = ResourceBundle.getBundle("resources.Recursos", Locale.getDefault());
            } catch (MissingResourceException mre) {
                JOptionPane.showMessageDialog(new JFrame(), "ResourceBundle not found","Error",JOptionPane.ERROR_MESSAGE);
                System.exit(1);
    public String getResourceString(String nm)
            String str;
            try {       
                str = resources.getString(nm);   
                  } catch (MissingResourceException mre) {       
                str = null;
            return str;
        public URL getResource(String key)
            String name = getResourceString(key);
            if (name != null)
                URL url = getClass().getResource(name); //  Here is the exception
                return url;  
            return null;
        public ImageIcon loadImage(String image_name)
            URL image_url = null;    
            try
                image_url = getResource(image_name);             
                if (image_url != null)
                    return new ImageIcon(image_url);
                else
                return null;                  
            }catch(Exception e)
                JOptionPane.showMessageDialog(new JFrame(), e.getMessage() + "In load Image","Error",JOptionPane.ERROR_MESSAGE);
                return null;
    /** Inside the constructor */
    abrirButton = new JButton(loadImage("open"));
    }//End of the class}
    The ResourceBundle is a file named: Recursos.properties and it's in a folder inside the folder of my *.class and *.java And have this information:
    Title=Recursos
    ElementTreeFrameTitle=Elements
    ViewportBackingStore=false
    open=resources/open24.gif
    save=resources/saveAs24.gif
    cut=resources/cut24.gif
    copy=resources/copy24.gif
    paste=resources/paste24.gif
    analisis=resources/bean24.gif
    This one, runs with the jar, but the images are not in the buttons and I get the Dialog message telling me that there was an error in loadImage. Check that method. I used this dialogs to track the error and the exception it's generated by:
    URL url = getClass().getResource(name);
    in public URL getResource(String key) method.
    2- I also tried to follow the instructions of this article that describes how to get resources from jars:
    http://www.javaworld.com/javaworld/jw-07-1998/jw-07-jar-p2.html
    This is the first page of the article:
    http://www.javaworld.com/javaworld/jw-07-1998/jw-07-jar.html
    And I did something like this:
    /** Inside constructor */
    abrirButton = new JButton(new ImageIcon(getImageFromJAR("Imagenes/open24.gif")));
    /** Inside of my main class */
    public Image getImageFromJAR(String fileName)
               try{
               if( fileName == null ) return null;          
               Image image = null;
               Toolkit toolkit = Toolkit.getDefaultToolkit();          
                image = toolkit.getImage( getClass().getResource(fileName) );           
                return image;
                }catch(Exception exc){
                    JOptionPane.showMessageDialog(new JFrame(), "Exception loading the image","Error",JOptionPane.ERROR_MESSAGE);
                    return null;
    ...The images in this one are in the folder Imagenes inside the folder of my *.class and *.java
    This one work fine in bluej too, but the jar... It doesn't even start.
    3- And the last one.
    abrirButton = new JButton(new ImageIcon(getClass().getResource("Imagenes/open24.gif"));Works fine in bluej, not running in jar.
    Am I doing something wrong? Please somebody help me.
    thanks in advance

    Are you putting the image files inside the jar? If you are, then use "jar tf jarfile.jar" to display the contents of the jar and make sure the files are there and inside the right directory. If you are not, then you can not use getClass().getResource() from a jar file because it will look inside the jar file.
    If you are getting an error message, please post it.

  • CommandAction works through OnDeviceDebug, but not when installed from jar

    Hi everybody,
    I'm trying to run a HelloMIDlet example and if I run it on emulator it works fine, also when I run it on mobile through OnDeviceDebug from eclipse it works fine, but when I install a jar file and run the application it ends with Application Error message and it exits. I found out that the problem might be in the CommandAction method, because when I use this:
    public void commandAction(Command c, Displayable s) {
              notifyDestroyed();
    }then the application works also when installed from jar, but when I use this:
    public void commandAction(Command c, Displayable s) {
       String label = new String("Exit");   //just for test
       if (label.equals("Exit"))
         notifyDestroyed();
    }then it ends with Application Error right after I run the program (and it works when I use OnDeviceDebug). I'm using jdk1.5.0_06 and WTK from Sony Erricsson (my target device is W800i, which supports CLDC1.1 and MIDP2.0)
    My manifest file is
    Manifest-Version: 1.0
    MicroEdition-Configuration: CLDC-1.1
    MIDlet-Name: HelloMIDlet
    Created-By: Sun Microsystems Inc.
    MIDlet-Vendor: Sun Microsystems, Inc.
    MIDlet-1: HelloMIDlet, , HelloMIDlet
    MIDlet-Version: 1.0
    MicroEdition-Profile: MIDP-2.0
    MIDlet-Description: Hello Worldand I don't use the jad file when installing the application (seems to be unecessary when you have a manifest file inside the jar). And I'm unable to debug it because when debugging then it works normally. Also I tried to recompile the BluetoothDemo and the same error(and works through OnDeviceDebug). And when I installed the jar file, which is originally distributed with BluetoothDemo then it worked. When I compared original jar file and my jar file then the only difference was in the size the class files (class files compiled by me were bigger then the class files in original jar file (which work)).
    Any ideas guys and girls?

    I tried that approach but it doesn't work either. I think maybe my directory structure is wrong.
    C:\IRS\IRS.jar
    C:\IRS\irs.hs
    referenced: jar:file://C:/IRS/IRS.jar!/irs.hs
    Am I doing this right?

  • Problem loading Applets from Jar files on 64 bit machine

    I am developing an applet (extends Applet but uses swing components) using JDK 1.6 (Though these problems still happen in JDK 1.7) and I am unable to get the applet to load on a 64 bit machine in most cases. The web server(s) are running on localhost and I am connecting on the same machine using a local network ip address (such as 192.168.*.*)
    Below are all of my test results. Can someone provide a suggestion for repairing this? The Windows Server machine is a clients computer I access to it via remote desktop but I can't do much with it though I do have administrator rights. The Windows 7 machine is my development platform so I have been able to do extensive testing on it.
    This problem is presenting in the following environments when trying to load an applet from JAR files in a HTML document using the Applet or Object tag.
    Windows Server 2008 (Intel Chipset)
    Tested Browsers:
    Internet Explorer 9 (32 bit) - Shows it is blocked by default then simply shows an x when loaded from a web page, same result when loading from local drive.
    Windows 7 Home Premium (AMD Chipset)
    Tested Browsers:
    Firefox 6.0.1 (32 bit) - Java logo shows with spinner, after a few minutes there is finally an error that a class in the jar was not found
    Internet Explorer 9 (32 bit) - Java logo shows with spinner, after a few minutes there is finally an error that a class in the jar was not found
    Internet Explorer 9 (64 bit) - Java logo shows with spinner and most of the windows desktop manager freezes, keyboard is the only thing that responds so you can alt-tab to another app to regain control of the desktop.
    Chrome (32 bit) - Java logo shows with spinner, after a few minutes there is finally an error that a class in the jar was not found
    The only way I have been able to get a Java applet to run on a 64 bit machine are the following ways.
    Firefox 9 nightly (64 bit) works perfectly! Go Firefox!
    Internet Explorer 9 (32 bit) loading directly from drive (c:\...)
    Chrome (32 bit) loading directly from drive (c:\...)
    Firefox 6.0.1 (32 bit) loading directly from drive (c:\....)
    Can someone please help! I've been fighting with this bug for over a week and I can't find anything that will solve it, I have noticed that in some cases if my jar has very little code in it than it will run on the server, but the minute I start adding things to it the jar won't load anymore.

    jschell wrote:
    rritoch wrote:
    I am developing an applet (extends Applet but uses swing components) using JDK 1.6 (Though these problems still happen in JDK 1.7) and I am unable to get the applet to load on a 64 bit machine in most cases.
    To clarify...
    1. You have tried it on 32 bit machine? Exactly which OS?I tested this on Windows Vista Business which is in 32 bit mode and the applets run without any problems
    >
    2. Your only 64 bit tests have involved 2008/Win7?
    If so then I would suspect something with windows not java. Probably permissions.
    The web server(s) are running on localhost and I am connecting on the same machine using a local network ip address (such as 192.168.*.*)
    Yes, I haven't tried running the jars on other operating systems.
    >
    I don't understand that. If you are running on localhost then you should connect to localhost. If running on an IP then you should connect to that. Perhaps you meant that you have tested using both of those?I'm testing using the lan ip address but I'm connecting from the same machine. I've tried localhost and that didn't work so I tried lan ip since that will likely have a different java security context than localhost. At first I was blaming the IIS server but I downloaded the jar directly and using HTTP fox was able to verify that the jar is being sent with the correct mime-type and that the server can upload the jar file without a problem. This leaves me to believe the problem is with Java.

  • How to extract html file and folder from jar file

    Hi all ,
    I should to submit my project tomorrow . plz help me .
    In my project jar file I have html page that should run when I use the program, I can't extract it . Also it have folder that contain some files that My program should use it . I dont know how to use it from jar file or how to extract it . plz help me.
    If you could I need java could for that.
    Thanks alot.

    Hi all ,
    I should to submit my project tomorrow . plz help me .
    In my project jar file I have html page that should run when I use the program, I can't extract it . Also it have folder that contain some files that My program should use it . I dont know how to use it from jar file or how to extract it . plz help me.
    If you could I need java could for that.
    Thanks alot.

  • Please help: Example how to peploy application from jar file step by step

    Please help: Example how to peploy application from jar file step by step.
    All help appreciated
    Mike

    Thanks I will try these links
    Mike
    "Slava Imeshev" <[email protected]> wrote:
    Hi Mike,
    These links could be useful:
    http://e-docs.bea.com/wls/docs61////adminguide/appman.html
    http://e-docs.bea.com/wls/docs61////quickstart/quick_start.html
    http://e-docs.bea.com/wls/docs61//////ConsoleHelp/application.html
    http://e-docs.bea.com/wls/docs61///programming/environment.html
    Regards,
    Slava Imeshev
    "Mike" <[email protected]> wrote in message
    news:3ca0e94c$[email protected]..
    Please help: Example how to peploy application from jar file step bystep.
    All help appreciated
    Mike

  • Reading Images from JAR Files

    Hi,
    I am having a very difficult time being able to read images from a JAR file via my Applet. I have tried everything that I know about with no luck. The only way I can get this to work is to store the images individually in a sub directory of public_html on the websever. This works, but I would like the images to come down in a JAR file for performance reasons.
    I am using Internet Explorer 5.5 for my browser. I checked the options and everything seems to be in order, but......
    I would appreciate any feedback that anyone might have on this topic..........
    Thank You....

    once in a jar file i inserted a image
    the jar file on clicking starts an frame.
    so the image was for getting that image at the icon place at top and at minimized window
    i could not get that image from jar file by new imageicon().getimage();
    but i get the image if it is in the directory in which jar file is.....
    can one explain the reason

  • Strange behavior from a PB G4 (Part 2)

    On to my next issue. Often when I'm typing the insertion point will jump to someplace other than where it should be or just disappear all together. I'm not doing anything to cause it to do this. I've been being really carefull to not to do anything wrong. I'ts often enough to be a real nuisance. It happened 7 times during my first post (Strange behavior from a PB G4) and 3 times during this one. Please help. Thanks.

    Igor_G5 wrote:
    ... I thought about putting in a larger drive but when I looked up instructions for it i was surprized at how difficult it was.
    Did you use the iFixit website? It has excellent pictures and instructions that are easy to follow.
    Replacing any hard disk drive will be challenging for a paraplegic, but with someone's help it can be done fairly inexpensively. There are many tiny fasteners that require tiny tools. Use an egg carton to store them, separated by their location in the PowerBook.
    Earlier PowerBooks are easier to work on than later ones.
    I still use a PowerBook G4 on occasion, mostly for importing video for editing in iMovie. I upgraded its original 60 GB HD to a much larger one. If you were to do this you would need to locate the PowerBook's original System Install DVD to install and subsequently update OS X and all its original programs.
    If you ensure at least a few gigabytes free space, I think most of your problems will be fixed. When free disk space gets down to a few hundred megabytes or less, performance will suffer dramatically. You don't want it to ever get anywhere near that low. Strange things start to happen.
    Keep the number of icons on the Desktop to a minimum also. That makes a difference, for reasons that I do not fully understand.

  • Loading library from jar file

    Hi all,
    My question is can we load library from jar file using System.load() method.
    ex:
    myJar.jar
    |
    |----com.test.common.Util
    which conatins a method to load library from jar file itself, before that i used to load from File
    |---libraries/MozillaParser/......
    Iam able load from Local system,
    File parserLibraryFile = new File("libraries/MozillaParser" + EnviromentController.getSharedLibraryExtension());
    File mozillaDistBinDirectory = new File("libraries/mozilla.dist.bin."+EnviromentController.getOperatingSystemName());
    MozillaParser.init(parserLibraryFile.getAbsolutePath() , mozillaDistBinDirectory.getAbsolutePath());
    but i am unable to load from jar file
    URL url = ClassLoader.getSystemClassLoader().getResource("libraries/MozillaParser" + EnviromentController.getSharedLibraryExtension());
    URL url1 = ClassLoader.getSystemClassLoader().getResource("libraries/mozilla.dist.bin."+EnviromentController.getOperatingSystemName());
    MozillaParser.init(url.toString(), url1.toString());
    Thanks in advance.

    That's a really confusing post.
    The easiest way to make sure you can use the classes in a jar file is to copy the jar file to the "/jre/lib/ext" subfolder of your JDK. These classes will be visible to all applications.

  • Unable to read TLD "META-INF/jsf_core.tld" from JAR file "file:

    Hallo everybody :-)<br /><br />i've installed Workflow-Server + ARES + FormManager. When i call localhost:8080/adminui i can log in and the browser loads the next site --> it fails and says:<br /><br />org.apache.jasper.JasperException: Unable to read TLD "META-INF/jsf_core.tld" from JAR file "file:/C:/Adobe/LiveCycle/jboss/server/all/tmp/deploy/tmp56414LiveCycle.ear-contents/admi nui.war/WEB-INF/lib/jsf-impl.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: com.sun.faces.taglib.FacesTagExtraInfo<br />     org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:5 0)<br />     org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)<br />     org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:183)<br />     org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:181)< br />     org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)<br />     org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)<br />     org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)<br />     org.apache.jasper.compiler.Parser.parse(Parser.java:126)<br />     org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)<br />     org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)<br />     org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)<br />     org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)<br />     org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)<br />     org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)<br />     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)<br />     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)<br />     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)<br />     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)<br />     javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />     com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)<b r />     com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)<br />     com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)<b r />     com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)<br />     com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)<br />     javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)<br />     com.adobe.framework.SecurityFilter.doFilter(SecurityFilter.java:177)<br />     com.adobe.idp.um.auth.filter.PortalSSOFilter.doFilter(PortalSSOFilter.java:106)<br />     com.adobe.framework.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter .java:161)<br /><br />Any idea what' wrong?<br /><br />Thanks,<br />Valerio

    Hi Howard,
    thank you for your post.
    I actually new about the problems with the jvm version. Still i wanted to ask, cause there are different reports on this `java problems` and even though the 1.4.2_08 seems to be the best version (by the way this version is not to be downloaded any longer *sig*), there are people getting all installed with other versions. I couldn't find any regularity in the misbehavior of the servers while installing.
    I finally achieved and got everything working ... but very slow. Loading the adminui or BAM features takes very long time (over one minute). Have you already had this delay. Any hint?
    Thanks again,
    Valerio

  • Problem loading image from jar file referenced by jar file

    First, I searched this one and no, I didn't find an answer. Loading images from jar files has been pretty much done to death but my problem is different. Please read on.
    I have my application, a straight up executable running from Eclipse. It uses a jar file, call it JarA. JarA launches a GUI that is located in another jar file. Call it JarB. To recap:
    My application calls JarA -> JarA loads classes from JarB -> JarB looks for images to place in a GUI it wants to show on the screen
    When JarB goes to load an image the following happens:
    java.lang.NullPointerException
         at sun.misc.URLClassPath$3.run(URLClassPath.java:316)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath.getLoader(URLClassPath.java:313)
         at sun.misc.URLClassPath.getLoader(URLClassPath.java:290)
         at sun.misc.URLClassPath.findResource(URLClassPath.java:141)
         at java.net.URLClassLoader$2.run(URLClassLoader.java:362)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findResource(URLClassLoader.java:359)
         at java.lang.ClassLoader.getResource(ClassLoader.java:977)
         at org.cubrc.gmshell.gui.MainWin.preInit(MainWin.java:152)
         at org.cubrc.gmshell.gui.MainWin.<init>(MainWin.java:135)
    The code from JarB that loads the image looks like this:
              URL[] oSearch = {Main.class.getResource("images/")};
              URLClassLoader oLoader = new URLClassLoader(oSearch);
              imgIcon = new ImageIcon(oLoader.getResource("icon.gif"));
              imgMatchRunning = new ImageIcon(oLoader.getResource("gears.gif"));
              imgMatchStill = new ImageIcon(oLoader.getResource("gears-still.gif"));
              imgMagnify = new ImageIcon(oLoader.getResource("magnify.gif"));This looks right to me and JarB certainly has an images directory with those files. But I'm in hell right now because I don't know where to place the images to make this work or if you can even attempt to load images with a dependency chain like this.
    Any help very appreciated!

    Have you tried to move your image-files out of the jar file and place them in the sam folder as the jar-file? I think that would help.
    When you try to load the image-file you get the NullPointerException because the program tries to read a file it can't find. Remember that a jar file IS a file and not a directory.
    If you want to read somthing inside the jar-file you need to encode it first.
    Have you tried to read the jar-file with winRar. It makes it easy to add and remove files in your jar-file.

  • Loading images from jar

    Found a good solution that works from running in command line, i.e java -jar or normally or using web start and not getting missing image URL loading from jar
    It deserves some dukes :) Also, someone can improve on it to make sure it's 100%
    Asume the function is in a package AWTUtilities class
    Many forums provide close solution but they all forget the vital replacing back slash with forward slash when reading from jar!! :)
    That's what got me stump for a good day trying to figure why it should load the images, but it's not...
    Regards
    Abraham Khalil
       // The subtlety in getResource() is that it uses the
       // Class loader of the class used to get the rousource.
       // This means that if you want to load a resource from
       // your JAR file, then you better use a class in the
       // JAR file.
       public static Image getImageResource( String name ) throws java.io.IOException {
          return getImageResource( AWTUtilities.class, name );
       public static Image getImageResource(Class base, String name ) throws java.io.IOException {
          if (name != null) {
             Image result = null;
             // A must, else won't pick the path properly within the jar!!
             // For file system forward or backward slash is not an issue
             name = name.replace('\\', '/');
             // For loading from file system using getResource via base class
             URL imageURL = base.getResource( name );
             // For loading from jar starting from root path using getResource via base class
             if (imageURL == null) {
                imageURL = base.getResource("/" + name );
             // For loading from file system using getSystemResource
             if (imageURL == null) {
                imageURL = ClassLoader.getSystemResource( name );
             // For loading from jar starting from root path using getSystemResource
             if (imageURL == null) {
                imageURL = ClassLoader.getSystemResource("/" + name );
             // Found the image url? If so, create the image and return it...
             if ( imageURL != null ) {
                Toolkit tk = Toolkit.getDefaultToolkit();
                result = tk.createImage( (ImageProducer) imageURL.getContent() );
             return result;
          else {
             return null;

    The problem is that you use the wrong classloader. The system default classloader is the one that launched the webstart utility. It doesn't contain your classes or jars. You have to get hold of the classloader for your classes.
    Here's my solution as a schetch: probably it won't compile but you get the idea:
    // 1: get hold of the classloader for my classes:
    // - this class cannot possibly be loaded by anyone else:
    Object dummy = new Object(){
    public String toString() { return super.toString(); }
    ClassLoader cl = dummy.getClass().getClassLoader();
    // 2: get an inputstream to read resource from from jar:
    InputStream is = cl.getResourceAsStream("images/myimage.gif");
    // 3: create image from inputstream
    // can be done in many different ways using tmp-files etc.
    ImageIcon icon = new ImageIcon(is);
    Image img = icon.getImage();

Maybe you are looking for

  • HP Smart Web Printing 4.6 Error Message

    I am running Windows 7 Professional, 64 bit, and IE9.  I have downloaded and installed HP Smart Web Printing, Version 4.6, but it will not work.  The popup error message I get reads: "HP Smart Web Printing must be updated to run on this browser.  Wou

  • Long time to load and cannot change homepage

    I live in France and my ISP is Orange. I have a LIVEBOX 2 and have used Orange for the last year and a half. Up until a few days ago, Forefox only took about 10 seconds to load to my homepage which was www.google.co.uk A few days ago, Firefox took ab

  • Lack of features in Austria

    Hello, does anybody know why so many features are missing on iOS6 in Austria, although they are available in other German speaking countries e.g. Germany or Switzerland? Regards, Daniel

  • File associations lost from ftp servers

    Whenever I move files to an ftp server, the file associations are lost if there are no extensions on those files. Mac OSX knew what it was when I put it on the server but when it comes back, finder has no idea what to do with it. I.e. a quicktime doc

  • Stock Transport Order without Delivery or any customer

    Hi Error: Not possible to determine shipping data for material I am trying to create an STO (me21n) for plant to plant transfer of stocks within one company code (intra compnay). I do not have any customer or shipping/delivery details. This should be