Java Dynamic Connector help

Sridhar Kolluri

Member
Hello all,
I have been trying to setup the java dynamic connector for sometime without success.

I followed what ever has been given in the setup guide for connectors.

1. I copied all the jar files and driver files along with jdeinterop.ini, jdbj.ini, jas.ini, jdelog.properties files into one directory c:\connectorsamples.
2. Created a sample java file which tries to login to EnterpriseOne 8.10. The code is given below

import com.jdedwards.system.connector.dynamic.*;
import com.jdedwards.system.connector.dynamic.spec.source.OneworldBSFNSpecSource;
import com.jdedwards.system.connector.dynamic.spec.source.BSFNSpecSource;
import com.jdedwards.system.connector.dynamic.spec.source.OneworldBSFNSpecSource;
import com.jdedwards.system.connector.dynamic.spec.source.BSFNMethod;
import com.jdedwards.system.connector.dynamic.spec.dictionary.OneworldSpecDictionary;
import com.jdedwards.system.connector.dynamic.spec.dictionary.SpecDictionary;
import com.jdedwards.system.connector.dynamic.spec.dictionary.Context;

public class connectorexample
{
public static void main(String args[])
{
System.out.println("Example connector program..");

BSFNSpecSource specSource = null;
SpecDictionary specDictionary = null;


try{
//Step 1: Create a SpecDictionary
int sessionID = Connector.getInstance().login("10000676", "chintu", "PY810", "*ALL");
specDictionary = new OneworldSpecDictionary(sessionID);
// or specDictionary = new ImagespecDictionary(“dict.xml”);

//Step 2: Bind the SpecDictionary to a SpecSource
specDictionary.bindSpecSource(specSource);

//Step 3a: Lookup the BSFNMethod by giving the full path
BSFNMethod method =(BSFNMethod) specDictionary.getSpec ("CFIN.F4211.F4211FSBeginDoc");

//Step 3b: or navigate through the dictionary and get the context attributes
Context initContext = specDictionary.getInitialContext();
Context[] subContextList = initContext.getSubcontexts();
for (int i=0;i<subContextList.length; i++) {
Context subContext=subContextList;
subContext.getName();
subContext.getDescription();

System.out.println(subContext.getName());
System.out.println(subContext.getDescription());

//method=(BSFNMethod)subContext.getBoundSpecContent();
}
}
catch(Exception e) {
System.out.println("The error is : "+e);
e.printStackTrace();
}


}
}


3. Set the classpath with appropriate jar, driver jar and ini files. Complied the program with success.

When trying to run the application, I get the following error.

com.jdedwards.system.connector.dynamic.InvalidConfigurationException: enterprise
Server property not found in the INI file
at com.jdedwards.system.connector.dynamic.Connector.getProperties(Unknow
n Source)
at com.jdedwards.system.connector.dynamic.Connector.<init>(Unknown Sourc
e)
at com.jdedwards.system.connector.dynamic.Connector.getInstance(Unknown
Source)
at connectorexample.main(connectorexample.java:22)

I am not sure which INI file this error referring to..

I gave the enterpriseServer path where ever applicable in all the ini files that I mentioned above... in my case the enterprise server is S653A41D and the port is 6012.

Where am I gone wrong. Please help me resolve this issue.

Thanks and regards
Sridhar Kolluri
 
You probably are missing some JAR's in the classpath. Such as xalan.jar or xerces.jar. As I recall, these jars might be listed in Connectors.pdf.
 
Back
Top