You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by itay sahar <it...@gmail.com> on 2007/10/30 16:29:26 UTC

migration from tomcat 4.1 to 5.5

hi,

i have an application running on tomcat 4.1.
i want to make a huge addings to this application but first i want to work
on tomcat 5.5 version.
is there a way i can do it ? (i know it's not easy).

my project lib include the following jar files:  (works fine on tomcat
4.1!!!!!!!!)

aopalliance.jar
cglib-2.0-rc2.jar
commons-beanutils.jar
commons-collections-2.1.jar
commons-dbcp-1.1.jar
commons-digester.jar
commons-logging.jar
dom4j-1.4.jar
hibernate2.jar
jsf-api.jar
jsf-impl.jar
jstl.jar     (i don't see any use in the application but the jar exist
anyway)
jta.jar
log4j.jar
mysql-connector-java-3.0.9-stable-bin.jar
odmg-3.0.jar
servlet.jar              (probably Servlet 2.3).
spring.jar
struts.jar


i'v tried to remove sevlet.jar and use servlet-api.jar (tomcat 5.5 version
-- Servlet 2.4) but i cannot use:javax.servlet.jsp.tagext.TagSupport
and also javax.servlet.jsp.JspException is not available.

thanks in advance,
itay

Re: migration from tomcat 4.1 to 5.5

Posted by David Smith <dn...@cornell.edu>.
Throw out servlet-api.jar, servlet.jar.  Servlet-api.jar is provided in 
the common/lib folder.  As to TagSupport and JspException, they should 
be provided by common/lib/jsp-api.jar.

--David

itay sahar wrote:

>hi,
>
>i have an application running on tomcat 4.1.
>i want to make a huge addings to this application but first i want to work
>on tomcat 5.5 version.
>is there a way i can do it ? (i know it's not easy).
>
>my project lib include the following jar files:  (works fine on tomcat
>4.1!!!!!!!!)
>
>aopalliance.jar
>cglib-2.0-rc2.jar
>commons-beanutils.jar
>commons-collections-2.1.jar
>commons-dbcp-1.1.jar
>commons-digester.jar
>commons-logging.jar
>dom4j-1.4.jar
>hibernate2.jar
>jsf-api.jar
>jsf-impl.jar
>jstl.jar     (i don't see any use in the application but the jar exist
>anyway)
>jta.jar
>log4j.jar
>mysql-connector-java-3.0.9-stable-bin.jar
>odmg-3.0.jar
>servlet.jar              (probably Servlet 2.3).
>spring.jar
>struts.jar
>
>
>i'v tried to remove sevlet.jar and use servlet-api.jar (tomcat 5.5 version
>-- Servlet 2.4) but i cannot use:javax.servlet.jsp.tagext.TagSupport
>and also javax.servlet.jsp.JspException is not available.
>
>thanks in advance,
>itay
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: migration from tomcat 4.1 to 5.5

Posted by itay sahar <it...@gmail.com>.
running Tomcat by itself downloaded from tomcat.apache.org


On 10/30/07, itay sahar <it...@gmail.com> wrote:
>
> i'm using the servlet-api.jar that come with tomcat 5.5 installation (
> download from tomcat website).
> it's should be 2.4. (according the spec).
>
> my code is build in  eclipse with this jar version.
> the problem is in runtime...
> note: i don't want to get back to 1.4.
> maybe i need to change somthing in the code:
>
> this is the code display with the error mention above:
>
> org.apache.jasper.JasperException: Exception in JSP: /index.jsp:5
>
> 2:   <head>
> 3:   </head>
> 4:   <body>
> 5:     <jsp:forward page="main.jsf"/>
> 6:   </body>
> 7: </html>
>
>
>
>
> On 10/30/07, Caldarale, Charles R <Ch...@unisys.com> wrote:
> >
> > > From: itay sahar [mailto:itay.sahar@gmail.com]
> > > Subject: Re: migration from tomcat 4.1 to 5.5
> > >
> > > 3. But i still get the error: "java.lang.NoSuchMethodError:
> > > javax.servlet.jsp.tagext.TagAttributeInfo"
> > > when tring launch the application.
> >
> > There are three versions of the TagAttributeInfo constructor,
> > differentiated by the arguments, implemented at different versions of
> > the JSP spec.  Which one are you trying to use?  Your stack trace should
> > tell you.
> >
> > - Chuck
> >
> >
> > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> >
> > MATERIAL and is thus for use only by the intended recipient. If you
> > received this in error, please contact the sender and delete the e-mail
> > and its attachments from all computers.
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

