Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

11g SDK and SQL Server Driver

772776Jun 21 2011
I am trying to write a java app using the ODI SDK. I am hitting trouble when connecting to the ODI work repository. When debugging I found that I had to use the weblogic sql server driver. I used the following code below...

MasterRepositoryDbInfo masterInfo = new MasterRepositoryDbInfo("jdbc:weblogic:sqlserver://INDIGOS2:1433;SelectMethod=cursor;databaseName=INDS4_ODI;integratedSecurity=false","weblogic.jdbc.sqlserver.SQLServerDriver","odi_user","odi_password".toCharArray(), new PoolingAttributes());
WorkRepositoryDbInfo workInfo = new WorkRepositoryDbInfo("WORKREP",new PoolingAttributes());
final OdiInstance odiInstance = OdiInstance.createInstance(new OdiInstanceConfig(masterInfo,workInfo));

Now the error when I debug is telling me I can only use it in embedded applications (see below). I got the driver from the ..\Middleware\wlserver_10.3\server\lib directory. Apparently this is not the correct driver so the question is what is the correct SQL Server JDBC driver to be using when connecting to the work repository? I also encountered the same issue with the Microsoft SQL Server driver - sqljdbc4.jar.

Or have I missed a configuration step somewhere?

Java error:
Exception in thread "main" oracle.odi.core.config.NotMasterRepositorySchemaException: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select REP_SHORT_ID, REP_NAME, REP_TYPE, REP_TIMESTAMP, REP_VERSION, MIN_EXE_VERSION, IND_INSTALL_OK from SNP_LOC_REP]; SQL state [HY000]; error code [0]; [FMWGEN][SQLServer JDBC Driver]This driver is locked for use with embedded applications.; nested exception is java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]This driver is locked for use with embedded applications.
at oracle.odi.core.repository.Repository.getMasterRepository(Repository.java:81)
at oracle.odi.core.OdiInstance.createMasterRepository(OdiInstance.java:491)
at oracle.odi.core.OdiInstance.<init>(OdiInstance.java:544)
at oracle.odi.core.OdiInstance.createInstance(OdiInstance.java:521)
at indigo.essbase.odi.RunODIScenario.main(RunODIScenario.java:43)
Caused by: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select REP_SHORT_ID, REP_NAME, REP_TYPE, REP_TIMESTAMP, REP_VERSION, MIN_EXE_VERSION, IND_INSTALL_OK from SNP_LOC_REP]; SQL state [HY000]; error code [0]; [FMWGEN][SQLServer JDBC Driver]This driver is locked for use with embedded applications.; nested exception is java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]This driver is locked for use with embedded applications.
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:120)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:276)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:554)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:588)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:613)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:645)
at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:111)
at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:121)
at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:136)
at oracle.odi.core.repository.support.RepositoryUtils$RepositoryInfoSource.loadRepositoryInfo(RepositoryUtils.java:180)
at oracle.odi.core.repository.support.RepositoryUtils.loadMasterRepositoryInfo(RepositoryUtils.java:374)
at oracle.odi.core.repository.Repository.getMasterRepository(Repository.java:77)
... 4 more
Caused by: java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]This driver is locked for use with embedded applications.
at weblogic.jdbc.sqlserverbase.dda4.b(Unknown Source)
at weblogic.jdbc.sqlserverbase.dda4.a(Unknown Source)
at weblogic.jdbc.sqlserverbase.dda3.b(Unknown Source)
at weblogic.jdbc.sqlserverbase.dda3.a(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseConnection.prepareStatement(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseConnection.prepareStatement(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.ucp.jdbc.proxy.JDBCConnectionProxyFactory.invoke(JDBCConnectionProxyFactory.java:274)
at $Proxy0.prepareStatement(Unknown Source)
at org.springframework.jdbc.core.PreparedStatementCreatorFactory$PreparedStatementCreatorImpl.createPreparedStatement(PreparedStatementCreatorFactory.java:241)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:532)
... 13 more
Java Result: 1

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 19 2011
Added on Jun 21 2011
0 comments
630 views