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

  • Home
  • SEARCH
  • 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 7641523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:56:41+00:00 2026-05-31T08:56:41+00:00

I try to develop a simple webapp using GWT + hibernate4 + Apache Tomcat.

  • 0

I try to develop a simple webapp using GWT + hibernate4 + Apache Tomcat.
Now I have written my simple classes with GWT & hibernate (using the default App Engine server for the first time), but I get an error while sending data to server, whch arrises in class

public class HibernateUtil {
private static SessionFactory sessionFactory;
private static ServiceRegistry serviceRegistry;

static SessionFactory getSessionFactory() throws HibernateException {
    Configuration configuration = new Configuration();
    configuration.configure();
    serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();        
    sessionFactory = configuration.buildSessionFactory(serviceRegistry);
    return sessionFactory;
}

}

on the line sessionFactory = configuration.buildSessionFactory(serviceRegistry);
Here is the stacktrace

    java.lang.NoClassDefFoundError: javax.naming.InitialContext 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.hibernate.service.jndi.internal.JndiServiceImpl.buildInitialContext(JndiServiceImpl.java:77)
at org.hibernate.service.jndi.internal.JndiServiceImpl.bind(JndiServiceImpl.java:107)
at org.hibernate.internal.SessionFactoryRegistry.addSessionFactory(SessionFactoryRegistry.java:79)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:440)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
at ru.leti.alexeeva.server.HibernateUtil.getSessionFactory(HibernateUtil.java:17)

is there any way round?

  • 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-05-31T08:56:43+00:00Added an answer on May 31, 2026 at 8:56 am

    What’s happening is exactly what it says:

    “java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer’s guide for more details.”

    Your code won’t run like this, out of the box because of Google App Engine JRE whitelist. In other words, you can’t use all Java classes and libraries that you can running a “standalone” Java app server like Tomcat.

    See precise list of which Java classes are allowed to be used in an application running on Google App Engine:

    http://code.google.com/appengine/docs/java/jrewhitelist.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am try to develop a small application. Now should i organize my 3rd
I have a quick little application and wanted to give a try to develop
I try to develop a simple average function in Haskell. This seems to work:
I try to develop simple web service to liferay 6.1. I follow such manuals
I'm trying to develop simple RESTful api using FastCGI (and restcgi). When I tried
I've been using BBEdit in conjunction to develop for a while now. I use
I develop a simple app, when i try to save an XMLDocument to a
I'm new to Scala and wanting to develop a simple little Scala Wicket webapp
I try to develop a simple web application, but to exclude all the possibilities
I'm trying to develop a simple shopping cart and using http://jqueryui.com/demos/droppable/#photo-manager as the base.

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.