facebook

Hibernate 3.1 not playing well with Struts 1.2.7 and Tiles?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #258127 Reply

    deinesh
    Member

    MyEclipse: Version 5.0
    Hibernate: 3.1
    Struts: 1.2.7
    Web Container: Resin 3.0.19
    I am also using tiles.

    I have a web-project that works until I add Hibernate capabilities. I don’t even access the the HibernateSessionFactory, all I do is add Hibernate Capabilities, Configure a Database Connection and Create a Session Factory. When I deploy the app, it throws a javax.servlet.UnavailableException
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368).

    As I said earlier, I do not even start a Hibernate Session or even access the class anywhere in my code. This app used to work before I added Hibernate capabilities.

    The full stack-trace is below:

    [11:47:01.651] WebApp[http://localhost:8080/Shoe_Store] starting
    [11:47:02.010] action: init
    log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
    log4j:WARN Please initialize the log4j system properly.
    [11:47:02.510] javax.servlet.UnavailableException
    [11:47:02.510]     at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368)
    [11:47:02.510]     at javax.servlet.GenericServlet.init(GenericServlet.java:69)
    [11:47:02.510]     at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:600)
    [11:47:02.510]     at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
    [11:47:02.510]     at com.caucho.server.webapp.Application.start(Application.java:1604)
    [11:47:02.510]     at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
    [11:47:02.510]     at com.caucho.server.deploy.DeployController.restartImpl(DeployController.java:584)
    [11:47:02.510]     at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.alarm(StartAutoRedeployAutoStrategy.java:176)
    [11:47:02.510]     at com.caucho.server.deploy.DeployController.handleAlarm(DeployController.java:742)
    [11:47:02.510]     at com.caucho.util.Alarm.handleAlarm(Alarm.java:350)
    [11:47:02.510]     at com.caucho.util.Alarm.run(Alarm.java:320)
    [11:47:02.510]     at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
    [11:47:02.510]     at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
    [11:47:02.510]     at java.lang.Thread.run(Thread.java:595)
    [11:47:02.510] javax.servlet.UnavailableException
    [11:47:02.510]     at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368)
    [11:47:02.510]     at javax.servlet.GenericServlet.init(GenericServlet.java:69)
    [11:47:02.510]     at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:600)
    [11:47:02.510]     at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
    [11:47:02.510]     at com.caucho.server.webapp.Application.start(Application.java:1604)
    [11:47:02.510]     at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
    [11:47:02.510]     at com.caucho.server.deploy.DeployController.restartImpl(DeployController.java:584)
    [11:47:02.510]     at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.alarm(StartAutoRedeployAutoStrategy.java:176)
    [11:47:02.510]     at com.caucho.server.deploy.DeployController.handleAlarm(DeployController.java:742)
    [11:47:02.510]     at com.caucho.util.Alarm.handleAlarm(Alarm.java:350)
    [11:47:02.510]     at com.caucho.util.Alarm.run(Alarm.java:320)
    [11:47:02.510]     at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
    [11:47:02.510]     at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
    [11:47:02.510]     at java.lang.Thread.run(Thread.java:595)
    
    #258144

    deinesh
    Member

    A quick update.

    I was able to recreate this problem using the latest production Struts distribution (1.2.9).

    This problem does not crop up when I am using Struts 1.1.

    To recreate this problem, Create a Web-Project, Add Struts (1.2) capabilties and Hibernate (3.1) capabilities. Then deploy to a Resin server. If you want, you can verify that the application deploys before Hibernate capabilities are added and fails to deploy after Hibernate capabilities are added.

    I am going back to Struts 1.1 until this issue is resolved.

    Another question, to go back to Struts 1.1, is it enough if I just copy the 1.1 jars into my project/webroot/web-inf/lib folders and change all the DTD’s to Struts_1_1 from Struts_1_2 or are there some internal My-Eclipse settings that I will have to tune?

    deinesh

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Hibernate 3.1 not playing well with Struts 1.2.7 and Tiles?

You must be logged in to post in the forum log in