on 08-04-2008 10:08 AM
Hi,
I am new to crystal .I am trying to create user in crystal server using below code but am facing some issues. Kindly help me. Thanks in advance.
Code
IInfoObjects userObjs = iInfoStore.query("select SI_ID from CI_SYSTEMOBJECTS where SI_PROGID = "+ "'CrystalEnterprise.User' and SI_NAME = '"+ strUserName + "'");
if (0 != userObjs.size()) {
userCreated = true;
} else {
IPluginMgr pluginMgr = iInfoStore.getPluginMgr();
IPluginInfo pluginInfo = pluginMgr.getPluginInfo("CrystalEnterprise.User");
IInfoObjects infoObjs = iInfoStore.newInfoObjectCollection();
infoObjs.add(pluginInfo);
IInfoObject infoObject = (IInfoObject) infoObjs.get(0);
infoObject.setTitle(strUserName);
iObjectId = infoObject.getID();
iInfoStore.commit(infoObjs);// Error At this line
String strQuery = "select SI_ID, SI_PROGID from CI_SYSTEMOBJECTS where SI_ID="+ iObjectId;
IInfoObjects usersInfo = iInfoStore.query(strQuery);
if (usersInfo.size() != 0) {
userInfo = (IInfoObject) usersInfo.get(0);
roleSIId = userInfo.getID();
String strProgId = (String) userInfo.properties().getProperty(CePropertyID.SI_PROGID).getValue();
if (strProgId.equals(CeProgID.USER)) {
((IUser) userInfo).setFullName(strUserName);
((IUser) userInfo).setNewPassword(strPassword);
((IUser) userInfo).setPasswordExpiryAllowed(false);
((IUser) userInfo).setPasswordChangeAllowed(true);
((IUser) userInfo).setPasswordToChangeAtNextLogon(false);
}
}
if (blnRightsStatus) {
iInfoStore.commit(usersInfo);
userCreated = true;
}
Error
com.crystaldecisions.sdk.occa.infostore.internal.t: An error occurred at the server :
Failed to commit objects to server : cause:com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.seagatesoftware.com/OCA/oca_abuse:3.2 detail:An error occurred at the server : Failed to commit objects to server :
The server supplied the following details: OCA_Abuse exception 7680 at .\exceptionmapper.cpp : 61 48162 {}
...Unknown exception from IInfoStoreSubsystem::commit
at com.crystaldecisions.sdk.occa.infostore.internal.t.map(Unknown Source)
at com.crystaldecisions.sdk.occa.infostore.internal.InfoStore.commit(Unknown Source)
at Cry.createCrystalUser(Cry.java:124)
at Cry.getCRConnection(Cry.java:77)
at Cry.main(Cry.java:27)
Caused by: com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.seagatesoftware.com/OCA/oca_abuse:3.2
at com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuseHelper.read(oca_abuseHelper.java:106)
at com.crystaldecisions.enterprise.ocaframework.idl.OCA.OCAi._InfoStoreEx2Stub.commit(_InfoStoreEx2Stub.java:435)Ucre----
>false
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 com.crystaldecisions.enterprise.ocaframework.d.invoke(Unknown Source)
at com.crystaldecisions.sdk.occa.infostore.internal.d.commit(Unknown Source)
... 4 more
Hi
it may be a possibility the Application server crash.
in that case you have to reinstall the server.
Regards
Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.