5 Replies Latest reply on Jun 22, 2011 9:35 PM by 870695

    Essbase CDF and ODI 11g

    772776
      I am looking for any hints on how to use the ODI 11g SDK. I want to call a java application (CDF) that runs an ODI scenario using RUNJAVA in Essbase which I have successfully done in the 10g environment.

      The java application has the odi-core.jar included in the project and registers OK with Essbase and I have replicated code from the Oracle sample code site. When I run the application in a calc script I get the following error:

      EssbaseCluster-1.EFTS.EFTS.odi     Execute calculation script     June 17, 2011 10:20:40 AM NZST     Failed
      Error: 1200456 Problem running [indigo.essbase.odi.RunODIScenario]: [java.lang.NoClassDefFoundError: org/springframework/util/StringUtils]

      When I comment out the code that calls the creates the OdiInstance then the java app executes fine - i.e. writes something to the Essbase log.

      The research I have done so far indicates that a classpath is incorrect. If that is the case where do I start looking to correct the classpath? Or do I need an entry in the UDF.policy file to the ODI SDK lib directory?

      Any tips would be grateful.
      Thanks.
        • 1. Re: Essbase CDF and ODI 11g
          JohnGoodwin
          It does sound like essbase can't view some java classes - org.springframework.util.StringUtils which may not be part of the core ODI SDK, not sure about that though.
          To prove it could you copy the ODI SDK jars to ARBORPATH/java/udf/ or the directory where you placed your jar that essbase can see.

          Cheers

          John
          http://john-goodwin.blogspot.com/
          1 person found this helpful
          • 2. Re: Essbase CDF and ODI 11g
            772776
            Thanks John. I have added all of the ODI SDK jars to the java application (in Netbeans) and copied all of the ODI jars into the lib directory. I have managed to debug the java code and have found that I should be using the weblogic jdbc driver when connecting to the work repository. Here is the code I use to do this...

            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));

            This gets me a step closer but unfortunately I hit another error when I debug (see below). I got the driver from the ..\Middleware\wlserver_10.3\server\lib directory. Apparently to the error below this is not the correct driver so the question is what is the correct SQL Server JDBC driver to be using?

            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

            Edited by: user13114513 on Jun 20, 2011 9:25 PM
            • 3. Re: Essbase CDF and ODI 11g
              JohnGoodwin
              Have you tried using a sql server jdbc connection and using the sql server driver e.g. sqljdbc4.jar

              Cheers

              John
              http://john-goodwin.blogspot.com/
              • 4. Re: Essbase CDF and ODI 11g
                772776
                Yes, I have tried that and get the same error.
                • 5. Re: Essbase CDF and ODI 11g
                  870695
                  Hi John. I am new to ODI 11g and now i want to use ODI SDK in my java code to operate ODI, I am very very new, so any basic tutorial would be great, thank you!