Having problem loading resource file in WAR

Forgive me to post it here, I'm not sure where I should post this question.
          I'm using weblogic 5.1 with sp 9. In an WAR file, I put an resource file
          myapp.dtd as the follwoing:
          WEB-INF/classes/myapp.dtd
          WEB-INF/classes/mypackage/MyHello.class
          In MyHello.java, I'm loading myapp.dtd using an absolute path:
          getClass().getResourceAsStream("/myapp.dtd")
          This fails and returns null.
          However, if I put myapp.dtd in the same directory as MyHello.class
          WEB-INF/classes/mypackage/myapp.dtd
          WEB-INF/classes/mypackage/MyHello.class
          and use a relative path:
          getClass().getResourceAsStream("myapp.dtd")
          This sucessfully load the resource file.
          Does anyone know the problem with the first approach? Thanks.
          -gecko
          

A correction, both approaches seem to fail if I deploy it in a WAR file.
          However, both of them succeeded if I deploy it as an exploded WAR file. So
          the problem is not absolute path v.s. relative path. It is a problem in
          weblogic class loader's handling of WAR file. I think this is clearly a bug
          in weblogic.
          "gecko" <[email protected]> wrote in message
          news:3b8fc81f$[email protected]..
          > Forgive me to post it here, I'm not sure where I should post this
          question.
          >
          > I'm using weblogic 5.1 with sp 9. In an WAR file, I put an resource file
          > myapp.dtd as the follwoing:
          >
          > WEB-INF/classes/myapp.dtd
          > WEB-INF/classes/mypackage/MyHello.class
          > ...
          >
          > In MyHello.java, I'm loading myapp.dtd using an absolute path:
          >
          > getClass().getResourceAsStream("/myapp.dtd")
          >
          > This fails and returns null.
          >
          > However, if I put myapp.dtd in the same directory as MyHello.class
          >
          > WEB-INF/classes/mypackage/myapp.dtd
          > WEB-INF/classes/mypackage/MyHello.class
          >
          > and use a relative path:
          >
          > getClass().getResourceAsStream("myapp.dtd")
          >
          > This sucessfully load the resource file.
          >
          > Does anyone know the problem with the first approach? Thanks.
          >
          > -gecko
          >
          >
          >
          

