-->
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.  [ 2 posts ] 
Author Message
 Post subject: 500 Internal Server Error while running a hibernate Applicat
PostPosted: Thu Jul 26, 2007 3:51 am 
Newbie

Joined: Sun Jul 22, 2007 9:59 pm
Posts: 4
Hi,

I am running a hibernate application for inserting a record in MySql database using JDeveloper.

I am using the following piece of code:

Configuration cfg = new Configuration().addClass(Department.class);
sessionFactory = cfg.buildSessionFactory() ;
Session session = sessionFactory.openSession() ;
Department dept = new Department() ;
dept.setDepname("PPPPPP");
session.save(dept);

but on executing it i get the following error trace:


java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].naming.ContextClassLoader.defineClass(ContextClassLoader.java:1102)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].naming.ContextClassLoader.findClass(ContextClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].naming.ContextClassLoader.loadClass(ContextClassLoader.java:135)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
at org.hibernate.bytecode.cglib.ProxyFactoryFactoryImpl.<clinit>(ProxyFactoryFactoryImpl.java:82)
at org.hibernate.bytecode.cglib.BytecodeProviderImpl.getProxyFactoryFactory(BytecodeProviderImpl.java:33)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactoryInternal(PojoEntityTuplizer.java:182)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:160)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at test.EmployeeDAO.addEmployee(EmployeeDAO.java:230)
at test.EmployeeAddAction.execute(EmployeeAddAction.java:29)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:721)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)


Pls. help me out.

_________________
Regards
Shivali Goel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 26, 2007 7:00 am 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
You are missing cglib in your classpath. there is a lib directory in the hibernate distribution. In there is a readme.txt file which exactly explains which depencencies are use by hibernate at compile or run time.

cheers,
mike

_________________
Please don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.