Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#137482 - 04/23/07 11:01 AM Cannot open catalog; ARERR 9006
Ranga Offline
Stealth Member

Registered: 02/13/07
Posts: 15
Loc: Fairfax, VA, USA
Hello,

Remedy version: 6.3
Platform: Windows 2003 Server and Client using Java API.

When registering for alerts or trying to access a schema using the Java API, I see the following error message. Any idea why this is happening?

MessageType: 2
MessageNum: 9006
MessageText: Cannot open catalog; Message number = 9006
AppendedText: null
at com.remedy.arsys.api.Proxy.ARRegisterForAlerts(Native Method)
at com.remedy.arsys.api.Util.ARRegisterForAlerts(Util.java:2010)


I do not have a problem accessing Alert Events schema or the Alert List from within the Remedy User client.

thanks
Ranga

Top
#137483 - 04/23/07 11:02 AM Re: Cannot open catalog; ARERR 9006 [Re: Ranga]
Ranga Offline
Stealth Member

Registered: 02/13/07
Posts: 15
Loc: Fairfax, VA, USA
Error message guide says the following, but what does it mean?

9006
Error
Unrecognized encryption algorithm.
This error is returned because an unknown encryption algorithm was used.

Top
#137485 - 04/23/07 11:17 AM Re: Cannot open catalog; ARERR 9006 [Re: Ranga]
Shark_7-11 Offline
Stealth Member
*****

Registered: 09/26/06
Posts: 267
What does your Login() parameters look like?
What I usually do is, I log in, and then right after that, I do a VerifyUser to ensure I am logged in (API)
Can you maybe paste you login code, I have an idea that is where you error is.
_________________________
Mayhem, Chaos and Anarchy
My job here is complete!

Top
#137486 - 04/23/07 11:26 AM Re: Cannot open catalog; ARERR 9006 [Re: Shark_7-11]
Shark_7-11 Offline
Stealth Member
*****

Registered: 09/26/06
Posts: 267
Do you have the following in there?
ARServerUser.setServer(...)
ARServerUser.setUser(...)
ARServerUser.setPassword(...)
ARServerUser.setAuthentication("") //This should be Empty in most cases !!!
ARServerUser.setPort(0) //Portmapper uses 0 Have a look at Util.ARSetServerPort

Then

ARServerUser.login()

Then try

ARServerUser.verifyUser(VerifyUserCriteria)



_________________________
Mayhem, Chaos and Anarchy
My job here is complete!

Top
#137487 - 04/23/07 11:31 AM Re: Cannot open catalog; ARERR 9006 [Re: Shark_7-11]
Ranga Offline
Stealth Member

Registered: 02/13/07
Posts: 15
Loc: Fairfax, VA, USA
Hello,

thanks for the help.

Port and rpc numbers are not set or are set to zero, so that port mapper service is used.


public RemedyContext(String userName, String password, String target, int port, int rpcNumber) throws Exception {
this.context = new ARServerUser(userName, password, Locale.getDefault().getLanguage(), target);

try {
Util.ARSetServerPort(this.context,
new NameID(target),
port,
rpcNumber);
} catch (ARException e) {
throw new Exception("Connection exception: " + getErrorString(e), e);
}catch(UnsatisfiedLinkError l) {
throw new Exception("Missing Library exception: " + l.toString(), l);
}catch(NoClassDefFoundError t) {
throw new Exception("Missing Class exception: " + t.toString(), t);
}catch(Throwable t) {
throw new Exception("Exception: " + t.toString(), t);
}
}

Top
#137488 - 04/23/07 11:35 AM Re: Cannot open catalog; ARERR 9006 [Re: Ranga]
Ranga Offline
Stealth Member

Registered: 02/13/07
Posts: 15
Loc: Fairfax, VA, USA
However, verifyUser throws an exception, I am wondering if it will throw the same exception (ARERR 9006). If it is the same exception, what is the solution?

thanks
Ranga

Top
#137502 - 04/24/07 09:56 AM Re: Cannot open catalog; ARERR 9006 [Re: Ranga]
Shark_7-11 Offline
Stealth Member
*****

Registered: 09/26/06
Posts: 267
I'll have to dig in my archives for an Java app.
In the meantime, try setting the Authentication string to a blank string
ARServerUser.setAuthentication("")
I'm fairly positive it is the login that is not 100% correct thus your session identifier has an incorrect encryption parameter/algorythm
_________________________
Mayhem, Chaos and Anarchy
My job here is complete!

Top
#137503 - 04/24/07 10:01 AM Re: Cannot open catalog; ARERR 9006 [Re: Ranga]
Shark_7-11 Offline
Stealth Member
*****

Registered: 09/26/06
Posts: 267
I can't quite Remember where I got this but I used this before as sample code. (Might be old, used it in version 6.0.1 I think but should still work)

Here the left the locale string empty. I'm not sure where your error could be.

Can you log in and do anything?
like this.context.logout() ?

 Quote:
import com.remedy.arsys.api.*;
import java.util.Date;
import java.text.DateFormat;


