aspose file tools*
The moose likes Struts and the fly likes Error while deploying struts application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error while deploying struts application" Watch "Error while deploying struts application" New topic
Author

Error while deploying struts application

Dagadu Akambe
Greenhorn

Joined: Sep 04, 2008
Posts: 7
Hello friends,

I am using struts 1.3.8 and tomcat 5.5 , my application is working fine with tomcat 5.5 but when i deploy it on Tomcat 6.0.14/Tomcat 6.0.18 I am facing the following problem while deploying in tomcat console.

=================
SEVERE: Servlet /smartlola threw load() exception
javax.servlet.UnavailableException: java.lang.NoClassDefFoundError: javax/transaction/Synchronization
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:402)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 11, 2009 1:27:21 AM org.apache.coyote.http11.Http11Protocol start

===================================================

If I open project from Browser using http://localhost:8080/xxxx then I am facing following problem in the browser window.

===============================================
org.apache.jasper.JasperException: Unable to read TLD "META-INF/tld/struts-bean.tld" from JAR file "file:/D:/java/apache-tomcat-6.0.14/webapps/smartlola/WEB-INF/lib/struts-taglib-1.3.8.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.bean.CookieTei
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:181)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:182)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:476)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1426)
org.apache.jasper.compiler.Parser.parse(Parser.java:133)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

===========================================================
I have all the required JAR files in LIB folder of my project.


Please help me to solve this problem.


Thanks and Regards
D. Akambe
Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
Please Post your web.xml and struts-config.xml

and please use code tag when you post them

without those file, it's not possible to know where the problem is

Thanks
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

"Dagadu Akambe", Welcome to the ranch !
Be careful next time to avoid using only capital letters in your thread title (check this). Thank you.


[My Blog]
All roads lead to JavaRanch
Dagadu Akambe
Greenhorn

Joined: Sep 04, 2008
Posts: 7
Sorry I forget to put here my web.xml and struts-config.xml

----------------------------struts-config.xml-----------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">

<struts-config>

<form-beans>

<form-bean name="loginForm" type="com.edu.forms.LoginMasterForm"></form-bean>
<form-bean name="homeForm" type="com.edu.forms.HomePageMasterForm"/>

</form-beans>


<global-forwards>
<forward name="moveToHome" path="/Home.do?dispatch=goToHomePage"></forward>
</global-forwards>


<action-mappings>

<action path="/login" type="com.edu.actions.LoginAction"
name="loginForm"
validate="false"
scope="request"
parameter="dispatch"
input="/index/Login.jsp">
<forward name="login" path="/index/Login.jsp"></forward>
<forward name="loginSuccess" path="/index/SLHome.jsp"></forward>
</action>

<!-- Homepage Action -->

<action path="/Home"
type="com.edu.actions.HomepageDispatchAction"
name="homeForm"
scope="request"
parameter="dispatch"
validate="false"
input="/index/index.jsp">
<forward name="login" path="/index/SLRegisteredUserHome.jsp"/>
<forward name="failure" path="/index/SLHome.jsp"/>
<forward name="register" path="/index/SLRegisterMain.jsp"/>
<forward name="showHistory" path="/HistoryDispatchAction.do?dispatch=goToHistory"/>
<forward name="goToCatg" path="/index/ak_in.jsp"/>
<forward name="homepage" path="/index/SLHome.jsp"></forward>
<forward name="movieUpload" path="/SLAddMovies.do?target=goToMovieUpload"></forward>
<forward name="editMovie" path="/SLAddMovies.do?target=goToModifyMovie"/>

</action>




</action-mappings>

<message-resources parameter="com.edu.properties.application" />

<plug-in className="com.edu.util.HibernatePlugIn" id="HibernatePlugIn" />

</struts-config>
-----------------------------------------------------------------------------------------------

--------------------------------------web.xml----------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<display-name>Struts Blank Application</display-name>

<!-- Standard Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>


<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>


<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index/Login.jsp</welcome-file>
</welcome-file-list>

</web-app>
----------------------------------------------------------------------------

please help me to solve this problem


Regards
D.Akambe
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Dagadu Akambe wrote:
javax.servlet.UnavailableException: java.lang.NoClassDefFoundError: javax/transaction/Synchronization
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:402)

Problem with the Trnasaction API, try to put jta.jar into the CLASSPATH
Dagadu Akambe wrote:
org.apache.jasper.JasperException: Unable to read TLD "META-INF/tld/struts-bean.tld" from JAR file "file:/D:/java/apache-tomcat-6.0.14/webapps/smartlola/WEB-INF/lib/struts-taglib-1.3.8.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.bean.CookieTei

Please make sure you have TLD file in the struts-taglib-1.3.8.jar/META-INF/tld/struts-bean.tld, also check for the taglib mapping. The JAR must be on classpath.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Dagadu Akambe
Greenhorn

Joined: Sep 04, 2008
Posts: 7
Thanks Sagar For your reply.

I inserted jta.jar into lib folder and Error which I was facing while deploying that one gone.

I checked for struts-bean.tld inside the struts-taglib-1.3.8.jar and it is present their but still facing the same problem as I mentioned above.


Thanks and Regards
D.Akambe
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Dagadu Akambe wrote:I checked for struts-bean.tld inside the struts-taglib-1.3.8.jar and it is present their but still facing the same problem as I mentioned above.

Look at the very first reply regarding the new way of defining the tld url in JSP files here and I hope you got the struts-taglib-1.3.8.jar in Classpath
Sunmon Jaya
Greenhorn

Joined: May 17, 2010
Posts: 1
I have the same problem, and solve it with the under instruction.

Just delete these files from the directory(web-inf):
jsp-api.jar
servlet-api.jar

perhaps no help to the poster, I wish it will help other ones.
Haritha Gorijavolu
Greenhorn

Joined: Feb 18, 2011
Posts: 21

Thanks, Sunmon Jaya. You suggestion was a lifeSAVER!! I finally figured the cause for my misery of last 20 hours.
Revathy Kuberan
Greenhorn

Joined: Dec 01, 2011
Posts: 1
Thnaks Sunmon Jaya. Thank you after an hour of struggle i got the solution now. its Working Now!!!
David Quintana
Greenhorn

Joined: May 29, 2013
Posts: 1

Thanks a lot Sunmon Jaya, it fixed for me too.
 
wood burning stoves
 
subject: Error while deploying struts application