This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 218428 - Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found.
Summary: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found.
Status: RESOLVED INVALID
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-16 20:47 UTC by David Konecny
Modified: 2012-09-23 20:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2012-09-16 20:47:33 UTC
I followed
> http://wiki.netbeans.org/NewAndNoteworthyNB73#JPA
and created J2SE project and used "Entity from DB" for DiscountCode table and opened JPQL editor to run "select d from DiscountCode" query and output is:

javax.persistence.PersistenceException: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Exception Description: Configuration error.  Class [org.apache.derby.jdbc.ClientDriver] not found.
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:517)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
Caused by: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Exception Description: Configuration error.  Class [org.apache.derby.jdbc.ClientDriver] not found.
	at org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82)
	at org.eclipse.persistence.sessions.DefaultConnector.loadDriverClass(DefaultConnector.java:267)
	at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:85)
	at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
	... 6 more
Comment 1 Sergey Petrov 2012-09-17 05:07:58 UTC
from link above " you need to add jdbc driver and build your application"
Comment 2 David Konecny 2012-09-17 22:36:48 UTC
I thought (I might be wrong though) that we add JDBC driver to project classpath automatically when generating entities. And if not could we do that? That sounds like a logical helpful step to me.
Comment 3 David Konecny 2012-09-17 22:38:08 UTC
After adding a driver to the classpath it works. But for example query "select d.rate from DiscountCode d" returns 10 empty rows. That's a bug ay?
Comment 4 Sergey Petrov 2012-09-18 05:47:31 UTC
it's on plaanning page and there is enhancment request to add jdbc automatically.

yes, may be a bug, will try today.
Comment 5 Petr Jiricka 2012-09-18 07:40:48 UTC
I found the existing issue, it's bug 185500.
Comment 6 Sergey Petrov 2012-09-21 14:45:44 UTC
The behavior is enhanced, nb extend classpath now to add driver classpath for jpql execution if it wasn't added to a project.
Comment 7 David Konecny 2012-09-23 20:58:19 UTC
Thanks.