Similar Messages

  • Problem loading resources file in JSP using f:loadBundle

    Hi,
    We are facing problem while loading our properties file in JSP using f:loadBundle.we tried the following way
    <f:loadBundle basename="resources.ApplicationResource" var="msg"/>
    This properties file is src java folder and also in WEB-INF-->classes->resources folder
    but even then its not able to load.I made an entry in the faces-config for message-bundle. But of no use.
    Any pointers would be of great help.

    does your file calls
    ApplicationResource.properties ?
    If so is it in
    the package resources ?

  • Firefox cannot be closed; the following message appears: "Can't load resource file, can not run". How to solve this problem; I am using Windows XP SP3

    Whwn I want to close Firefox 9.x , a pop-up appears with the message: "Can't load resource file ......" . First I have to close this pop-up, then Firefox is closed. Also with other versions of Firefox I had this problem.

    i deleted the rdf and now the first window only (and any tabs in it) are maximised. i found this in the rdf
    <RDF:Description RDF:about="chrome://browser/content/browser.xul#main-window"
    screenX="4"
    screenY="4"
    width="1008"
    height="461"
    sizemode="Normal" />
    i tried changing normal to maximised; no effect. either i need also to change the numbers (to match a maximised window) or ff ignores this. i want to be able to open different sites in different windows, and not have to maximise them manually. ff never used to be broken, why break this? what possible security flaw was fixed by screwing up ff to never open maximised unless u hack it or delete certain config files?

  • TS3212 Is anyone else having problems loading the newest version of iTunes (10.6.3) on Windows?

    Is anyone having problems loading the newest version of iTunes (10.6.3) using Windows Vista? My current iTunes program version 10.6.1 keeps telling me there is an update but when I try to load it the information box goes away and nothing happens.  I have tried downloading the new version from Apple web site but it brings up a warning screen of " iTunes setup.exe is not commonly downloaded and could harm your computer." I select the action of run anyway and get the next error "iTunes Setup.exe is not a valid Win32 application."  What Gives?

    I select the action of run anyway and get the next error "iTunes Setup.exe is not a valid Win32 application."
    In the course of your troubleshooting to date have you worked through the following document?
    iTunes: Windows reports that "iTunesSetup.exe is not a valid Win32 application"

  • I am having problems viewing CR2 files

    Hi,
    I using windows xp service pack3. I used before about 2 years and I never had problems, but now when I uninstall adobe photoshop cs5  because I could not see CR2 files in adobe bridge I tried install again about 3 times and unsuccessful, could you help me please.
    Kind Regards
    Vygis
    Date: Tue, 12 Jun 2012 16:55:49 -0600
    From: [email protected]
    To: [email address removed by host]
    Subject: I am having problems viewing CR2 files Installing Adobe Photoshop cs5
    Re: Installing Adobe Photoshop cs5 created by Jeff A Wright in Downloading, Installing, Setting Up - View the full discussion
    Were you experiencing this message prior to removing Photoshop CS5 Extended?  If not what prompted you to reinstall?  Finally what version of Windows are you using?
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Re: Installing Adobe Photoshop cs5
    To unsubscribe from this thread, please visit the message page at Re: Installing Adobe Photoshop cs5. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Downloading, Installing, Setting Up by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

    Are you receiving an error when installing or are you unable to view your CR2 files once Photoshop is installed?

  • Latest version of Firefox is having problems loading sites, it tries to load to Google Analytics. No error messages, just a page that won't load. How do I stop this?

    Latest version of Firefox is having problems loading some sites, it tries to load and then gets taken over trying to load Google Analytics. No error messages, just a page that won't load. How do I get rid of this, it is a "pain in the neck"
    == URL of affected sites ==
    http://

    I just spent 3 days with this issue as well. I finally fixed it by reluctantly adding yet another add-on called ADBLOCK
    I was able to selectively block google-analytics. Now pages that weren't loading before are now loading.
    eg vimeo.com starbucks.com & other random sites.
    This was a tough one to fix because there is NO ERROR MESSAGE..page just shows it's loading...forever..& the bottom of my browser says 'waiting for google analytics'. I finally figured out google analytics is the culprit. Ironically, some help pages in trying to find a fix wouldn't load for me due to google analytics arghhh!
    Im on a macbookpro & Safari worked fine for these same sites. It was just Firefox. I nearly switched back to Safari because of this stupid issue.
    I'm wondering if this was caused by recent firefox 'updates'...

  • Problems loading RAW files from Canon 6D in Elements 10

    Elements 10 - Windows: I have been using the software for a couple of years and never had a problem loading RAW files from my Canon T2i ir 60D, however I just purchased a Canon 6D and when I try to load a RAW from the 6D I get Cannot open 'C:\User...CR2' because it is the wrong type of file.  I thought cameraraw 6.5 patch would be the fix but when trying to install I get "Error loading Updater workflow"

    Will the DNG files perform the same, meaning will I retain all the information that makes RAW important for processing?
    Yes. That's why DNGs were invented. Adobe has put a lot of work into the DNG format for this very reason.
    Raw files are proprietary and manufacturer specific. Raw formats change with every make and model of camera. Software must be updated for the new Raw format of every single camera. Adobe does an admirable job of upgrading Camera Raw for every new camera.
    DNG is also a Raw format but it's open source and works in any software which can read the DNG format. If camera manufacturers used the DNG format instead of their own Raw format, you would not have to upgrade Elements 10. But they don't, and probably never will, so you must upgrade the Camera Raw plugin (and therefore Elements 10 since it's not compatible with the new Camera Raw) to read the new Raw format from the 6D or add another step to your workflow with conversion to DNG first.
    See
    http://photographylife.com/dng-vs-raw
    http://www.adobe.com/products/photoshop/extend.displayTab2.html

  • I am having problems creating PDF file and downloading them

    I am having problems creating PDF file and downloading them

    Hi Randy Keil,
    You might need to sign up with your Adobe ID and password at "https://cloud.acrobat.com/convertpdf"
    Then you can choose the desired files to create the PDF.
    Now, let me know what error message do you get while doing the same.
    What kind of files are you trying to convert to PDF?
    Have you checked with your internet connection and tried using a different browser?
    Hope to get your response.
    Regards,
    Anubha

  • Im having problems importing prores files at correct frame rate

    im having problems importing prores files at correct frame rate. they have been converted to prores at 25fps but on importing they appear in fcp as 30fps. any help would be appreciated.

    I don't know anything about Wondershare. But it seems something may have got messed up in the conversion. Or maybe there is an identifier on the converted clip that has FCP confused and it really is 25 fps.
    To begin, your sequence settings don't match your clips. You want a Pro Res sequence. Let FCP set this automatically by dragging a Pro Res to an empty sequence and when gives you a message asking whether you want the sequence to match the clips, click yes. Then hit command 0 again and see whether the frame rate is set at 30 or 25.
    If it really is 30, then it will need to be converted and re-imported. It can be done in Compressor or in Cinema Tools. If you have used Cinema Tools before, great. Of not, I'll defer to others because it's been a while and I don't want to mess you up.
    Good luck.
    Russ

  • I am having problems using mov files imported into a project. I get the message "Not rendered" in the Canvas and clip won't play. Can anyone help?

    I am having problems using mov files imported into a project. I get the message "Not rendered" in the Canvas and clip won't play. Can anyone help?

    When clips won't play without rendering in the Timeline, it usually means that the clip's specs don't match the Sequence settings.
    A .mov file could be made from any number of codecs; the QuickTime Movie designation is merely a container for video files of all kinds.  Since FCE only works with the QuickTime DV codec and the Apple Intermediate Codec (AIC) natively, if your mov files aren't one of those two, you need to convert them PRIOR to importing into your FCE project.
    -DH

  • I just stared having problems with importing files from nikon D810 into LR 5.7 it pop a window saying it can not read files on working on a imac 27" running yosemite on my mac pro after a few times it finally was able to read files and import them into LR

    I just stared having problems with importing files from nikon D810 into LR 5.7 it pop a window saying it can not read files on working on a imac 27" running yosemite on my mac pro after a few times it finally was able to read files and import them into LR I never had this problem before was there some kind of update that could of cause this?

  • Problems loading raw files from Nikon D750 to lightroom4

    problems loading raw files from Nikon D750 to lightroom4. Any thoughts?

    This is a recently produced model so raw support was only added in LR 5.7 / ACR 8.7, updates to LR 4 ceased about two years ago when LR 5 was issued.
    Options a.) Upgrade to LR 5.
    b.) Utilize the latest Adobe DNG Converter 8.8 to convert the nef files to dng format then you will be able to import the dng files into LR 4.

  • Failed to load resource file sqlcmd.rll- during EHP1 installation

    Hello all,
    We are installing EHP1 on Netweaver with MSSQL server 2005 SP2
    I am getting the error
    failed to load resource file sqlcmd.rll
    Please help
    Rohit

    It's always helpful to give as much information as possible when asking question. You did e. g. not specify
    - in which phase/when this error occurs
    - where this error message is coming
    - what has been done prior to this
    etc.
    so everything leading to answers could only be wild guesses such as "are the harddisks all mounted and available in the resource groups" or "search the filesystem for that DLL" etc.
    All we know is that "a DLL is missing".
    Markus

  • Safari is having problem loading messages in gmail. When using other browsers, there is no problem loading and viewing the messages. What is going on? please help!

    safari is having problem loading messages in gmail. When using other browsers, there is no problem loading and viewing the messages. What is going on? please help!

    I should have explained further. The game opens in a new window over to the upper left of my screen, leaving the original page underneath. I tried minimizing it so that I could get to my toolbar and did the View > Zoom > Reset. This has no effect. The lower portion of the game is still not showing. Using other browsers the window or frame of the game is much larger, therefore everything shows.

  • Lately when I access Optum Rx it mbegins to load but I get firefox having problem loading page

    Lately when I access Optum Rx I log in and it begins to download the I receive message firefox having problem loading page, why?

    Update your Firefox to latest version of Firefox 20.0.1
    Hello,
    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

