RE: Tomcat 5.5.9 with Struts 1.2.7 - ClassCastException - looks like a Tomcat bug

2005-08-17 Thread Christian Dionne
Hi Stewart,

I had the same problem and I received a great answer on this mailing list
a few days ago.

The problem is caused by either one of these libraries that are
conflicting with Struts: 
- jsp-api.jar
- jsp-2.0-api.jar

On my side, removing these libraries from my project (they were not used)
solved the problem.

Thanks,
Christian

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: August 17, 2005 6:24 AM
To: [EMAIL PROTECTED]; user@struts.apache.org
Subject: Tomcat 5.5.9 with Struts 1.2.7 - ClassCastException - looks like a
Tomcat bug

Using Struts 1.2.7 with the latest Tomcat 5.5.9 I get the following in 
localhost.date.log when I first try to access my web application: 

17-Aug-2005 11:02:02 org.apache.catalina.core.Stand-ardHostValve custom 
SEVERE: Exception Processing 
ErrorPage[exceptionType=java.l-ang.Exception, location=/error.jsp] 
org.apache.jasper.JasperExcept-ion: Failed to load or instantiate 
TagExtraInfo class: org.apache.struts.taglib.html.-MessagesTei 

And in stdout_date.log I get: 

ERROR:org.apache.catalina.core-.ApplicationDispatcher.invoke(-Applicatio
nDispatcher.java:704-) 
Servlet.service() for servlet jsp threw exception 
java.lang.ClassCastException: org.apache.struts.taglib.html.-MessagesTei


Through trial and error I have found that this does not happen with 
Tomcat 5.0.28, with all other factors (struts, my application, etc) 
kept the same. 

Thought you all might like to know. 

Stewart 

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Error: java.lang.ClassCastException: org.apache.struts.taglib .htm l.MessagesTei

2005-08-16 Thread Christian Dionne
Nick!

Big Big Big thanks to you that was the problem!  Now everything is working
fine.

Thanks to Laurie too for trying hard to help me.

Christian

-Original Message-
From: Nick Heudecker [mailto:[EMAIL PROTECTED] 
Sent: August 15, 2005 11:17 PM
To: Struts Users Mailing List
Subject: Re: Error: java.lang.ClassCastException: org.apache.struts.taglib
.htm l.MessagesTei

This error is caused by a jsp-api.jar in your application.


On 8/15/05, Laurie Harper [EMAIL PROTECTED] wrote:
 You said you were using Struts 1.2.7. I'm guessing those 1.1 TLDs are
 declaring the TEI class Tomcat's failing to load in the old location. Try
 using the TLDs (and other configuration files) that correspond to the
 Struts release you're using.
 
 L.
 
 Christian Dionne wrote:
 
  Hi Laurie,
 
  Thanks for your answer.  I did a quick search to find if that
  was my problem and unfortunately it isn't.  I don't have any other
  copy of struts.jar in any other directory than in my project directory
  (WEB-INF/lib)...
 
  Here is the struts structure I have:
  WEB-INF/struts-bean-1.1.tld
  WEB-INF/struts-bean.tld
  WEB-INF/struts-html-1.1.tld
  WEB-INF/struts-html.tld
  WEB-INF/struts-logic-1.1.tld
  WEB-INF/struts-logic.tld
  WEB-INF/struts-nested-1.1.tld
  WEB-INF/struts-nested.tld
  WEB-INF/struts-tiles-1.1.tld
  WEB-INF/struts-tiles.tld
  WEB-INF/lib/struts.jar
 
  I just hope this ok.  Thanks again for helping me.  This is really
strange
  since I have been able to use struts without any problem on older Tomcat
  version.
 
  Thanks,
  Christian Dionne
 
  -Original Message-
  From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
  Sent: August 15, 2005 1:30 PM
  To: user@struts.apache.org
  Subject: Re: Error: java.lang.ClassCastException:
  org.apache.struts.taglib.htm l.MessagesTei
 
  You probably have multiple copies of the struts jar on you application's
  class path. Make sure that struts.jar only exists in your WEB-INF/lib
  directory and not elsewhere in whatever application server or servlet
  container you're using. Assuming you're using Tomcat, look for copies of
  struts.jar in common/lib, shared/lib, etc.
 
  L.
 
  Christian Dionne wrote:
 
 Hi!
 
 I'm using Tomcat 5.5.9 with Struts 1.2.7.  I am trying to convert my
 application that was working
 fine with Tomcat 5.0.30.  I mostly fixed everything except that now I am
 getting this error.
 
 This occurs when parsing a .jsp file that includes a struts .tld.
 
 Any idea how to fix this?  I saw a lot of similar post on the internet
 
  about
 
 this problem
 but no solution.
 
 org.apache.jasper.JasperException: Failed to load or instantiate
 TagExtraInfo class: org.apache.struts.taglib.html.MessagesTei
 
 
 
 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
 
 java:50)
 
 
 
 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407
 
 )
 
 
 
 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:279
 
 )
 
 
 
 
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm
 
 pl.java:422)
 
 
 
 
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
 
 va:248)
 
 
 
 
