cancel
Showing results for 
Search instead for 
Did you mean: 

unable to update data from JSPDynpage using RFC

Former Member
0 Kudos

I have this code in my JSPDynpage

	public void onSaveButtonClicked (Event event) throws PageException  
	{
		DropdownListBox dListMain = (DropdownListBox) getComponentByName("mydropdown");
		DropdownListBox dListEthnicityNew = (DropdownListBox) getComponentByName("ethnicNew");
		TableView raceCtgTableWithSelections = (TableView) getComponentByName("raceCategoryField");
		this.listSelected = dListMain.getSelection();
		this.listSelectedText = dListMain.getTextForKey(listSelected.toString());
		this.ethnicNewSelected = dListEthnicityNew.getSelection();
		this.ethnicNewSelectedText = dListEthnicityNew.getTextForKey(ethnicNewSelected);
		InputField valFromField = (InputField) getComponentByName("vFrom");
		SimpleDateFormat sapFormat = new SimpleDateFormat("yyyyMMdd");
		SimpleDateFormat javaFormat = new SimpleDateFormat("MM/dd/yyyy");
		
		try 
		{
			IPortalComponentProfile userProfile = request.getComponentContext().getProfile();
			String destinationName = userProfile.getProperty("SystemIdentifier");
			IJCOClientService clientService = (IJCOClientService) request.getService(IJCOClientService.KEY);
			client =  clientService.getJCOClient(destinationName, request);
			client.connect();
			myRep = new JCO.Repository( "SAP", client );
			fTemplate = myRep.getFunctionTemplate("ZHMA_ETHNICITY");
			func = new JCO.Function ( fTemplate );
					
			if(func == null) 
			{
				System.out.println(" Function Module not found in SAP.");
				throw new Exception(" Function Module not found in SAP.");
			}
													   
			func.getImportParameterList().setValue(dListMain.getSelection(),"CETHNICITY");
			func.getImportParameterList().setValue(sapFormat.format(javaFormat.parse(valFromField.getValue().toString())),"VALFROM");
			func.getImportParameterList().setValue("99991231","VALTO");
			func.getImportParameterList().setValue(dListEthnicityNew.getSelection(),"ETHEN");
			int j=1;
			for(int i=1; i <= raceCtgTableWithSelections.getRowCount(); i++)
			{
				if(raceCtgTableWithSelections.isRowSelected(i))
				{
					func.getImportParameterList().setValue("R"+i, "RACECAT"+j);
					j++;
				}
			}
			
			client.execute(func);
			JCO.Table messages = func.getTableParameterList().getTable("RETURN");
			for(int i=0; i < messages.getNumRows(); i++)
			{
				messages.setRow(i);
				messagesList.add(messages.getString("MESSAGE"));
			}
			myContext.putValue("messages", messagesList);
		}
		catch(Exception e) 
		{
			System.out.println(e);
			throw new PageException(e);
		}
			   
		state = INITIAL_STATE; 
	}

<b>This code is working fine in my development environment, but some how, this is not working in QA environment. I am getting the exception below in QA.</b>

#1#com.sap.sldserv.exception.SldServiceRuntimeException: Failed to create CIM client. Check via 'Visual Administrator' tool if the secure store is operational.

at com.sap.sldserv.SldApplicationService.getCimClient(SldApplicationService.java:117)

at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory$1.run(SystemLandscapeFactory.java:751)

at java.security.AccessController.doPrivileged(AccessController.java:193)

at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getClient(SystemLandscapeFactory.java:747)

at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getCurrentJ2EECluster(SystemLandscapeFactory.java:808)

at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJ2EEVersionInfo(SystemLandscapeFactory.java:1080)

at com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscape.getJ2EEVersionInfo(WDSystemLandscape.java:580)

at com.sap.tc.webdynpro.clientimpl.http.client.AbstractHttpClient.getJ2EEInfo(AbstractHttpClient.java:546)

at com.sap.tc.webdynpro.clientimpl.http.client.AbstractHttpClient.writeVersionInfo(AbstractHttpClient.java:502)

at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.fillStaticTemplateContext(HtmlClient.java:737)

at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.sendResponse(HtmlClient.java:1223)

at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.retrieveData(HtmlClient.java:252)

at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doRetrieveData(WindowPhaseModel.java:595)

at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:156)

at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)

at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:313)

at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:759)

at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:712)

at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)

at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)

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(AccessController.java:215)

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.lcr.api.cimclient.CIMClientException: java.net.MalformedURLException: URL must have a host part

at com.sap.lcr.api.cimclient.ClientFactory.createConnection(ClientFactory.java:466)

at com.sap.lcr.api.cimclient.ClientFactory.createClientImpl(ClientFactory.java:413)

at com.sap.lcr.api.cimclient.ClientFactory.createClient(ClientFactory.java:363)

at com.sap.sldserv.SldApplicationService.getCimClient(SldApplicationService.java:113)

... 38 more

Let me know is there any thing that I need to configure in QA environment.

Thanks in Advance,

Jagadeesh.

Message was edited by:

Jagadeesh Vankayala

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Shubhadip,

Does the CIM client required only when RFC updates the data?

I am using a RFC module ZHMA_ETHNICITY for both retrieving data to display on screen and also to update the data. I am able to get the data to display on screen, but when I click on save button, data is not saving, it is not even throwing any exception to the screen.

And also, I am not sure about any SLD related configurations made.

Regards,

Jagadeesh.

Former Member
0 Kudos

hmmm - its stragne that it can fetch data but can not update it. I actually pointed you to the CIM setting as I read that kind of error in the exception log you provided. Need to check some more documentation on CIM setting before I can comment. Did you anyway check the whether the CIM related things are identical or not. Do atleast one thing - check in DEV Visual Admin if there is any host name provided in the CIM Client generation tab. Data present there should be your SLD host name, port number, user id & password (Administrator User id shoudl do). Check whether the same is there in QA also? In QA though the CIM data should point to the QA SLD server.

Regards,

Shubhadip

Message was edited by:

Shubhadip Ghosh

Former Member
0 Kudos

I do not have access to SLD in both envs. I am trying to get the basis folks look into this. I will update you once I hear from them.

Regards,

Jagadeesh.

Former Member
0 Kudos

hi Jagadeesh,

are you using SLD related configurations anywhere for your application? From the error message it seems the CIM client generation falied due to some reason. You can check from the Visual Admin of both your DEV & QA systems to find any mismatch.

Go to Visual Admin -> Server -> Services -> SLD Data Supplier -> CIM Client Generation Settings and see if you can find any difference. Normally here in the HTTP Settings tab and CIM Client Generation tab you should mention your SLD URL and logon details. You can check the CIM client generation setting by clicking the "CIMCLient Test" button under the CIM Client Generation Setting tab.

Regards,

Shubhadip