Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7734093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:09:49+00:00 2026-06-01T07:09:49+00:00

I configured GWT 2.4.0 + Hibernate 4.x I used Using Data Transfer Objects (DTO)

  • 0

I configured GWT 2.4.0 + Hibernate 4.x

I used Using Data Transfer Objects (DTO) as integration strategy following the GWT tutorial:
https://developers.google.com/web-toolkit/articles/using_gwt_with_hibernate

But when I run the project as Web Application (using Google eclipse plugin), this exception is thrown:

Caused by: java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. Please see the Google App Engine developer’s guide for more details.

The full exception:

Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. Please see the Google  App Engine developer's guide for more details.
01/04/2012 22:11:39 com.google.appengine.tools.development.ApiProxyLocalImpl log
GRAVE: javax.servlet.ServletContext log: Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String web.reg.client.GreetingService.greetServer(java.lang.String) throws java.lang.IllegalArgumentException' threw an unexpected exception: java.lang.ExceptionInInitializerError
    at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:60)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:78)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:363)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.ExceptionInInitializerError
    at web.reg.util.HibernateUtil.<clinit>(HibernateUtil.java:17)
    at web.reg.server.GreetingServiceImpl.greetServer(GreetingServiceImpl.java:36)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:104)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
    ... 34 more
Caused by: java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. Please see the Google  App Engine developer's guide for more details.
    at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
    at org.hsqldb.HsqlSocketFactory.createSocket(Unknown Source)
    at org.hsqldb.HSQLClientConnection.openConnection(Unknown Source)
    at org.hsqldb.HSQLClientConnection.initConnection(Unknown Source)
    at org.hsqldb.HSQLClientConnection.<init>(Unknown Source)
    at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
    at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
    at org.hsqldb.jdbcDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:154)
    at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173)
    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
    at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)
    at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2273)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2269)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1738)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1778)
    at web.reg.util.HibernateUtil.<clinit>(HibernateUtil.java:13)

I’ve read in this forum: http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg44312.html
that I should uncheck the “Use Google App Engine” Option on eclipse, and also remove the jars of this google app engine references.

Ok I did it.

But when I run the gwt via eclipse plugin, when I launch the application and send some data to be stored on server this exception is thrown:

Caused by: org.hibernate.HibernateException: Could not instantiate dialect class
    at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:82)
    at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:64)
    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:170)
    at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)
    at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2273)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2269)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1738)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1778)
    at web.reg.util.HibernateUtil.<clinit>(HibernateUtil.java:13)
    ... 28 more
Caused by: java.lang.ClassCastException: org.hibernate.dialect.HSQLDialect cannot be cast to org.hibernate.dialect.Dialect
    at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)

My hibernate.cfg.xml is realy using org.hibernate.dialect.HSQLDialect by the property:
org.hibernate.dialect.HSQLDialect

the .jar files I'm using are:

on GWT structure:


war/WEB-INF/lib:
|- antlr-2.7.7.jar
|- dom4j-1.6.1.jar
|- gwt-servlet.jar
|- hibernate-commons-annotations-4.0.1.Final.jar
|- hibernate-core-4.1.1.Final.jar
|- hibernate-entitymanager-4.1.1.Final.jar
|- hibernate-jpa-2.0-api-1.0.1.Final.jar
|- hsqldb.jar
|- javassist-3.15.0-GA.jar
|- jboss-logging-3.1.0.GA.jar
|- jboss-transaction-api_1.1_spec-1.0.0.Final.jar
|- jsr107cache-1.1.jar

What is missing? Or is there something I shouldn’t put?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:09:50+00:00Added an answer on June 1, 2026 at 7:09 am

    This is a Jetty Classloader issue. I didn’t get this particular error myself, but the problem is detailed in this Hibernate Bug Report.

    Vladimir Konkov’s suggestion to change the ClassLoaderServiceImpl.java to pass a null value to the constructor should work to resolve it.

    this.classClassLoader = new ClassLoader(null) {
            @Override
            protected Class<?> findClass(String name) throws ClassNotFoundException {
                for ( ClassLoader loader : classLoadingClassLoaders ) {
                    try {
                        return loader.loadClass( name );
                    }
                    catch (Exception ignore) {
                    }
                }
                throw new ClassNotFoundException( "Could not load requested class : " + name );
            }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I configured Second Level Cache using Ehcache in hibernate.cfg.xml ,ehcache.xml.And setting the cache-usage property
I configured a jail with Chroot in SSH following this tutorial . I found
I have problem with using Hibernate Validator with GWT 2.4. When module is starting
I configured mysql ODBC connector in ODBC Data Source Configuration => test connection is
I'm having a bit of a weird issue here, basically, im using hibernate together
I've configured my GWT app with Guice as documented here . With this setup
My GWT app, using UiBinder, won't load in Internet Explorer. However, it loads just
I try to develop a simple webapp using GWT + hibernate4 + Apache Tomcat.
I've been using GWT together with Maven , but whatever I try to do,
Configured Nginx as reverse proxy in front of Play! and passing https with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.