AnsweredAssumed Answered

Deploy Clarity on an existing database, error in BG service

Question asked by rayyan on Feb 25, 2012
Latest reply on Mar 18, 2012 by rayyan
Hello Everybody,

I'm trying to deploy clarity on an existed database, this is what I've done:
1. Install Clarity: v12.0.4
2. Attach a copy from a database on another server
3. Problem found on niku as it was an orphaned database user, fixed
4. NSA configuration says database is available, but still asking me to install Database, usually I don't need to do this, if I'm connecting to an existed database


So, now BG service can't be started, Clarity give me page not found, and the bg log is giving me this:
I think this is a problem with connecting to the database, but I tried to log in to SQL Management studio using 'niku' database user, and it looks I have the proper access, but still nothing happened
ERROR 2012-02-25 19:06:28,939 [WrapperSimpleAppMain] niku.security (none:none:none) UserSessionCache.insertToPersistence:PMD error
com.niku.union.persistence.PersistenceException:
SQL error code: 2812
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Could not find stored procedure 'CMN_SESSIONS_INS_ID_SP2'.
Executed:
{call CMN_SESSIONS_INS_ID_SP2(?,?,?,?,?)}
Derived from statement:
<?xml version="1.0" encoding="UTF-8"?>
<statement location="securityPMD.xml" id="security.insertUserSession_stmt" batchable="true" sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" inputSource="none" xmlns="http://schemas.niku.com/2002/pmd">
<sql dbVendor="all">
<text>
{call CMN_SESSIONS_INS_ID_SP2(?,?,?,?,?)}
</text>
<param name="userId" type="long" direction="IN" expressionListDelimiter=","/>
<param name="userName" type="string" direction="IN" expressionListDelimiter=","/>
<param name="sessionToken" type="string" direction="IN" expressionListDelimiter=","/>
<param name="num" type="long" direction="OUT" expressionListDelimiter=","/>
<param name="newSessionId" type="string" direction="OUT" expressionListDelimiter=","/>
</sql>
</statement>

Referenced by:
<?xml version="1.0" encoding="UTF-8"?>
<statementRef id="security.insertUserSession_stmt" inputSource="map" sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" xmlns="http://schemas.niku.com/2002/pmd"/>

Using input:
{userName=unknown, sessionToken=48da58b3:135b57a569e:-80001330189588189, userId=7, newSessionId=null}


at com.niku.union.persistence.PersistenceController.createException(PersistenceController.java:1800)

at com.niku.union.persistence.PersistenceController.handleSQLException(PersistenceController.java:1858)

at com.niku.union.persistence.PersistenceController.processSql(PersistenceController.java:2334)

at com.niku.union.persistence.PersistenceController.processStatement(PersistenceController.java:701)

at com.niku.union.persistence.PersistenceController.processStatements(PersistenceController.java:610)

at com.niku.union.persistence.PersistenceController.doProcessRequest(PersistenceController.java:450)

at com.niku.union.persistence.PersistenceController.processRequest(PersistenceController.java:221)

at com.niku.security.cache.UserSessionCache.insertToPersistence(UserSessionCache.java:246)

at com.niku.security.service.AuthenticationService.init(AuthenticationService.java:325)

at com.niku.union.bgp.NikuBGServer.initServer(NikuBGServer.java:79)

at com.niku.union.bgp.NikuBGServer.main(NikuBGServer.java:184)

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:585)

at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)

at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: [CA Clarity][SQLServer JDBC Driver][SQLServer]Could not find stored procedure 'CMN_SESSIONS_INS_ID_SP2'.

at com.ca.clarity.jdbc.base.BaseExceptions.createException(Unknown Source)

at com.ca.clarity.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.ca.clarity.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)

at com.ca.clarity.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)

at com.ca.clarity.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)

at com.ca.clarity.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)

at com.ca.clarity.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)

at com.ca.clarity.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)

at com.ca.clarity.jdbc.base.BaseStatement.postImplExecute(Unknown Source)

at com.ca.clarity.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)

at com.ca.clarity.jdbc.base.BaseStatement.commonExecute(Unknown Source)

at com.ca.clarity.jdbc.base.BaseStatement.executeInternal(Unknown Source)

at com.ca.clarity.jdbc.base.BasePreparedStatement.execute(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:585)

at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:68)

at org.logicalcobwebs.cglib.proxy.Proxy$ProxyImpl$$EnhancerByCGLIB$$c476e394.execute(<generated>)

at com.niku.union.persistence.PersistenceController.processSql(PersistenceController.java:2313)

... 14 more
ERROR 2012-02-25 19:06:28,939 [WrapperSimpleAppMain] bgp.JobLogger (none:none:none)
java.lang.Exception: Problem : com.niku.union.security.SecurityException: Database error while inserting user session

at com.niku.union.bgp.NikuBGServer.initServer(NikuBGServer.java:92)

at com.niku.union.bgp.NikuBGServer.main(NikuBGServer.java:184)

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:585)

at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)

at java.lang.Thread.run(Thread.java:595)

Outcomes