Announcement Announcement Module
Collapse
No announcement yet.
spring-hibernate configuration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring-hibernate configuration

    hi all,

    I am completely new to the spring framework. I have got problem with spring frame work. The product running on Oracle apps & oracle. Now I have to migrate it on to Tomcat5.0 with Ms-SQL server 2005 as db . In one of applicationcontext.xml

    <bean name="dataAccessManager"
    class="com.xteric.vanderbilt.dao.DataAccessManager " singleton="false"
    lazy-init="false">
    <property name="sessionFactory">
    <ref bean="sessionFactory" />
    </property>
    </bean>

    <bean name="sessionFactory"
    class="org.springframework.orm.hibernate3.LocalSes sionFactoryBean">
    <property name="configLocation">
    <value>classpath:hibernate.cfg.xml</value>
    </property>
    </bean>

    By the above code u could understand the issue. DataAccesManger is class contains sessionfactory as member variable which will be initilized by the applicationcontext.xml file. But Some how it is not being initilized at the time of the application loading. I am getting nullpointerException while running my app. I am in a great confusion whether it is the problem with tomcat or spring jar files? My sys windowsXP.

    Could u ple help me in this issue as I have to solve it by tomorrow?
    Thanks in advance.
    vijay

  • #2
    Questions relating to Hibernate would probably be better recieved on the Data Access forum in future. Anyway, we can try and solve this on here. Is it possible to see your stacktrace?

    Comment


    • #3
      spring-hibernate mapping

      Hi
      This is stack trace

      java.lang.NullPointerException
      at com.xteric.vanderbilt.dao.DataAccessManager.resetH ibernateSession(Dat
      aAccessManager.java:69)
      at com.xteric.vanderbilt.dao.DataAccessManager.handle Exception(DataAcces
      sManager.java:369)
      at com.xteric.vanderbilt.dao.employee.HibernateEmploy eeDAO.getEmployeeBy
      UserId(HibernateEmployeeDAO.java:60)
      at com.xteric.vanderbilt.business.EmployeeManager.get EmployeeByUserId(Em
      ployeeManager.java:56)
      at com.xteric.vanderbilt.action.LoginAction.loginViaL dap(LoginAction.jav
      a:130)
      at com.xteric.vanderbilt.action.LoginAction.execute(L oginAction.java:65)

      at org.apache.struts.action.RequestProcessor.processA ctionPerform(Reques
      tProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process( RequestProcessor.ja
      va:274)
      at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:148
      2)
      at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:525)

      at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
      at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(Appl
      icationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationF
      ilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperV
      alve.java:214)
      at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardContextValve.invo keInternal(Standard
      ContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextV
      alve.java:152)
      at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.j
      ava:137)
      at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.j
      ava:118)
      at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValv
      eContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineVal
      ve.java:109)
      at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.jav
      a:520)
      at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:929)

      at org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:16
      0)
      at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java
      :799)
      at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.proce
      ssConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java
      :577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadP
      ool.java:684)
      at java.lang.Thread.run(Thread.java:619)
      log4j:ERROR Error occured while sending e-mail notification.
      javax.mail.SendFailedException: Invalid Addresses;
      nested exception is:
      com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 <karthikeyan_g@a
      pollohealthstreet.com>... Relaying denied from karthikeyan_g@apollohealthstreet.
      com. For more info, see http://www.vanderbilt.edu/vumail/relay.html

      at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTranspo rt.java:1196)
      at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTr ansport.java:584)
      at javax.mail.Transport.send0(Transport.java:169)
      at javax.mail.Transport.send(Transport.java:98)
      at org.apache.log4j.net.SMTPAppender.sendBuffer(Unkno wn Source)
      at org.apache.log4j.net.SMTPAppender.append(Unknown Source)
      at org.apache.log4j.AppenderSkeleton.doAppend(Appende rSkeleton.java:221)

      at org.apache.log4j.helpers.AppenderAttachableImpl.ap pendLoopOnAppenders
      (AppenderAttachableImpl.java:57)
      at org.apache.log4j.Category.callAppenders(Category.j ava:194)
      at org.apache.log4j.Category.forcedLog(Category.java: 379)
      at org.apache.log4j.Category.error(Category.java:310)
      at com.xteric.vanderbilt.action.LoginAction.loginViaL dap(LoginAction.jav
      a:145)
      at com.xteric.vanderbilt.action.LoginAction.execute(L oginAction.java:65)
      at com.xteric.vanderbilt.action.LoginAction.execute(L oginAction.java:65)

      at org.apache.struts.action.RequestProcessor.processA ctionPerform(Reques
      tProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process( RequestProcessor.ja
      va:274)
      at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:148
      2)
      at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:525)

      at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
      at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(Appl
      icationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationF
      ilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperV
      alve.java:214)
      at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardContextValve.invo keInternal(Standard
      ContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextV
      alve.java:152)
      at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.j
      ava:137)
      at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.j
      ava:118)
      at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValv
      eContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineVal
      ve.java:109)
      at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.jav
      a:520)
      at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:929)

      at org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:16
      0)
      at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java
      :799)
      at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.proce
      ssConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java
      :577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadP
      ool.java:684)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 <karthikeyan_
      [email protected]>... Relaying denied from karthikeyan_g@apollohealthstre
      et.com. For more info, see http://www.vanderbilt.edu/vumail/relay.html

      at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTranspo rt.java:1047)
      ... 42 more
      2007-01-23 10:12:08||||WARN |EnterpriseManager|No enterprise configuration found
      ; creating default

      What are jar file are required for running my application? will you pls resolve it as soon as possible.
      regards & thanks.
      vijay

      Comment

      Working...
      X