It looks like the support Jars (in this case commons-lang.jar) aren't in your 
WEB-INF/lib
directory or in the CLASSPATH of the server. They need to be in one of those places.

Good luck,
Patrick


--- Yin Shi <[EMAIL PROTECTED]> wrote:
> Hi friends,
> 
> I am using WSAD5.
> 
> I am new to Hibernate, and I tried to use it in a pure Java project, and ran it by a
> Java Application (has main class), which was ok.
> 
> But when I tried it in a Web Application, write a servlet to access the Hibernate,
> every time it just failed, the error message is: "Failed to load servlet:
> java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableException".
> 
> By the way, I am trying the quick start example using Tomcat 4.1 and Hibernate2
> provided in the Hibernate home page, the difference is I want to use it in WSAD5.  I
> just could not get it working.  I think "sessionFactory = new
> Configuration().configure().buildSessionFactory();" caused the problem, but I am not
> sure how to fix it.  I did not have .properties file, I wander if I need it or not?
> 
> Just wander does anyone have simple examples how to use Hibernate in a Web 
> Application
> in WSAD5?  
> 
> Here is my cfg.xml
> ______________________________________
> 
> <?xml version='1.0' encoding='utf-8'?>
> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration 
> DTD//EN"
>                                         
> "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd";>
> 
> <hibernate-configuration>
> 
>     <session-factory>
> 
>               <property
> name="hibernate.connection.driver_class">COM.ibm.db2.jdbc.net.DB2Driver</property>
>         <property name="hibernate.connection.url">jdbc:db2:JDO</property>
>         <property name="hibernate.connection.username">admin</property>
>         <property name="hibernate.connection.password">admin</property>
>         <property name="show_sql">true</property>
>         <property name="use_outer_join">true</property>
>         <property name="dialect">net.sf.hibernate.dialect.DB2Dialect</property>
> 
>         <!-- Mapping files -->   
>         <mapping resource="Cat.hbm.xml"/>   
>     </session-factory>
>     
> </hibernate-configuration>
> 
> ---------------------------------------------------
> 
> Thanks for all you helps!
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to