I recently worked through a tutorial that describes how to use Hibernate with GWT.
http://code.google.com/webtoolkit/artic ... rnate.htmlThat tutorial provides three examples. I used the first one that uses Data Transfer Objects to transfer the entities between the server and client.
http://code.google.com/webtoolkit/artic ... #UsingDTOsThe tutorial doesn't provide an Eclipse project. Instead, it provides an Ant build file that will build and deploy the project. I later modified the project to use a MySQL database and also I used my own database table. That worked fine as long as I built and deployed the project using the Ant build file that was provided with the tutorial.
After working successfully with the project using a text editor and an Ant build file, I tried to move the same source code into a GWT project in Eclipse. I started by creating a new GWT project in Eclipse, and then I added my source code from the Hibernate tutorial project. After compiling the project on Eclipse, the project started successfully and displayed the page in the browser. When I clicked the button that should retrieve some data from the database, I got an error when the following line was executed.
sessionFactory = config.buildSessionFactory();
The stack trace includes the following.
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:128)
at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkAccess(DevAppServerFactory.java:155)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:288)
at java.lang.Thread.init(Thread.java:332)
at java.lang.Thread.<init>(Thread.java:377)
at java.util.TimerThread.<init>(Timer.java:456)
at java.util.Timer.<init>(Timer.java:71)
at java.util.Timer.<init>(Timer.java:122)
at com.mysql.jdbc.ConnectionImpl.<clinit>(ConnectionImpl.java:208)
Does anyone have any idea why I would have a problem connecting to the database when I attempt to run the code from an Eclipse project?