Re: migration from tomcat 4.1 to 5.5

Posted by itay sahar <it...@gmail.com>.
i'm using the servlet-api.jar that come with tomcat 5.5 installation (
download from tomcat website).
it's should be 2.4. (according the spec).

my code is build in  eclipse with this jar version.
the problem is in runtime...
note: i don't want to get back to 1.4.
maybe i need to change somthing in the code:

this is the code display with the error mention above:

org.apache.jasper.JasperException: Exception in JSP: /index.jsp:5

2:   <head>
3:   </head>
4:   <body>
5:     <jsp:forward page="main.jsf"/>
6:   </body>
7: </html>




On 10/30/07, Caldarale, Charles R <Ch...@unisys.com> wrote:
>
> > From: itay sahar [mailto:itay.sahar@gmail.com]
> > Subject: Re: migration from tomcat 4.1 to 5.5
> >
> > 3. But i still get the error: "java.lang.NoSuchMethodError:
> > javax.servlet.jsp.tagext.TagAttributeInfo"
> > when tring launch the application.
>
> There are three versions of the TagAttributeInfo constructor,
> differentiated by the arguments, implemented at different versions of
> the JSP spec.  Which one are you trying to use?  Your stack trace should
> tell you.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: migration from tomcat 4.1 to 5.5

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: itay sahar [mailto:itay.sahar@gmail.com] 
> Subject: Re: migration from tomcat 4.1 to 5.5
> 
> 3. But i still get the error: "java.lang.NoSuchMethodError:
> javax.servlet.jsp.tagext.TagAttributeInfo"
> when tring launch the application.

There are three versions of the TagAttributeInfo constructor,
differentiated by the arguments, implemented at different versions of
the JSP spec.  Which one are you trying to use?  Your stack trace should
tell you.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: migration from tomcat 4.1 to 5.5

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Itay,

itay sahar wrote:
> well i change the classpath to work with the new "servlet-api.jar" and "
> jsp-api.jar" (new version from tomcat)
> After deploy i removed from the folder the two jar mention above since they
> already exist in common/lib.
> 
> so now:
> 1. No errors in eclipse ( after using the new jars).
> 2. Tomcat is starting with no errors.
> 3. But i still get the error: "java.lang.NoSuchMethodError:
> javax.servlet.jsp.tagext.TagAttributeInfo"
> when trying launch the application.
> 
> do you have an idea where is the conflict came from ?

That is very weird. Are you running Tomcat through Eclipse, or by
itself? Are you using a packaged version of Tomcat from somewhere other
than tomcat.apache.org?

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHJ5n59CaO5/Lv0PARAiBmAKC6PDQk+XYm9A/n7m0sTkBI0FvxRACgoMgX
DPyUs0fGKLPe2XajXc8rjCc=
=1uWi
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: migration from tomcat 4.1 to 5.5

Posted by itay sahar <it...@gmail.com>.
well i change the classpath to work with the new "servlet-api.jar" and "
jsp-api.jar" (new version from tomcat)
After deploy i removed from the folder the two jar mention above since they
already exist in common/lib.

so now:
1. No errors in eclipse ( after using the new jars).
2. Tomcat is starting with no errors.
3. But i still get the error: "java.lang.NoSuchMethodError:
javax.servlet.jsp.tagext.TagAttributeInfo"
when tring launch the application.

do you have an idea where is the conflict came from ?


