WebDynpro with MDM Java Connector
Hi,
I'm trying to setup the JCA in MDM5.5 SP4 patch 3 in a Java Stack Engine 6.40.
I'll be trying to access it from a standalone Webdynpro application.
In the documentation I got it talks about setting a file:
application-j2ee-engine.xml
which only exist in J2EE apps, and not WebDynpro apps.
Any ideas?
Cheers,
Michael
If you are using the MDM Java Connector from Web Dynpro application, you have to set the properites accordingly.
Go to <b>properties of Project</b> and there choose "<b>Webdynpro reference</b>". Here, choose <b>library reference</b> and there give your library reference.
Similar Messages
-
Webdynpro with MDM thru JAVA MDM API
Hi all
i have the requirement with webdynpro MDM JAVA API which interacting with MDM system.
i have one repositoty in the MDM console i.e DEMO_CUSTOMER
i have one table in that repository called CUSTOMER_ADDRESS .
i want to access the customer address details information from the MDM table into Webdynpro application.
can you please send the sample code to the following operations with MDM table which retrieves the information in the webdynpro application.
1) displying the table data
2) inserting the record from the table
2) deleting the record from the table
3) updating the record from the table.
it is very helpful to me if anybody would have to send the sample code to me to the above operations.
Regards
Suresh babuIf you are using the MDM Java Connector from Web Dynpro application, you have to set the properites accordingly.
Go to <b>properties of Project</b> and there choose "<b>Webdynpro reference</b>". Here, choose <b>library reference</b> and there give your library reference. -
Error while deploying MDM Java Connector for EP
Hi,
i am a newbie to MDM.i am trying to develop a portal component with the blog "Using MDM5.5 Java Connector with SAP Enterprise Portal 6.0" as reference.
i created an MDM system in portal and the connection tests passed.
But when i deploy the code i get the following exception-
java.lang.NullPointerException
at com.sap.mdm.connector.connection.MdmConnectionFactory.getConnectionEx(MdmConnectionFactory.java:170)
at com.sap.portal.ivs.internalconnector.ConnectionProvider.getConnection(ConnectionProvider.java:304)
at com.sap.portal.ivs.internalconnector.ConnectionProvider.getConnection(ConnectionProvider.java:258)
at com.sapportals.portal.ivs.cg.ConnectorService.getConnection(ConnectorService.java:478)
at com.sapportals.portal.ivs.cg.ConnectorService.getConnection(ConnectorService.java:85)
at com.cts.mdm.MDMtestcomp.doContent(MDMtestcomp.java:36)(this points to the line <b>connection = cgService.getConnection("MDM_SYSTEM_ALIAS", prop);</b>)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
This is my code-
IConnectorGatewayService cgService = (IConnectorGatewayService)
PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
ConnectionProperties prop =
new ConnectionProperties(request.getLocale(), request.getUser());
IConnection connection = null;
connection = cgService.getConnection("MDM_SYSTEM_ALIAS", prop);
INative nativeInterface = connection.retrieveNative();
CatalogData catalog = new CatalogData();
catalog = (CatalogData)
nativeInterface.getNative(CatalogData.class.getName());
ResultSetDefinition rsd = new ResultSetDefinition("Customers");
rsd.AddField("Name");
Search search = new Search("Customers");
A2iResultSet rs = null;
rs = catalog.GetResultSet(search,rsd,"Name",true,0);
response.write(rs.GetFields().toString());
Have i missed anything?
Should i deploy any .jar file? (i've already deployed MDM4J.jar) and referenced it in portalapp!
Thanks in advance
SwarnaDeepikaHello Swarna:
I believe than rather than deploying the MDM4J.jar, you should deploy this components:
com.sap.mdm.tech.mdm4j.sda
com.sap.mdm.tech.connector.sda
BPMDMTECHN00_0.sca
BPMDMAPPLI00_0.sca
Once you deploy those, you should have no problems. Another solution would be to take your MDM4J.jar and wrap it into an SDA, then deploy, but that would be pretty much the same.
Those components are included on your MDM CD. Please ensure you use the same Version/support package/hotfix all over your landscape.
I hope that helps
Alejandro -
Deployment Issue with MDM Java API exposed as Webservice using EJBS
Hi Experts,
I am implementing MDM Java APIS in Stateless session bean.Exposed that bean as Webservice and using that webservice in
Webdynpro through Adaptive Webservice Model.
I am facing following issue:
Webservice works fine after deployment,after some number of execution webservice stops working and gives exception.After
Redeployment of the Webservice, it starts working again works fine some number of execution.
I am Using new MDMJava API.
MDM Server Details: MDM 5.5 SP06
I am using following code for connetion
//////////////*************Getting Connection************///////
ConnectionPool pool = null;
String sessionId = null;
try {
pool = ConnectionPoolFactory.getInstance("Server Ip");
} catch (ConnectionException e1) {
System.out.println(e1.getMessage());
//////////////*************Repository Session************///////
CreateRepositorySessionCommand repSeession =
new CreateRepositorySessionCommand(p_pool);
repSeession.setRepositoryIdentifier(p_repId);
try {
repSeession.execute();
} catch (CommandException e2) {
System.out.println(e2.getMessage().toString());
String repIID = repSeession.getRepositorySession();
// Authenticate Repository
AuthenticateRepositorySessionCommand autRepSeesion =
new AuthenticateRepositorySessionCommand(p_pool);
try {
autRepSeesion.setSession(repSeession.getRepositorySession());
autRepSeesion.setUserName(p_user);
autRepSeesion.setUserPassword(p_Password);
autRepSeesion.execute();
} catch (CommandException e3) {
System.out.println(
"RepSession Seesion" + e3.getMessage().toString());
return autRepSeesion.getSession();
//////////////*************user Session************///////
GetRepositoryRegionListCommand regionListCommand =
new GetRepositoryRegionListCommand(p_pool);
regionListCommand.setRepositoryIdentifier(p_repId);
try {
regionListCommand.execute();
} catch (CommandException e) {
System.out.println(e.getMessage().toString());
RegionProperties[] regions = regionListCommand.getRegions();
// create a user session
CreateUserSessionCommand UsersessionCommand =
new CreateUserSessionCommand(p_pool);
UsersessionCommand.setRepositoryIdentifier(p_repId);
UsersessionCommand.setDataRegion(regions[0]);
// use the first region
try {
UsersessionCommand.execute();
} catch (CommandException e) {
System.out.println("UserSession" + e.getMessage().toString());
String UsersessionId2 = UsersessionCommand.getUserSession();
AuthenticateUserSessionCommand authUserCommand =
new AuthenticateUserSessionCommand(p_pool);
authUserCommand.setSession(UsersessionCommand.getUserSession());
authUserCommand.setUserName(p_userId);
authUserCommand.setUserPassword(p_password);
try {
authUserCommand.execute();
} catch (CommandException e) {
System.out.println("User Seesion" + e.getMessage().toString());
return authUserCommand.getSession();
//////////////*************Destroy Session************///////
DestroySessionCommand destroySessionCommand =
new DestroySessionCommand(p_pool);
destroySessionCommand.setSession(p_repsession);
try {
destroySessionCommand.execute();
} catch (CommandException e) {
e.printStackTrace();
destroySessionCommand.setSession(p_Uesrsession);
try {
destroySessionCommand.execute();
} catch (CommandException e) {
e.printStackTrace();
Do we need to relase the connection pool object also?
Can anyone help me with the code how that can be achived?
Please Reply if anyone has come accross similar issue or know what can be the solution.
Thanks in Advance.
Regards Shruti
Edited by: Shruti Shah on Dec 18, 2008 12:52 PMHi Nitin,
Thanks for the prompt Response.
Even I am guessing that its becose of Connection pool.
I am destroying session as follows
DestroySessionCommand destroySessionCommand =
new DestroySessionCommand(p_pool);
destroySessionCommand.setSession(p_repsession);
try {
destroySessionCommand.execute();
} catch (CommandException e) {
e.printStackTrace();
destroySessionCommand.setSession(p_Uesrsession);
try {
destroySessionCommand.execute();
} catch (CommandException e) {
e.printStackTrace();
But I didnot find any method by which i can close realsse connection from connection pool.
It would be great if you can help me how close or realese those connection.In MDM Console i am able to see those sessions even after destroying them.
Regards Shruti. -
MDM Java Connector Config Error.
We deployed "com.sap.mdm.tech.connector.sda", "com.sap.mdm.tech.mdm4j.sda" using SDM. The deployment was successful. We wanted to set all the parameters like
UserName, Password,Server, Port, RepositoryLanguage as Key-Value pair in MDM Connector properties in Visual Admin from Server->Connection Container->Connectors -> MDM Factory -> Managed Connection Factory -> Poperties.
The intention was to use "spec.getAllConnectionProperties()" code to get the properties at runtime using following code given below.
Context ctx = new InitialContext();
IConnectionFactory conFactory = (IConnectionFactory)
ctx.lookup("deployedAdapters/MDM Factory/shareable/MDM Factory");
IConnectionSpec spec = conFactory.getConnectionSpec();
While setting these properties in Visual Admin, it threw an error.
java.rmi.RemoteException: Error occurred while starting application in whole cluster and wait.; nested exception is:
com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 19149650:com.sap.engine.services.connector.exceptions.BaseDeploymentException: Cannot access methods of instance of class "com.sap.mdm.connector.connection.MdmManagedConnectionFactory". Possible reasons: the class is not public and is in another package, the current method does not have access to the appropriate zero-argument constructor or there is no such method.
at com.sap.engine.services.connector.jca.deploy.DeployAdmin.instantiateMCF(DeployAdmin.java:1210)
at com.sap.engine.services.connector.jca.deploy.DeployAdmin.registerConnector(DeployAdmin.java:2015)
at com.sap.engine.services.connector.jca.deploy.ContainerImpl.prepareStart(ContainerImpl.java:1144)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:223)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:171)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:301)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:342)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:126)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:245)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4761)
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:661)
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:645)
at com.sap.engine.services.connector.jca.deploy.ContainerImpl.startApplication(ContainerImpl.java:1745)
at com.sap.engine.services.connector.jca15.gui.RuntimeControlsImpl.startApplication(RuntimeControlsImpl.java:169)
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.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:409)
at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:258)
at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:131)
at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:212)
at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:766)
at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
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.NoSuchMethodException: com.sap.mdm.connector.connection.MdmManagedConnectionFactory.setUserName(java.lang.String)
at java.lang.Class.getMethod(Class.java:986)
at com.sap.engine.services.connector.jca.deploy.DeployAdmin.instantiateMCF(DeployAdmin.java:1190)
... 42 more
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:663)
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:645)
at com.sap.engine.services.connector.jca.deploy.ContainerImpl.startApplication(ContainerImpl.java:1745)
at com.sap.engine.services.connector.jca15.gui.RuntimeControlsImpl.startApplication(RuntimeControlsImpl.java:169)
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.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:409)
at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:258)
at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:131)
at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:212)
at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:766)
at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
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: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 19149650:com.sap.engine.services.connector.exceptions.BaseDeploymentException: Cannot access methods of instance of class "com.sap.mdm.connector.connection.MdmManagedConnectionFactory". Possible reasons: the class is not public and is in another package, the current method does not have access to the appropriate zero-argument constructor or there is no such method.
at com.sap.engine.services.connector.jca.deploy.DeployAdmin.instantiateMCF(DeployAdmin.java:1210)
at com.sap.engine.services.connector.jca.deploy.DeployAdmin.registerConnector(DeployAdmin.java:2015)
at com.sap.engine.services.connector.jca.deploy.ContainerImpl.prepareStart(ContainerImpl.java:1144)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:223)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:171)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:301)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:342)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:126)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:245)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4761)
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:661)
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:645)
at com.sap.engine.services.connector.jca.deploy.ContainerImpl.startApplication(ContainerImpl.java:1745)
at com.sap.engine.services.connector.jca15.gui.RuntimeControlsImpl.startApplication(RuntimeControlsImpl.java:169)
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.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:409)
at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:258)
at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:131)
at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:212)
at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:766)
at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
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.NoSuchMethodException: com.sap.mdm.connector.connection.MdmManagedConnectionFactory.setUserName(java.lang.String)
at java.lang.Class.getMethod(Class.java:986)
at com.sap.engine.services.connector.jca.deploy.DeployAdmin.instantiateMCF(DeployAdmin.java:1190)
... 42 more
at com.sap.engine.services.deploy.server.application.ParallelAdapter.sleepClientThread(ParallelAdapter.java:270)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:127)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:245)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4761)
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:661)
... 32 more
How do I solve this bug? We tried both in NW04 SP17 J2EE engine and NW04s SPS9 J2EE engine. It is throwing error in both. Any immediate help will highly be recognise.
Best Regards
KalyanHi Kalyan,
setting the properties in visual admin is not supported for the MDM connector. You always need to set the properties in your code:
spec.setPropertyValue("UserName", user);
spec.setPropertyValue("Password", password);
spec.setPropertyValue("Server", server);
spec.setPropertyValue("Port", String.valueOf(port));
spec.setPropertyValue("RepositoryLanguage", lang);
spec.setPropertyValue("CodeRegion", "English [US]");
// Get the Connection
connection = connectionFactory.getConnectionEx(spec);
// Retrieve Native inteface
INative nativeInterface = connection.retrieveNative();
// Get the CatalogData the physical connection
catalog = (CatalogData)
nativeInterface.getNative(CatalogData.class.getName());
Kind regards,
Andreas -
Error using the MDM Java Connector
Hi All,
I am developing a Web Dynpro type DC where I need to use MDM, I tried to reach MDM repository using the following code:
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.search.Search;
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;
import com.sapportals.connector.connection.InterfaceNotSupportedException;
import com.sapportals.connector.metadata.CapabilityNotSupportedException;
public class Mdmjconn{
public /*IConnection*/ String conn()/*throws Exception*/{
String s = null;
String str = "start ";
Context ctx = null;
try{
ctx = new InitialContext();
}catch(NamingException nex){
str = str + "[" + nex.getLocalizedMessage() + "]" + " NamingException - InitialContext| ";
IConnectionFactory connectionFactory = null;
try{
connectionFactory = (IConnectionFactory)ctx.lookup("deployedAdapters/MDM Factory/shareable/MDM Factory");
catch(NamingException nex){
str = str + "[" + nex.getMessage() + "]" + " NamingException - lookup| ";
catch(ClassCastException ccex){
str = str + "[" + ccex.getMessage() + "]" + " ClassCastException - lookup| ";
IConnectionSpec spec = null;
CatalogData catalog = null;
IConnection connection = null;
try{
spec = connectionFactory.getConnectionSpec();
spec.setPropertyValue("UserName", "Admin");
spec.setPropertyValue("Password", "Admin");
spec.setPropertyValue("Server", "localhost");
spec.setPropertyValue("Port", "2005");
spec.setPropertyValue("RepositoryLanguage", "English [US]");
}catch(ConnectorException cex){
str = str + "[" + cex.getMessage() + "]" + " ConnectorException - getConnectionSpec| ";
}catch(NullPointerException npex){
str = str + "[" + npex.getMessage() + "]" + " NullPointerException - getConnectionSpec| ";
INative nativeInterface = null;
try{
connection = connectionFactory.getConnectionEx(spec);
}catch(ConnectionFailedException cfex){
str = str + "[" + cfex.getMessage() + "]" + " ConnectionFailedException - getConnectionEx| ";
}catch(ConnectorException cex){
str = str + "[" + cex.getMessage() + "]" + " ConnectorException - getConnectionEx| ";
}catch(NullPointerException npex){
str = str + "[" + npex.getMessage() + "]" + " NullPointerException - getConnectionEx| ";
try{
nativeInterface = connection.retrieveNative();
}catch(CapabilityNotSupportedException cnsex){
str = str + "[" + cnsex.getMessage() + "]" + " CapabilityNotSupportedException - retrieveNative| ";
}catch(NullPointerException npex){
str = str + "[" + npex.getMessage() + "]" + " NullPointerException - retrieveNative| ";
try{
catalog = (CatalogData)nativeInterface.getNative(CatalogData.class.getName());
}catch(InterfaceNotSupportedException insex){
str = str + "[" + insex.getMessage() + "]" + " InterFaceNotSupportedException - getNative| ";
}catch(ConnectorException cex){
str = str + "[" + cex.getMessage() + "]" + " ConnectorException - getNative| ";
}catch(NullPointerException npex){
str = str + "[" + npex.getLocalizedMessage() + "]" + " NullPointerException - getNative| ";
//TEST SEARCH BEGIN
A2iResultSet rs;
ResultSetDefinition resultdefinition = new ResultSetDefinition("MDM_BUSINESS_PARTNERS");
resultdefinition.AddField("MDM_PARTNER_ID");
resultdefinition.AddField("MDM_FIRST_NAME");
resultdefinition.AddField("MDM_LAST_NAME");
resultdefinition.AddField("M_CITY");
resultdefinition.AddField("M_POSTAL_CODE");
resultdefinition.AddField("M_STREET");
resultdefinition.AddField("M_HOUSE_NUMBER");
resultdefinition.AddField("M_COUNTRY");
resultdefinition.AddField("M_DUNS");
resultdefinition.AddField("MDM_TAX_NUMBER_1");
Search search = new Search(resultdefinition.GetTable());
try {
rs = catalog.GetResultSet(search, resultdefinition, "MDM_PARTNER_ID", true, 0);
int i=0;//1316;
int idd = 0;
i = 1327;
idd = rs.GetValueAt(i, "MDM_PARTNER_ID").GetIntValue();
String namef = rs.GetValueAt(i, "MDM_FIRST_NAME").TranslateToString();
String namel = rs.GetValueAt(i, "MDM_LAST_NAME").TranslateToString();
String city = rs.GetValueAt(i, "M_CITY").TranslateToString();
String pc = rs.GetValueAt(i, "M_POSTAL_CODE").TranslateToString();
String street = rs.GetValueAt(i, "M_STREET").TranslateToString();
String hn = rs.GetValueAt(i, "M_HOUSE_NUMBER").TranslateToString();
String country = rs.GetValueAt(i, "M_COUNTRY").TranslateToString();
String duns = rs.GetValueAt(i, "M_DUNS").TranslateToString();
String tax = rs.GetValueAt(i, "MDM_TAX_NUMBER_1").TranslateToString();
str = namef + ", " + namel + ", " + city + ", " + pc + ", " + street + ", " + hn + ", "+ country + ", "+ duns + ", " + tax + "! ";
}catch (a2i.core.StringException e){
e.A2iPrintError();
str = str + "Error at GetValueAt| ";
}catch(NullPointerException npex){
str = str + "[" + npex.getLocalizedMessage() + "]" + " NullPointerException - GetResultSet, GetValueAt| ";
//TEST SEARCH END
try{
connection.close();
}catch(ResourceException rex){
str = str + "[" + rex.getMessage() + "]" + " ResourceException - close| ";
}catch(NullPointerException npex){
str = str + "[" + npex.getMessage() + "]" + " NullPointerException - close| ";
if(str == null){
return "zero";
}else
return str;
I got the following result:
<i>start [null] ClassCastException - lookup| [null] NullPointerException - getConnectionSpec| [null] NullPointerException - getConnectionEx| [null] NullPointerException - retrieveNative| [null] NullPointerException - getNative| [null] NullPointerException - GetResultSet, GetValueAt| [null] NullPointerException - close| </i>
So the code throws ClassCastException at the <b>lookup</b> method call and causes the other NullPointerExceptions.
I checked the JNDI Registry in VA, the "deployedAdapters/MDM Factory/shareable/MDM Factory" path is right.
What can be the reason for this problem?
Thanks & regards,
PeterMy problem is solved!
The only needed Web Dynpro Library References were the following:
com.sap.mdm.tech.mdm4j
tcconnconnectorframework -
Is this possible: SAP Java Connector - XI - R3 with XI RFC Adapter?
Hi,
I try to call a RFC on a remote R/3 System over the XI Server in a Java Application with SAP Java Connector.
I have configured a RFC Sender Adapter in XI. I get the
following Exception:
"lookup of alternativeServiceIdentifier via CPA-cache failed for channel 'SenderChannel_RFC"!
Is this scenario possible? Or do the connection from
a SAP Java Connector App to the XI RFC Adapter not work?
You can't set the Client and System ID of a Third-Party or
Standalone Java system in the SLD.
Thanks for any help!
Regards
WolfgangHi,
We use a JCO for directly connecting to sap systems.
In that case we need not use any XI also.
But if you want to use RFC adapter and java application the best way is to use java proxies as sender and reciever as RFC adapter.
I donot think there is any architectural significance in using rfc adapter of XI while using JCO.
Let me know if I mis-understood the context. -
Hi,
Can anyone provide me the links for the tutorial on MDM Java API. I need tutorial how to interact with the repository in MDM and doing manipulations on the data using Java API. I need some sample programs too.
Regards
V. Suresh KumarHi,
Kindly follow the links below to get info:
Working with Java Api's
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70a7afe4-9e3e-2b10-de8d-b105d0b8c79e
How to Identify Identical Master Data Records Using SAP MDM 5.5 Java APIs :
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a06478f5-b28d-2910-e083-c28eb96bbb60
Retrieving Data from MDM using Java APi's- Part 1
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/421718aa-0501-0010-d3b0-de6b02aa269b
Getting insight in the New MDM Java Api's
Getting Insight in the New MDM Java API
POulating Lookup Fields using Java Api's
Populating Lookup Fields using Java API - Has sample Code
SAP NetWeaver Master Data Management Java API u2013 New features in SP06 Webinar Details
https://www.sdn.sap.com/irj/sdn/event/webinars?rid=/library/uuid/209cad46-e080-2a10-7390-a5a43bd0ad2f
SAP Network Blog: Performing Free Form Searches with MDM Java API
https://www.sdn.sap.com/irj/sdn/event/webinars?rid=/library/uuid/209cad46-e080-2a10-7390-a5a43bd0ad2f
SAP Network Blog: MDM Java API 2 an introductive series part I
MDM Java API 2 an introductive series part I
Hope it helps.
Thanks and Regards
Nitin jain -
Hello!
I am new with the Java Connector, and I am sure this problem is something easy to solve; I just can not figure it out.
I am on XP Pro, and I have the files extracted to the directory C:\JCo. I have the PATH and CLASSPATH environment variables updated, but I am guessing that I might have the incorrect values there.
Here is the problem. I can compile Example1 (or any of the other examples) from the demo directory fine, but when I try to run it I get the error message "Exception in thread "main" java.lang.NoClassDefFoundError: Example1," which does not make sense since it was compiled correctly.
My guess is that the CLASSPATH (or PATH) variable is not set correctly. Can anyone send me what they have for that value, or what I should be using? I checked the Intro.html file and I think I am just not putting it in correctly or not understanding the intent.
I am always fast with returning points for helpful answers!
Thanks!
JohnHello John,
as the demos compile without any errors your classpath settings for the JCO libs should be ok. How did you try to run the examples? If you're using the commandline you have to add the parameter -cp <path_to_your_demos> or add the demopath also to your global classpath definition.
Hope this helps.
Cheers Lars
PS: Don't forget the points if my answer helped you -
Migration from MDM 4J to MDM Java API
Hi,
Can anyone send me details on the migration of MDM 4J to MDM Java API .
Any document on the differences between the two will be really appreciated.
Best Regards
SidHi Siddharth,
MDM4J was the old jar files which has been shipped by SAP. In earlier, for customization of any user requirement which is not avialable in MDM, In this case, we can use the MDM JAVA API. for using the same, we need to deploy the MDM4J.jar file then we can use.
Now, SAP has replaced the old MDM API file name as "MDM4J.jar" with "MDM Java API.jar".
the only difference between two is that they have added some new jar files to do the specific work with the MDM4J.jar itself. you can find the name as below:
MDM4J.jar
mdm-protocol.jar
mdm-data.jar
mdm-core.jar
mdm-common.jar
mdm-admin.jar
they have removed some old functionality from MDM4J.jar file itself and added so many new functionality with it.
for example: by using old java api, we can not get the password of any user but it is possible by new java API jar file. like this they have added so many new fuctionality which we can perform on the MDM Console and MDM Data manager.
for further info about the MDM JAVA API, you can just refer the following links:
http://help.sap.com/saphelp_mdmgds55/helpdata/EN/index.htm
in the left pane,go to programming interface, the required java apis documents is there.
All the documentation is available on the MDM documentation center on SAP Service Marketplace:
http://service.sap.com/installMDM
But for this you need valid service market place id and pwd.
Hope this will help you.
Regards,
Saurabh...
Reward with points if found useful.
Edited by: Saurabh Kumar Sahu on Jan 29, 2008 3:19 PM -
How to start to work on MDM JAVA API by using webdynpro for java
Hi all
I have basic idea on MDM business package thru portal by using standard iViews.
now i am planning to work on MDM JAVA APIs by using Webdynpro for Java as UI.
1) can you please share the required documents on the same. how to start working on this by using MDM JAVA APIs in webdynpro for java
2) what are the JARs files are required and how to integrate those jar files into webdynpro for java application.
3) is there any SDN help on MDM JAVA API with webdynpro for java? . can you please send the link on the same.
4) can you please help by providing sample code on how to use JAVA APIs for retrieving,deleting,inserting and Updating the data in the database.
if anybody helps on the same then it is the great help to me.
points are always rewardable...
Regards
Suresh babuHi Suresh,
You can have the MDM JAVA API javadocs from the link
http://help.sap.com/javadocs/MDM/SP06P2/index.html
There you can see a package named com.sap.mdm.examples.The classes in it contains some examples using which you can start understanding the code.
You need to have MDM JAR files for it. And these JAR files to be used at build time can be added to the project thru :-
Right click on project-> properties->Java Build Path - > Add external JARs
At run time you can add them the reference in
Right click on project-> properties->web dynpro references->library reference.
Thanks
Namrata -
How and where to install MDM Connector and MDM Java API
Hi all
I am installing MDM Server 5.5 and refering to Installation gude
MDM 5.5 SP06 installation guide (Document Version 1.1 December 10, 2007). While installing Development and Portal components , We have to install MDM Connector and MDM JAVA API. I want to know whether the file JAVAAPI<version>.sca file is to extracted on MDM Server or SRM Server ( Using SDM). Please let me know
Thanks in advance.
Vitthal prabhuHi Vitthal,
We have to install MDM Connector and MDM JAVA API.
All these sca files that u got along with the business content needs to be deployed onto Web Application Server (recommended WAS 7.0 ).
U can deploy these files with the help of SDM.
Hope dis solves ur problem.
Regards Tejas.............. -
WebDynpro with ABAP or JAVA?
Hi all,
I am a veteran in ABAP. I wish to learn web dynpro. I never worked on JAVA. Can anybody advice me which programming language i should use to learn WebDynpro development. Also let me know which companies have webdynpro projects in India?
Thanks in advance..Hi Buddy,
Welcome to intresting world of Web Dynpro.
As veteran ABAPer you should go for WebDynproABAP .
Now why ?
Point 1:
In my view WebDynpro ABAP and Wd Java are not same.
Basically WebDynpro ABAP and Java are two different webDynpro provided by NetWeaver Stack.
Basic conceptual base of WD ABAP and WD Java is same.I mean to say concepts like Context binding , node , elements , Layout both support are same.
But when you provide background functionality to your Web Screen then Java or ABAP come in to picture.Just take case , you want do some thing on click of some button then
1) in case of java may you will call some ejb or you will may write some java code on click.
2) but in case of WD ABAP you have to do same thing with ABAP classes . You will call some call or some method of some system defined class.
Ulimately point I want make
1) WD ABAP and WD java 's Base is same but you code in completely different way.
2) Purpose for which SAP came with two different WDynpro is different. Java can be used for developing quite sophistcated Web services.
Point 2:
another help for you .Just go thr' following thread
How much of oops ABAP is required for ABAP Webdynpro .
Point 3:
You can start with tutorials and all
Web Dynpro for ABAP
http://help.sap.com/saphelp_erp2005/helpdata/en/a5/1a1e3e7181b60ae10000000a114084/frameset.htm
best tutorials in wbdynpro for ABAP to start with :
https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/fed073e5-0901-0010-4eb4-c9882aac7b11 [original link is broken] -
Integrating SAP Java Connector with SAP XI
Hi XI experts
We are about to integrate our SAP ERP2004 system with a new WMS system. The vendors of the WMS system normally integrates with ERP directly through SAP Java Connector, but we would like to put SAP XI between the two systems so we have good way of monitoring the messages beeing sent.
I would like to make a synchronous test scenario where we send a ARTMAS idoc from SAP to XI which sends it to the WMS. After WMS system receives the ARTMAS Idoc it sends an acknowledgement back to XI which passes it on to SAP.
The integration would then look like this:
SAP ERP <-> SAP XI <-> WMS (Jco)
Is this scenario possible? And if so, how would you suggest to set it up?
I was thinking of using the RFC adapter to connect to the Java Connector of WMS, but am not sure if this is the right approach or how it should be set up.
Any help or comments would be greatly appreciated.
Best Regards
ChrisI have made a setup like this:
SAP <-> XI <-> WMS
The Scenario is like this:
SAP sends an ARTMAS03 idoc to XI which maps it directly to the same ARTMAS03 idoc structure (need a few changes in the future so thats why im not using IDOC tunnelling) then it uses a RFC receiver adapter to connect to our SAP gateway, where the WMS is registrered through JCO.
When I first sent the idoc, i got a "RfcAFWException: failed to read funtionname from XML document: missing namespace declaration(2)" then after reading Q23 in note 730870, I used the RFCNormalizer xslt to change the namespace to a "urn:sap-com:document:sap:rfc:fuctions" instead of the "urn:sap-com:document:sap:idoc:messages". The error is now "functiontemplate from repository was <null>".
As far as i can see the error is because the metadata repository defined in the RFC adapter cant find the function module that normally would be in the root of a RFC-XML. But I dont know how I can send an Idoc through the rfc adapter to the gateway then. Anyone got some ideas?
Thanks
Chris -
Integration of ABAP webdynpro with JAVA portal
Hi ,
Could any one give me a simple procedure or step by step process to integrate the abap webdynpro with java portal . The RFC and stuffs ?
Regards,
Sakthihi,
please check out the link :
http://help.sap.com/saphelp_nw04/helpdata/en/74/d5e7418192c717e10000000a155106/frameset.htm
hope this will surely help you!!!
thanks & regards,
punit raval.
Maybe you are looking for
-
HDD crashed! How to install Tiger onto 867mhz G4 with no DVD drive??
Hi folks. My trusty 867mhz G4 Quicksilver Powermac drive has finally konked out. It was running OS 9.2.2 before. Now I want to install Tiger as the OS. Having only a CD drive (nope, can't read or write DVD's), how do I proceed to install Tiger (I hav
-
Is the Power Adaptor required?
I'm getting a 4gb nano and since you can update the firmware on it, is the poweer adaptor required to finish the update? The Adaptor is not included in the box and this worries me.
-
Hi All, We have a scenario where a particular DP or SNP Macro is being used in several jobs. Is there any way to find out that in what all jobs is a particular MACRO being used in my APO system (a kind of where used scenario for Macros). Thanks in Ad
-
Mail Rules syntax - separators possible?
Hello all, I have a Junk Mail rule in Apple Mail that filters mail as junk if contains certain keywords in the Subject or Message Content, things like: OEM software posing drunk mom I'm sure you get the picture?! Anyway, I have around 20-30 keywords
-
What version JAVA for Lion?
Apparently I have "Apple" JAVA version 1.6.0.37 on my Mac, which was last updated June, 2011. Firefox says this plugin is up to date, but they call it Version 14.5.0.. JAVA.com however says my plugin in not up to date for Lion and that I need Version