Home made classLoader not being able to load properties files

Well, I need to use my own class loader to load some class dynamically. My own class loader works wonder... except when some library that I use try to load their property files from their jar library.
My class loader overrides findClass and receives the classes (or files) names of the binaries to load in the following format: net.sourceforge.jtds.jdbc.Messages
It loads fine the class Messages.class but it seems like the library I use also wants to load Messages.properties and fails doing so with the following message
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: No message resource found for message property prop.servertype
     at net.sourceforge.jtds.jdbc.Messages.get(Messages.java:120)
     at net.sourceforge.jtds.jdbc.Messages.get(Messages.java:67)
     at net.sourceforge.jtds.jdbc.Driver.parseURL(Driver.java:375)
     at net.sourceforge.jtds.jdbc.Driver.setupConnectProperties(Driver.java:240)
     at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:179)
     at java.sql.DriverManager.getConnection(Unknown Source)
I know it tried to load a property file because my class loader receives calls to findClass with the following parameter:
- once with: net.sourceforge.jtds.jdbc.Messages_en_US
- and once with: net.sourceforge.jtds.jdbc.Messages_en
which are the way Java.util.RessourceBundle loads its property files depending of the Localisation setting of your computer. Plus, I have verifyed the jar source and it is exactly what it is doing.
When I use the default class loader, it works fine.
How can I build my own class loader in order that the RessourceBundle loader also works???
Please! If you know anything about it let me know because I've been on the subject for a while now and so far, no luck!
Thanks

I have found the answer... as described in:
http://java.sun.com/javase/6/docs/technotes/guides/lang/resources.html
the problem was that the properties are loaded with the getResource & getResourceAsStream methods and I didn't knew that one. I thought that is was loaded through findClass because I saw the property files trying to be loaded through findClass.
The truth is that it tries to load with the getRessources methods and if it fails tries with the findClass/loadClass.
To Fix the problem, I have simply overriden the getRessourceAsStream to do my magic and that was it.
Thanks