On 10/30/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Itay,
>
> itay sahar wrote:
> > The type javax.servlet.jsp.tagext.TagSupport cannot be resolved. It is
> > indirectly referenced from required .class files
> > *The application is up and running but when click on the application
> from
> > tomcat manager i got the followiong error:
>
> Hmm.. it's possible that something changed from Servlet 2.3 (Tomcat 4.x)
> to Servlet 2.4 (Tomcat 5.x). Actually, it's probably the difference
> between JSP 1.2 (Tomcat 4.x) and JSP 2.0 (Tomcat 5.5). In either case,
> the API has changed, and you need to change along with it. The error you
> are getting does not point to an API issue, but it's worth a check.
>
> In your project, replace servlet-api.jar with the one you can find in
> the Tomcat distribution. Re-compile and you'll probably get errors
> (method not found?). Fix those errors and you'll probably be able to
> deploy after that.
>
> You can completely remove servlet.jar from your project (you do not need
> it even to compile). This may be interfering, since this is the
> implementation JAR. I think Tomcat will veto loading the servlet API
> jar, but it might not detect the other one as a problem.
>
> Once you do all that, let us know how it goes.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHJ2w29CaO5/Lv0PARApq+AJ9IYAHhlaYEs6nvo7ZaQjhUgH0u8QCeOd0d
> bENAJ2AAS3p9mW+vMdc/8Lc=
> =i87r
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: migration from tomcat 4.1 to 5.5

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Itay,

itay sahar wrote:
> The type javax.servlet.jsp.tagext.TagSupport cannot be resolved. It is
> indirectly referenced from required .class files
> *The application is up and running but when click on the application from
> tomcat manager i got the followiong error:

Hmm.. it's possible that something changed from Servlet 2.3 (Tomcat 4.x)
to Servlet 2.4 (Tomcat 5.x). Actually, it's probably the difference
between JSP 1.2 (Tomcat 4.x) and JSP 2.0 (Tomcat 5.5). In either case,
the API has changed, and you need to change along with it. The error you
are getting does not point to an API issue, but it's worth a check.

In your project, replace servlet-api.jar with the one you can find in
the Tomcat distribution. Re-compile and you'll probably get errors
(method not found?). Fix those errors and you'll probably be able to
deploy after that.

You can completely remove servlet.jar from your project (you do not need
it even to compile). This may be interfering, since this is the
implementation JAR. I think Tomcat will veto loading the servlet API
jar, but it might not detect the other one as a problem.

Once you do all that, let us know how it goes.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHJ2w29CaO5/Lv0PARApq+AJ9IYAHhlaYEs6nvo7ZaQjhUgH0u8QCeOd0d
bENAJ2AAS3p9mW+vMdc/8Lc=
=i87r
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: migration from tomcat 4.1 to 5.5

Posted by itay sahar <it...@gmail.com>.
hi thanks for reply,

The <DataSource> details is in "applicationContext.xml" (spring).
There is no data moved from context.xml/server.xml from tomcat 4.1 to tomcat
5.5. (i just don't have it...)
succeeded run on the default 4.1 version.

I'm using the default files as they created by tomcat 5.5.
Tomcat ignore servlet.jar so it removed by me from the lib folder.
(in Apache only)

* In eclipse i still need it to compile!! i do want to work with the new jar
(servlet-api.jar)
but when i removed the servlet.jar from the class path i got this error on
one of the classes:

The type javax.servlet.jsp.tagext.TagSupport cannot be resolved. It is
indirectly referenced from required .class files
*The application is up and running but when click on the application from
tomcat manager i got the followiong error:


java.lang.NoSuchMethodError:
javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;ZZ)V
	org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute(TagLibraryInfoImpl.java:581)
	org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:402)
	org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:249)
	org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:180)
	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
	org.apache.jasper.compiler.Parser.parse(Parser.java:127)
	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
	org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
	com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
	com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:691)
	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:661)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:48)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)




