Re: ClassCastException in CountAggregator

2005-12-16 Thread Stanley Bradbury

Edson Carlos Ericksson Richter wrote:

In NetBeans environment, you could define your Resources under 
server.xml (bad option) under META-INF/context.xml file (better, 
project based - allow several projects in one installation without 
interference between projects). So I put it in META-INF/context.xml.



Thanks for your attention,

Edson Richter


Stanley Bradbury escreveu:


Edson Carlos Ericksson Richter wrote:


As stated in my previous mail, the connection pool is declared
url="jdbc:derby:c:/projects/biblio/database;" maxActive="10" 
maxIdle="2"/>



And in web.xml I just have a resource-ref, as required by specs:

 
   
   jdbc/Biblio
   javax.sql.DataSource
   Container
 


The code running is (it's a generic code I use to test queries, so 
don't be afraid about weird coding):


   
 select count(*) from my_table
   
   
 
   
 ${col}
   
 
   
 
   
 ${mgr:stripClob(row[col])}
   
 
   
   


The error occur at , so rest of code is just here to 
illustrate usage.


At last, the derby.jar and derbypt_BR.jar are in 
$NETBEANS_HOME/enterprise2/jakarta-tomcat-5.5.9/commons/lib/, so 
classes are avaliable to the pool. If I remove them, I get problems 
with connection (and plain queries stop working).



I expect this helps... I will not have much time free help, but from 
times to times I'll check to see if there is anything I could 
contribute.


Best regards,

Edson Richter



Stanley Bradbury escreveu:


[EMAIL PROTECTED] wrote:


Thank you all for the tips.

Before giving up using derby, I have: 1) checked for older 
versions. No, there are none (in
real, I tried a fresh install of Tomcat). I double checked 
$JAVA_HOME/jre/lib/ext, and
tryied including install a new version of JDK (I was using 
1.5.0_04 and made a try with

1.5.0_06 - no differences).
I tryied a simple JSP that take a connection from the pool and 
executed a simple select

count(*) from some_table and error is the same.

Interesting is that I tryied Ij, and the error didn't occured.
But, Ij is not using pt_BR messages, and I suspect error is 
related (but then I give up: I
could not spent more than a couple of hours without sucess 
searching on the net - I searched
Google, MSN, Altavista). db.apache.org was unavaliable yesterday, 
and I could not search

mailing lists.

So, without web support (even from the list), I could not defend 
Derby anymore in the
project, and manager directed all development to a comercial 
database, unfortunatelly.


At all, thank you... But don't forget to check what could be wrong 
- there is a serious

erro/bugr in there.

Details:

- Tomcat 5.5.9 embedded in NetBeans 5.0 Beta 2
- Tomcat 5.5.7 embedded in NetBeans 4.1
- Connection obtained with 
'jdbc:derby:c:/projects/biblio/database' (it's embedded) - Plain

queries works fine (select * from some_table)
- Aggregate count throw ClassCastException (select count(*) from 
some_table)


Connection declaration:

url="jdbc:derby:c:/projects/biblio/database;" maxActive="10" 
maxIdle="2"/>


Here is stack trace:

08/12/2005 16:29:24 org.apache.catalina.core.ApplicationDispatcher 
invoke

SEVERE: Servlet.service() for servlet jsp threw exception
ERROR 38000: A exceção 'java.lang.ClassCastException:
org.apache.derby.impl.sql.execute.CountAggregator' foi emitida ao 
avaliar uma expressão.
   at 
org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source)
   at 
org.apache.derby.iapi.error.StandardException.unexpectedUserException(Unknown 


Source)
   at 
org.apache.derby.impl.sql.execute.GenericAggregator.getAggregatorInstance(Unknown 


Source)
   at 
org.apache.derby.impl.sql.execute.GenericAggregator.initialize(Unknown 
Source)
 


..  SNIP ...

Hi Edson -

Could you help me setup a test case for this problem?  It would be 
great if  you could provide a test case for the problem and file a 
JIRA entry with the test case attached (please let me know if you 
can do this).  It sounds, however, that you are working to a tight 
timeframe so I am willing to attempt to create a test case but need 
some additional information.
I have not used NetBeans but know a bit about JSPs with Tomcat.  
Could you post the information I will need to perform the test you 
describe as:


".. I tryied a simple JSP that take a connection from the pool and 
executed a simple select count(*) from some_table and error is the 
same .."


Here are the things I can think of that will be very helpful: + 
Having the JSP code would be very helpful - would you post it?
+  I need to know how the connection pool was defined (what entries 
were placed in server.xml, the application deployment XML file and 
the web.xml file). +  If there any other settings needed to setup 
the connection pool in the Tomcat/NetBeans environment please 
include those also.
I have located another report of this stack trace when performing 
'select count(*)' in a different 

