-->
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 inside an applet
PostPosted: Thu Feb 15, 2007 8:51 pm 
Newbie

Joined: Fri Nov 17, 2006 11:32 am
Posts: 13
This perhaps is not a 100% hibernate question, but I'm sure that must be any user that had had the problem:

I have an applet that it's working correctly inside eclipse. But when I try to export it to the Web Server (Apache) I get this error:
Code:
NoDefClassFoundError: /org/hibernate/Session


. This is the directory structure:
Code:
/ # root folder of the application
|
-> index.html #where I invoke the applet by <applet> tag
->editor.jar #the application
      |
      ->editor # all the sources and .class
      ->lib  #all the libs, where is hibernate3.jar, where is org.hibernate.Session.class
      ->.classpath #classpath definition


Here is the classpath:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
   <classpathentry kind="src" path="src"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
   <classpathentry kind="lib" path="lib/ant-antlr-1.6.5.jar"/>
   <classpathentry kind="lib" path="lib/antlr-2.7.6.jar"/>
   <classpathentry kind="lib" path="lib/asm-attrs.jar"/>
   <classpathentry kind="lib" path="lib/asm.jar"/>
   <classpathentry kind="lib" path="lib/cglib-2.1.3.jar"/>
   <classpathentry kind="lib" path="lib/commons-collections-2.1.1.jar"/>
   <classpathentry kind="lib" path="lib/commons-logging-1.0.4.jar"/>
   <classpathentry kind="lib" path="lib/dom4j-1.6.1.jar"/>
   <classpathentry kind="lib" path="lib/ehcache-1.2.jar"/>
   <classpathentry kind="lib" path="lib/hibernate3.jar"/>
   <classpathentry kind="lib" path="lib/jaas.jar"/>
   <classpathentry kind="lib" path="lib/jaxen-1.1-beta-7.jar"/>
   <classpathentry kind="lib" path="lib/jdbc2_0-stdext.jar"/>
   <classpathentry kind="lib" path="lib/jta.jar"/>
   <classpathentry kind="lib" path="lib/log4j-1.2.11.jar"/>
   <classpathentry kind="lib" path="lib/xerces-2.6.2.jar"/>
   <classpathentry kind="lib" path="lib/xml-apis.jar"/>
   <classpathentry kind="lib" path="lib/mysql-connector-java-5.0.4-bin.jar"/>
   <classpathentry kind="lib" path="lib/images.jar"/>
   <classpathentry kind="output" path="bin"/>
</classpath>


Did anyone ever use Hibernate in an applet? any idea to find a solution? need more information? just ask for it.
thanks,
regards,
Neuquino

_________________
Neuquino
"Keep on trying and get better every day" (Queen)


Top
 Profile  
 
 Post subject: Re: Hibernate inside an applet
PostPosted: Fri Feb 16, 2007 3:35 am 
Newbie

Joined: Thu Feb 15, 2007 5:46 am
Posts: 12
Location: Helsinki
Well, the error is due to Hibernate's libraries not being in the applet classpath. But that's not the main problem.

Using hibernate in an applet is a very poor idea, due to several reasons, such as security and userfriendliness, so I would seriously reconsider another approach.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 16, 2007 8:53 am 
Newbie

Joined: Fri Nov 17, 2006 11:32 am
Posts: 13
Hibernate's libraries seems to be in the applet classpath ¿what is wrong in the classpath I post above? ¿Why in eclipse it works correctly?

¿What do you mean with security and userfriendliness reasons? Wich problems could this carry out?

Thanks
Neuquino

_________________
Neuquino
"Keep on trying and get better every day" (Queen)


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.