Maybe you are looking for

  • Problems deploying VS 2005 Web Site with Crystal Reports

    If it's not one assembly reported missing, it's another. Runs fine on my local machine, but can't deploy to a test environment on my company's server. How can I force crystal to install everything on the server that is needed so that my clients (end

  • Broken xperia z 2 screen while cleaning

    I bought a xperia z 2 just a week ago and now the touch screen cracked while I was cleaning the glass. How is that even possible? It cracked as if I poured hot water in a layer of ice. Now that I went to claim the warranty to the mobile company. they

  • Listener not getting started

    Hello, I am using Oracle Database 10G and Windows Vista. I am trying to start my listener but it is not getting started. When I looked at the error message. It says TNS-12560: TNS:protocol adapter error TNS-00511: No listener 32-bit Windows Error: 2:

  • Clearing a Chart/Grap​h programati​cally

    Hello, Is there a way to clear a graph or chart at the time the program starts. I have looked at the attribute node values but there is nothing I can see that would do this. The problem is when I restart the program the charts x axis keeps growing an

  • Inability to run VIs in more than one sub panel

    Hello, I have a VI that contains a tab control with 8 tabs. Under each tab, I have placed a sub panel. I need to a separate VI in each sub panel simultaneously. Using Open VI reference function and without any options,I have Invoked Nodes to Run VI a