public class getEntryDiary {
public static void main(String[] args) {
get();
}

static void get() {
//create context
ARServerUser context = new ARServerUser("Demo", "", "", "93i2a");

try {
//Get an entry factory. We will be using the EntryFactory findByKey method. This method requires 3 arguements, context, EntryKey,EntryCriteria.
//The two blocks of code that follow creating the factory object create those required objects for the findBykey method.
EntryFactory entfact = EntryFactory.getFactory();

//create an new EntryKey object whose constructor takes a NameID(form name) and a EntryID(record ID).
EntryKey key = new EntryKey(new NameID("test1"),
new EntryID("000000000000001"));

//Create an EntryCriteria object. Since the constructor for EntryCriteria expects an array of FieldID objects in an EntryListFieldInfo array object the
//following block of code is necessary. We say that we want to create a new EntryListFieldInfo array object that will hold 2 values. We then say
//that we want a new FieldID array object that will hold two field id values. Next we construct a new FieldID object whose constructor wants a
//field id in the form of a long int, at the same time we create the object we set it into the FieldID array object. We do this for field id's 1 and 8.
//Next, we create a new EntryListFieldInfo object whose constructor loads the FieldID array element into each EntryListFieldInfo array element.
EntryListFieldInfo[] fieldlist = new EntryListFieldInfo[2];
FieldID[] fields = new FieldID[2];
fields[0] = new FieldID(1);
fields[1] = new FieldID(536870917);
fieldlist[0] = new EntryListFieldInfo(fields[0]);
fieldlist[1] = new EntryListFieldInfo(fields[1]);

//Now that we have an EntryListFieldInfo array object containing the required FieldID references, we can set that as the entry criteria for the
//EntryCriteria object. We use the EntryCriteria classes setEntryListFieldInfo method to do this.
EntryCriteria entrycrit = new EntryCriteria(fieldlist);
entrycrit.setEntryListFieldInfo(fieldlist);

//We have now defined the required arguments so we can use the findByKey method of the EntryFactory to return the entry we want based on the EntryKey.
//****NOTE: the findByKey method will call the Remedy Java API Proxy class method ARGetEntry which will in turn, after passing through the
//JNI layer, call the C function ARGetEntry.

Entry entry = entfact.findByKey(context, key, entrycrit);

//Now we have the entry, i.e. record 000000000000001. To get at the field/value pairs for fields ids 1 and 536870917 we need to get those pairs using
//the Entry class method getEntryItems. Since this method returns a array of EntryItem objects, we store the return value in an EntryItem[] reference
//variable. Regular fields such as Entry ID(fid 1) values can be retrieved by using the EntryItem getValue method which returns a Value which can
//then be converted to a String and displayed. Diary fields, however, are somewhat tricky, see below.
EntryItem[] entrylist = entry.getEntryItems();

Value val = entrylist[0].getValue();
val.toString();
System.out.println("Entry ID = " + val);

//The actual encoded text of the diary field is stored in the EntryItem list, however the getValue() method of EntryItem returns a Value, however
//we need a Diary, so we cast to Diary. The hardest part about Diary fields is you cannot call the Diary class constructor directly, actually you could
//but you would need to know the encoded String of the diary field, which most humans wouldn't know.
//The big secret to this is that when you get the entry Items our JNI calls the constructor for the Diary class for you
//giving you access to all the needed Diary class methods.

Value entryItem = entrylist[1].getValue();
Diary diaryValue = null;
diaryValue = (Diary) entryItem.getValue();

//Decode all the encoded values in the diary field and store each seperate entry in the diary field in a DiaryInfo array list.
DiaryInfo[] diaryInfo = null;
diaryInfo = diaryValue.decode(context);
for (int i = 0; i < diaryInfo.length; ++i) {
//walk the DiaryInfo array list and get the diary text using the DiaryInfo method getDiaryInfo().
//also, get timestamp and user info for each diary entry.
String diaryString = diaryInfo[i].getDiaryInfo();
Timestamp time = diaryInfo[i].getTimestamp();
AccessNameID name = diaryInfo[i].getUser();
Date dateobj = time.toDate();
DateFormat datetime = DateFormat.getInstance();
String timestamp = datetime.format(dateobj);
String username = name.toString();
System.out.println(timestamp);
System.out.println(username);
System.out.println(diaryString);
}

//release the factory instance
entfact.releaseInstance(entry);
}
//catch and print out any errors
catch (ARException e) {
e.describe();
}
//clear the context created
finally {
context.clear();
}
}

}

_________________________
Mayhem, Chaos and Anarchy
My job here is complete!

Top
#137504 - 04/24/07 10:18 AM Re: Cannot open catalog; ARERR 9006 [Re: Shark_7-11]
Shark_7-11 Offline
Stealth Member
*****

Registered: 09/26/06
Posts: 267
My JDK didn't even set my JAVA_HOME, that's set but now when I compile (or try to) I get this error

com.remedy.arsys.api does not exist

Where/what directory should this be or variable be?

Nevermind got it sorted CLASSPATH not set

WHile the JAVA Calls the DLL i get this.. Dunno why

Exception in thread "main" java.lang.UnsatisfiedLinkError: no arjni70 in java.library.path
_________________________
Mayhem, Chaos and Anarchy
My job here is complete!

Top
#137506 - 04/24/07 02:11 PM Re: Cannot open catalog; ARERR 9006 [Re: Shark_7-11]
Ranga Offline
Stealth Member

Registered: 02/13/07
Posts: 15
Loc: Fairfax, VA, USA
Exception in thread "main" java.lang.UnsatisfiedLinkError: no arjni70 in java.library.path

The above error occurs because your system path does not include the directory where arjni70.dll file exists.

As far as login issues, We have used the same way of login for ever . The only thing that is different in the production environment is the ARS server communicates using encryption and our client libraries, not coming from the same server install, do not support encryption.

Top
Page 1 of 2 1 2 >