I didn't notice that I had the wrong topic in my email.
My sincerest apologies!

Marc Farrow wrote:
Min,

 You commited what is known as thread stealing.  Read the FAQs.  When you
want to submit a new question/topic then send a clean email to
users@tomcat.apache.org and DO NOT REPLY to someone else's post.

On 5/4/06, Min Huang <[EMAIL PROTECTED]> wrote:

I've been stumped on a (what seems to be) a simple classpath
problem for nearly a day now, and I am feeling like an idiot
for not being able to figure it out.

I wrote a jar that is bundled within a war, as part of a web
app that was written long ago.  My application jar references a
bunch of configuration files, all located inside the jar.

When testing the app, it seems that none of my configuration
files within the jar can be found, causing my code to fail.  I'm using
Log4J, Hibernate3, and Commons Configuration - none of whose
configuration files are found.

However, I decided to play around with the problem a little bit,
and I found that if I unpack my jar into the /WEB-INF/classes
folder, and the tomcat log shows that all of my configuration files,
save for my hibernate.cfg.xml, are found.

Now, a few twists to make things interesting:
- I'm using Hibernate 3, but the old webapp is using Hibernate2, which
I assumed wouldn't cause namespace conflicts because they are located
in different packages.
- The Hibernate2 configuration file is located in /WEB-INF/classes
and can be found.  *My* Hibernate3 configuration file is located within
my jar in /WEB-INF/lib, and can't be found.
- My configuration files aren't located in the base path within the
jar, if that makes a difference.
- My application jar runs fine on its own if I make a quick and dirty
JSP with a scriplet that executes the code.

Is this a classpath issue?  Do different versions of Hibernate just
not play around nicely with each other?  Will I have hair left before
this problem is resolved?

If anybody knows, please tell!



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Marc Farrow

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to