Skip to Content
author's profile photo Former Member
Former Member

MDM4J API - Login Code Error

Hi All

We encounter issue while logging into repository using MDM API.

We are using MDM SP05 and MDM4J API.

We receive the following error in logs

java.lang.IllegalStateException: Login method has not been successfully called.

java.lang.IllegalStateException: Login method has not been successfully called.

at a2i.common.CatalogData.Preprocess(Unknown Source)

at a2i.common.CatalogData.GetRecordsByValue(Unknown Source)

at a2i.common.CatalogData.GetRecordsByValue(Unknown Source)

Please help us finding the cause for this error.

Here is the code that we have for login functionality

public class PublishCatalog{

private static CatalogData catalogData;

private static CatalogCache catalogImageCache;

private static CatalogCache documentCache;

private static Object catalogLock = new Object();

private static final LogWrapper log = new LogWrapper(PublishCatalog.class, "com.ges.pca.mdme.PublishCatalog");

public PublishCatalog(){}

public static CatalogData getCatalogData(){

if(catalogData == null){

String server = System.getProperty("GES.PublishCatalog.server");

int port = Integer.parseInt(System.getProperty("GES.PublishCatalog.port"));

String user = System.getProperty("GES.PublishCatalog.user");

String password = System.getProperty("GES.PublishCatalog.password");

int minCon = -1;

int maxCon = -1;

int timeOut = -1;

try{

minCon = Integer.parseInt(System.getProperty("GES.PublishCatalog.minCon"));

}

catch(Exception e){

minCon = 2;

}

try {

maxCon = Integer.parseInt(System.getProperty("GES.PublishCatalog.maxCon"));

}

catch(Exception e){

maxCon = 8;

}

try{

timeOut = Integer.parseInt(System.getProperty("GES.PublishCatalog.timeOut"));

}

catch(Exception e){

timeOut = 0;

}

String logFile = System.getProperty("GES.PublishCatalog.logfile");

synchronized(catalogLock){

if(catalogData == null){

catalogData = new CatalogData();

int status = catalogData.Login(server, port, user, password, "English [US]", minCon, maxCon, timeOut, logFile);

if(status != 0){

catalogData = null;

log.error("Unable to connect to the Publish Catalog on " + server + ":" + port + " MDMEErrorCode: " + status);

}

}

}

}

return catalogData;

}

}

Thanks

Prakash

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 05:25 AM

    Hi Parkash,

    Not sure just idea.

    Try after " import a2i.common.* ";

    import a2i.core.*;

    so on....

    BR,

    Alok

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.