On 10/30/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Itay,
>
> itay sahar wrote:
> > i have an application running on tomcat 4.1.
> > i want to make a huge addings to this application but first i want to
> work
> > on tomcat 5.5 version.
> > is there a way i can do it ? (i know it's not easy).
>
> I recently upgraded 5 applications from 4.1.36 to 5.5.23 and it was
> relatively smooth. The best advice I can give you is:
>
> 1. Move any <Realm> and/or <DataSource> elements from server.xml to
>   [yourwebapp]/META-INF/context.xml (yes, that's META-INF, not WEB-INF)
>
> 2. Throw out your old server.xml. Start again with the one that ships
>   with Tomcat 5.5 and customize it to meet your needs. You may find
>   that, after doing #1 above that you no longer need any customizations
>   to the server.xml file.
>
> 3. Throw out servlet-api.jar and servlet.jar from your application.
>   Tomcat will ignore them at best (which I think is the case) and fail
>   at worst.
>
> > commons-beanutils.jar
> > commons-collections-2.1.jar
> > commons-dbcp-1.1.jar
> > commons-digester.jar
> > commons-logging.jar
>
> You might want to check that you have the most recent (compatible)
> versions of these libraries. I know that some of them have newer
> versions. I wouldn't do this until after you have TC 5.5 working, though.
>
> > mysql-connector-java-3.0.9-stable-bin.jar
>
> Latest MySQL connector is 5.0.something (I have 5.0.7 right now). I
> strongly recommend upgrading after you get everything else working. Note
> that from 3.0 to 5.0 a lot of JDBC spec stuff was fixed (MySQL had not
> been compliant in several instances) so some behavior has changed (for
> instance, inserting more data than will fit into a character column now
> throws an exception instead of issuing a warning). Check the docs to see
> how to deal with these changes. In most cases, you can configure the
> JDBC driver to revert to the old (non-JDBC-compliant) behavior.
>
> > but i cannot use:javax.servlet.jsp.tagext.TagSupport
> > and also javax.servlet.jsp.JspException is not available.
>
> Do you have a problem compiling, or a problem deploying? Can you post a
> full stack trace of the first error you encounter?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHJ1Hs9CaO5/Lv0PARAlJiAKC4qUzX3yago9BSc04tE03h7k/yYQCgmElL
> z/Y6O2l2yvLSkWp8zi4TtVA=
> =8jqv
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: migration from tomcat 4.1 to 5.5

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Itay,

itay sahar wrote:
> i have an application running on tomcat 4.1.
> i want to make a huge addings to this application but first i want to work
> on tomcat 5.5 version.
> is there a way i can do it ? (i know it's not easy).

I recently upgraded 5 applications from 4.1.36 to 5.5.23 and it was
relatively smooth. The best advice I can give you is:

1. Move any <Realm> and/or <DataSource> elements from server.xml to
   [yourwebapp]/META-INF/context.xml (yes, that's META-INF, not WEB-INF)

2. Throw out your old server.xml. Start again with the one that ships
   with Tomcat 5.5 and customize it to meet your needs. You may find
   that, after doing #1 above that you no longer need any customizations
   to the server.xml file.

3. Throw out servlet-api.jar and servlet.jar from your application.
   Tomcat will ignore them at best (which I think is the case) and fail
   at worst.

> commons-beanutils.jar
> commons-collections-2.1.jar
> commons-dbcp-1.1.jar
> commons-digester.jar
> commons-logging.jar

You might want to check that you have the most recent (compatible)
versions of these libraries. I know that some of them have newer
versions. I wouldn't do this until after you have TC 5.5 working, though.

> mysql-connector-java-3.0.9-stable-bin.jar

Latest MySQL connector is 5.0.something (I have 5.0.7 right now). I
strongly recommend upgrading after you get everything else working. Note
that from 3.0 to 5.0 a lot of JDBC spec stuff was fixed (MySQL had not
been compliant in several instances) so some behavior has changed (for
instance, inserting more data than will fit into a character column now
throws an exception instead of issuing a warning). Check the docs to see
how to deal with these changes. In most cases, you can configure the
JDBC driver to revert to the old (non-JDBC-compliant) behavior.

> but i cannot use:javax.servlet.jsp.tagext.TagSupport
> and also javax.servlet.jsp.JspException is not available.

Do you have a problem compiling, or a problem deploying? Can you post a
full stack trace of the first error you encounter?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHJ1Hs9CaO5/Lv0PARAlJiAKC4qUzX3yago9BSc04tE03h7k/yYQCgmElL
z/Y6O2l2yvLSkWp8zi4TtVA=
=8jqv
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org