Similar Messages

  • My daughter accidentally deleted her texting app off of her i-pod 4th generation.  Is there a way to get it back?  Or, is the there a way to re-install or install a new one.  The issue seems to be not being able to load a newer ios.

    My daughter accidentally deleted her texting app off of her i-pod 4th generation.  Is there a way to get it back?  Or, is the there a way to re-install or install a new one.  The issue seems to be not being able to load a newer ios.

    Hello rkoslosky,
    Welcome to the Apple Support Communities!
    I understand that you are not able to locate the Messages application on your daughters iPod touch (4th generation). The good news is that this application cannot be deleted or restricted. The first suggestion I have is to try and search for Messages using Spotlight to search the iPod touch for this application. If Messages is located in Spotlight, then it has probably been moved to a different page of applications or even possibly a folder of applications on the device. Searching all pages will help you locate it. 
    Search with Spotlight - Apple Support
    Have a great day,
    Joe

  • Have you fixed, in Firefox 5, the problem that existed in Firefox 4 with not being able to view PDF files?

    In Firefox 4 you had a bug that did not allow the viewing of PDF files. I see that you just released Firefox 5. Did Firefox 5 fix that problem?

    Firefox does not intrinsically support PDF documents and never has. If you want to be able to read PDF documents within the context of the browser itself, install Adobe Reader. It will install a Firefox-compatible plugin intended for that purpose.
    [http://www.filehippo.com/download_adobe_reader/ http://www.filehippo.com/download_adobe_reader/]
    Once Adobe Reader is installed, you can verify that the plugin is active by typing about:plugins into the address bar, followed by ENTER. You should find Adobe's plugin among the list shown.
    If there is no plugin registered to handle PDF documents then Firefox will not attempt to display them. Instead, they are treated as an ordinary download and it's up to you to have an application installed that is capable of opening them in Windows.
    So, you can use other PDF reader applications but, as far as I'm aware, none of them install a plugin that allows you to read a PDF directly in the browser window. If that's what you want, use Adobe Reader. The version of Firefox shouldn't matter.

  • Firefox 4 beta on my and another system ended up not being able to load certain web sites ie igoogle so went back to 3.6 has anyone else had the same problem

    firefox 4 beta ended up on certain web sites grinding to a halt then stopped responding igoogle is a prime example firefox 3.6 is fine with the web site it was not doing it till the 12th beta version and its happened on two systems so im not alone its resulted in me removing firefox 4 and i will wait until its officially released

    Although FF4 is so nice I'm almost ready to ditch iGoogle!
    Please fix what appears to be an RSS/iGoogle issue with FF4...
    Gmail is fine, but titles dont show in most RSS feed gadgets and no stories, strangely, apart from this one:
    http://www.google.com.au/ig/directory?hl=en&url=www.google.com/ig/modules/builtin_news_technology.xml
    Which if you enter the last part of the url reports that
    "<Content type="html">
    This is a builtin module, so the UserPrefs and Content are ignored."
    Any ideas?

  • TS1717 OK.  Ari tried to help me with the problem of not being able to load/use itunes onto a Windows 7 OS.  I thought that I was replying to her/him.  Do you have a solution or a help phone number I can call for this problem.

    Does anyone know how to contact a person a apple for help with loading itunes onto a windows 7 OS so that I can update my IPOD?

    You probably need to reply to the thread below.
    https://discussions.apple.com/message/23980460#23980460

  • Mathscript node errors due to not being able to find .m files

    I recently installed LV 8.5.1 and tried to open a VI with a mathscript node (originally created with LV 8.2).  It got a broken arrow due to an unrecognized symbol in the node which was the name of a matscript function in a .m file of the same name.  And this worked fine with 8.2.  I updated the mathscript: search paths 'Working Directory' both in the mathscript window and the main app Tools->Options list.  I exited and re-started, but to no avail.  And I made sure to add it as a 'recursive' search folder, even though my file is right at the top.
    What am I doing wrong?

    Hello Umars,
    In LabVIEW 8.5 you won't be able to use user defined functions if you are you using a Base Package.  Regardless of which package you are using you may find the LabVIEW help file informative.
    Calling User-Defined Functions from LabVIEW MathScript (Windows, Not in Base Package)
    http://zone.ni.com/reference/en-XX/help/371361D-01/lvconcepts/calling_udf/ 
    David A
    National Instruments
    FlexRIO Product Support Engineer

  • Not being able to save song file?

    Today I ran into a situation with Logic which has happened to me 3 - 4 times in the last 12 months..I'll be working on a song, for hours, and then I lose the ability to save the song.. I hit 'save as' command. The save window opens up, and Logic hangs.. The 'save' button is flashing, but nothing will work.. I can move other Logic windows around, (arrange page, score page, etc).. But none of them will close. The only thing I can do is force quit.. You cannot play the song either.. All you can do is force quit.. Other applications are running fine.. I ran disk utilities, everything was fine..
    If I look at application manager, Logic is not hanging up.. This has happened to me a few times in the last year.. I usually just back up to one earlier version, and rebuild... This happened twice today, after opening an earlier version, it too, stopped saving after an hour or so..
    I opened the last salvageable version, and exported all midi tracks one by one, and two audio files..
    I then opened a new project and imported files in.. so far so good..
    Has anyone else run into this problem?

    Yes, I have exactly the same problem, and there are a lot of other users ( see topics at logicuser.de if you speak german ).
    In my case it´s so often on some projects that it´s almost impossible to work.
    Some say it could be a problem with external or bad harddisks. But I´m running audio on two internal brand new HDs, so I don´t believe this.
    This could help sometimes :
    - when it happens, immediatly delete the undo list. most of the times this gives you a "last chance" to see what you´ve done in the song, write things down, export important tracks, then try to save under a different name. But most of the times this saved version doesn´t contain the changes you made after the problem occured, even if Logic is running and seems to save the song.
    - try to save the song as a template ( "Save as Template..." under "file" ). This helped some users, in my case it failed.
    I have the feeling that these bugs occur when you´re working with huge audiofiles ( nothing very huge, just a few tracks around 5 minutes, something every Audiosoftware should handle with ease ) and do a lot of edits and fades. Drum editing for live drums on 12 or more tracks is almost impossible. Logic 5/6 on G4 handled projects a lot bigger than that without any problems !
    Also drag and drop several huge audiofiles from the media list into the arrange window causes crashes.
    Just started a very small project with 5 audio tracks of 4-7 minutes each track last week - nothing else. Even this project is hard to handle because of graphic bugs. Zooming in and out shows the song position pointer on a different position than the one I´m playing back.
    I´m VERY frustrated with Logic in the moment. It´s NOT possible to work professionally anymore.
    I´m sweating when I have clients in the studio : how many crashed will we experience ? will we loose edits we´ve done ?
    Looks like Apple´s just focuing on people who play back apple loops. There was NO innovation since Apple bought Logic from Emagic, there are NO MORE updates, at least with bug fixes. In times of Emagic we had updates with bug fixes every few months, and we had most of the times a stable version. The last Logic update 8.0.2 is from May 2008 ! Over 1 year !
    Have they stopped the development ?
    When will we get an 64 version ?
    I´m on a 64bit 8core system for over a year now and was so naive to think : if I bought a 64bit G5 Apple will come up with a 64bit version for Logic in a few months.
    But the most annoying thing is : WHEN WILL WE GET A STABLE UPDATE that will allow us to do the most basic things for an Pro Audio application : recording and editing a few audio tracks ???
    I would have switched long ago to Nuendo if there would be a convenient way to work with my EXS library that I developped over the years.
    best regards,
    ghanimist

  • Not being able to create TDMS file and write to it

    I m new to labview and lately i have been trying to code a RT vi which allows me create a TDMS file and write into it. I have seen a couple of examples on web. and this is what i implemented (refer the snippet i attached) after going through them.
    Now the problem is, there is no file being created on my desktop. I dont understand what is wrong. I may be missing some simple part. Please help me to figure it out
    Solved!
    Go to Solution.
    Attachments:
    RT_write to TDMS.PNG ‏10 KB

    Hi Rex,
    usually "RT targets" are NOT capable of accessing your Windows PC desktop as they are computers of their own…
    Write to the RT storage and copy the files created there using FTP to your PC!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Is there a solution to Adobe Bridge CS6 not being able to read raw files from the 5D Mk lll

    I like to use Bridge as my overall file organizer.  I operate on a Mac version OSX version 10.8.3 and cannot read my raw files in bridge cs6.  Does anyone have a solution for this.  
    Also is Canon putting any pressure on Adobe to fix this?

    Not bridge but camera raw. You'll need to update your camera RAW.
    You can either do it directly in Photoshop, or you can download it here: http://blogs.adobe.com/crawlspace/2011/03/keeping-photoshop-up-to-date.html
    At the bottom, there is a link to download Camera Raw 7.4 for Mac and WIndows. Adobe hides there link from their main site to force people to update via Photoshop update feature.
    Weekend Travelers Blog | Eastern Sierra Fall Color Guide

  • Not being able get a pdf file to print off on eprinter

    we have just installed an eprinter in our office its connected to the next work etc no jams etc. We have printed some pdf documents off this printer with no problems. but when we goto print a certain pdf document off from our customer it will not print although i can print the same document to their printer in manchester.
    is there something im missing and need to check settings wise , the printer is free for everyone to print too and is not blocked or jammed.
    any ideas anyone cheers
    eprinter hplaser jet pro 400 m401 dne 

    Hi keiron0070
    I suspect your question would be better answered in the HP Enterprise Business Community,  as the HP LaserJet Pro 400 Printer M401 series is a commercial model.
    My technical expertise is with consumer products and software, I am sure the commercial folks would be happy to help if you re-post your question for them to answer. The HP Enterprise Business Community is an HP Forum designed for the Commercial and Enterprise customers to help one another. I am sure you will find some HP folks there to help too.
    Click here to log into the commercial forum > HP Enterprise Business Community
    Best of luck.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Anyone know how to fix problem of not being able to import RAW files of Nikon D800 to Lightroom 5.2?

    Hi there, am failing miserably to import NIKON D800 RAW files into Lightroom, have updated to version 5.2 which Adobe website says is compatible, but still no luck. Can import PDF files of Nikon D800, and my RAW files are fully accessible via Nikon proprietary software such as ViewNX2 and Capture NX2. Have Microsoft OS Windows 7 (if that helps..). Anyone any idea how to fix this problem? Grateful for any ideas, Ruud

    Dear Jim, you have set me on the right track, thanks! I have updated my Nikon View NX 2 software (which includes the transfer software from camera to hard disk) and this has done the trick. Many thanks, also to Keith for showing interest in my problem. Downside remains that the files previously loaded with the old software remain 'un-importable', so if anyone still has a good tip how to try and correct that...
    .. all ideas are welcome!!
    But as said, many thanks for helping me solve the issue for future downloads
    Ruud

  • Can not sync files due to itunes not being able to find orginal file

    I have purchased these songs and video from apple on previous computer and have not had trouble until recently I believe it occured when i went to ver. 9. I have a touch and nano and these files that are on touch will not go to nano. I am afraid i will lose these if something happens to touch. It says it wil not sync with the touch also on 100 songs.

    Was the iPod previous synced to another iTunes library/computer?
    Have you successfully synced from this iTunes library/computer before?
    Do the songs play in iTunes?
    Do you have the right boxes checked to sync?
    iTunes: Syncing media content to iOS devices and iPod        
    Do you have any Restrictions (Settings>General>Restrictions) set that would prevent syncing those songs?

  • Camera Raw in Photoshop, sudenly not being able to parse the file...

    Suddenly when opening a group of RAW files from Bridge, after several successful adjustments on similar files, CR/PS will crash & freeze the system.  Have to use Task manager to reboot.  Have had no such probems in years of similar activities, the RAW files from long-supported cameras (.NEF and .RAW images).  Have tried deleting the cache, even unistalled and reinstalled PS, to no more then very temporary success (which may have been no more thatn the intermittent iccurrence that had been happening originally).  Have the latest editions updated of PS5, lots of memory, Win 7, 64-bit.
    Any ideas or suggestions?
    Thanks,
    Steve Goldblatt

    Have tried deleting the cache, even unistalled and reinstalled PS, to no more then very temporary success (which may have been no more thatn the intermittent iccurrence
    Paintball Aberdeen

  • N800 not being able to run WAV files

    I recently got a N800 and downloaded the latest operating system last week. I also am using Gizmo (VOIP) where I have my voice messages recorded and mailed to my e-mail account. These voice mail files are in .wav format and the N800 manual says that they could be read/heard but I keep getting the message on the N800 that the file is unsupported. Any ideas?

    Are you sure it supports WAV format?

  • I game on steam, and recently I went to go play garry's mod, (note i just upgraded to os x mavericks) and it said something about not being able to find the files, or not being able to start garry's mod.

    So, I really play gmod alot, so im really frustrated about this. Does anyone have a patch or something for this?

    Contact gmod's developer.

Maybe you are looking for