DO NOT REPLY [Bug 22913] - Using jndi to get a DBCP BasicDataSource gives a ClassCastException

2005-02-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=22913


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 OS/Version||All
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2005-02-28 21:59 ---
Closing as invalid based on Dirk's comments.

Issues such as this should always be discussed on the relevant mailing list
before creating a bugzilla item.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 15293] - ClassCastException when using Coyote connector with JK2 and using HTTPS

2004-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=15293


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2004-12-01 02:53 ---
As of November 15, 2004, JK2 is no longer supported. All bugs related to JK2 
will be marked as WONTFIX. In its place, some of its features have been 
backported to jk1. Most of those features will be seen in 1.2.7, which is 
slated for release on November 30th, 2004.

Another alternative is the ajp addition to mod_proxy which will be part of 
apache 2.

For more information on the Tomat connectors docs at
http://jakarta.apache.org/tomcat/connectors-doc/

[Even though this seems to be jk and not jk2. But the tomcat version is 4.0
which is also unsupported.]


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 32454] - A ClassCastException can be caused for JNDI mail session lookup

2004-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32454


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 32454] - A ClassCastException can be caused for JNDI mail session lookup

2004-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32454


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2004-11-30 18:26 ---
Done for 5.0.31 as well.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 32454] - A ClassCastException can be caused for JNDI mail session lookup

2004-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32454


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2004-11-30 18:24 ---
I've applied your patch for Tomcat 5.5.5, will do 5.0.31 shortly.  Thanks for 
submitting it ;)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 32454] - A ClassCastException can be caused for JNDI mail session lookup

2004-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32454





--- Additional Comments From [EMAIL PROTECTED]  2004-11-30 18:20 ---
Created an attachment (id=13599)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=13599&action=view)
adds a section 4 to javamail config mentioning the javamail libs and locations


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 32454] - A ClassCastException can be caused for JNDI mail session lookup

2004-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32454


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2004-11-30 18:01 ---
It's a user error, because it's the user that's placing (and controlling the 
location of) mail.jar and actiation.jar.  If you want to use them, use one 
version in one place.  Jar duplication across repositories like this is user 
error.  The docs on MailSession JNDI, however, should be amended to include 
this information.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 32454] New: - A ClassCastException can be caused for JNDI mail session lookup

2004-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32454>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32454

   Summary: A ClassCastException can be caused for JNDI mail session
lookup
   Product: Tomcat 5
   Version: 5.5.4
  Platform: PC
OS/Version: Windows 2000
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


the JavaMail JNDI configuration for Tomcat requires activation.jar and 
mail.jar. 

a java.lang.ClassCastException: javax.mail.Session can be caused by placing 
mail.jar in common/lib *and* WEB-INF/lib and then attempting to obtain a 
Session from mail/Session JNDI context as per 5.5.4 docs. 

placing activation.jar in both locations does not cause the issue, it is 
confined to 2 copies of mail.jar. activation.jar and mail.jar should be located 
in common/lib for Tomcat to configure the JNDI factory. The question is whether 
the error _should_ occur or whether this is a user error for placing mail.jar 
in a webapp lib.

java.lang.ClassCastException: javax.mail.Session
at com.qas.newmedia.common.email.MrPostMan.sendMessage
(MrPostMan.java:103)
at com.qas.newmedia.common.email.MrPostMan.sendMessage
(MrPostMan.java:147)
at com.qas.newmedia.intranet.pof.actions.create.CreateStep1Action.doWork
(CreateStep1Action.java:38)
at com.qas.newmedia.intranet.iq.actions.SecuredBaseAction.execute
(SecuredBaseAction.java:151)
at org.apache.struts.action.RequestProcessor.processActionPerform
(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)
at com.qas.newmedia.common.filters.SetCharacterEncodingFilter.doFilter
(SetCharacterEncodingFilter.java:146)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:105)
at org.apache.catalina.valves.FastCommonAccessLogValve.invoke
(FastCommonAccessLogValve.java:481)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:383)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at org.apache.jk.common.ChannelSocket.processConnection
(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 31171] - ClassCastException in org.apache.jasper.runtime.PageContextImpl.getException

2004-09-20 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31171>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31171

ClassCastException in org.apache.jasper.runtime.PageContextImpl.getException

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-09-20 18:09 ---
Fixed for 5.0.29 and 5.5.3.

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



DO NOT REPLY [Bug 31171] - ClassCastException in org.apache.jasper.runtime.PageContextImpl.getException

2004-09-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31171>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31171

ClassCastException in org.apache.jasper.runtime.PageContextImpl.getException





--- Additional Comments From [EMAIL PROTECTED]  2004-09-19 02:04 ---
Yoav Shapira's suggestion (2004-09-15 18:14) seems like a reasonable way to handle 
this.  If my 
opinion matters :)

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



DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30085>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib





--- Additional Comments From [EMAIL PROTECTED]  2004-09-17 23:07 ---
I agree with most of the points you make; however, portability is a non-issue 
for my client in this particular case, although I agree with the concept.

I've gone into the code and attempted to use the Java types instead, but it 
doesn't work when I need to pass a cursor to an Oracle stored proc, so it 
doesn't look like I can decouple the two.  I do however, understand the issue 
more clearly now, and hopefully anyone else who comes across this will too.

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



DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30085>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-09-17 15:36 ---
First, I don't buy that you have to include the vendor-specific JAR in general 
to call stored procs: we call stored procs all the time using just the methods 
and types in the java.sql package.  To do otherwise of course ties you to the 
DB vendor and limits portability.  But I can see this being a requirement in a 
specific case such as yours.

To the VM, oracle.sql.BLOB loaded in one classloader is different from 
oracle.sql.BLOB loaded in another classloader.  This is a VM issue, not a 
Tomcat one.  You can read more about in the JLS if you want.  Tomcat's 
ClassLoader model (delegation and all) is dictated by the Servlet 
Specification.  Things loaded in the common classloader cannot see things 
loaded in the WEB-INF classloaders, it's not our choice as Tomcat implementors, 
it's mandated by the Spec.

Here's one workaround: if you must include the Oracle jar in WEB-INF/lib, put 
the DBCP (and commons-pool) jars there as well, and configure your own 
connection pooling instead of using Tomcat's.  This is trivial to do and 
ensures greater portability for your app.

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



DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30085>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2004-09-17 15:25 ---
I've encountered this issue while doing some development with Oracle and Tomcat
as well, and believe it is a valid issue:

1)  My code will not compile without the Oracle jar file included in the
project; when you call stored procs, you have to say what kind of paramters
you're passing in and out, thus requiring jar file inclusion in the project.

2) Tomcat needs the jar file to create the pooled connections.

3) These are loaded with separate classloaders (for obvious reasons), and it
should be a supported configuration in Tomcat.

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



DO NOT REPLY [Bug 31171] - ClassCastException in org.apache.jasper.runtime.PageContextImpl.getException

2004-09-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31171>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31171

ClassCastException in org.apache.jasper.runtime.PageContextImpl.getException





--- Additional Comments From [EMAIL PROTECTED]  2004-09-15 18:14 ---
Good, interesting catch.  It seems like something simple in the PageContext 
imlpementation, like

if(! (exception instanceof Exception)) {
  exception = new JspException(exception);
}

would be a good wrap.  It only wraps if needed, and the JspException 
constructor takes a Throwable root cause, so I think we'll be all set.  I'll 
wait to see what more experienced Jasper developers (Kin-Man?) think of this.

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



DO NOT REPLY [Bug 31171] New: - ClassCastException in org.apache.jasper.runtime.PageContextImpl.getException

2004-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31171>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31171

ClassCastException in org.apache.jasper.runtime.PageContextImpl.getException

   Summary: ClassCastException in
org.apache.jasper.runtime.PageContextImpl.getException
   Product: Tomcat 5
   Version: 5.0.19
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I am writing to report a case where calling PageContextImpl.getException()
can result in a ClassCastException.  This occurred in tomcat 5.0.19,
but examination of tomcat 5.0.28's source code, the problem could
occur there as well.

In my application, I have an jsp declared as an error page.  This
error page uses a tag to record some additional information.  The
first few lines of this tag are as follows:

