It looks fine. I would expect a hibernate error message as
well...something to say that it's not happy with your hibernate.cfg.xml
for some reason.
The exception you've shown seems to be the one you created in your catch
clause. We're not seeing the exception you caught. I would expect that
you've already got that, but if not, maybe you can add something to show
its contents?
Also, is your src directory (where your hibernate files are) in your
classpath?
tolga ozdemir wrote:
> This is my HibernateContext.java.. Something wrong in it?
>
>
>
>
> import org.apache.commons.logging.*;
> import org.hibernate.SessionFactory;
> import org.hibernate.cfg.Configuration;
>
>
> public class HibernateContext {
>
> private final static String CONFIGURATION_FILE = "hibernate.cfg.xml";
>
> private static Log log = LogFactory.getLog(HibernateContext.class);
>
> private static SessionFactory sessionFactory;
>
> public static SessionFactory getSessionFactory(){
>
> if(sessionFactory == null){
>
> try{
> sessionFactory = new Configuration()
>
> .addResource(CONFIGURATION_FILE)
>
> .configure()
>
> .buildSessionFactory();
>
> }catch (Throwable th) {
> log.error("Initial SessionFactory creation
> failed.", th);
> throw new ExceptionInInitializerError(th);
> }
>
> }
>
> return sessionFactory;
> }
>
> }
>
>
> ERROR:
>
> WARNING: Nested in javax.servlet.ServletException: init:
> java.lang.ExceptionInInitializerError
> at net.tolgaozdemir.gwt.server.HibernateContext.getSessionFactory
> (HibernateContext.java:29)
> at net.tolgaozdemir.gwt.server.EntryRemoteService.init
> (EntryRemoteService.java:27)
> at javax.servlet.GenericServlet.init(GenericServlet.java:215)
> at org.mortbay.jetty.servlet.ServletHolder.initServlet
> (ServletHolder.java:433)
> at org.mortbay.jetty.servlet.ServletHolder.getServlet
> (ServletHolder.java:342)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 463)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1093)
> at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> (TransactionCleanupFilter.java:43)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1084)
> at com.google.appengine.tools.development.StaticFileFilter.doFilter
> (StaticFileFilter.java:124)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1084)
> at org.mortbay.jetty.servlet.ServletHandler.handle
> (ServletHandler.java:360)
> at org.mortbay.jetty.security.SecurityHandler.handle
> (SecurityHandler.java:216)
> at org.mortbay.jetty.servlet.SessionHandler.handle
> (SessionHandler.java:181)
> at org.mortbay.jetty.handler.ContextHandler.handle
> (ContextHandler.java:712)
> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 405)
> at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
> (DevAppEngineWebAppContext.java:54)
> at org.mortbay.jetty.handler.HandlerWrapper.handle
> (HandlerWrapper.java:139)
> at com.google.appengine.tools.development.JettyContainerService
> $ApiProxyHandler.handle(JettyContainerService.java:313)
> at org.mortbay.jetty.handler.HandlerWrapper.handle
> (HandlerWrapper.java:139)
> at org.mortbay.jetty.Server.handle(Server.java:313)
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 506)
> at org.mortbay.jetty.HttpConnection$RequestHandler.content
> (HttpConnection.java:844)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> at org.mortbay.io.nio.SelectChannelEndPoint.run
> (SelectChannelEndPoint.java:396)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run
> (BoundedThreadPool.java:442)
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---