Re: ClassCastException in CountAggregator

2005-12-15 Thread Edson Carlos Ericksson Richter
In NetBeans environment, you could define your Resources under 
server.xml (bad option) under META-INF/context.xml file (better, project 
based - allow several projects in one installation without interference 
between projects). So I put it in META-INF/context.xml.



Thanks for your attention,

Edson Richter


Stanley Bradbury escreveu:


Edson Carlos Ericksson Richter wrote:


As stated in my previous mail, the connection pool is declared
url="jdbc:derby:c:/projects/biblio/database;" maxActive="10" 
maxIdle="2"/>



And in web.xml I just have a resource-ref, as required by specs:

 
   
   jdbc/Biblio
   javax.sql.DataSource
   Container
 


The code running is (it's a generic code I use to test queries, so 
don't be afraid about weird coding):


   
 select count(*) from my_table
   
   
 
   
 ${col}
   
 
   
 
   
 ${mgr:stripClob(row[col])}
   
 
   
   


The error occur at , so rest of code is just here to 
illustrate usage.


At last, the derby.jar and derbypt_BR.jar are in 
$NETBEANS_HOME/enterprise2/jakarta-tomcat-5.5.9/commons/lib/, so 
classes are avaliable to the pool. If I remove them, I get problems 
with connection (and plain queries stop working).



I expect this helps... I will not have much time free help, but from 
times to times I'll check to see if there is anything I could 
contribute.


Best regards,

Edson Richter



Stanley Bradbury escreveu:


[EMAIL PROTECTED] wrote:


Thank you all for the tips.

Before giving up using derby, I have: 1) checked for older 
versions. No, there are none (in
real, I tried a fresh install of Tomcat). I double checked 
$JAVA_HOME/jre/lib/ext, and
tryied including install a new version of JDK (I was using 1.5.0_04 
and made a try with

1.5.0_06 - no differences).
I tryied a simple JSP that take a connection from the pool and 
executed a simple select

count(*) from some_table and error is the same.

Interesting is that I tryied Ij, and the error didn't occured.
But, Ij is not using pt_BR messages, and I suspect error is related 
(but then I give up: I
could not spent more than a couple of hours without sucess 
searching on the net - I searched
Google, MSN, Altavista). db.apache.org was unavaliable yesterday, 
and I could not search

mailing lists.

So, without web support (even from the list), I could not defend 
Derby anymore in the
project, and manager directed all development to a comercial 
database, unfortunatelly.


At all, thank you... But don't forget to check what could be wrong 
- there is a serious

erro/bugr in there.

Details:

- Tomcat 5.5.9 embedded in NetBeans 5.0 Beta 2
- Tomcat 5.5.7 embedded in NetBeans 4.1
- Connection obtained with 'jdbc:derby:c:/projects/biblio/database' 
(it's embedded) - Plain

queries works fine (select * from some_table)
- Aggregate count throw ClassCastException (select count(*) from 
some_table)


Connection declaration:

url="jdbc:derby:c:/projects/biblio/database;" maxActive="10" 
maxIdle="2"/>


Here is stack trace:

08/12/2005 16:29:24 org.apache.catalina.core.ApplicationDispatcher 
invoke

SEVERE: Servlet.service() for servlet jsp threw exception
ERROR 38000: A exceção 'java.lang.ClassCastException:
org.apache.derby.impl.sql.execute.CountAggregator' foi emitida ao 
avaliar uma expressão.
   at 
org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source)
   at 
org.apache.derby.iapi.error.StandardException.unexpectedUserException(Unknown 


Source)
   at 
org.apache.derby.impl.sql.execute.GenericAggregator.getAggregatorInstance(Unknown 


Source)
   at 
org.apache.derby.impl.sql.execute.GenericAggregator.initialize(Unknown 
Source)
 


..  SNIP ...

Hi Edson -

Could you help me setup a test case for this problem?  It would be 
great if  you could provide a test case for the problem and file a 
JIRA entry with the test case attached (please let me know if you 
can do this).  It sounds, however, that you are working to a tight 
timeframe so I am willing to attempt to create a test case but need 
some additional information.
I have not used NetBeans but know a bit about JSPs with Tomcat.  
Could you post the information I will need to perform the test you 
describe as:


".. I tryied a simple JSP that take a connection from the pool and 
executed a simple select count(*) from some_table and error is the 
same .."


Here are the things I can think of that will be very helpful: + 
Having the JSP code would be very helpful - would you post it?
+  I need to know how the connection pool was defined (what entries 
were placed in server.xml, the application deployment XML file and 
the web.xml file). +  If there any other settings needed to setup 
the connection pool in the Tomcat/NetBeans environment please 
include those also.
I have located another report of this stack trace when performing 
'select count(*)' in a different server that did not seem to relate 
to c

Re: ClassCastException in CountAggregator

2005-12-15 Thread Stanley Bradbury

Edson Carlos Ericksson Richter wrote:


As stated in my previous mail, the connection pool is declared
url="jdbc:derby:c:/projects/biblio/database;" maxActive="10" 
maxIdle="2"/>



And in web.xml I just have a resource-ref, as required by specs:

 
   
   jdbc/Biblio
   javax.sql.DataSource
   Container
 


The code running is (it's a generic code I use to test queries, so 
don't be afraid about weird coding):


   
 select count(*) from my_table
   
   
 
   
 ${col}
   
 
   
 
   
 ${mgr:stripClob(row[col])}
   
 
   
   


The error occur at , so rest of code is just here to 
illustrate usage.


At last, the derby.jar and derbypt_BR.jar are in 
$NETBEANS_HOME/enterprise2/jakarta-tomcat-5.5.9/commons/lib/, so 
classes are avaliable to the pool. If I remove them, I get problems 
with connection (and plain queries stop working).



I expect this helps... I will not have much time free help, but from 
times to times I'll check to see if there is anything I could contribute.


Best regards,

Edson Richter



Stanley Bradbury escreveu:


[EMAIL PROTECTED] wrote:


Thank you all for the tips.

Before giving up using derby, I have: 1) checked for older versions. 
No, there are none (in
real, I tried a fresh install of Tomcat). I double checked 
$JAVA_HOME/jre/lib/ext, and
tryied including install a new version of JDK (I was using 1.5.0_04 
and made a try with

1.5.0_06 - no differences).
I tryied a simple JSP that take a connection from the pool and 
executed a simple select

count(*) from some_table and error is the same.

Interesting is that I tryied Ij, and the error didn't occured.
But, Ij is not using pt_BR messages, and I suspect error is related 
(but then I give up: I
could not spent more than a couple of hours without sucess searching 
on the net - I searched
Google, MSN, Altavista). db.apache.org was unavaliable yesterday, 
and I could not search

mailing lists.

So, without web support (even from the list), I could not defend 
Derby anymore in the
project, and manager directed all development to a comercial 
database, unfortunatelly.


At all, thank you... But don't forget to check what could be wrong - 
there is a serious

erro/bugr in there.

Details:

- Tomcat 5.5.9 embedded in NetBeans 5.0 Beta 2
- Tomcat 5.5.7 embedded in NetBeans 4.1
- Connection obtained with 'jdbc:derby:c:/projects/biblio/database' 
(it's embedded) - Plain

queries works fine (select * from some_table)
- Aggregate count throw ClassCastException (select count(*) from 
some_table)


Connection declaration:

url="jdbc:derby:c:/projects/biblio/database;" maxActive="10" 
maxIdle="2"/>


Here is stack trace:

08/12/2005 16:29:24 org.apache.catalina.core.ApplicationDispatcher 
invoke

SEVERE: Servlet.service() for servlet jsp threw exception
ERROR 38000: A exceção 'java.lang.ClassCastException:
org.apache.derby.impl.sql.execute.CountAggregator' foi emitida ao 
avaliar uma expressão.
   at 
org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source)
   at 
org.apache.derby.iapi.error.StandardException.unexpectedUserException(Unknown 


Source)
   at 
org.apache.derby.impl.sql.execute.GenericAggregator.getAggregatorInstance(Unknown 


Source)
   at 
org.apache.derby.impl.sql.execute.GenericAggregator.initialize(Unknown 
Source)
 


..  SNIP ...

Hi Edson -

Could you help me setup a test case for this problem?  It would be 
great if  you could provide a test case for the problem and file a 
JIRA entry with the test case attached (please let me know if you can 
do this).  It sounds, however, that you are working to a tight 
timeframe so I am willing to attempt to create a test case but need 
some additional information.
I have not used NetBeans but know a bit about JSPs with Tomcat.  
Could you post the information I will need to perform the test you 
describe as:


".. I tryied a simple JSP that take a connection from the pool and 
executed a simple select count(*) from some_table and error is the 
same .."


Here are the things I can think of that will be very helpful: + 
Having the JSP code would be very helpful - would you post it?
+  I need to know how the connection pool was defined (what entries 
were placed in server.xml, the application deployment XML file and 
the web.xml file). +  If there any other settings needed to setup the 
connection pool in the Tomcat/NetBeans environment please include 
those also.
I have located another report of this stack trace when performing 
'select count(*)' in a different server that did not seem to relate 
to codesets so I am hoping that  pt_BR is not required to debug this 
problem.


