Build: NetBeans IDE 6.9.1 (Build 201007282301)
VM: Java HotSpot(TM) Client VM, 19.0-b09, Java(TM) SE Runtime Environment, 1.6.0_23-b05
jungmat: only crashed when C3P0 connection provider is activated thru hibernate.cfg.xml
magoarcano: I was trying to start writing the first lines in HQL editor with .cfg.xml file
jungmat: when i'am trying to execute an HQL query in HQL Query netbeans interface
Created attachment 104859 [details]
Created attachment 106960 [details]
I am trying to execute an hql query in HQL query editor ; C3P0 library is there
when I am remove
in hibernate.cfg.xml file the query is running fine
Application is working fine even with or without the above config line
maybe it's a bug in HQL Netbeans Editor ?
Unless I am mistaken D-Light is using HSQL, so Maria, please deal with evaluation of the issue.
What we have in D-Light is H2 Java embedded database which uses SQL. Nothing to do with HQL...
So I cannot evaluate and move back to platform
Opps, sorry. I mistaken H2 SQL with HQL. Moving to hibernate.
Can someone provide sample project?
What does it mean "C3P0 library is there"? Is "com/mchange/v2/c3p0/DataSources" in this library?
(In reply to comment #6)
> Can someone provide sample project?
> What does it mean "C3P0 library is there"? Is "com/mchange/v2/c3p0/DataSources"
> in this library?
Here below an hibernate.cfg.xml sample ; you can modify it so that it point to one of your own tables ; if you try to execute a simple HQL query, in my case <from Cities> in the netbeans HQL editor unless connection C3P0 provider (line commented) the query is working fine ; if you uncomment the C3P0 connection provider line you will receive the stacktrace ; if you run the "full" application (and consequently the queries) with the NetBeans <run> command (with connection provider C3P0) the application is also working fine.
To give an answer to your other question about the library : "com/mchange/v2/c3p0/DataSources" is in this library.
In view of the exchanges between the different NetBeans support teams, allow me to announce my intuition about this bug: given that the stacktrace arrives in one of first stages of execution, probably during the translation of HQL in SQL, I evaluate that it is the component HQL Editor which is not (or not yet) compatible with C3P0, as though the translator did not know what to make of the " connection provider "... Can you verify this supposition ?
Thanks in advance
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Caution : the next line does not work in HQL Query Console -->
<!-- <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>-->
*** Bug 194647 has been marked as a duplicate of this bug. ***
The issue is reproducible during POJo generation also, and can't be resolved with addition of c3p0-0.9.1.jar. I'm not sure what provider is used by default but classloader used inside of hibernate code (and likely assigned by nb) can't access this class, hope it may be fixed but need more investigation.
*** Bug 201897 has been marked as a duplicate of this bug. ***
*** Bug 215551 has been marked as a duplicate of this bug. ***
*** Bug 226423 has been marked as a duplicate of this bug. ***
I came across this problem and posted it as a question in stackoverflow. Later then, I managed to solve the problem. It's not a bug, we just missed to add the "mchange-commons*.jar" from the c3p0 lib distribution.