on 2006 Oct 13 3:23 PM
Hi,
I am using the following code to fetch data from a table in MDM.
Context ctx = new InitialContext();
IConnectionFactory connectionFactory = (IConnectionFactory)ctx.lookup("deployedAdapters/MDM Factory/shareable/MDM Factory");
IConnectionSpec spec = connectionFactory.getConnectionSpec();
spec.setPropertyValue("UserName", "");
spec.setPropertyValue("Password", "");
spec.setPropertyValue("Server", "");
spec.setPropertyValue("Port", "");
spec.setPropertyValue("RepositoryLanguage", "");
IConnection connection = connectionFactory.getConnectionEx(spec);
INative nativeInterface = connection.retrieveNative();
CatalogData catalog = (CatalogData) nativeInterface.getNative(CatalogData.class.getName());
ResultSetDefinition resultdefenition = new ResultSetDefinition("Products");
resultdefenition.AddField("Id");
Search search = new Search("Products");
A2iResultSet rs = catalog.GetResultSet(search, resultdefenition, "Id", true, 0);
connection.close();
I am getting the following exception at design time:
The project was not built since its classpath is incomplete. Cannot find the class file for javax.resource.cci.ConnectionSpec. Fix the classpath then try rebuilding this project.
This compilation unit indirectly references the missing type javax.resource.cci.ConnectionSpec (typically some required class file is referencing a type outside the classpath)
This issue has been bothering me for days now and it doesn't seem to go!
Hi Devashish,
You need to include Connector.jar file in your classpath. This file contains the connectionSpec.class file which is being referenced by your program.
Regards,
Mausam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mausam,
Thanks for immediate reply.
The issue is now resolved and i am not getting any compile time errors now.
I am new so would be asking few more questions to get my application working.
I am getting a NoClassDefFound error where i am trying to lookup.
Where exactly do we need to go in Visual Administrator to fetch the "correct" JNDI Path?
Also, MDM (same version) needs to be installed with the WAS to make this application run successfully or how do we establish between MDM Server and my WAS on 2 separate systems.
Regards,
Dev.
yes,
i have deployed all the JAR files.
I think there is some issue with JNDI lookup..
The error is:
Path to object does not exist at MDM Factory.
The path which i am giving is:
deployedAdapters/MDM Factory/shareable/MDM Factory
I checked in Visual Admin, and the path is right.
Any pointers what could be wrong?
Hi Devashish,
Have you given run time reference to the J2EE ConnectorFramework.... like sap.com/tcconnconnectorframework? That could be the problem here. Please check it.
Check <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49">this</a> PDF on page 11.
Regards,
Mausam
Message was edited by: Mausam Kakkad
User | Count |
---|---|
81 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.