| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 2010-08-03 02:21:04
|
slivey
Joined: 2010-08-03 02:00:39
Messages: 3
Offline
|
I would like to use Power Architect to connect to my Force.com (salesforce platform) database.
Currently, a JDBC driver exists for SchemaSpy. But getting it working is somewhat "clunky" and then you can only view the schema in SchemSpy.
I much prefer SQL Power Architect. And I think a database connection could be easily created with some minor adjustments to the JDBC SchemaSpy connector.
I was able to adjust an existing Database Connection (SQLStream generic connector) and tested the connection successfully... Here are the adjusted parameters:
Driver Class: com.claimvantage.force.jdbc.ForceMetaDataDriver
Connection String Template: jdbc:claimvantage:force:<sfuser>:<sfpw>
(where sfuser is the salesforce username, sfpw is the salesforce password + security token)
Jar files from first three downloads here: http://code.google.com/p/force-metadata-jdbc-driver/downloads/list (depends.zip has jar files)
Also - all source code, wiki, etc for the salesforce jdbc may be viewed here.
So, Test Connection is successful with these parameters.
However, when I Add Source Connection, I get a Java null pointer exception (see below). But I think it would only take a few "tweaks" to adapt and get working. And this type of connection would draw a huge following to SQL Power Architect - because there is currently no decent way to create/view data models.
Error Report (null pointer exception):
java.lang.RuntimeException: java.lang.NullPointerException
at ca.sqlpower.architect.swingui.DBTree$PokeDBWorker.cleanup(DBTree.java:80
at ca.sqlpower.swingui.SPSwingWorker$1.run(SPSwingWorker.java:114)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:18
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.NullPointerException
at ca.sqlpower.sqlobject.SQLCatalog.fetchCatalogs(SQLCatalog.java:65)
at ca.sqlpower.sqlobject.SQLDatabase.populateImpl(SQLDatabase.java:162)
at ca.sqlpower.sqlobject.SQLObject.populate(SQLObject.java:179)
at ca.sqlpower.sqlobject.SQLObject.getChildCount(SQLObject.java:297)
at ca.sqlpower.architect.swingui.DBTree$PokeDBWorker.pokeDatabase(DBTree.java:789)
at ca.sqlpower.architect.swingui.DBTree$PokeDBWorker.doStuff(DBTree.java:774)
at ca.sqlpower.swingui.SPSwingWorker.run(SPSwingWorker.java:104)
at java.lang.Thread.run(Thread.java:637)
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 2010-08-03 10:58:26
|
Jonathan
SQL Power Developer
Joined: 2007-01-08 15:10:32
Messages: 873
Offline
|
Yes, that does sound like a good project and opportunity!
As you say, the project description for the force-metadata-jdbc-driver begins with: "This JDBC driver implements just enough of the java.sql.DatabaseMetaData interface to allow the wonderful SchemaSpy to output a set of ERDs for a Force.com data model."
The way to get this driver working with SQL Power Architect would be to iteratively:
* implement the "next" missing feature in the driver
* re-test
until the populate/reverse engineer feature works properly.
The job would be far, far easier if you replaced the current stub implementations that return 0, false, or null (which is everything after line 77 of http://code.google.com/p/force-metadata-jdbc-driver/source/browse/trunk/force-metadata-jdbc-driver/src/com/claimvantage/force/jdbc/ForceMetaData.java) with a "throw UnsupportedOperationException()". Otherwise, if you start working on enhancing the driver's API coverage as-is, you'll spend most of your time backtracking through the SQL Power Architect code trying to figure out why there was a NullPointerException or IndexOutOfBoundsException after a call into the JDBC driver.
Good luck with this! I'd be very interested to hear back with your results. If you get it working, we'd be happy to bundle your enhanced version of the driver and a built-in configuration for Force.com connections in a future release of SQL Power Architect.
-Jonathan
|
|
|
 |
|
|
|
|