Feedback of Target Platform migration from Eclipse 4.3 to 4.4.1 - Follow-up with Datatools

aurelien.pupier
Blog Categories: 

I discovered a new issue since my last post about Target Platform migration from Eclipse 4.3 to 4.4.1. It concerns a behavior modification in Datatools API which broke our integration of the Datatools Graphical Designer.

datatools Graphical Designer Integration

The symptom

When trying to connect to a database, a NPE is thrown (which is the case when using the Graphical Designer):

  1. !ENTRY org.eclipse.datatools.connectivity 4 10001 2015-03-18 13:31:13.354
  2. !MESSAGE Internal Error - org.eclipse.datatools.connectivity
  3. !STACK 0
  4. java.lang.NullPointerException
  5. at org.eclipse.datatools.connectivity.drivers.DriverValidator.validateJarListFiles(DriverValidator.java:161)
  6. at org.eclipse.datatools.connectivity.drivers.DriverValidator.isValid(DriverValidator.java:92)
  7. at org.eclipse.datatools.connectivity.internal.ConnectionProfileMgmt.writeCPToXML1_0(ConnectionProfileMgmt.java:321)
  8. at org.eclipse.datatools.connectivity.internal.ConnectionProfileMgmt.saveCPs(ConnectionProfileMgmt.java:216)
  9. at org.eclipse.datatools.connectivity.internal.ConnectionProfileMgmt.saveCPs(ConnectionProfileMgmt.java:172)
  10. at org.eclipse.datatools.connectivity.internal.InternalProfileManager.saveChanges(InternalProfileManager.java:1018)
  11. at org.eclipse.datatools.connectivity.internal.InternalProfileManager.addProfile(InternalProfileManager.java:784)
  12. at org.eclipse.datatools.connectivity.internal.InternalProfileManager.addProfile(InternalProfileManager.java:737)
  13. at org.eclipse.datatools.connectivity.internal.InternalProfileManager.createProfile(InternalProfileManager.java:633)
  14. at org.eclipse.datatools.connectivity.internal.InternalProfileManager.createProfile(InternalProfileManager.java:483)
  15. at org.eclipse.datatools.connectivity.ProfileManager.createProfile(ProfileManager.java:179)
  16. at org.bonitasoft.studio.datatools.ConnectionProfileUtil.createConnectionProfile(ConnectionProfileUtil.java:102)

The fix

The fix "simply" consisted in specifying the IDriverMgmtConstants.PROP_DEFN_TYPE property value for the DriverInstance. The value required to be based on the Driver Template ID defined by extension points "org.eclipse.datatools.connectivity.driverExtension".

And that's all!...

I mean for all databases except Oracle's ones...

For Oracle , it also requires to duplicate the properties given to the DriverInstance to the Connection Profile creation method (org.eclipse.datatools.connectivity.ProfileManager.createProfile(String, String, String, Properties).

Acknowledgements

I want to thanks JBoss Tools Integration Stack developers for having provided information in their public bugtracker on how they solve the issue on their side and Mickaƫl Istria for his help guiding me to the specific git commit solving the issue. It saves me a lot of time.

Notifications