configuring Hibernate, stripersist on eclipse

I have tried to use stripersist with mysql but was not successful.

I have copied sample code of stripes book , email23 , to eclipse and added res folder as source folder.

When I try to run the application I get the following error

SEVERE: Servlet.service() for servlet DispatcherServlet threw exception java.lang.NullPointerException at at stripesbook.ext.MyActionBeanContext.getUser( at stripesbook.action.BaseActionBean.getUser( at stripesbook.action.ContactListActionBean.getContacts( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at javax.el.BeanELResolver.getValue( at javax.el.CompositeELResolver.getValue( at org.apache.el.parser.AstValue.getValue( at org.apache.el.ValueExpressionImpl.getValue( at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate( at org.apache.jsp.WEB_002dINF.jsp.contact_005flist_jsp._jspService( at org.apache.jasper.runtime.HttpJspBase.service( at javax.servlet.http.HttpServlet.service( at org.apache.jasper.servlet.JspServletWrapper.service( at org.apache.jasper.servlet.JspServlet.serviceJspFile( at org.apache.jasper.servlet.JspServlet.service( at javax.servlet.http.HttpServlet.service( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at org.apache.catalina.core.ApplicationDispatcher.invoke( at org.apache.catalina.core.ApplicationDispatcher.processRequest( at org.apache.catalina.core.ApplicationDispatcher.doForward( at org.apache.catalina.core.ApplicationDispatcher.forward( at net.sourceforge.stripes.action.ForwardResolution.execute( at net.sourceforge.stripes.controller.DispatcherHelper$7.intercept( at net.sourceforge.stripes.controller.ExecutionContext.proceed( at net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept( at net.sourceforge.stripes.controller.ExecutionContext.proceed( at net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept( at net.sourceforge.stripes.controller.ExecutionContext.proceed( at net.sourceforge.stripes.controller.ExecutionContext.wrap( at net.sourceforge.stripes.controller.DispatcherHelper.executeResolution( at net.sourceforge.stripes.controller.DispatcherServlet.executeResolution( at net.sourceforge.stripes.controller.DispatcherServlet.doPost( at net.sourceforge.stripes.controller.DispatcherServlet.doGet( at javax.servlet.http.HttpServlet.service( at javax.servlet.http.HttpServlet.service( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at net.sourceforge.stripes.controller.StripesFilter.doFilter( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at org.apache.catalina.core.StandardWrapperValve.invoke( at org.apache.catalina.core.StandardContextValve.invoke( at org.apache.catalina.core.StandardHostValve.invoke( at org.apache.catalina.valves.ErrorReportValve.invoke( at org.apache.catalina.core.StandardEngineValve.invoke( at org.apache.catalina.connector.CoyoteAdapter.service( at org.apache.coyote.http11.Http11Processor.process( at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process( at$ at

I have checked this thread, Help configuring Hibernate,Jpa, Stripesist on Stripes , but still have the problem

Any help is appreciated.

-------------Problems Reply------------

Your code is failing on the getEntityManager() that returns null:

45: public T read(ID id) {
46: return Stripersist.getEntityManager().find(entityClass, id);
47: }

This means that you don't have Hibernate/JPA configured correctly for your web application.

You might find this documentation helpful (although you can follow any Hibernate/JPA configuration guide, as the configuration is not Stripersist or Stripes specific):

Category:hibernate Views:0 Time:2011-12-21

Related post

  • How to Configure Hibernate with Eclipse Galileo 2009-10-27

    Can someone tell me how to configure hibernate (Annotations) with Eclipse? --------------Solutions------------- To use hibernate annotations in Eclipse I just add a reference to the required jar (hibernate-annotations.jar). You will also need the hib

  • How to configure Hibernate Tools HQL editor in Eclipse with a custom NamingStrategy 2009-03-18

    I've installed Hibernate Tools 3.2.4.GA in Eclipse Ganymede. The main driver for installing it was to be able to issue HQL queries interactively. I have configured all of our mapping files,, etc. and it shows all of our entities

  • how to configure hibernate 3.3 in eclipse galileo? 2010-02-12

    i am working on galileo but i am not able to find the plugin for hibernate 3.3 can anybody send me the plugin link please. it's urgent. and also send me the spring 2.x latest version plugin also. Thanks in advance, Bhuvan Yadav. --------------Solutio

  • How to install Hibernate Tools in Eclipse? 2008-12-09

    What is the proper way to install Hibernate Tools in Eclipse as a plugin? The Hibernate site doesn't really give any instructions. Looking at the Hibernate Tools binary, it appears that I can just unzip th

  • How to see SQL query using Hibernate Tools in Eclipse? 2008-12-09

    Having installed Hibernate Tools in Eclipse, how can I view the would-be generated SQL query of from the JPA query language? (I'm using Hibernate as my JPA implementation) My Java DAO class looks something like: public List<Person> findById(int

  • Error while running a hibernate program in eclipse 2011-01-20

    I was trying to run a hibernate sample in eclipse and I am getting Referenced classpath provider does not exist: org.maven.ide.eclipse.launchconfig.classpathProvider I just uninstalled maven from eclipse but I think I need to make some changes in con

  • Help configuring Hibernate,Jpa, Stripesist on Stripes 2011-04-21

    I need some help configuring JPA Stripersist and Hibernate on a Stripes project I have the Stripersist.jar and JPA.jar, the book i have is not that clear about how to get the "correct" Hibernate jars(i just found so many on the hibernate website), an

  • can I configure hibernate properties to connect without using an instance name to sql server 2005? 2008-10-01

    Can I configure hibernate properties to connect without using an instance name to sql server 2005? I need to force it to use localhost as the hostname and not specify the instance (same as you can do with the sql server enterprise manager). Ta! T ---

  • Configure Hibernate to escape underscores in LIKE clause using SQL Server dialect 2008-11-17

    I have a SQL SELECT query which has a LIKE clause containing an underscore, which should specifically look for an underscore, not treat it as a wildcard: SELECT * FROM my_table WHERE name LIKE '_H9%'; I understand that I can change the actual clause

  • Configuring Hibernate logging using Log4j XML config file? 2009-01-12

    I haven't been able to find any documentation on how to configure Hibernate's logging using the XML style configuration file for Log4j. Is this even possible or do I have use a properties style configuration file to control Hibernate's logging? If an

  • How can I configure Hibernate to use SSL to talk to the DB server? 2009-08-13

    I have an existing java webapp that uses Hibernate for it's persistence. I've been told that I have to have to talk to the DB encrypted - so my first thought is to set it up to do the communication via SSL - and went through figured out how to set up

  • Configure Hibernate to obtain a fresh connection from a connection pool 2010-04-15

    How do I configure Hibernate so that each time I call sessionFactory.openSession() it connects with a new connection from the connection pool? The connection pool is managed by Websphere Application Server and is a JDBC Data Source. Thanks ----------

  • How to configure Hibernate database reverse engineering tool to map database table relation as a entites inheritance? 2010-04-30

    Is it possible to configure Hibernate reverse engineering and code generation tool in such a way that one-to-many relation between tables is mapped to entities inheritance instead of enrites relation? I have Person table and Employee table, which are

  • How to configure tomcat 7 in Eclipse 3.6 with jdk 1.6.0_20? 2010-09-26

    I'm having some problems configure tomcat 7 on Eclipse 3.6 . The enviroment is a notebook with o.s. Windows 7 Home Premium 64 bit. Before this upgrade i work succesfully with tomcat 6 on Eclipse 3.6 but my switch on the newer tomcat is an evil! I rep

  • How to add hibernate javadocs in Eclipse? 2010-09-28

    I am using Eclipse for the past two months. I didnt used javadocs in it before. Today i searched for hibernate javadocs and got But i dont know how to add it in eclipse. Any suggestions!! --------------Solutions-------

  • Configuring Hibernate.cfg.xml 2011-01-04

    How to tell to my Spring and here is my I am getting this error. I have not configured anything in my application-context.xml Initial SessionFactory creation /hibernate.cfg.xml not found co

  • How do I configure Hibernate with a JPA 2.0 file? 2011-05-24

    Hibernate docs show very clearly how to configure Hibernate with XML. This is the snippet of code to do so: new Configuration().configure("catdb.cfg.xml") Now how do you configure Hibernate when instead of a hibernate configuration file, you have a J

  • Setting debug configuration for maven+jetty+eclipse 2011-10-24

    I have created a web app using maven in eclipse. I am using jetty for running the app. I am able to run the app using the maven jetty plugin. But I am facing difficulty while debugging the app - The steps that i have followed to setup debug settings

  • Setting Hibernate up in eclipse 2011-12-19

    I have a serious problem understanding how to set up hibernate using eclipse. I spent like 2 days already and cant figure it out. I downloaded Eclipse IDE for Java Developers, 128 MB. Now I have no freaking Idea how to install hibernate! I am also co

Copyright (C), All Rights Reserved.

processed in 0.082 (s). 11 q(s)