Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Error while deploying struts application

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Dagadu Akambe", Welcome to the ranch !
Be careful next time to avoid using only capital letters in your thread title (check this). Thank you.
 
Dagadu Akambe
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Dagadu Akambe
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Greenhorn
Posts: 1
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 21
Debian Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Sunmon Jaya. You suggestion was a lifeSAVER!! I finally figured the cause for my misery of last 20 hours.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thnaks Sunmon Jaya. Thank you after an hour of struggle i got the solution now. its Working Now!!!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks a lot Sunmon Jaya, it fixed for me too.
 
Hey cool! They got a blimp! But I have a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic