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:
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
The error occur at , so rest of code is just here to
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.
Stanley Bradbury escreveu:
> email@example.com 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.
>> - 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
>> Connection declaration:
>> > type="javax.sql.DataSource" username="" password=""
>> url="jdbc:derby:c:/projects/biblio/database;" maxActive="10"
>> Here is stack trace:
>> 08/12/2005 16:29:24 org.apache.catalina.core.ApplicationDispatcher
>> 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.
> ...... 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
> Thanks in advance