on 10-10-2006 11:33 AM
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
SwarnaDeepika
Hello 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
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 Alejandro & Laszlo,
First of all, thanks a lot for your replies.(i'm unable to reward u points,i think ther's some issue with the SDN.)
Alejandro, i have already deployed the sda and sca files in my portal's SDM. only after that i was able to create 'MDM System' and other MDM iViews.
The iviews are working absolutely fine and the system alias's connection test also passed.But when i try connecting with a code in NWDS....i'm getting a null pointer exception.
Laszlo,is MDM Java Connector usable only from SP04? isnt it possible to use it with SP03 itself?
Regards
SwarnaDeepika
Hello Swarna:
Java Connector is (I believe) the MDM4J.jar itself but wrapped up in a sda component. It's available for SP03 and SP04.
Have you tried to set the WAS on debug mode? perhaps you can gain a deeper insight of what's going on there
Greetings!
Alejandro
PS: SDN points seems to be under maintainance, but if you want to assign points, you can try later 😃
Hi,
I have done the user-mapping with the incorrect user!
When i was re-checking the system alias connection test, this was found out! Now i am able to connect to the MDM server :-)....for viewing,modifying and inserting records....but how can view images
that are stored in the repository? I tried getImage(),getImageInfo() methods,but no luck because it is required to pass "image ID" as a parameter , is it similar to record id?(i tried by passing record id it dint work either) if not, then where should i get this image id from?
Thanks in advance
SwarnaDeepika
Hi SwarnaDeepika,
I am glad you can now connect Portal to MDM Server , and I believe the question asked initially was solved.
Please consider the possibility of posting a new message in this forum related to your new question "....but how can view images that are stored in the repository?" to ensure a timely reply.
Thank you in advance.
Regards.
Laszlo.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.