问题
In my GWT service on server side I use Hibernate. When creating a SessionFactory I get following error:
"java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. Please see the Google App Engine developer's guide for more details."
What could be the reason?
回答1:
It seems to be that you are trying to use Hibernate on Google App Engine, but Hibernate is incompatible with Google App Engine
回答2:
This is a common GWT issue in debug mode - eg if you're looking to get postgres data locally before a prod install, you can't using the app engine. But when tomcat (or whatever) is serving the servlets, all is normal.
来源:https://stackoverflow.com/questions/2203830/gwt-and-hibernate-noclassdeffounderror-when-using-hibernate