Thanks in advance






Hi Edson -

Thanks for the reply - I certainly understand being busy and appreciate 
your time to respond to my questions.  My newbie-academic understanding 
of Tomcat is that the pool can be defined in a couple of places but most 
commonly i

Re: ClassCastException in CountAggregator

2005-12-15 Thread Edson Carlos Ericksson Richter

As stated in my previous mail, the connection pool is declared



And in web.xml I just have a resource-ref, as required by specs:

 
   
   jdbc/Biblio
   javax.sql.DataSource
   Container
 


The code running is (it's a generic code I use to test queries, so don't 
be afraid about weird coding):


   
 select count(*) from my_table
   
   
 
   
 ${col}
   
 
   
 
   
 ${mgr:stripClob(row[col])}
   
 
   
   


The error occur at , so rest of code is just here to 
illustrate usage.


At last, the derby.jar and derbypt_BR.jar are in 
$NETBEANS_HOME/enterprise2/jakarta-tomcat-5.5.9/commons/lib/, so classes 
are avaliable to the pool. If I remove them, I get problems with 
connection (and plain queries stop working).



I expect this helps... I will not have much time free help, but from 
times to times I'll check to see if there is anything I could contribute.


Best regards,

Edson Richter



Stanley Bradbury escreveu:


[EMAIL PROTECTED] wrote:


Thank you all for the tips.

Before giving up using derby, I have: 1) checked for older versions. 
No, there are none (in
real, I tried a fresh install of Tomcat). I double checked 
$JAVA_HOME/jre/lib/ext, and
tryied including install a new version of JDK (I was using 1.5.0_04 
and made a try with

1.5.0_06 - no differences).
I tryied a simple JSP that take a connection from the pool and 
executed a simple select

count(*) from some_table and error is the same.

Interesting is that I tryied Ij, and the error didn't occured.
But, Ij is not using pt_BR messages, and I suspect error is related 
(but then I give up: I
could not spent more than a couple of hours without sucess searching 
on the net - I searched
Google, MSN, Altavista). db.apache.org was unavaliable yesterday, and 
I could not search

mailing lists.

So, without web support (even from the list), I could not defend 
Derby anymore in the
project, and manager directed all development to a comercial 
database, unfortunatelly.


At all, thank you... But don't forget to check what could be wrong - 
there is a serious

erro/bugr in there.

Details:

- Tomcat 5.5.9 embedded in NetBeans 5.0 Beta 2
- Tomcat 5.5.7 embedded in NetBeans 4.1
- Connection obtained with 'jdbc:derby:c:/projects/biblio/database' 
(it's embedded) - Plain

queries works fine (select * from some_table)
- Aggregate count throw ClassCastException (select count(*) from 
some_table)


Connection declaration:

url="jdbc:derby:c:/projects/biblio/database;" maxActive="10" 
maxIdle="2"/>


Here is stack trace:

08/12/2005 16:29:24 org.apache.catalina.core.ApplicationDispatcher 
invoke

SEVERE: Servlet.service() for servlet jsp threw exception
ERROR 38000: A exceção 'java.lang.ClassCastException:
org.apache.derby.impl.sql.execute.CountAggregator' foi emitida ao 
avaliar uma expressão.
   at 
org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source)
   at 
org.apache.derby.iapi.error.StandardException.unexpectedUserException(Unknown 


Source)
   at 
org.apache.derby.impl.sql.execute.GenericAggregator.getAggregatorInstance(Unknown 


Source)
   at 
org.apache.derby.impl.sql.execute.GenericAggregator.initialize(Unknown 
Source)
 


..  SNIP ...

Hi Edson -

Could you help me setup a test case for this problem?  It would be 
great if  you could provide a test case for the problem and file a 
JIRA entry with the test case attached (please let me know if you can 
do this).  It sounds, however, that you are working to a tight 
timeframe so I am willing to attempt to create a test case but need 
some additional information.
I have not used NetBeans but know a bit about JSPs with Tomcat.  Could 
you post the information I will need to perform the test you describe as:


".. I tryied a simple JSP that take a connection from the pool and 
executed a simple select count(*) from some_table and error is the 
same .."


Here are the things I can think of that will be very helpful: + Having 
the JSP code would be very helpful - would you post it?
+  I need to know how the connection pool was defined (what entries 
were placed in server.xml, the application deployment XML file and the 
web.xml file). +  If there any other settings needed to setup the 
connection pool in the Tomcat/NetBeans environment please include 
those also.
I have located another report of this stack trace when performing 
'select count(*)' in a different server that did not seem to relate to 
codesets so I am hoping that  pt_BR is not required to debug this 
problem.