org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java
 
 :162)
 
 org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
   org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
   org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
   org.apache.jasper.compiler.Parser.parse(Parser.java:126)
 
 
 
 
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:21
 
 1)
 
 
 
 
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
 
 
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
 
 
 
 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
 
 56)
 
 
 
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
 
 93)
 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
 root cause
 
 java.lang.ClassCastException: org.apache.struts.taglib.html.MessagesTei
 
 
 
 
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm
 
 pl.java:420)
 
 
 
 
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
 
 va:248)
 
 
 
 
org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java
 
 :162)
 
 org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
   org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483

Error: java.lang.ClassCastException: org.apache.struts.taglib.htm l.MessagesTei

2005-08-15 Thread Christian Dionne
Hi!

I'm using Tomcat 5.5.9 with Struts 1.2.7.  I am trying to convert my
application that was working
fine with Tomcat 5.0.30.  I mostly fixed everything except that now I am
getting this error.

This occurs when parsing a .jsp file that includes a struts .tld.

Any idea how to fix this?  I saw a lot of similar post on the internet about
this problem
but no solution.

org.apache.jasper.JasperException: Failed to load or instantiate
TagExtraInfo class: org.apache.struts.taglib.html.MessagesTei

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:50)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407
)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:279
)

org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm
pl.java:422)

org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
va:248)

org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java
:162)

org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:21
1)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
56)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
93)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause 

java.lang.ClassCastException: org.apache.struts.taglib.html.MessagesTei

org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm
pl.java:420)

org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
va:248)

org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java
:162)

org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:21
1)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
56)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
93)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Thanks!
Christian Dionne

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Error: java.lang.ClassCastException: org.apache.struts.taglib .htm l.MessagesTei

2005-08-15 Thread Christian Dionne
Hi Laurie,

Thanks for your answer.  I did a quick search to find if that
was my problem and unfortunately it isn't.  I don't have any other
copy of struts.jar in any other directory than in my project directory 
(WEB-INF/lib)...

Here is the struts structure I have:
WEB-INF/struts-bean-1.1.tld
WEB-INF/struts-bean.tld
WEB-INF/struts-html-1.1.tld
WEB-INF/struts-html.tld
WEB-INF/struts-logic-1.1.tld
WEB-INF/struts-logic.tld
WEB-INF/struts-nested-1.1.tld
WEB-INF/struts-nested.tld
WEB-INF/struts-tiles-1.1.tld
WEB-INF/struts-tiles.tld
WEB-INF/lib/struts.jar

I just hope this ok.  Thanks again for helping me.  This is really strange
since I have been able to use struts without any problem on older Tomcat
version.

Thanks,
Christian Dionne

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: August 15, 2005 1:30 PM
To: user@struts.apache.org
Subject: Re: Error: java.lang.ClassCastException:
org.apache.struts.taglib.htm l.MessagesTei

You probably have multiple copies of the struts jar on you application's 
class path. Make sure that struts.jar only exists in your WEB-INF/lib 
directory and not elsewhere in whatever application server or servlet 
container you're using. Assuming you're using Tomcat, look for copies of 
struts.jar in common/lib, shared/lib, etc.

L.

Christian Dionne wrote:
 Hi!
 
 I'm using Tomcat 5.5.9 with Struts 1.2.7.  I am trying to convert my
 application that was working
 fine with Tomcat 5.0.30.  I mostly fixed everything except that now I am
 getting this error.
 
 This occurs when parsing a .jsp file that includes a struts .tld.
 
 Any idea how to fix this?  I saw a lot of similar post on the internet
about
 this problem
 but no solution.
 
 org.apache.jasper.JasperException: Failed to load or instantiate
 TagExtraInfo class: org.apache.struts.taglib.html.MessagesTei
   

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
 java:50)
   

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407
 )
   

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:279
 )
   

org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm
 pl.java:422)
   

org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
 va:248)
   

org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java
 :162)
   
 org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
   org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
   org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
   org.apache.jasper.compiler.Parser.parse(Parser.java:126)
   

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:21
 1)
   

org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
   

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
 56)
   

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
 93)
   
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
 root cause 
 
 java.lang.ClassCastException: org.apache.struts.taglib.html.MessagesTei
   

org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm
 pl.java:420)
   

org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
 va:248)
   

org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java
 :162)
   
 org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
   org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
   org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
   org.apache.jasper.compiler.Parser.parse(Parser.java:126)
   

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:21
 1)
   

org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
   

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
 56)
   

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
 93)
   
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291