Skip to Content
0
Former Member
Jul 23, 2007 at 05:58 PM

unable to update data from JSPDynpage using RFC

16 Views

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