Thanks in advance





begin:vcard
fn:Edson Carlos Ericksson Richter
n:Richter;Edson
org;quoted-printable:MGR Inform=C3=A1tica Ltda;Desenvolvimento
adr:Cristo Redentor;;Assis Brasil, 3257, Sala 409;Porto Alegre;RS;91010007;Brasil
email;internet:[EMAIL PROTECTED]
title:Diretor de Sistemas
tel;work:(51)3347-0446
tel;cell:(51)9259-2993
x-mozilla-html:FALSE
url:http://www.mgrinformati

Re: ClassCastException in CountAggregator

2005-12-14 Thread Stanley Bradbury

[EMAIL PROTECTED] wrote:


Thank you all for the tips.

Before giving up using derby, I have: 1) checked for older versions. No, there 
are none (in
real, I tried a fresh install of Tomcat). I double checked 
$JAVA_HOME/jre/lib/ext, and
tryied including install a new version of JDK (I was using 1.5.0_04 and made a 
try with
1.5.0_06 - no differences).
I tryied a simple JSP that take a connection from the pool and executed a 
simple select
count(*) from some_table and error is the same.

Interesting is that I tryied Ij, and the error didn't occured.
But, Ij is not using pt_BR messages, and I suspect error is related (but then I 
give up: I
could not spent more than a couple of hours without sucess searching on the net 
- I searched
Google, MSN, Altavista). db.apache.org was unavaliable yesterday, and I could 
not search
mailing lists.

So, without web support (even from the list), I could not defend Derby anymore 
in the
project, and manager directed all development to a comercial database, 
unfortunatelly.

At all, thank you... But don't forget to check what could be wrong - there is a 
serious
erro/bugr in there.

Details:

- Tomcat 5.5.9 embedded in NetBeans 5.0 Beta 2
- Tomcat 5.5.7 embedded in NetBeans 4.1
- Connection obtained with 'jdbc:derby:c:/projects/biblio/database' (it's 
embedded) - Plain
queries works fine (select * from some_table)
- Aggregate count throw ClassCastException (select count(*) from some_table)

Connection declaration:



Here is stack trace:

08/12/2005 16:29:24 org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
ERROR 38000: A exceção 'java.lang.ClassCastException:
org.apache.derby.impl.sql.execute.CountAggregator' foi emitida ao avaliar uma 
expressão.
   at org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source)
   at 
org.apache.derby.iapi.error.StandardException.unexpectedUserException(Unknown
Source)
   at 
org.apache.derby.impl.sql.execute.GenericAggregator.getAggregatorInstance(Unknown
Source)
   at 
org.apache.derby.impl.sql.execute.GenericAggregator.initialize(Unknown Source)
 


..  SNIP ...

Hi Edson -

Could you help me setup a test case for this problem?  It would be great 
if  you could provide a test case for the problem and file a JIRA entry 
with the test case attached (please let me know if you can do this).  It 
sounds, however, that you are working to a tight timeframe so I am 
willing to attempt to create a test case but need some additional 
information.
I have not used NetBeans but know a bit about JSPs with Tomcat.  Could 
you post the information I will need to perform the test you describe as:


".. I tryied a simple JSP that take a connection from the pool and 
executed a simple select count(*) from some_table and error is the same .."


Here are the things I can think of that will be very helpful: 
+ Having the JSP code would be very helpful - would you post it?
+  I need to know how the connection pool was defined (what entries were 
placed in server.xml, the application deployment XML file and the 
web.xml file). 
+  If there any other settings needed to setup the connection pool in 
the Tomcat/NetBeans environment please include those also. 

I have located another report of this stack trace when performing 
'select count(*)' in a different server that did not seem to relate to 
codesets so I am hoping that  pt_BR is not required to debug this problem.


Thanks in advance



Re: ClassCastException in CountAggregator

2005-12-09 Thread Daniel John Debrunner
Satheesh Bandaram wrote:

