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.
1. Register WebLogic 10.3.4 in the IDE 2. Enable JPA 2.0 on this instance and make sure the default JPA provider is set to Kodo 3. Create a EE 5 Web Application 4. Create a persistence unit, use OpenJPA (JPA 2.0), which is the default option 5. Write some code that accesses JPA (e.g. JPA from DB + JSF from JPA) 6. Run the application and display a page that accesses the JPA code The application will fail with the following exception: Caused by: <openjpa-1.1.1-SNAPSHOT-r422266:965591 fatal user error> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property. at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:72) at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:776) at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:553) Full stack trace in the attachment. The question is whether OpenJPA should be enabled as a possibility at all, if JPA 2.0 is enabled.
Created attachment 105417 [details] Stack trace from the WebLogic log
it doesn't look related to jpa2.0, but if it works with disabled jpa2.0 support it worth to investigate.
can't deploy on weblogic because of issue 194966
Tried both - first create pu and use one created by entities from db and I have next exception: java.lang.AbstractMethodError: org.apache.openjpa.persistence.EntityManagerImpl.getCriteriaBuilder()Ljavax/persistence/criteria/CriteriaBuilder; at p.DiscountCodeJpaController.findDiscountCodeEntities(DiscountCodeJpaController.java:129) instead of initially reported. it looks like initial error is related with some datasource configuration issues. it still an issue, may be we should handle somehow default openjpa with enabled jpa2.0 either on persistence side or server plugin shouldn't provide jpa2.0 api.
Yes, I am now getting the same error (the previous error is resolved, I don't see it any more). I think this is an important scenario (as OpenJPA is the default provider), and should work out of the box for 7.0. Changing priority to P2.
ok, will look, if openjpa on weblogic support jpa 1.0 only it should be handled and only OpenJPA(1.0) should be available instead of openJPA(2.0).
Thanks. Also, EclipseLink (JPA 2.0) should be selected by default (even if OpenJPA is the default on the server), because honoring the user's choice of JPA 2 is more important than honoring his choice of the provider, IMO.
yes, it may be good, not sure yet, but as a special case it's likely will be coded as some hack instead of good design, at least at first iteration.
Integrated into 'main-golden', will be available in build *201102180501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/805201c63a0b User: Sergey B. Petrov <sj-nb@netbeans.org> Log: fix #194787 - separate default openjpa 1.0 and 2.0
now openjpa 1.0 is shown as default and persistence.xml version 1.0 is created by new pu and entities from db wizards with this default.
Thanks, this fixes the worst part, but I would still prefer: - If JPA 2 is enabled, always use EclipseLink (JPA 2.0) as the default (regardless of the default provider setting in admin console) - If JPA 2 is disabled, honor the setting in the admin console (i.e. OpenJPA by default, or EclipseLink if the user switched to EL in the admin console). Is this doable for 7.0, even if it requires some small hack? Thanks.
yes, I'm looking to select eclipselink as 'prefered' if jpa2.0 is supported and default is not jpa2.0 provider. Also it's good because there is an issue (isn't filed) with openjpa and controllers generated by jsf from entities (it may be an issue with openjpa also).
should be fixed now, if jpa2.0 is supported eclipselink is selected by default, also server default is openjpa 1.0.
Integrated into 'main-golden', will be available in build *201102190501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/0719020352fd User: Sergey B. Petrov <sj-nb@netbeans.org> Log: fix #194787 - fix issue with provider version isn't used in pu wizard