Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8933513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:33:28+00:00 2026-06-15T09:33:28+00:00

i got a problem with my .properties-files in an EAR project. I already checked

  • 0

i got a problem with my .properties-files in an EAR project.
I already checked some topics on this issue at svf as well as on other boards.

I use properties file for a Util in my EJB-Project, but i can’t access them.
Refering to a post in a jboss-forum i already tried to put them under META-INF in the EAR-Project and EarContent/lib/classes/ .. sadly it didn’t work.
I still get this error:

SEVERE: java.util.MissingResourceException: Can’t find bundle for base
name credentials, locale en_US at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1499)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1322)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:724) at
com.lumen.Utils.PropsUtil.loadProperties(PropsUtil.java:50)

I try do access the props-file via:
Line 50:
ResourceBundle rb = ResourceBundle.getBundle("credentials");

My Project Structure looks like this:

EAR

->EarContent

–>lib

—> someexternallibs.jar

—>classes

—->*.properties

->META-INF

–>*.properties

–>application.xml

EJB

->src

–>package.package.Util <– here i need to load the properties

Web <– Here i don’t need the properties at all

->src

->WebContent

Add Info: I use eclipse for development, the rest of the project is working so fine so far.

Hope you can help me 🙂

GreeZ ZuSe

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:33:29+00:00Added an answer on June 15, 2026 at 9:33 am

    A classes folder is not allowed in a EAR structure.

    So, firstly you should pack your resources in a jar file, either one already existing or a dedicated one in the lib folder.

    Another issue arises regarding the classloader hierarchy if you use the simple:

    ResourceBundle.getBundle(String)
    

    The correct way to call classloader related methods in presence of multiple classloaders is by specifying the current context classloader as in:

    ResourceBundle.getBundle("bundlename",Locale.getDefault(),Thread.currentThread.().getContextClassLoader())
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got problem with sending data in Android using httpPost. I found some example,
I've got problem with DirectX in C#. I want to draw some lines. Firstly
Got a problem with Apache and PHP-files of Wordpress. When I go to any
got a problem, can't get my head around this jquery and would appreciate your
I've got a slightly tricky problem to solve; imagine this: One of my applications
my name is samy and im going insane! i got this problem that my
I've got a project which links against various common libraries, as well as Boost.
This is a follow-up to this question . I've got the same problem as
I've got a little problem. I programmed a winforms application that recursivly searches files
I got 2 projects. A plugin project containing some components (POJOs) and a fragment

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.