> This helps, but I still don't know what is causing the problem. I
> currently believe this is because of some configuration issue.
> 
> If you can isolate a test case using IJ, I think that would help solve
> the problem.
> 
>> interesting is that I tryied Ij, and the error didn't occured.
>> But, Ij is not using pt_BR messages, and I suspect error is related 
> 
> This configuration of Tomcat and Derby is used offen and running
> aggregates is also common. Current aggregate code seems to load the
> class dynamically, so if there are any configuration issues, you could
> see this problem. (like Stan's message)

I don't think a test case with ij will be possible. Most likely the
aggregate class is being loaded from the same jar as the rest of the
engine, but through a different class loader.

Dan.





Re: ClassCastException in CountAggregator

2005-12-09 Thread Satheesh Bandaram




This helps, but I still don't know what is causing the problem. I
currently believe this is because of some configuration issue.

If you can isolate a test case using IJ, I think that would help solve
the problem. 
> interesting is that I tryied Ij, and the error didn't occured.
> But, Ij is not using pt_BR messages, and I suspect error is related 
This configuration of Tomcat and Derby is used offen and running
aggregates is also common. Current aggregate code seems to load the
class dynamically, so if there are any configuration issues, you could
see this problem. (like Stan's message)

Sorry, couldn't help you further. If you can make a test case with IJ,
I will look again on this.

Satheesh

[EMAIL PROTECTED] wrote:

  Thank you all for the tips.

Before giving up using derby, I have: 1) checked for older versions. No, there are none (in
real, I tried a fresh install of Tomcat). I double checked $JAVA_HOME/jre/lib/ext, and
tryied including install a new version of JDK (I was using 1.5.0_04 and made a try with
1.5.0_06 - no differences).
I tryied a simple JSP that take a connection from the pool and executed a simple select
count(*) from some_table and error is the same.

Interesting is that I tryied Ij, and the error didn't occured.
But, Ij is not using pt_BR messages, and I suspect error is related (but then I give up: I
could not spent more than a couple of hours without sucess searching on the net - I searched
Google, MSN, Altavista). db.apache.org was unavaliable yesterday, and I could not search
mailing lists.

So, without web support (even from the list), I could not defend Derby anymore in the
project, and manager directed all development to a comercial database, unfortunatelly.

At all, thank you... But don't forget to check what could be wrong - there is a serious
erro/bugr in there.

Details:

- Tomcat 5.5.9 embedded in NetBeans 5.0 Beta 2
- Tomcat 5.5.7 embedded in NetBeans 4.1
- Connection obtained with 'jdbc:derby:c:/projects/biblio/database' (it's embedded) - Plain
queries works fine (select * from some_table)
- Aggregate count throw ClassCastException (select count(*) from some_table)

Connection declaration:



Here is stack trace:

08/12/2005 16:29:24 org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
ERROR 38000: A exceção 'java.lang.ClassCastException:
org.apache.derby.impl.sql.execute.CountAggregator' foi emitida ao avaliar uma expressão.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.error.StandardException.unexpectedUserException(Unknown
Source)
at org.apache.derby.impl.sql.execute.GenericAggregator.getAggregatorInstance(Unknown
Source)
at org.apache.derby.impl.sql.execute.GenericAggregator.initialize(Unknown Source)
at
org.apache.derby.impl.sql.execute.ScalarAggregateResultSet.initializeScalarAggregation(Unknown
Source)
at org.apache.derby.impl.sql.execute.ScalarAggregateResultSet.getNextRowCore(Unknown
Source)
at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown
Source)
at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:168)
at org.apache.taglibs.standard.tag.common.sql.ResultImpl.(Unknown Source)
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(Unknown Source)
at org.apache.jsp.Biblio.esquerda_jsp._jspx_meth_sql_query_1(esquerda_jsp.java:1427)
at org.apache.jsp.Biblio.esquerda_jsp._jspService(esquerda_jsp.java:215)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at
org.apache.catalina.core.ApplicationDispat

Re: ClassCastException in CountAggregator

2005-12-08 Thread edson . richter
Thank you all for the tips.

Before giving up using derby, I have: 1) checked for older versions. No, there 
are none (in
real, I tried a fresh install of Tomcat). I double checked 
$JAVA_HOME/jre/lib/ext, and
tryied including install a new version of JDK (I was using 1.5.0_04 and made a 
try with
1.5.0_06 - no differences).
I tryied a simple JSP that take a connection from the pool and executed a 
simple select
count(*) from some_table and error is the same.

Interesting is that I tryied Ij, and the error didn't occured.
But, Ij is not using pt_BR messages, and I suspect error is related (but then I 
give up: I
could not spent more than a couple of hours without sucess searching on the net 
- I searched
Google, MSN, Altavista). db.apache.org was unavaliable yesterday, and I could 
not search
mailing lists.

So, without web support (even from the list), I could not defend Derby anymore 
in the
project, and manager directed all development to a comercial database, 
unfortunatelly.

At all, thank you... But don't forget to check what could be wrong - there is a 
serious
erro/bugr in there.

Details:

- Tomcat 5.5.9 embedded in NetBeans 5.0 Beta 2
- Tomcat 5.5.7 embedded in NetBeans 4.1
- Connection obtained with 'jdbc:derby:c:/projects/biblio/database' (it's 
embedded) - Plain
queries works fine (select * from some_table)
- Aggregate count throw ClassCastException (select count(*) from some_table)

