on 10-26-2006 6:46 AM
I am attempting to create a web service to retrieve data from the Vendor table in the standard Vendors repository.
I am using NW2004s SP09 and MDM 5.5 SP04.
I am able to connect to the MDM Vendor repository successfully through the MDM Console but when I try to query my web service I get the following error:
#1.5#001185C4400600670000003400001120000420AFD853304D#1161839527513#com.sap.engine.services.ejb#sap.com/PayerDemoEar#com.sap.engine.services.ejb#Guest#0####86b14db064b011db967d001185c44006#SAPEngine_Application_Thread[impl:3]_11##0#0#Error##Java###
[EXCEPTION]
#1#com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method getMDMData.
at com.sap.mdm.api.adm.tst.PayerDemoLocalLocalObjectImpl0.getMDMData(PayerDemoLocalLocalObjectImpl0.java:119)
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:324)
at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.IllegalArgumentException: Table Vendors does not exist.
at com.a2i.xcat.internal.SubTableCache.GetTableCache(Unknown Source)
at a2i.common.CatalogData.GetCachedTable(Unknown Source)
at a2i.common.CatalogData.GetResultSet(Unknown Source)
at com.sap.mdm.api.adm.tst.PayerDemoBean.getMDMData(PayerDemoBean.java:117)
at com.sap.mdm.api.adm.tst.PayerDemoLocalLocalObjectImpl0.getMDMData(PayerDemoLocalLocalObjectImpl0.java:103)
... 25 more
java.lang.IllegalArgumentException: Table Vendors does not exist.
at com.a2i.xcat.internal.SubTableCache.GetTableCache(Unknown Source)
at a2i.common.CatalogData.GetCachedTable(Unknown Source)
at a2i.common.CatalogData.GetResultSet(Unknown Source)
at com.sap.mdm.api.adm.tst.PayerDemoBean.getMDMData(PayerDemoBean.java:117)
at com.sap.mdm.api.adm.tst.PayerDemoLocalLocalObjectImpl0.getMDMData(PayerDemoLocalLocalObjectImpl0.java:103)
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:324)
at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
The tables Vendors does exist in the repository.
I am entering the correct password information and the port I am using is the same as displayed in the MDM Console.
My code is as follows:
package com.sap.mdm.api.adm.tst;
import javax.ejb.CreateException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.resource.ResourceException;
import a2i.common.A2iResultSet;
import a2i.common.CatalogData;
import a2i.common.ResultSetDefinition;
import a2i.core.StringException;
import a2i.search.Search;
import com.sap.tc.logging.ConsoleLog;
import com.sap.tc.logging.Location;
import com.sap.tc.logging.Severity;
import com.sapportals.connector.ConnectorException;
import com.sapportals.connector.connection.ConnectionFailedException;
import com.sapportals.connector.connection.IConnection;
import com.sapportals.connector.connection.IConnectionFactory;
import com.sapportals.connector.connection.IConnectionSpec;
import com.sapportals.connector.connection.INative;
...
public String getMDMData(String server, String user, String password, String port, String tableName) {
// Prepare Logger
loc.setMinimumSeverity(Severity.ALL);
loc.addLog(new ConsoleLog());
loc.entering(getMDMDataMsg);
// create connection pool
final String tag = server;
String strReturnVal = null;
try {
Context ctx = new InitialContext();
IConnectionFactory connectionFactory =
(IConnectionFactory) ctx.lookup(
"deployedAdapters/MDM Factory/shareable/MDM Factory");
IConnectionSpec spec = connectionFactory.getConnectionSpec();
spec.setPropertyValue("UserName", user);
spec.setPropertyValue("Password", password);
spec.setPropertyValue("Server", server);
spec.setPropertyValue("Port", port);
spec.setPropertyValue("RepositoryLanguage", "English [US]");
IConnection connection = null;
try {
connection = connectionFactory.getConnectionEx(spec);
} catch (ConnectionFailedException e) {
loc.fatalT("ConnectionFailedException.");
loc.fatalT(e.toString());
} catch (ConnectorException f) {
loc.fatalT("ConnectorException.");
}
INative nativeInterface = connection.retrieveNative();
CatalogData catalog = new CatalogData();
catalog =
(CatalogData) nativeInterface.getNative(
CatalogData.class.getName());
Search search = new Search(tableName);
ResultSetDefinition resultdefenition =
new ResultSetDefinition(tableName);
A2iResultSet rs = null;
try {
rs =
catalog.GetResultSet(
search,
resultdefenition,
null,
true,
0);
} catch (StringException e) {
loc.fatalT("getResultSet");
} finally {
loc.exiting();
}
try {
if (rs != null) {
strReturnVal = rs.GetValueAt(0, "Vendors").toString();
} else {
strReturnVal = "null_rs";
}
} catch (StringException e) {
loc.debugT("String Exception");
} finally {
loc.exiting();
}
connection.close();
} catch (NamingException ne) {
loc.fatalT("Naming Exception.");
} catch (ResourceException re) {
loc.fatalT("Resource Exception.");
}
return strReturnVal;
}
Does anybody have an idea what might be causing this error?
No exception is thrown on connection but when I try to retrieve data I get the table does not exist error.
I have not been able to find a similar error yet on either the message boards or in the notes.
Thank you in advance for your assistance.
Can you access the table Vendors using Data Manager ?
Is the code of your table <b>Vendors</b> ? The table code is visible in Console.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for you quick response. I can access the table from Data Manager. I looked in the MDM Console and the CODE property for the Vendors table was set to MDM_ID. I changed this to Vendors and now I get a <b>Read timed out</b> response and no error is being written to the log. Does the CODE value need to be the same name as the table that I am querying?
Best Regards
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.