-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Hibernate jars required in appserver classpath ? Why ?
PostPosted: Tue Mar 16, 2004 12:17 am 
Beginner
Beginner

Joined: Tue Feb 17, 2004 7:53 am
Posts: 24
I have deployed a CMT bean in Weblogic 8.1 and packaged the hibernate libraries in the ear. But to my surprise, I found that when weblogic starts it complains with NoClassDef Error for hibernate classes like HibernateException . Then I placed the jars in weblogic classpath and it worked fine. Why ear classloader can't load the hibernate jars i dont undestand if all jars are in ear.

But this is not feasible and desirable to place all jars in system classpath. Seems some classpath issue..I am looking into this ..if any body has any idea or faced such an issue, pls intimate.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 16, 2004 12:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
You really need to find some docs on J2EE packaging and classloading if you're going to be developing Ent. archives. Here's a link to an oldie-but-goodie...
http://www.theserverside.com/articles/article.tss?l=ClassLoading

Simply placing jar files into an ear does *not* make them available to components within the ear (aside from JBoss and its cooky classloader). Instead, each ear component needs to have manifest Class-Path entry specifying resources in the ear which should be loaded into that component's classloader. That's the purest way to do it, although different app servers handle this slightly differently.


Top
 Profile  
 
 Post subject: Re: Hibernate jars required in appserver classpath ? Why ?
PostPosted: Wed Mar 17, 2004 11:04 pm 
Newbie

Joined: Wed Mar 17, 2004 10:50 pm
Posts: 1
Location: Palo Alto, CA
anjali wrote:
I have deployed a CMT bean in Weblogic 8.1 and packaged the hibernate libraries in the ear. But to my surprise, I found that when weblogic starts it complains with NoClassDef Error for hibernate classes like HibernateException . Then I placed the jars in weblogic classpath and it worked fine. Why ear classloader can't load the hibernate jars i dont undestand if all jars are in ear.


The simplest way to get it done in weblogic 8.1 is to put hibernate jars into EAR's APP-INF/lib directory. This weblogic-specific feature loads classes in that jars with EJB classloader. You hibernate classes will be available for EJB and WAR modules.

Hope this helps.

_________________
Regards,

Slava Imeshev


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.