Connection declaration:



Here is stack trace:

08/12/2005 16:29:24 org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
ERROR 38000: A exceção 'java.lang.ClassCastException:
org.apache.derby.impl.sql.execute.CountAggregator' foi emitida ao avaliar uma 
expressão.
at org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source)
at 
org.apache.derby.iapi.error.StandardException.unexpectedUserException(Unknown
Source)
at 
org.apache.derby.impl.sql.execute.GenericAggregator.getAggregatorInstance(Unknown
Source)
at 
org.apache.derby.impl.sql.execute.GenericAggregator.initialize(Unknown Source)
at
org.apache.derby.impl.sql.execute.ScalarAggregateResultSet.initializeScalarAggregation(Unknown
Source)
at 
org.apache.derby.impl.sql.execute.ScalarAggregateResultSet.getNextRowCore(Unknown
Source)
at 
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown
Source)
at 
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(Unknown 
Source)
at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown 
Source)
at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
at 
org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:168)
at org.apache.taglibs.standard.tag.common.sql.ResultImpl.(Unknown 
Source)
at 
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(Unknown 
Source)
at 
org.apache.jsp.Biblio.esquerda_jsp._jspx_meth_sql_query_1(esquerda_jsp.java:1427)
at org.apache.jsp.Biblio.esquerda_jsp._jspService(esquerda_jsp.java:215)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jsp.Biblio.intro_jsp._jspService(intro_jsp.java:110)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.jav

Re: ClassCastException in CountAggregator

2005-12-07 Thread Stanley Bradbury

Satheesh Bandaram wrote:


A full exception trace (from derby.log) would help. I have not seen this
kind of error for this usage...

Satheesh

Jean T. Anderson wrote:

 


Edson Carlos Ericksson Richter wrote:

   


