Forum Discussion
FICO
14 years agoCommunity Manager
Connecting to a repository using API
Connecting to a repository using API The following works fine on a Database repository without BVS
Hashtable<String, String> ht = getConnectionTable();
NdJdbcRepositoryConnect...
FICO
14 years agoCommunity Manager
Thanks very much for the reply Tom,
I have to say I find the repository managment connection seems overly complicated and non-intuitive. There seems to be a number of connection files with different formats between the IDE, the API, the RMA, repositories vs. workspaces, etc. Can I not just load one of the various files already created by the IDE and RMA and use it to connect?
Since NdJdbcRepositoryConnection is a NdWorkspaceConnection, are there are additional properties I need to set that would indicate the workspace to connect to? When I load the properties up as a hashtable (Properties), I still get the same error.
Properties:
com_blazesoft_repository_username=DBUSERID
com_blazesoft_repository_password=DBPASSWORD com_blazesoft_repository_jdbc_url=jdbc:db2://DBHOST (http://blaze.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif)BPORT/DBSUBSYSTEM com_blazesoft_repository_connectionclass=com.blazesoft.repository.jdbc.NdJdbcRepositoryConnection com_blazesoft_repository_jdbc_driver=com.ibm.db2.jcc.DB2Driver com_blazesoft_repository_jdbc_table=DBSCHEMA.DBTABLE com_blazesoft_repository_repositoryname=BlazeVersionedRepository com_blazesoft_repository_persist_credentials=true com_blazesoft_repository_jdbc_accessor=com.blazesoft.repository.jdbc.NdDefaultJdbcRepositoryAccessorcom.blazesoft.repository_workspacefolder=c:/temp/users/workspaces
com_blazesoft_repository_connection_name=API Private WorkspaceCode:
try{
Reader r =
new FileReader("c:/temp/blazeapi/workspace.connection");
p.load(r);
Hashtable h = (Hashtable)p;
NdWorkspaceConnection workspaceConnection = NdRomFactory.newWorkspaceConnection(h);
connectionMgr = NdRomFactory.newRepositoryConnectionManager(workspaceConnection);
}
Error:
Exception in thread "main"
com.blazesoft.template.repository.NdRomConnectionException: Connecting to repository 'BlazeVersionedRepository' failed.
com.blazesoft.template.repository.NdRomConnectionException
: Could not get ROM configuration from repository 'BlazeVersionedRepository'.
Any help is greatly appreciated!
Related Content
Related Content
How can I use ODH for solving a MIP model using Xpress Python API?
Hi everyone, I want to play a bit with ODH for Xpress Solver. I did run ODH from the command line but now I want to integrate it in the whole pipeline of a Python program. What should I import? What...2 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread31Views0likes2Comments