tags:

views:

260

answers:

1

Hi, I have developed an web application using struts2 and hibernate 3, that is not being deployed properly in tomcat manager deployer.

Error message in manager console : FAIL - Application at context path /classifieds could not be started

Also here is the server error log, as in apache tomcat 6 log directory.

May 27, 2010 7:17:23 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter struts2 java.lang.ClassNotFoundException: net.web.classifieds.plugins.Struts2Dispatcher at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:269) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1276) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:624) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619)

A: 

It seems that the problem is caused by fact that the class: net.web.classifieds.plugins.Struts2Dispatcher is not found. Make sure that this class is attached to the war file, which you are trying to deploy.

If you have implemented this class yourself, it should be found from WEB-INF/classes/net/web/classifieds/plugins/ directory. You can verify this by unzipping the war file, and checking if the class is found. On the other hand, if the class is a part of a library implemented by someone else, you should find the jar file containing this class from WEB-INF/lib directory.

However, it would be useful to see your build script, if this does not solve the problem.

pkainulainen
Thanks Petri for the reply. Yes the problem stated here was in the build.xml file. the fileset dir was set to <fileset dir="."> instead of <fileset dir="WebContent">. Now I have rectified the problem, and the structure within the war file seems to be fine. Still I have the same error in the manager console FAIL - Application at context path /classifieds could not be started
Miltan Chaudhury
Here is the latest error from error log :May 28, 2010 12:00:38 PM org.apache.catalina.core.StandardContext filterStartSEVERE: Exception starting filter struts2javax.servlet.ServletException: org.hibernate.MappingException: Could not determine type for: org.apache.commons.logging.Log, for columns: [org.hibernate.mapping.Column(LOG)] at net.web.classifieds.plugins.Struts2Dispatcher.init(Unknown Source)
Miltan Chaudhury
This error is caused by hibernate. It seems that something is wrong with your hibernate mapping. Are you trying to log something in to the database?
pkainulainen
Yes Petri, I understand that, . And accordingly investigating the issue .. here are few more clues to get it solved :I have used eclipse plugin, Hibernate tools, to generate the .hbm.xml mapping files and the Java files those are mapped to DB tables. I am doing this autogeneration for the first time, I found that some Home files are created there, like ... I have a table auction, accordingly I have the Auction.java and Auction.hbm.xml files generated. But here I also see AuctionHome.java and AuctionHome.hbm.xml files generated.Please help. Thanks a lot for following up the issue.
Miltan Chaudhury
I have removed the *Home.* files from the directory, and now I get the error :May 28, 2010 3:29:26 PM org.apache.catalina.core.StandardContext filterStartSEVERE: Exception starting filter struts2javax.servlet.ServletException: org.hibernate.MappingNotFoundException: resource: net/web/classifieds/vo/AdminHome.hbm.xml not found at net.web.classifieds.plugins.Struts2Dispatcher.init(Unknown Source) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) ...This application is nothing private, so I can mail the compressed source code to you for review
Miltan Chaudhury
Petri thanks for showing interest. I have mailed the source code to you.
Miltan Chaudhury
The problem is that your hibernate configuration contains mapping resources that are not found from the given directory. Your hibernate.cfg.xml should contain only references to such files that are actually found from the code base. The problem with code generation is that it never produces perfect results. One should always be prepared to tweak the generated entities and entity mappings by hand.
pkainulainen