public void doTag() throws IOException, JspException
{
try {

PageContext context = (PageContext)getJspContext();
JspWriter out = context.getOut();
HttpServletRequest request = (HttpServletRequest) context.getRequest();
Throwable error = context.getException();
// proceed to log the exception and some of the
// surrounding contextual information

In one case, the `catch' associated with this try caught a
ClassCastException from PageContextImpl.getException():

  // line 608 in 5.0.19's PageContextImpl.java
  // line 560 in 5.0.28's PageContextImpl.java
  public Exception getException() { return (Exception)request.getAttribute(EXCEPTION); 
}


This would occur if the error was a result of a java.lang.Throwable.


What possible paths might lead up to this?

The _jspService() generated by JspC typically terminates with
something like the following:

} catch (Throwable t) {
  if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
  out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
  }
} finally {
  if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}

It's catching a Throwable.

PageContextImpl.handlePageException() (lines 730 - 745 in version
5.0.28) does this: 


   public void handlePageException(final Throwable t)
throws IOException, ServletException
{
if (t == null)
throw new NullPointerException("null Throwable");

if (System.getSecurityManager() != null){
try{
AccessController.doPrivileged(new PrivilegedExceptionAction(){
public Object run() throws Exception{
doHandlePageException(t);
return null;
}
});


It's dealing with throwables.

Continuing on to doHandlePageException(), (lines 763 - 786 in version
5.0.28):

private void doHandlePageException(Throwable t)
throws IOException, ServletException {

if (errorPageURL != null && !errorPageURL.equals("")) {

/*
 * Set request attributes.
 * Do not set the javax.servlet.error.exception attribute here
 * (instead, set in the generated servlet code for the error page)
 * in order to prevent the ErrorReportValve, which is invoked as
 * part of forwarding the request to the error page, from
 * throwing it if the response has not been committed (the response
 * will have been committed if the error page is a JSP page).
 */
request.setAttribute("javax.servlet.jsp.jspException", t);
request.setAttribute("javax.servlet.error.status_code",
new Integer(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
request.setAttribute("javax.servlet.error.request_uri",
((HttpServletRequest) request).getRequestURI());
request.setAttribute("javax.servlet.error.servlet_name",
 config.getServletName());
try {
forward(errorPageURL);


It's also dealing with Throwables.


The following two (short) jsp files reproduce the problem consistently.


--- Page: foo.jsp ---
<%@ page session="false"
 language="java" 
 errorPage="/myerror.jsp"
%>

hello world
<%
  if (1 + 1 == 2) {
throw new Throwable("The cake fell in the mud&qu

DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-07-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30085>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib





--- Additional Comments From [EMAIL PROTECTED]  2004-07-13 19:49 ---
Moreover, what is the reason that DBCP is using classes from /common/lib by
default?  My webapp configures DBCP in the webapp's  -- seems to me
that the webapp's Oracle classes should be loaded instead.

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



DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-07-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30085>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib





--- Additional Comments From [EMAIL PROTECTED]  2004-07-13 19:30 ---
DBCP uses classes from common/lib
WebApp uses classes from WEB-INF/lib

Those two are the same and I don't understand why a ClassCastException is
thrown: I am casting to the right class.

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



DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-07-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30085>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-07-13 18:38 ---
Well, duh, what do you think DBCP will be using ?
And since there's no delegation in the CL (by default), your webapp will use
that other class in /WEB-INF/lib.
-> classcast

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



DO NOT REPLY [Bug 30085] New: - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-07-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30085>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib

   Summary: ClassCastException using Oracle BLOB if Oracle JDBC jar
is in both /common/lib and [webapp]/lib
   Product: Tomcat 5
   Version: 5.0.25
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Reproduceble on both Windows 2000 and Solaris.

Use either classes12.zip (rename to classes12.jar) or ojdbc.jar from Oracle.

Place either of the jar files into both /common/lib and [webapp]/lib, configure
webapp to use org.apache.commons.dbcp.BasicDataSourceFactory in the context XML
file.

Get blob from Oracle database via ResultSet.getBlob() and cast it to a
oracle.sql.BLOB. --> ClassCastException occures even though the blob in the
ResultSet is an oracle.sql.BLOB, as indicated by debugger.

Solution: remove the Oracle JDBC jar from [webapps]/lib directory and everything
works fine.

Seems to be an issue with Catalina's classloader.

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter





--- Additional Comments From [EMAIL PROTECTED]  2004-03-17 23:16 ---
The current code reads:

if (contentLength != -1) {
response.getMimeHeaders().setValue("Content-Length")
.setInt(contentLength);
outputBuffer.addActiveFilter
(outputFilters[Constants.IDENTITY_FILTER]);
contentDelimitation = true;
} else {
if (entityBody && http11 && keepAlive) {
outputBuffer.addActiveFilter
(outputFilters[Constants.CHUNKED_FILTER]);
contentDelimitation = true;
response.addHeader("Transfer-Encoding", "chunked");
} else {
outputBuffer.addActiveFilter
(outputFilters[Constants.IDENTITY_FILTER]);
}
}

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter





--- Additional Comments From [EMAIL PROTECTED]  2004-03-17 20:00 ---
Created an attachment (id=10836)
fixed the patch.. had a extra char in it. sorry remy

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter





--- Additional Comments From [EMAIL PROTECTED]  2004-03-17 19:24 ---
Created an attachment (id=10835)
Patch for the HttpProcessor, fixes classCastException

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter





--- Additional Comments From [EMAIL PROTECTED]  2004-03-17 19:23 ---

I found what was causing the class cast exception.  The maxKeepAliveRequests is 
set to 100.  If more than 100 requests are sent to that connection then the 
Http11Processor.process() sets keepAlive to false (which is the correct 
behavior) but when Http11Processor.processResponse() is called the following 
code 

1485if (contentLength != -1) {
1486response.getMimeHeaders().setValue("Content-Length")
1487.setInt(contentLength);
1488outputBuffer.addActiveFilter
1489(outputFilters[Constants.IDENTITY_FILTER]);
1490contentDelimitation = true;
1491} else {
1492if (entityBody && http11 && keepAlive) {
1493outputBuffer.addActiveFilter
1494(outputFilters[Constants.CHUNKED_FILTER]);
1495contentDelimitation = true;
1496response.addHeader("Transfer-Encoding", "chunked");
1497}
1498}

does not add a filter there for causing the compression filter to be the only 
one added.  

I am attaching a patch that checks to see if there are any filters added before 
the compression filter is and if not added the identityFilter.

All line numbers and the patch are for 5.0.18

John

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-02-24 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2004-02-24 23:16 ---
*** Bug 27197 has been marked as a duplicate of this bug. ***

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



DO NOT REPLY [Bug 22913] - Using jndi to get a DBCP BasicDataSource gives a ClassCastException

2004-02-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22913>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22913

Using jndi to get a DBCP   BasicDataSource gives a  ClassCastException





--- Additional Comments From [EMAIL PROTECTED]  2004-02-21 13:36 ---
Stacktrace of the ClassCastException?
Version of DBCP you are using

PS: these kind of issues should first be verified on the commons-user mailing list

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-02-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter





--- Additional Comments From [EMAIL PROTECTED]  2004-02-05 17:10 ---
Sure. Please provide a test case (test telnet request + servlet or JSP if needed).

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-02-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter





--- Additional Comments From [EMAIL PROTECTED]  2004-02-05 13:47 ---
Remy,

The fix did not work.. I still get the classcastexception.  The stacktrace is 
the same..

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter





--- Additional Comments From [EMAIL PROTECTED]  2004-02-04 19:44 ---
Okidoki. Feel free to test the patch.

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter





--- Additional Comments From [EMAIL PROTECTED]  2004-02-04 17:34 ---
I know it seems silly (believe me I know!!) but I just do as management tells 
me to and they wanted me to see if I could get it fixed..

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-02-04 16:39 ---
I added a filter for the only branch of the if which wasn't adding a filter. I
don't quite understand when this branch code was being run; possibly in the case
of an error. So this is fixed.

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2004-02-04 16:23 ---
So basically, you are complining about stacktraces in your logs, right ?
"I get ClassCastException's when navigating our site" would be translated by a
normal guy as: I see the stacktrace in my browser.
Maybe it could happen when finishing an error request.

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter





--- Additional Comments From [EMAIL PROTECTED]  2004-02-04 16:09 ---
Remy,

I did not think you read my bug reports, I though you would have filtered them 
by now.. :-)

I understand what you are saying, but I keep getting the following stacktrace...

ava.lang.ClassCastException
at org.apache.coyote.http11.filters.GzipOutputFilter.end
(GzipOutputFilter.java:165)
at org.apache.coyote.http11.InternalOutputBuffer.endRequest
(InternalOutputBuffer.java:439)
at org.apache.coyote.http11.Http11Processor.action
(Http11Processor.java:968)
at org.apache.coyote.Response.action(Response.java:226)
at org.apache.coyote.Response.finish(Response.java:348)
at org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:328)
at org.apache.coyote.tomcat5.CoyoteResponse.finishResponse
(CoyoteResponse.java:497)
at org.apache.coyote.tomcat5.CoyoteAdapter.service
(CoyoteAdapter.java:209)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:828)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:536)

This would indicate to me that it is a bug..

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



DO NOT REPLY [Bug 26662] - ClassCastException in GzipOutputFilter

2004-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-02-04 15:59 ---
Long time since I last heard about your reports. Now you'll see that this must
be wrapped with another filter for content delimitation (either identity or
chunked), which can be safely cast. If this doesn't happen, then you have a bug,
but quite frankly I really doubt it.

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



DO NOT REPLY [Bug 26662] New: - ClassCastException in GzipOutputFilter

2004-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26662

ClassCastException in GzipOutputFilter

   Summary: ClassCastException in GzipOutputFilter
   Product: Tomcat 5
   Version: 5.0.18
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Connector:Coyote
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When using the compression filter included with the coyote connector I get 
ClassCastException's when navigating our site.  It is at line 165 in the 
GzipOutputFilter

159 public long end()
160throws IOException {
161if (compressionStream == null) {
162compressionStream = new GZIPOutputStream(fakeOutputStream);
163}
164compressionStream.finish();
165return ((OutputFilter) buffer).end();
166}

the buffer being cast into an OutputFilter is not always an OutputFilter as 
show in InternalOutputBuffer line 309 

306public void addActiveFilter(OutputFilter filter) {
307
308if (lastActiveFilter == -1) {
309filter.setBuffer(outputStreamOutputBuffer);
310} else {
311for (int i = 0; i <= lastActiveFilter; i++) {
312if (activeFilters[i] == filter)
313return;
314}
315filter.setBuffer(activeFilters[lastActiveFilter]);
316}
317
318activeFilters[++lastActiveFilter] = filter;
319
320filter.setResponse(response);
321
322} 

as you can see if lastActiveFilter = -1 then the buffer is set to 
outputStreamOutputBuffer which is an OutputStreamOutputBuffer which inherits 
from OutputBuffer not OutputFilter so the cast fails.

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



DO NOT REPLY [Bug 13597] - ClassCastException in

2004-02-01 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13597>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13597

ClassCastException in 

DO NOT REPLY [Bug 26191] - ClassCastException in JspDocumentParser

2004-01-19 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26191>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26191

ClassCastException in JspDocumentParser

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-01-19 10:34 ---
Fixed. Thanks.

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



DO NOT REPLY [Bug 26191] - ClassCastException in JspDocumentParser

2004-01-16 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26191>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26191

ClassCastException in JspDocumentParser





--- Additional Comments From [EMAIL PROTECTED]  2004-01-16 11:45 ---
I have to agree the code is usafe. It probably should be:
} catch (SAXParseException e) {
  // Do what we currently do
} catch (SAXException e) {
  // Reduced functionality (no line info)
} catch (Exception e) {
  // Unexpected error
}

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



DO NOT REPLY [Bug 26191] - ClassCastException in JspDocumentParser

2004-01-16 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26191>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26191

ClassCastException in JspDocumentParser





--- Additional Comments From [EMAIL PROTECTED]  2004-01-16 11:42 ---
Created an attachment (id=9976)
Proposed patch

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



DO NOT REPLY [Bug 26191] New: - ClassCastException in JspDocumentParser

2004-01-16 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26191>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26191

ClassCastException in JspDocumentParser

   Summary: ClassCastException in JspDocumentParser
   Product: Tomcat 5
   Version: 5.0.16
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


from JspDocumentParser.java Revision: 1.74
lines 233-240
} catch (Exception e) {
jspDocParser.err.jspError(
new Mark(
path,
((SAXParseException)e).getLineNumber(),
((SAXParseException)e).getColumnNumber()),
e.getMessage());
}


SAXException thrown at line 1057 of JspDocumentParser.java results in
ClassCastException

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



ClassCastException in GzipOutputFilter

2003-10-16 Thread Torsten Fohrer

After cvs checkout and build i got this exception:

SEVERE: Error finishing response
java.lang.ClassCastException
at
org.apache.coyote.http11.filters.GzipOutputFilter.end(GzipOutputFilter.java:
165)
at
org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffe
r.java:437)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:817)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
at java.lang.Thread.run(Thread.java:536)
java.lang.ClassCastException
at
org.apache.coyote.http11.filters.GzipOutputFilter.end(GzipOutputFilter.java:
165)
at
org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffe
r.java:437)
at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:919)
at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.Response.finish(Response.java:343)
at
org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:328)
at
org.apache.coyote.tomcat5.CoyoteResponse.finishResponse(CoyoteResponse.java:
497)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:780)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
at java.lang.Thread.run(Thread.java:536)

Mit freundlichen Grüssen

Torsten Fohrer
DCSI AG

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



DO NOT REPLY [Bug 22913] - Using jndi to get a DBCP BasicDataSource gives a ClassCastException

2003-09-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22913>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22913

Using jndi to get a DBCP   BasicDataSource gives a  ClassCastException





--- Additional Comments From [EMAIL PROTECTED]  2003-09-04 19:37 ---
I forgot to mention that I use these three lines to get the datasource:
initContext = new InitialContext();
javax.naming.Context envContext =  
(javax.naming.Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookupLink("jdbc/SessionDB");

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



DO NOT REPLY [Bug 15778] New: - DBCP ClassCastException / postgresql's PGConnection / getLargeObjectAPI

2003-01-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15778>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15778

DBCP ClassCastException / postgresql's PGConnection / getLargeObjectAPI

   Summary: DBCP ClassCastException / postgresql's PGConnection /
getLargeObjectAPI
   Product: Tomcat 4
   Version: 4.1.12
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Major
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have tomcat 4.1.12 configured with JNDI DataSource with PostgreSQL 7.2.3 
connection pool configured like the documentation (tried it with pgjdbc2.jar 
and also the 7.3 jar from jdbc.postgresql.org that claims to work with PG 7.2 
and even a compiled jar from the PG 7.3 source). The connection pool works fine 
with the "normal" SQL interface (not LargeObject), but when reach this line I 
get a ClassCastException:

LargeObjectManager lobj = ((org.postgresql.PGConnection)db).getLargeObjectAPI();

Before trying to use the DBCP, I never got a ClassCastException here.

Is this a new bug or just something that is not supported by the DBCP/JDBC?

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




DO NOT REPLY [Bug 15293] - ClassCastException when using Coyote connector with JK2 and using HTTPS

2002-12-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15293>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15293

ClassCastException when using Coyote connector with JK2  and using HTTPS





--- Additional Comments From [EMAIL PROTECTED]  2002-12-12 00:07 ---
Sorry just noticed I was using mod_jk not mod_jk2 after multiple unsuccessful 
attempts to make mod_jk2 work with apache 1.3.27 on windows

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




DO NOT REPLY [Bug 15293] New: - ClassCastException when using Coyote connector with JK2 and using HTTPS

2002-12-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15293>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15293

ClassCastException when using Coyote connector with JK2  and using HTTPS

   Summary: ClassCastException when using Coyote connector with JK2
and using HTTPS
   Product: Tomcat 4
   Version: 4.0 Beta 1
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Connector:Coyote JK 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


An exception (see stack trace) happens when accessing tomcat via apache server 
ONLY when using HTTPS (works fine over HTTP). Even though this exception is 
thrown content is delivered succesfully to user's browser

MOD_JK: 2.0.2
Tomcate 4.1.16
Apache 1.3.27 with SSL


943626 [Thread-11] ERROR server.JkCoyoteHandler  - Error in action code
java.lang.ClassCastException
at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:382)
at org.apache.coyote.Response.action(Response.java:216)
at org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest
(CoyoteAdapter.java:310)
at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:221)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
at org.apache.jk.common.ChannelSocket.processConnection
(ChannelSocket.java:590)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)

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




DO NOT REPLY [Bug 15201] - ClassCastException in JkCoyoteHandler.action() with SSL

2002-12-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15201>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15201

ClassCastException in JkCoyoteHandler.action() with SSL

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-12-10 08:47 ---
Fixed in CVS. 4.1.17 will include the fix (great timing, this would have been a
must-fix issue, and a serious problem if it had ended in a stable build).

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




DO NOT REPLY [Bug 15201] New: - ClassCastException in JkCoyoteHandler.action() with SSL

2002-12-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15201>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15201

ClassCastException in JkCoyoteHandler.action() with SSL

   Summary: ClassCastException in JkCoyoteHandler.action() with SSL
   Product: Tomcat 4
   Version: 4.1.16
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Connector:Coyote JK 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


This is seen using the just-released Debian 4.1.16-1 package. (I haven't been
able to build Tomcat yet.)

I get the following in my catalina.out log:
---
0 [main] INFO common.ChannelSocket  - JK2: ajp13 listening on
localhost/127.0.0.1:8009
300 [main] INFO server.JkMain  - Jk running ID=0 time=20/4751 
config=/usr/share/tomcat4/conf/jk2.properties
---

When I try to connect, over SSL via Apache, I get the following addition:

---
32394 [Thread-4] ERROR server.JkCoyoteHandler  - Error in action code 
java.lang.ClassCastException
at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:382)
at org.apache.coyote.Response.action(Response.java:216)
at
org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:310)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:221)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)
---

There seem to be no ill effects, though. The request completes anyway.

The configuration hasn't changed from my earlier 4.1.12 installation.

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




DO NOT REPLY [Bug 13597] New: - ClassCastException in

2002-10-14 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13597>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13597

ClassCastException in http://localhost:8081/webapp/login.jsp
3. type the username toto
4. type enter.
5. you should see the exception

EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected result:

Welcome toto

Actual Result:

ClassCastException

ERROR MESSAGES/STACK TRACES THAT OCCUR :
root cause

org.apache.jasper.JasperException: Unable to convert string 'toto' to 
class
java.lang.String for attribute username: java.lang.ClassCastException
at org.apache.jasper.runtime.JspRuntimeLibrary.convert
(JspRuntimeLibrary.java:184)
at 
org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper
(JspRuntimeLibrary.java:267)
at org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper
(JspRuntimeLibrary.java:219)
at org.apache.jsp.welcome$jsp._jspService(welcome$jsp.java:105)



REPRODUCIBILITY :
This bug can be reproduced always.

-- BEGIN SOURCE --
File LoginBean.java
===
public class LoginBean {
  private String username = "";
  public void setUsername(String username) {this.username = username;}
  public String getUsername() {return username;}
}
File LoginBeanBeanInfo.java
===
import java.beans.*;
import java.io.*;

public class LoginBeanBeanInfo extends SimpleBeanInfo {
  private Class beanClass = LoginBean.class;

  public LoginBeanBeanInfo() {
  }

  public PropertyDescriptor[] getPropertyDescriptors() {
try {
  PropertyDescriptor _username = new PropertyDescriptor("username",
beanClass, "getUsername", "setUsername");
  _username.setDisplayName("username");
  _username.setShortDescription("username");
  _username.setPropertyEditorClass(javax.swing.JTextField.class);
  PropertyDescriptor[] pds = new PropertyDescriptor[] {_username};
  return pds;
}
catch(IntrospectionException ex) {
  ex.printStackTrace();
  return null;
}
  }
}
File login.jsp
===


login



Login Page

Username   :  






File welcome.jsp
===
<%@page import="LoginBean"%>

Welcome Page




Welcome 




-- END SOURCE --

CUSTOMER WORKAROUND :
replace the line

by
<%
String s = request.getParameter("username");
loginBeanId.setUsername(s);
%>

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




DO NOT REPLY [Bug 10766] - <%@ page extends %> causes ClassCastException

2002-07-18 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10766>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10766

<%@ page extends %> causes ClassCastException

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

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




DO NOT REPLY [Bug 10766] New: - <%@ page extends %> causes ClassCastException

2002-07-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10766>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10766

<%@ page extends %> causes ClassCastException

   Summary: <%@ page extends %> causes ClassCastException
   Product: Tomcat 4
   Version: Nightly Build
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Jasper 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


If a JSP page extends a class using the extends directive and the class in turn
implements the HttpJspPage instead of HttpJspBase, a ClassCastException is
thrown.

The root of the problem is from line 157 of "JspServletWrapper.java":

return (HttpJspBase)theServlet;

which assumes that theServlet can be cast to HttpJspBase, which is not true in
this case.

I believe this change was made when background compilation was added to
jasper2.  Glenn?

The watchdog test
/jsp-tests/jsp/core_syntax/directives/page/extend/positiveExtends.jsp is a good
test case.

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




DO NOT REPLY [Bug 10405] - ClassCastException is thrown when request.setAttribute("charset", non_string) is called before request.getParameter() call.

2002-07-02 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10405>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10405

ClassCastException is thrown when request.setAttribute("charset", non_string) is 
called before request.getParameter() call.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-07-03 05:27 ---
The "charset" attribute is documented at 
<http://jakarta.apache.org/tomcat/tomcat-3.3-
doc/serverxml.html#DecodeInterceptor>, where it also tells you how to change 
the name if you want to use "charset" for yourself.

Given that this particular attribute is supposed to be set by the web-app 
developer (it's the TC 3.3 version of the 2.3 setCharacterEncoding), I think 
that having a simple name is justified.

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




DO NOT REPLY [Bug 10405] - ClassCastException is thrown when request.setAttribute("charset", non_string) is called before request.getParameter() call.

2002-07-02 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10405>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10405

ClassCastException is thrown when request.setAttribute("charset", non_string) is 
called before request.getParameter() call.





--- Additional Comments From [EMAIL PROTECTED]  2002-07-03 05:26 ---
I'm not sure if anything in Tomcat depends on this behaviour. Anyway, you can
always work around this by using your own unique attibute identifiers. Something
like:

"domain-name.package-name.app-name.charset"

Then it won't get in the way.

Bojan

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




DO NOT REPLY [Bug 10405] - ClassCastException is thrown when request.setAttribute("charset", non_string) is called before request.getParameter() call.

2002-07-02 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10405>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10405

ClassCastException is thrown when request.setAttribute("charset", non_string) is 
called before request.getParameter() call.





--- Additional Comments From [EMAIL PROTECTED]  2002-07-03 05:02 ---
API doc says containers can use request attributes.  I did not know that.  I was
worrying about the conflicts of the attribute names used by application and
container. 

So, this is not a bug, but the API doc says that the attribute name should
follow the same conventions as package names; i.e. "org.apache..charset".

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




DO NOT REPLY [Bug 10405] - ClassCastException is thrown when request.setAttribute("charset", non_string) is called before request.getParameter() call.

2002-07-02 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10405>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10405

ClassCastException is thrown when request.setAttribute("charset", non_string) is 
called before request.getParameter() call.





--- Additional Comments From [EMAIL PROTECTED]  2002-07-02 23:12 ---
DecodeInterceptor expects charset to be a String. Why do need it to be an Object?

Bojan

PS. Here is that line of code:
--
charset=(String)req.getAttribute( charsetAttribute );
--

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




DO NOT REPLY [Bug 10405] New: - ClassCastException is thrown when request.setAttribute("charset", non_string) is called before request.getParameter() call.

2002-07-02 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10405>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10405

ClassCastException is thrown when request.setAttribute("charset", non_string) is 
called before request.getParameter() call.

   Summary: ClassCastException is thrown when
request.setAttribute("charset", non_string) is called
before request.getParameter() call.
   Product: Tomcat 3
   Version: 3.3.1 Final
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Servlet
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Here is a simple Servlet that reproduce the problem.
---
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class Attr extends HttpServlet {
public void doGet(HttpServletRequest request,
  HttpServletResponse response)
throws IOException, ServletException
{
request.setAttribute("charset", new Object());
request.getParameter("blah");
}
}


java.lang.ClassCastException: java.lang.Object
at
org.apache.tomcat.modules.mappers.DecodeInterceptor.getInfo(DecodeInterceptor.java:581)
at org.apache.tomcat.core.Request.getCharEncoding(Request.java:483)
at org.apache.tomcat.core.Request.getCharacterEncoding(Request.java:470)
at org.apache.tomcat.core.Request.handleQueryParameters(Request.java:451)
at
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRequestFacade.java:277)
at Attr.doGet(Attr.java:12)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)

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




ClassCastException in PageContextImpl

2002-06-15 Thread Joel Roth-Nater

(longish, please read if you're familiar with Jasper sources)

I'm using Jasper which comes packaged with JBoss 3.0. One of the JSPs
has the following code:

BodyContent bc = pageContext.pushBody();
request.getRequestDispatcher(jspName).forward(request, response);
pageContext.popBody();
wc.writeOut(new FileWriter(...));

I am using this to generate a bunch of files on disk. At the bottom of
the including page, I get the following error:

java.lang.ClassCastException: org.apache.jasper.runtime.BodyContentImpl
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:174)
at 
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:198)
at 
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:193)
at org.apache.jsp.generate$jsp._jspService(generate$jsp.java:552)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)



This is the cleanup code at the bottom of the JSP (generate$jsp.java):

  } catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
  out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
  } finally {
552:if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
  }


... and this is the Jasper code where it happens (PageContextImpl.java):

public void release() {
out = baseOut;
try {
if (isIncluded) {
174:((JspWriterImpl)out).flushBuffer();
// push it into the including jspWriter
} else {
out.flush();
}
} catch (IOException ex) {
loghelper.log("Internal error flushing the buffer in release()");
}


It seems that after the popBody() in the JSP, out is no longer of
class JspWriterImpl with makes the cast fail. To be sure, my use of
the BodyContent is somewhat creative, but I'm not aware that I'm
breaking any J2EE contract. Also, my code works just fine under
WebLogic. Would it make sense to check instanceof JspWriterImpl on
line 173?

Or am I missing something?

Any hint is appreciated

-- Joel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 7904] - Tag Pool Manager - ClassCastException

2002-04-28 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7904>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7904

Tag Pool Manager - ClassCastException

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-04-29 02:13 ---
>From the analysis below, nothing to do with Tomcat.

You can try setting the use11Loader="true" attribute in the LoaderInterceptor11 
element of server.xml (for version 3.3.1).  This gives a more re-load friendly 
configuration (at the expense of losing some Java2 concepts like "sealing").

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




DO NOT REPLY [Bug 7904] - Tag Pool Manager - ClassCastException

2002-04-10 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7904>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7904

Tag Pool Manager - ClassCastException





--- Additional Comments From [EMAIL PROTECTED]  2002-04-11 01:13 ---
I got the clue !!
It's not the TagPoolManager's fault, it's my fault... sorry...

When tomcat is running and you compile some java class which is already loaded,
then tomcat tries to reload such classes and that exception happens...
- console says, AutoDeploy:reload 


the simple solution is to block all the reloadable optionsas follows
this may be plausible in production environment.

in server.xml, you can stop reloading context.
   

in app-xxx.xml, you can stop reloading servlet(?)
   

As i can see from jarkata web site, 
above two options has nothing to do with common java class,
and they affect the reload of context and servlets(JSPs) 
but i don't know why the reload of common java class is affected...
or is there any other options to stop reloading common java class ?
or did i miss something ?

thanks in advance...

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




DO NOT REPLY [Bug 7904] New: - Tag Pool Manager - ClassCastException

2002-04-09 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7904>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7904

Tag Pool Manager - ClassCastException

   Summary: Tag Pool Manager - ClassCastException
   Product: Tomcat 3
   Version: 3.3 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


If you put  tag in server.xml
to use custom tag pooling.
Sometimes(!!!) you get the following error message,
but mostly it works fine...

((Following is error message and the latter part of it has the generated jsp 
java code which causes Exception ...))


javax.servlet.ServletException: com.summus.hbuilder.util.taglib.LogoTag
at org.apache.jasper.runtime.PageContextImpl.handlePageException
(Unknown Source)
at user.maple.template.Top_1._jspService(Top_1.java:116)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.facade.RequestDispatcherImpl.doInclude(Unknown 
Source)
at org.apache.tomcat.facade.RequestDispatcherImpl.include(Unknown 
Source)
at org.apache.jasper.runtime.PageContextImpl.include(Unknown Source)
at user.maple.template.link.Links_4._jspService(Links_4.java:171)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown 
Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at 
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown 
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Root cause:
java.lang.ClassCastException: com.summus.hbuilder.util.taglib.LogoTag
at user.maple.template.Top_1._jspService(Top_1.java:76)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.facade.RequestDispatcherImpl.doInclude(Unknown 
Source)
at org.apache.tomcat.facade.RequestDispatcherImpl.include(Unknown 
Source)
at org.apache.jasper.runtime.PageContextImpl.include(Unknown Source)
at user.maple.template.link.Links_4._jspService(Links_4.java:171)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown 
Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at 
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown 
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(Unknown Source)
at java.lang.Thread.run(Unknown Source)
+


The 76th line of the generated jsp java code(Top_1.java) is
if 
(_jspx_tagPool__WEB_INF_tlds_hbuildersetupTagLib_tld_logo != null) {
  _jspx_th_hbuilder_

DO NOT REPLY [Bug 7115] - ClassCastException in Win2000 on code tested on Win98

2002-03-18 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7115>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7115

ClassCastException in Win2000 on code tested on Win98

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-03-18 15:14 ---
This has been reported multiple times, and it has *always* been a question of 
having the servlet API 2.2 classes somewhere.

The reason why I have strong doubt about your bug report is this:
Line 832 / TC 4.0 RC2 / StandardWrapper:
servlet = (Servlet) classClass.newInstance();

The only way it can fail is if there's a class conflict in the servlet API (or 
if your servlet is really not a servlet).

Also: upgrade.

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




DO NOT REPLY [Bug 7115] - ClassCastException in Win2000 on code tested on Win98

2002-03-18 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7115>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7115

ClassCastException in Win2000 on code tested on Win98

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2002-03-18 10:55 ---
I've checked the system for older servlet APIs. The only servlet*.jar and 
servlet*.zip files on the machine are those installed by Tomcat. The machine's 
hard drive was re-formatted before it was turned over to be a dedicated Tomcat 
server and nothing has been installed other than Windows 2000, its Service Pack 
2, and the stuff needed for the sevlet (J2SDK 1.4, JDK1.3, Tomcat, MySQL 
server). All of the above were installed on default settings. I also tried 
setting the CLASSPATH in Autoexec.BAT to include Servlet.jar in 
Tomcat/Common/lib. No joy.

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




DO NOT REPLY [Bug 7115] - ClassCastException in Win2000 on code tested on Win98

2002-03-14 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7115>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7115

ClassCastException in Win2000 on code tested on Win98

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-03-14 16:21 ---
Please check you don't have an older servlet API JAR somewhere in your webapps, 
or set as a system extension.

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




DO NOT REPLY [Bug 7115] New: - ClassCastException in Win2000 on code tested on Win98

2002-03-14 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7115>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7115

ClassCastException in Win2000 on code tested on Win98

   Summary: ClassCastException in Win2000 on code tested on Win98
   Product: Tomcat 4
   Version: 4.0 Release Candidate 2
  Platform: Other
OS/Version: Windows NT/2K
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


ClassCastException in Win2000 on code tested OK on Win98, at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:832). I've 
tried: changing JDK from 1.4.0 to 1.3; Compiling the code on the Win2000 
machine (I started by using the class files complied on the Win98 machine); 
Setting the Java_Home and Classpath variables in Start.BAT; using a simpler 
Servlet (the original had database connections to a MySQL server; the 
replacement one simply returned an HTML date).

I want to use Win2000 for its better security behind out firewall.

My apologies if this fits into the simple/obvious category. I'm new to Servlets 
tho' not to Java.

Denys Wickens

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




ClassCastException only in tomcat4

2002-01-24 Thread Rene Dietze


Hello..

I have a problem with tomcat 4.
My servlet application run's fine under jserv and tomcat 3.3
under tomcat4 receive a java.lang.ClassCastException

deep in my startup process.. load classes with the classLoader..

try
{
  System.out.println("loadClass:"+clazz);
  Object o = 
Thread.currentThread().getContextClassLoader().loadClass(clazz).newInstance();
  System.out.println("Instance:"+o.toString());
  de.SB.parser.hook.Section  s = (de.SB.parser.hook.Section)o;
}
catch(Exception e)
{
  System.out.println(e.toString());
}

Here my STDOUT:  
 loadClass:de.SB..parser.hook.Section
 Instance:de.SB.parser.hook.Section@62cb55
 java.lang.ClassCastException: de.SB.parser.hook.Section 


a simple TypeCast..

I use under all versions (jserv,tomcat3.3,tomcat4)
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

Linux Kernal 2.4.10


I attempted also that:
ClassLoader.getSystemClassLoader().loadClass(clazz).newInstance();
but the instance of Section is really ok


I hope yours can help me

rene


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: classloader issues (ClassCastException on org.xml.sax.Parser)

2002-01-23 Thread Ed Korthof

On Wed, Jan 23, 2002 at 02:28:52AM -0800, Remy Maucherat wrote:
> > On Tue, Jan 22, 2002 at 06:14:18PM -0800, Remy Maucherat wrote:
> >
> > Do you mean you're spawning another process to do compilation?  I
> > thought that javac's core class had been fixed so that it'd be possible
> > to run it in a thread in an existing server ... for a number of reasons,
> > including performance and the awkwardness of spawning processes on
> > win32.  (I know there was talk about that years ago, when I last worked
> > on a page compilation system, but I don't know what happened with it.)
> 
> Jasper uses the javac API which doesn't spawn a process, but it still
> behaves the same way it does if you actually spawn a process.

You said the reason that we can't do what I suggested is that it would
"make JSPs behave differently from servlets" -- so I went to look at
Jasper to see how similar the behavior is right now, in terms of
classloading.  It looks like there's no guarantee at all about
consistency:

Jasper already assumes that the classpath for JSP compilation may be
different from that used in servlets.  There are a number of
inconsistencies, including at least the following:

1) jars accessed by URLs using protocols other than the file protocol
will be silently left out (JspEngineContext.java:155)

2) the order of classname resolution does not match the special logic in
WebappClassLoader, since the webapp classloader's jars aren't ever
preptended to the system classpath, they're always appended
(Compiler.java:233).  I haven't yet followed the logic all the way back
in terms of how the data gets into the context for use by JspServlet --
it is possible that the order is reversed somewhere else ... but if so,
the logic isn't in WebappClassLoader, which is the only class which will
know if delegation is true or false.  So I suspect it's not being done.

Note that #2 may mean that excluding the jars from the classpath to
Jasper might not be such a big deal, as the only reason for the
filtering of those jars in WebappClassloader is the fact that they could
override classes defined in their parent classloaders.

I can imagine that there may be other good reasons not to allow the
changes which I suggested, but AFAICT there's very little consistency
left to be preserved, when comparing classpath handling for JSP pages
and servlets.

> Also, you can't change the delegation and still be spec compliant. We could
> avoid implementing the requirement of preventing loading core libraries, if
> it turns out it's not implementable.

I don't mind configuring tomcat so that my install isn't spec compliant
(that's already possible, with the setDelgate toggle).  I tend to feel
as Daniel said -- the spec is broken.  But I can understand wanting to
build tomcat in such a way that it satisfies the spec as well as is
possible.

It is possible to be compliant with the specification, but I don't think
the current implementation is.  I can override classes in each of the
"protected" packages, so long as I take care to leave out the trigger
class, for which tomcat looks, in my .jar files -- so if it's tomcat's
job to avoid loading core libraries in the webapp classloaders, I don't
think it's doing it reliably.

Anyway -- one possibility would be to do filtering of .jars before
handing them to the JSP engine (much as it's being done now, thought it
might make more sense to read through the contents of the jars and look
for any classes which are in packages they're not allowed to be in), but
to do the kind of filtering which I described in my first message, in
loadClass.  And I'd suggest adding one or more toggles, to configure how
filtering is done.  (I'm not sure if one or two is appropriate because
I'm not sure if #2 -- up above -- should be fixed.)

thanks --

Ed

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5869] - ClassCastException during getResource()

2002-01-15 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5869>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5869

ClassCastException during getResource()

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2002-01-15 12:53 ---


*** This bug has been marked as a duplicate of 4830 ***

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




DO NOT REPLY [Bug 5869] - ClassCastException during getResource()

2002-01-15 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5869>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5869

ClassCastException during getResource()

[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|ClassCastException  |ClassCastException during
   ||getResource()

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




DO NOT REPLY [Bug 5869] New: - ClassCastException

2002-01-15 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5869>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5869

ClassCastException

   Summary: ClassCastException
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I get the following exception when I use getClass().getResource("");  This bug 
happens to be exactly the same as Bug #3855.  I made sure there is only 
instance of jndi.jar (as the resolution for that bug suggested), but to no 
avail.  This works just fine in tomcat 3.2.2.

The code is
/** meta schema directory */
private static final String METASCHEMA_DIR =
QbQueryManager.class.getResource("").getPath() + /*MSG0*/"/metaschema";

This is an attempt to get the real path to a directory in which the .class file 
for the class that has this static field exists. (Refer Bug #3855 again for 
more details).


- Root Cause -
java.lang.ExceptionInInitializerError: java.lang.ClassCastException: 
org.apache.naming.resources.FileDirContext
at org.apache.catalina.loader.WebappClassLoader.findResourceInternal
(WebappClassLoader.java:1585)
at org.apache.catalina.loader.WebappClassLoader.findResource
(WebappClassLoader.java:914)
at org.apache.catalina.loader.WebappClassLoader.getResource
(WebappClassLoader.java:1041)
at java.lang.Class.getResource(Unknown Source)
at com.autodesk.wpp.query.QbQueryManager.
(QbQueryManager.java:241)
at com.autodesk.wpp.query.QbGetSchemaNamesHandler.messageHandler
(QbGetSchemaNamesHandler.java:51)
at 
com.autodesk.wpp.navigation.communications.WpMessageHandler.handleMessage
(WpMessageHandler.java:63)
at 
com.autodesk.sunrise.communications.imp.ServerMessageProcessor.processMessage
(ServerMessageProcessor.java:148)
at 
com.autodesk.sunrise.communications.imp.ServerDemultiplexor.processMessage
(ServerDemultiplexor.java:254)
at 
com.autodesk.sunrise.communications.imp.ServerDemultiplexor.demultiplex
(ServerDemultiplexor.java:144)
at com.autodesk.sunrise.communications.imp.MessagingServlet.doPost
(MessagingServlet.java:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)

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




DO NOT REPLY [Bug 4434] - ClassCastException on page context

2002-01-07 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4434>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4434

ClassCastException on page context

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2002-01-07 03:12 ---
*** Bug 5708 has been marked as a duplicate of this bug. ***

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




DO NOT REPLY [Bug 4330] - ClassCastException with DocumentBuilderFactoryImpl

2002-01-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330

ClassCastException with DocumentBuilderFactoryImpl

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2002-01-04 18:26 ---
I routinely use j2sdk1.4.0 with tomcat and never run into this problem.  I am
closing this as WORKSFORME.  If you can attach a test case in the form of a .war
that I can drop into tomcat that shows this problem, please reopen this bug
again.  Thanks.

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




DO NOT REPLY [Bug 4330] - ClassCastException with DocumentBuilderFactoryImpl

2002-01-03 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330

ClassCastException with DocumentBuilderFactoryImpl

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 OS/Version|Linux   |Windows NT/2K
 Resolution|WORKSFORME  |



--- Additional Comments From [EMAIL PROTECTED]  2002-01-03 13:34 ---
I encountered the same problem with tomcat4.0.1/Win2k/jdk 1.4 beta-3 and after 
2 days of testing, I have found that whenever I add a new JSP page in any new 
context I created it throws up with the following exceptions. The same JSP 
works if put in the "examples" context. I found that changing the jdk to 1.3 
solved the problem for me.
I have also attached my server.xml file.

Stacktrace follows:

javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception
at org.apache.catalina.core.StandardWrapper.load
(StandardWrapper.java:871)
at org.apache.catalina.core.StandardWrapper.allocate
(StandardWrapper.java:615)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke
(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:539)
root cause java.lang.ClassCastException: 
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
at javax.xml.parsers.DocumentBuilderFactory.newInstance
(DocumentBuilderFactory.java:103)
at org.apache.jasper.parser.ParserUtils.parseXMLDocument
(ParserUtils.java:183)
at org.apache.jasper.compiler.TldLocationsCache.processWebDotXml
(TldLocationsCache.java:165)
at org.apache.jasper.compiler.TldLocationsCache.
(TldLocationsCache.java:138)
at org.apache.jasper.EmbededServletOptions.
(EmbededServletOptions.java:324)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
at org.apache.catalina.core.StandardWrapper.load
(StandardWrapper.java:852)
at org.apache.catalina.core.StandardWrapper.allocate
(StandardWrapper.java:615)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java

DO NOT REPLY [Bug 4330] - ClassCastException with DocumentBuilderFactoryImpl

2002-01-03 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330

ClassCastException with DocumentBuilderFactoryImpl





--- Additional Comments From [EMAIL PROTECTED]  2002-01-03 13:30 ---
Created an attachment (id=975)
Offending Server.xml

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




DO NOT REPLY [Bug 5584] - ClassCastException on DocumentBuilderFactoryImpl during jsp compile

2002-01-02 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5584>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5584

ClassCastException on DocumentBuilderFactoryImpl during jsp compile

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2002-01-02 06:46 ---
That does work for me. It looks like some class conflicts with JAXP (again ...).

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




DO NOT REPLY [Bug 5584] New: - ClassCastException on DocumentBuilderFactoryImpl during jsp compile

2001-12-24 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5584>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5584

ClassCastException on DocumentBuilderFactoryImpl during jsp compile

   Summary: ClassCastException on DocumentBuilderFactoryImpl during
jsp compile
   Product: Tomcat 4
   Version: 4.0.2 Beta 1
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


After upgrading my dev-tomcat from 4.0.1 to 4.0.2b1 and moving my webapp to 
this server, i receive to following exception while accessing a (any in this 
context) .jsp-file:

java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
at javax.xml.parsers.DocumentBuilderFactory.newInstance
(DocumentBuilderFactory.java:139)
at org.apache.jasper.parser.ParserUtils.parseXMLDocument
(ParserUtils.java:183)
at org.apache.jasper.compiler.TldLocationsCache.processWebDotXml
(TldLocationsCache.java:165)
at org.apache.jasper.compiler.TldLocationsCache.
(TldLocationsCache.java:138)
at org.apache.jasper.EmbededServletOptions.
(EmbededServletOptions.java:345)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
at org.apache.catalina.core.StandardWrapper.loadServlet
(StandardWrapper.java:916)
at org.apache.catalina.core.StandardWrapper.allocate
(StandardWrapper.java:653)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)

the sample jsp's are working?!? special: the webapp is placed in the "ROOT" 
directory and has an empty context, this is in production and worked fine with 
4.0.1 final.

there is a similar bug at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4329";>#4329

note: this is my first bug submission, so is this enough information?

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




ClassCastException on PortableRemoteObject.narrow() call

2001-11-29 Thread Aprameya Paduthonse

Hi There!

I am encountering ClassCastException on attempting a
PortableRemoteObject.narrow() call from one of my utility class used by my
JavaBeans.

I am essentially looking up a EJB deployed in Weblogic Server.

I have tried placing weblogic.jar(which has the factory class -
weblogic.jndi.WLInitialContextFactory) and the utility.jar in each of the
following directories, but with no success:
* CATALINA_HOME/common/lib
* CATALINA_HOME/server/lib (though not recommended)
* CATALINA_HOME/lib
* WEB-INF/lib
* explicitly through catalina.bat's CLASSPATH
(For more info:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html)


I had the same problem in version 3.2.3 when I placed my jars in
WEB-INF/lib; BUT, things were working when I moved these to TOMCAT_HOME/lib.

Could someone share similar experiences in Tomcat 4.0?

One could reproduce the problem with these 3 steps:
1. jsp/servlet/javabean calls a utility.jar for JNDI lookup, say
Utility.lookup(servicename)
2. utility.jar uses weblogic.jar or any other jar for lookup through
Context.lookup()
3. jsp/servlet/javabean does a PortableRemoteObject.narrow() on the Object
returned by lookup()


Thanks in advance.
Aprameya



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




DO NOT REPLY [Bug 4330] - ClassCastException with DocumentBuilderFactoryImpl

2001-11-29 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330

ClassCastException with DocumentBuilderFactoryImpl





--- Additional Comments From [EMAIL PROTECTED]  2001-11-29 
06:37 ---
I encountered the same problem today, when I set up a fresh build
environment, including xerces-1_4_4. Using xerces 1_4_3 instead
worked for me. In both cases I used the 1.3 JDK, not 1.4. The
Tomcat source tree was fresh from CVS today.

Joel, were you using xerces-1_4_4 as well by any chance?

I have not looked further into what the root cause or right fix is.

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




DO NOT REPLY [Bug 4330] - ClassCastException with DocumentBuilderFactoryImpl

2001-11-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330

ClassCastException with DocumentBuilderFactoryImpl

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME

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




DO NOT REPLY [Bug 4434] - ClassCastException on page context

2001-10-26 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4434>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4434

ClassCastException on page context

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||tomcat-
   ||[EMAIL PROTECTED]
 AssignedTo|tomcat- |[EMAIL PROTECTED]
   |[EMAIL PROTECTED]  |



--- Additional Comments From [EMAIL PROTECTED]  2001-10-26 10:11 ---
Can you attach your index.jsp file (and other relevant files) here for me to
reproduce this probem?  Thanks.



DO NOT REPLY [Bug 4434] New: - ClassCastException on page context

2001-10-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4434>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4434

ClassCastException on page context

   Summary: ClassCastException on page context
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: All
OS/Version: Windows NT/2K
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I receive an exception thrown from an invalid class cast while querying a page 
(which is there, and used to work using Tomcat 3.3)

I have set a context "/prod" pointing to a WebApp on a directory (D:/web/)
When querying the default index.jsp page, the error occurs.
This used to work fine with Tomcat 3.2.
Note : All Web App jsp included files are RELATIVE to the context, not absolute:
eg : <%@include file="../login.jsp"%>

The reported stack trace is :
org.apache.jasper.JasperException: Unable to compile class for JSP
D:\Apache-Group\catalina\work\localhost\prod\login\index$jsp.java:71: 
Incompatible type for method. Explicit cast needed to convert 
java.lang.Throwable to java.lang.Exception.
if (pageContext != null) pageContext.handlePageException(t);
 ^
1 error

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary
(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:484)



DO NOT REPLY [Bug 4330] - ClassCastException with DocumentBuilderFactoryImpl

2001-10-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330

ClassCastException with DocumentBuilderFactoryImpl





--- Additional Comments From [EMAIL PROTECTED]  2001-10-24 18:51 ---
I ran Tomcat 4.0 with JDK 1.4.0 beta without any problem.  Your server.xml looks
fine.  You don't need to build your own xerces to run tomcat.  You also don't
nee to define CLASSPATH.



DO NOT REPLY [Bug 4330] - ClassCastException with DocumentBuilderFactoryImpl

2001-10-23 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330

ClassCastException with DocumentBuilderFactoryImpl





--- Additional Comments From [EMAIL PROTECTED]  2001-10-23 04:23 ---
I scanned the jars in my classpath and the only jar that has a 
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl is the xerces.jar that I 
built under my 1.4 environment.  And the only jar that has a 
javax.xml.parsers.DocumentBuilderFactory is the rt.jar under my 1.4 
environment.  The engine is failing on startup, so there's no real test case 
except the following:

install 4.0.1
use the server.xml I provided on the earlier post.
watch it fail

I am happy to hear back that this is me being a dope, but please give me a clue 
why.



DO NOT REPLY [Bug 4330] - ClassCastException with DocumentBuilderFactoryImpl

2001-10-23 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330

ClassCastException with DocumentBuilderFactoryImpl





--- Additional Comments From [EMAIL PROTECTED]  2001-10-23 04:18 ---
Created an attachment (id=707)
server.xml of offending Tomcat install



DO NOT REPLY [Bug 4330] - ClassCastException with DocumentBuilderFactoryImpl

2001-10-22 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330

ClassCastException with DocumentBuilderFactoryImpl





--- Additional Comments From [EMAIL PROTECTED]  2001-10-22 14:45 ---
This is hardly a jasper problem.  xerces.jar is part of Tomcat 4.0.1 Final
distriubution; but make sure you don't have any incompatible XML parser that got
loaded instead.  Does JDK 1.4 come with one?  Try using JDK 1.3 to see if it
change anything.

In any case, please give me a test case that I can run with JDK1.4.  Thanks.



DO NOT REPLY [Bug 4330] New: - ClassCastException with DocumentBuilderFactoryImpl

2001-10-22 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4330

ClassCastException with DocumentBuilderFactoryImpl

   Summary: ClassCastException with DocumentBuilderFactoryImpl
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I was starting up the Tomcat 4.0 servlet engine, running against JDK 1.4 and 
received the following error when attempting to start the engine.  I'm willing 
to believe this is just a library issue on my part, but I'm not an idiot and 
have been hunting it down for 2 days now.  I even rebuilt the XErces2 jar under 
my running 1.4 environment (by downloading the source and running Ant against 
my JAVA_HOME.  

I have posted several questions to the tomcat users list with no reponses, and 
searched through the archives for similar issues with no success.  This leads 
me to believe it may in fact be a bug.  Please contact for more info if 
necessary.

The Stacktrace follows

javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception
at org.apache.catalina.core.StandardWrapper.load
(StandardWrapper.java:871)
at org.apache.catalina.core.StandardContext.loadOnStartup
(StandardContext.java:3267)
at org.apache.catalina.core.StandardContext.start
(StandardContext.java:3384)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:307)
at org.apache.catalina.core.StandardService.start
(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start
(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:42)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:28)
at java.lang.reflect.Method.invoke(Method.java:313)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
- Root Cause -
java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
at javax.xml.parsers.DocumentBuilderFactory.newInstance
(DocumentBuilderFactory.java:103)
at org.apache.jasper.parser.ParserUtils.parseXMLDocument
(ParserUtils.java:183)
at org.apache.jasper.compiler.TldLocationsCache.processWebDotXml
(TldLocationsCache.java:165)
at org.apache.jasper.compiler.TldLocationsCache.
(TldLocationsCache.java:138)
at org.apache.jasper.EmbededServletOptions.
(EmbededServletOptions.java:324)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
at org.apache.catalina.core.StandardWrapper.load
(StandardWrapper.java:852)
at org.apache.catalina.core.StandardContext.loadOnStartup
(StandardContext.java:3267)
at org.apache.catalina.core.StandardContext.start
(StandardContext.java:3384)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:307)
at org.apache.catalina.core.StandardService.start
(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start
(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:42)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:28)
at java.lang.reflect.Method.invoke(Method.java:313)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)



RE: ClassCastException

2001-10-03 Thread Kevin Jones

I had exactly this problem; but I had jdbc2_0-stdext.jar not in the
jre/lib/ext but in my webapp/web-inf/lib directory. Putting
jdbc2_0-stdext.jar in common/lib along with the tyrex files solved the
problem (classloaders, you gotta love 'em)

Kevin Jones
Developmentor
www.develop.com

> -Original Message-
> From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
> R. McClanahan
> Sent: 03 October 2001 17:20
> To: [EMAIL PROTECTED]
> Subject: Re: ClassCastException
>
>
>
>
> On Wed, 3 Oct 2001, Alessandro Pizzolotto wrote:
>
> > Date: Wed, 3 Oct 2001 17:10:37 +0200
> > From: Alessandro Pizzolotto <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: Re: ClassCastException
> >
> > hehehe
> > if i use this class:
> > tyrex.jdbc.xa.EnabledDataSource
> > instead
> > javax.sql.DataSource
> > the program works fine
> > the problem is that EnableDataSource implements
> javax.sql.DataSource but i
> > can't cast javax.sql.DataSource.
> > why ???
> >
>
> Would you happen to have a copy of jdbc2_0-stdext.jar in your system
> extensions directory ($JAVA_HOME/jre/lib/ext)?  That would cause problems
> like this -- the same sort of problem that causes "Class foo is not a
> servlet" errors if you have servlet.jar there.
>
> > Alessandro
>
> Craig McClanahan
>
> > - Original Message -
> > From: "Will Stranathan" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, October 03, 2001 3:04 PM
> > Subject: Re: ClassCastException
> >
> >
> > > Can we see the appropriate parts of server.xml and web.xml?
> > >
> > > Will Stranathan
> > >
> > > Alessandro Pizzolotto wrote:
> > >
> > > > this code
> > > >
> > > > javax.naming.Context ctx = new javax.naming.InitialContext();
> > > > javax.naming.Context cto =
> > (javax.naming.Context)ctx.lookup("java:/comp/env");
> > > > javax.sql.DataSource ds =
> > (javax.sql.DataSource)cto.lookup("jdbc/domus");
> > > >
> > > > produce this error
> > > >
> > > > java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
> > > >  at org.apache.jsp.ricerca3$jsp._jspService(ricerca3$jsp.java:74)
> > > >  at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> > > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> > > >  at
> >
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Jsp
> Servlet.ja
> > va:201)
> > > >  at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
> > > >  at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
> > > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> > > >  at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> pplication
> > FilterChain.java:247)
> > > >  at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> onFilterCh
> > ain.java:193)
> > > >  at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> erValve.ja
> > va:243)
> > > >  at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 66)
> > > >  at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> > > >  at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > > >  at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardConte
> xtValve.ja
> > va:215)
> > > >  at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 66)
> > > >  at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> > > >  at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > > >  at
> >
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
> > > >  at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
> e.java:164
> > )
> > > >  at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 66)
> > > >  at
> >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462

Re: ClassCastException

2001-10-03 Thread Alessandro Pizzolotto

now is ok
i am delete 2 .jar from WEB-INF/lib
the jdbc extension
tanks :)
Alkessandro
- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 03, 2001 6:19 PM
Subject: Re: ClassCastException


>
>
> On Wed, 3 Oct 2001, Alessandro Pizzolotto wrote:
>
> > Date: Wed, 3 Oct 2001 17:10:37 +0200
> > From: Alessandro Pizzolotto <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: Re: ClassCastException
> >
> > hehehe
> > if i use this class:
> > tyrex.jdbc.xa.EnabledDataSource
> > instead
> > javax.sql.DataSource
> > the program works fine
> > the problem is that EnableDataSource implements javax.sql.DataSource but
i
> > can't cast javax.sql.DataSource.
> > why ???
> >
>
> Would you happen to have a copy of jdbc2_0-stdext.jar in your system
> extensions directory ($JAVA_HOME/jre/lib/ext)?  That would cause problems
> like this -- the same sort of problem that causes "Class foo is not a
> servlet" errors if you have servlet.jar there.
>
> > Alessandro
>
> Craig McClanahan
>
> > - Original Message -
> > From: "Will Stranathan" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, October 03, 2001 3:04 PM
> > Subject: Re: ClassCastException
> >
> >
> > > Can we see the appropriate parts of server.xml and web.xml?
> > >
> > > Will Stranathan
> > >
> > > Alessandro Pizzolotto wrote:
> > >
> > > > this code
> > > >
> > > > javax.naming.Context ctx = new javax.naming.InitialContext();
> > > > javax.naming.Context cto =
> > (javax.naming.Context)ctx.lookup("java:/comp/env");
> > > > javax.sql.DataSource ds =
> > (javax.sql.DataSource)cto.lookup("jdbc/domus");
> > > >
> > > > produce this error
> > > >
> > > > java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
> > > >  at org.apache.jsp.ricerca3$jsp._jspService(ricerca3$jsp.java:74)
> > > >  at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> > > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> > > >  at
> >
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> > va:201)
> > > >  at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
> > > >  at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
> > > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> > > >  at
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > FilterChain.java:247)
> > > >  at
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > ain.java:193)
> > > >  at
> >
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > va:243)
> > > >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> > > >  at
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > > >  at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > > >  at
> >
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > va:215)
> > > >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> > > >  at
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > > >  at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > > >  at
> >
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
> > > >  at
> >
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> > )
> > > >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> > > >  at
> >
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> > > >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 64)
> > > >  at
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > > >  at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > > >  at
> >
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> > :163)
> > > >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> > > >  at
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > > >  at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > > >  at
> >
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> > 1005)
> > > >  at
> >
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098
> > )
> > > >  at java.lang.Thread.run(Thread.java:484)
> > > >
> > > > the code not get the cast in DataSource
> > > > why ?
> > > > tanks
> > > > Alessadro
> > > >
> > > >
> > >
> > >
> > >
> >
> >
>
>




Re: ClassCastException

2001-10-03 Thread Craig R. McClanahan



On Wed, 3 Oct 2001, Alessandro Pizzolotto wrote:

> Date: Wed, 3 Oct 2001 17:10:37 +0200
> From: Alessandro Pizzolotto <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Re: ClassCastException
>
> hehehe
> if i use this class:
> tyrex.jdbc.xa.EnabledDataSource
> instead
> javax.sql.DataSource
> the program works fine
> the problem is that EnableDataSource implements javax.sql.DataSource but i
> can't cast javax.sql.DataSource.
> why ???
>

Would you happen to have a copy of jdbc2_0-stdext.jar in your system
extensions directory ($JAVA_HOME/jre/lib/ext)?  That would cause problems
like this -- the same sort of problem that causes "Class foo is not a
servlet" errors if you have servlet.jar there.

> Alessandro

Craig McClanahan

> - Original Message -
> From: "Will Stranathan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 03, 2001 3:04 PM
> Subject: Re: ClassCastException
>
>
> > Can we see the appropriate parts of server.xml and web.xml?
> >
> > Will Stranathan
> >
> > Alessandro Pizzolotto wrote:
> >
> > > this code
> > >
> > > javax.naming.Context ctx = new javax.naming.InitialContext();
> > > javax.naming.Context cto =
> (javax.naming.Context)ctx.lookup("java:/comp/env");
> > > javax.sql.DataSource ds =
> (javax.sql.DataSource)cto.lookup("jdbc/domus");
> > >
> > > produce this error
> > >
> > > java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
> > >  at org.apache.jsp.ricerca3$jsp._jspService(ricerca3$jsp.java:74)
> > >  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> > >  at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:201)
> > >  at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
> > >  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
> > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> > >  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
> > >  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
> > >  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:243)
> > >  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> > >  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:215)
> > >  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> > >  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >  at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
> > >  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> )
> > >  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> > >  at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> > >  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> > >  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :163)
> > >  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> > >  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >  at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> 1005)
> > >  at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098
> )
> > >  at java.lang.Thread.run(Thread.java:484)
> > >
> > > the code not get the cast in DataSource
> > > why ?
> > > tanks
> > > Alessadro
> > >
> > >
> >
> >
> >
>
>




Re: ClassCastException

2001-10-03 Thread Fernando_Salazar


I believe you have the various jar's in the "wrong" locations.  They're
wrong because, even though all the classes
you need are there, they end up in incompatible class loaders.  Make sure
that:

* tyrex jar, jta jar, and jdbc optional jar are in common/lib.
* your JDBC driver jar is in common/lib, and *not* also in WEB-INF/lib

Possibly other setups will work correctly -- the stuff above works for us.
I know definitely that mislocating jar's
-- like putting drivers in server/lib -- results in the exact CCE that you
list below.

- Fernando



   

"Alessandro

Pizzolotto"  To: <[EMAIL PROTECTED]>   

      Subject: Re: ClassCastException   

   

10/03/2001 

11:10 AM   

Please respond 

to tomcat-dev  

   

   





hehehe
if i use this class:
tyrex.jdbc.xa.EnabledDataSource
instead
javax.sql.DataSource
the program works fine
the problem is that EnableDataSource implements javax.sql.DataSource but i
can't cast javax.sql.DataSource.
why ???

Alessandro
- Original Message -
From: "Will Stranathan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 03, 2001 3:04 PM
Subject: Re: ClassCastException


> Can we see the appropriate parts of server.xml and web.xml?
>
> Will Stranathan
>
> Alessandro Pizzolotto wrote:
>
> > this code
> >
> > javax.naming.Context ctx = new javax.naming.InitialContext();
> > javax.naming.Context cto =
(javax.naming.Context)ctx.lookup("java:/comp/env");
> > javax.sql.DataSource ds =
(javax.sql.DataSource)cto.lookup("jdbc/domus");
> >
> > produce this error
> >
> > java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
> >  at org.apache.jsp.ricerca3$jsp._jspService(ricerca3$jsp.java:74)
> >  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> >  at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja

va:201)
> >  at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
> >  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> >  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application

FilterChain.java:247)
> >  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh

ain.java:193)
> >  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja

va:243)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
> >  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja

va:215)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
> >  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
> >  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164

)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipe

Re: ClassCastException

2001-10-03 Thread Alessandro Pizzolotto

hehehe
if i use this class:
tyrex.jdbc.xa.EnabledDataSource
instead
javax.sql.DataSource
the program works fine
the problem is that EnableDataSource implements javax.sql.DataSource but i
can't cast javax.sql.DataSource.
why ???

Alessandro
- Original Message -
From: "Will Stranathan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 03, 2001 3:04 PM
Subject: Re: ClassCastException


> Can we see the appropriate parts of server.xml and web.xml?
>
> Will Stranathan
>
> Alessandro Pizzolotto wrote:
>
> > this code
> >
> > javax.naming.Context ctx = new javax.naming.InitialContext();
> > javax.naming.Context cto =
(javax.naming.Context)ctx.lookup("java:/comp/env");
> > javax.sql.DataSource ds =
(javax.sql.DataSource)cto.lookup("jdbc/domus");
> >
> > produce this error
> >
> > java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
> >  at org.apache.jsp.ricerca3$jsp._jspService(ricerca3$jsp.java:74)
> >  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> >  at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
> >  at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
> >  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> >  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
> >  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
> >  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> >  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> >  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
> >  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> >  at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> >  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> >  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1005)
> >  at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098
)
> >  at java.lang.Thread.run(Thread.java:484)
> >
> > the code not get the cast in DataSource
> > why ?
> > tanks
> > Alessadro
> >
> >
>
>
>




Re: ClassCastException

2001-10-03 Thread Alessandro Pizzolotto

sure :)
WEB.XML


http://java.sun.com/dtd/web-app_2_3.dtd";>


  jdbc/domus
  javax.sql.DataSource
  Container


#
SERVER.XML
##à
 

   

user
user


  
password
password


driverClassName
weblogic.jdbc.mssqlserver4.Driver


driverName
jdbc:weblogic:mssqlserver4:domus@localhost:1433

   
 
##


i tink that this part is correct ??

- Original Message -
From: "Will Stranathan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 03, 2001 3:04 PM
Subject: Re: ClassCastException


> Can we see the appropriate parts of server.xml and web.xml?
>
> Will Stranathan
>
> Alessandro Pizzolotto wrote:
>
> > this code
> >
> > javax.naming.Context ctx = new javax.naming.InitialContext();
> > javax.naming.Context cto =
(javax.naming.Context)ctx.lookup("java:/comp/env");
> > javax.sql.DataSource ds =
(javax.sql.DataSource)cto.lookup("jdbc/domus");
> >
> > produce this error
> >
> > java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
> >  at org.apache.jsp.ricerca3$jsp._jspService(ricerca3$jsp.java:74)
> >  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> >  at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
> >  at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
> >  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> >  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
> >  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
> >  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> >  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> >  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
> >  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> >  at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> >  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
> >  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> >  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1005)
> >  at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098
)
> >  at java.lang.Thread.run(Thread.java:484)
> >
> > the code not get the cast in DataSource
> > why ?
> > tanks
> > Alessadro
> >
> >
>
>
>




Re: ClassCastException

2001-10-03 Thread Will Stranathan

Can we see the appropriate parts of server.xml and web.xml?

Will Stranathan

Alessandro Pizzolotto wrote:

> this code 
> 
> javax.naming.Context ctx = new javax.naming.InitialContext();
> javax.naming.Context cto = (javax.naming.Context)ctx.lookup("java:/comp/env");
> javax.sql.DataSource ds = (javax.sql.DataSource)cto.lookup("jdbc/domus");
> 
> produce this error
> 
> java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
>  at org.apache.jsp.ricerca3$jsp._jspService(ricerca3$jsp.java:74)
>  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
>  at 
>org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
>  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
>  at 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>  at 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>  at 
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
>  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at 
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
>  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
>  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
>  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
>  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
>  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1005)
>  at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098)
>  at java.lang.Thread.run(Thread.java:484)
> 
> the code not get the cast in DataSource 
> why ?
> tanks
> Alessadro
> 
> 





ClassCastException

2001-10-03 Thread Alessandro Pizzolotto

this code 

javax.naming.Context ctx = new javax.naming.InitialContext();
javax.naming.Context cto = (javax.naming.Context)ctx.lookup("java:/comp/env");
javax.sql.DataSource ds = (javax.sql.DataSource)cto.lookup("jdbc/domus");

produce this error

java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
 at org.apache.jsp.ricerca3$jsp._jspService(ricerca3$jsp.java:74)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
 at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1005)
 at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098)
 at java.lang.Thread.run(Thread.java:484)

the code not get the cast in DataSource 
why ?
tanks
Alessadro



DO NOT REPLY [Bug 3896] - ClassCastException when invoking certain subclasses of HTTPServlet

2001-10-02 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896

ClassCastException when invoking certain subclasses of HTTPServlet





--- Additional Comments From [EMAIL PROTECTED]  2001-10-02 02:17 ---
Putting servlet.jar in the classpath and removing it from common/lib solved the 
problem.

Thank you.



DO NOT REPLY [Bug 3896] - ClassCastException when invoking certain subclasses of HTTPServlet

2001-10-02 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896

ClassCastException when invoking certain subclasses of HTTPServlet

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2001-10-02 00:55 ---
Do not edit the startup scripts, or otherwise, you're on your own.
If the system CL contains servlet.jar, you have to remove servlet.jar from 
common/lib (just put it somewhere else on your hard drive), otherwise, it will 
get loaded twice (because of a class loading delegation problem in 4.0 final) 
and you'll get class conflicts.



DO NOT REPLY [Bug 3896] - ClassCastException when invoking certain subclasses of HTTPServlet

2001-10-02 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896

ClassCastException when invoking certain subclasses of HTTPServlet

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |



--- Additional Comments From [EMAIL PROTECTED]  2001-10-02 00:48 ---
I still get the error message.
  - $JAVA_HOME/jre/lib/ext is empty.
  - WEB-INF/lib does not exist
I start tomcat with the following CLASSPATH (which contains servlet.jar, 
otherwise no servlets are found):

/home/jefe/ag-db/hermes/src:/home/jefe/ag-db/hermes/etc:/home/jefe/ag-db/hermes/
lib/webmacro.jar:/home/jefe/ag-db/hermes/lib/xerces.jar:/home/jefe/ag-db/hermes/
lib/activation.jar:/home/jefe/ag-db/hermes/lib/jakarta-tomcat-4.0/common/lib/ser
vlet.jar

... and with the following command line:
bin/catalina.sh start -config conf/server_hermes.xml -debug



DO NOT REPLY [Bug 3896] - ClassCastException when invoking certain subclasses of HTTPServlet

2001-10-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896

ClassCastException when invoking certain subclasses of HTTPServlet

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2001-10-01 14:29 ---
Removing the servlet.jar file from WEB-INF/lib fixed the problem.  Thanks for
the help.  Sorry I couldn't find the bug when I searched the database.



DO NOT REPLY [Bug 3896] - ClassCastException when invoking certain subclasses of HTTPServlet

2001-10-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896

ClassCastException when invoking certain subclasses of HTTPServlet

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2001-10-01 13:56 ---
It's also important that "servlet.jar" not be in the Java system
extensions directory ($JAVA_HOME/jre/lib/ext).  Reopened until confirmation.



DO NOT REPLY [Bug 3896] - ClassCastException when invoking certain subclasses of HTTPServlet

2001-10-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896

ClassCastException when invoking certain subclasses of HTTPServlet

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2001-10-01 12:42 ---
Check the location of servlet.jar and make sure that your web application 
doesn't have servlet.jar in web-inf/lib.  Could you reply back if you're still 
having the problem?



DO NOT REPLY [Bug 3896] - ClassCastException when invoking certain subclasses of HTTPServlet

2001-10-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896

ClassCastException when invoking certain subclasses of HTTPServlet

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2001-10-01 12:37 ---
*** Bug 3907 has been marked as a duplicate of this bug. ***



DO NOT REPLY [Bug 3896] New: - ClassCastException when invoking certain subclasses of HTTPServlet

2001-10-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3896

ClassCastException when invoking certain subclasses of HTTPServlet

   Summary: ClassCastException when invoking certain subclasses of
HTTPServlet
   Product: Tomcat 4
   Version: 4.0 Final
  Platform: Sun
OS/Version: Solaris
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When invoking a servlet that is a subclass of org.webmacro.http.WMServlet (which 
in turn is a direct subclass of HTTPServlet) the Catalina core throws a 
ServletException that is a linked to a ClassCastException:

Here is a snippet from the log file
2001-10-01 12:19:59 
StandardWrapper[:org.apache.catalina.INVOKER.hermes.web.HelloWorld]: Marking 
servlet org.apache.ca
talina.INVOKER.hermes.web.HelloWorld as unavailable
2001-10-01 12:19:59 invoker: Cannot allocate servlet instance for path 
/servlet/hermes.web.HelloWorld
javax.servlet.ServletException: Class hermes.web.HelloWorld is not a Servlet
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:848)
at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:621)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(Unknown 
Source)
at org.apache.catalina.servlets.InvokerServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown 
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)

The problem seems to occur in the following lines in 
org.apache.catalina.core.StandardWrapper:

try {
servlet = (Servlet) classClass.newInstance();
} catch (ClassCastException e) {
unavailable(null);
// Restore the context ClassLoader
throw new ServletException
(sm.getString("standardWrapper.notServlet", actualClass), e);
}


By splitting the line 
  servlet = (Servlet) classClass.newInstance();
and adding some debugging output 
log("Trying to instantiate " + classClass.getName());
Object instance =  classClass.newInstance();
log("Instantiated, instance is  " + instance);
log("Trying to cast ...");
servlet = (Servlet) instance;

one can focus that instance (which is of class hermes.web.HelloWorld) cannot be 
casted to Servlet.

The class hierarchy is as follows

Interface javax.servlet.Servlet
 ^
 | implements
 |
Class javax.servlet.GenericServlet
 ^
 | extends
 |
Class javax.servlet.http.HttpServlet
 ^
 | extends
 |
Class org.webmacro.servlet.WMServlet
 ^
 | extends
 |
Class hermes.web.HelloWorld

Clearly, HelloWorld should be castable to Servlet.
I have no idea why the cast fails. May be something is wrong with the class 
loader.

Daniel Faensen



Tomcat 3.2 ClassCastException after servlet update on getAttribute

2000-11-30 Thread David Rees

Below is a snippet of a thread from the tomcat-user list describing my
problem:

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
>
> David Rees wrote:
>
> > I also just tried this on Tomcat 3.2, same problem.
> >
> > Again, here's the problem:
> >
> > I have a form which posts to a jsp, which then instantiates a
> bean with the
> > data from the form, which then forwards the request to a
> servlet which does
> > a getAttribute to obtain then the bean data.  It then forwards
> on again to
> > another jsp.
> >
> > The problem occurs during development:  Updating the servlet causes a
> > ClassCastException.  Shutting down and restarting Tomcat makes the
> > ClassCastException go away.
> >
> > This happens on Tomcat 3.1 and 3.2.  It does not happen on the
> Tomcat 4.0 m4
> > build.
> >
> > Should I post this issue to the -dev list?  It seems like a
> Tomcat bug to
> > me.
> >
>
> You can if you want ... but there are fundamental architectural
> problems to the
> way that class reloading was done in 3.1 and 3.2.  It would be a
> pretty major
> change to fix it.
>
> Tomcat 4.0 uses a different strategy (pretty much based on what
> Apache JServ)
> did that seems to deal with class reloading in a much more robust
> manner (and
> with lower overhead).

I've done a bit more experimenting with this problem and now I've got two
cases which can produce the ClassCastException, one in a servlet, and also
one in a jsp.

If you like, I'll post the simple test cases for each, but from Craig's
message he implies that this is a known bug in the Tomcat 3.x series.

It would be nice to get this fixed, it would save me from
stopping/restarting Tomcat after updating certain servlets/jsps.

Thanks,
Dave




  1   2   >