I solved my problem not using derby :(
Appear the list is more interested in voting logos, than solving
critical bugs.
 


Your frustration is understandable -- it must have seemed like Derby
was doing nothing else today but looking at logos.

I suspect the real reason for silence on the issue you posted was
nobody immediately recognized the problem given the information
provided. The turnaround for a given problem often depends on if
someone has encountered it or something similar before.

Did you try running the same query in ij? and did it get the same error?

regards,

-jean

   


Richter


Edson Carlos Ericksson Richter escreveu:

 


the error message is:

select count(*) from TB_BIBLIO_AUTORIZACAO: Exception
"java.lang.ClassCastException:
org.apache.derby.impl.sql.execute.CountAggregator' was emited
evaluating expression.

The table TB_BIBLIO_AUTORIZACAO has 8 records, with 3 columns (one
integer, 2 varchar). There are no null values on contents.

I recently upgraded derby to 10.1.2.1 (from 10.1.1). I tried to
"downgrade" to 10.1.1, but gives same error. The app is being
developed under Apache Tomcat 5.5.9, and derby libraries are under
$JAKARTA/commons/lib. Other queries (for authentication, as example)
are working fine.

I'll appreciate any help.

   



   




 


Hi -
Some time ago I encountered similar inexplicable ClassCastExceptions 
that stemed from having multiple versions of derby classes loaded.  
Check to be sure that the only file containing Derby classes in your 
Tomcat system is the derby.jar file in $JAKARTA/commons/lib (check the 
webapp WEB_INF/lib directory too).  If I recall correctly my problem 
resulted from trying to have two versions of derby available in a single 
server by renaming the jars derby100.jar and derby101.jar.  The server 
loaded classes from both jarfiles that 'stepped on each other' resulting 
in casting and security violations while processing internal 
manipulations (like aggregation).


Hope this helps



Re: ClassCastException in CountAggregator

2005-12-07 Thread Satheesh Bandaram
A full exception trace (from derby.log) would help. I have not seen this
kind of error for this usage...

Satheesh

Jean T. Anderson wrote:

> Edson Carlos Ericksson Richter wrote:
>
>> I solved my problem not using derby :(
>> Appear the list is more interested in voting logos, than solving
>> critical bugs.
>
>
> Your frustration is understandable -- it must have seemed like Derby
> was doing nothing else today but looking at logos.
>
> I suspect the real reason for silence on the issue you posted was
> nobody immediately recognized the problem given the information
> provided. The turnaround for a given problem often depends on if
> someone has encountered it or something similar before.
>
> Did you try running the same query in ij? and did it get the same error?
>
> regards,
>
>  -jean
>
>>
>>
>> Richter
>>
>>
>> Edson Carlos Ericksson Richter escreveu:
>>
>>> the error message is:
>>>
>>> select count(*) from TB_BIBLIO_AUTORIZACAO: Exception
>>> "java.lang.ClassCastException:
>>> org.apache.derby.impl.sql.execute.CountAggregator' was emited
>>> evaluating expression.
>>>
>>> The table TB_BIBLIO_AUTORIZACAO has 8 records, with 3 columns (one
>>> integer, 2 varchar). There are no null values on contents.
>>>
>>> I recently upgraded derby to 10.1.2.1 (from 10.1.1). I tried to
>>> "downgrade" to 10.1.1, but gives same error. The app is being
>>> developed under Apache Tomcat 5.5.9, and derby libraries are under
>>> $JAKARTA/commons/lib. Other queries (for authentication, as example)
>>> are working fine.
>>>
>>> I'll appreciate any help.
>>>
>>
>
>
>



Re: ClassCastException in CountAggregator

2005-12-07 Thread Kathey Marsden
Jean T. Anderson wrote:

> Edson Carlos Ericksson Richter wrote:
>
>> I solved my problem not using derby :(
>> Appear the list is more interested in voting logos, than solving
>> critical bugs.
>
>
> Your frustration is understandable -- it must have seemed like Derby
> was doing nothing else today but looking at logos.
>
> I suspect the real reason for silence on the issue you posted was
> nobody immediately recognized the problem given the information
> provided. The turnaround for a given problem often depends on if
> someone has encountered it or something similar before.
>
> Did you try running the same query in ij? and did it get the same error?


A stack trace would also be really helpful and a reproducible case would
be ideal.  If you  have that and decide to come back (and even if you
don't) I think you  you should file a bug in Jira.  The  
ClassCastException sounds like a bug to me.








Re: ClassCastException in CountAggregator

2005-12-07 Thread Jean T. Anderson

Edson Carlos Ericksson Richter wrote:

I solved my problem not using derby :(
Appear the list is more interested in voting logos, than solving 
critical bugs.


Your frustration is understandable -- it must have seemed like Derby was 
doing nothing else today but looking at logos.


I suspect the real reason for silence on the issue you posted was nobody 
immediately recognized the problem given the information provided. The 
turnaround for a given problem often depends on if someone has 
encountered it or something similar before.


Did you try running the same query in ij? and did it get the same error?

regards,

 -jean




Richter


Edson Carlos Ericksson Richter escreveu:


the error message is:

select count(*) from TB_BIBLIO_AUTORIZACAO: Exception 
"java.lang.ClassCastException: 
org.apache.derby.impl.sql.execute.CountAggregator' was emited 
evaluating expression.


The table TB_BIBLIO_AUTORIZACAO has 8 records, with 3 columns (one 
integer, 2 varchar). There are no null values on contents.


I recently upgraded derby to 10.1.2.1 (from 10.1.1). I tried to 
"downgrade" to 10.1.1, but gives same error. The app is being 
developed under Apache Tomcat 5.5.9, and derby libraries are under 
$JAKARTA/commons/lib. Other queries (for authentication, as example) 
are working fine.


I'll appreciate any help.







Re: ClassCastException in CountAggregator

2005-12-07 Thread Edson Carlos Ericksson Richter

I solved my problem not using derby :(
Appear the list is more interested in voting logos, than solving 
critical bugs.




Richter


Edson Carlos Ericksson Richter escreveu:


the error message is:

select count(*) from TB_BIBLIO_AUTORIZACAO: Exception 
"java.lang.ClassCastException: 
org.apache.derby.impl.sql.execute.CountAggregator' was emited 
evaluating expression.


The table TB_BIBLIO_AUTORIZACAO has 8 records, with 3 columns (one 
integer, 2 varchar). There are no null values on contents.


I recently upgraded derby to 10.1.2.1 (from 10.1.1). I tried to 
"downgrade" to 10.1.1, but gives same error. The app is being 
developed under Apache Tomcat 5.5.9, and derby libraries are under 
$JAKARTA/commons/lib. Other queries (for authentication, as example) 
are working fine.


I'll appreciate any help.



begin:vcard
fn:Edson Carlos Ericksson Richter
n:Richter;Edson
org;quoted-printable:MGR Inform=C3=A1tica Ltda;Desenvolvimento
adr:Cristo Redentor;;Assis Brasil, 3257, Sala 409;Porto Alegre;RS;91010007;Brasil
email;internet:[EMAIL PROTECTED]
title:Diretor de Sistemas
tel;work:(51)3347-0446
tel;cell:(51)9259-2993
x-mozilla-html:FALSE
url:http://www.mgrinformatica.com.br
version:2.1
end:vcard