cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.NoSuchMethodError

Former Member
0 Kudos
137

Hi All,

Could anyone guide me what might be the exception here.

Solutions will be highly appreciated.

I have the following methods in my PcdUtil class.

public static IContentService getPcdService() {

return (IContentService) ServiceManager.getInstance().get("pcdservice");

}

public static IPCDManager getPcdManager() {

return (IPCDManager) ServiceManager.getInstance().get("pcdmanager");

}

My portalapp.xml is looking like this.

<application-config>

<property name="ServicesReference" value="htmlb,system,pcdadmin,pcdmanager"/>

</application-config>

If I try to run my application the following exception arises.

[impl:3]_16##0#0#Debug##Plain###Entering into getPcdManager() : PcdUtil#

#1.5#0002A5879F0C0052000000B900013DB800040C5BD0E91402#1139488393337#com.sap.portal.jsp#sap.com/irj#com.sap.portal.jsp#kiran.viswanathan#405##AMSDC245S45917_DP4_5715750#kiran.viswanathan#161e3d60996811dab5440002a5879f0c#SAPEngine_Application_Thread[impl:3]_16##0#0#Warning#1#/System/Server#Java###com.sapportals.portal.prt.core.service.ServiceManager.get(Ljava/lang/String;)Lcom/sapportals/portal/prt/service/IPortalService;

[EXCEPTION]

#1#java.lang.NoSuchMethodError: com.sapportals.portal.prt.core.service.ServiceManager.get(Ljava/lang/String;)Lcom/sapportals/portal/prt/service/IPortalService; at com.shell.ep.sapportals.epone.deploymentchecker.model.PcdUtil.getPcdManager(PcdUtil.java:43) at com.shell.ep.sapportals.epone.deploymentchecker.model.PcdUtil.getJavaIviewPath(PcdUtil.java:74) at com.shell.ep.sapportals.epone.deploymentchecker.model.IvuData.getShortPcdDirectory(IvuData.java:87) at com.shell.ep.sapportals.epone.deploymentchecker.model.IvuData.getPcdDirectory(IvuData.java:80) at com.shell.ep.sapportals.epone.deploymentchecker.model.IvuData.getCatalog(IvuData.java:56) at com.shell.ep.sapportals.epone.deploymentchecker.model.AbstractData.getCatalogModel(AbstractData.java:122) at pagelet._sapportalsjsp_deploychecker.doContent(_sapportalsjsp_deploychecker.java:656) 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.broker.PortalComponentItemFacade.service(PortalComponentItemFacade.java:360) at com.sapportals.portal.prt.core.broker.PortalComponentItem.service(PortalComponentItem.java:934) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:435) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:527) at com.sapportals.portal.prt.component.AbstractComponentResponse.include(AbstractComponentResponse.java:89) at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:232) at com.sapportals.portal.htmlb.page.JSPDynPage.doOutput(JSPDynPage.java:76) at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129) at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134) 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) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189) at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215) at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646) at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189) at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753) at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:232) at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522) at java.security.AccessController.doPrivileged(Native Method) at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37) at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71) 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:94) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162) # #1.5#0002A5879F0C0052000000BB00013DB800040C5BD0E92CC4#1139488393352#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#kiran.viswanathan#405##AMSDC245S45917_DP4_5715750#kiran.viswanathan#161e3d60996811dab5440002a5879f0c#SAPEngine_Application_Thread[impl:3]_16##0#0#Error#1#/System/Server#Java###Exception ID:01:33_09/02/06_0047_5715750 [EXCEPTION] #1#com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Resource

Component : com.shell.ep.sapportals.epone.deploymentchecker.DeployChecker

Component class : com.shell.ep.sapportals.epone.deploymentchecker.page.DeployChecker

User : kiran.viswanathan

at com.sapportals.portal.prt.core.PortalRequestManager.handlePortalComponentException(PortalRequestManager.java:969)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:444)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:527)

at com.sapportals.portal.prt.component.AbstractComponentResponse.include(AbstractComponentResponse.java:89)

at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:232)

at com.sapportals.portal.htmlb.page.JSPDynPage.doOutput(JSPDynPage.java:76)

at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)

at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)

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)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)

at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)

at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)

at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)

at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)

at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:232)

at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)

at java.security.AccessController.doPrivileged(Native Method)

at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)

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

at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:153)

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

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

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

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

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

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

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

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

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

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

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:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

Caused by: com.sapportals.portal.prt.component.PortalComponentException: Original exception:

at pagelet._sapportalsjsp_deploychecker.doContent(_sapportalsjsp_deploychecker.java:1683)

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.broker.PortalComponentItemFacade.service(PortalComponentItemFacade.java:360)

at com.sapportals.portal.prt.core.broker.PortalComponentItem.service(PortalComponentItem.java:934)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:435)

... 38 more

Caused by: java.lang.NoSuchMethodError: com.sapportals.portal.prt.core.service.ServiceManager.get(Ljava/lang/String;)Lcom/sapportals/portal/prt/service/IPortalService;

at com.shell.ep.sapportals.epone.deploymentchecker.model.PcdUtil.getPcdManager(PcdUtil.java:43)

at com.shell.ep.sapportals.epone.deploymentchecker.model.PcdUtil.getJavaIviewPath(PcdUtil.java:74)

at com.shell.ep.sapportals.epone.deploymentchecker.model.IvuData.getShortPcdDirectory(IvuData.java:87)

at com.shell.ep.sapportals.epone.deploymentchecker.model.IvuData.getPcdDirectory(IvuData.java:80)

at com.shell.ep.sapportals.epone.deploymentchecker.model.IvuData.getCatalog(IvuData.java:56)

at com.shell.ep.sapportals.epone.deploymentchecker.model.AbstractData.getCatalogModel(AbstractData.java:122)

at pagelet._sapportalsjsp_deploychecker.doContent(_sapportalsjsp_deploychecker.java:656)

But there is no compilation error in my application.

Could any one give me a clue?

Regards,

Karthick

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

I am not sure. But still may be that IDE/WAS may be on different patches. check that.

Regards,

Ganesh

Former Member
0 Kudos

Hi,

I believe you are using an old method of getting a service which has been deprecated and then removed. The correct way to get a service is through

PortalRuntime.getRuntimeResources().getService("servicename")

The reason why you get this error is that when you are compiling your code it is checking against other(and older) versions of the portal libraries, than when running the actual code.

Suggest you upgrade development environment.

Dagfinn

Former Member
0 Kudos

Hi Dagminn,

Thank yo for your answer.If I use your code,while running its saying that "Service not found: pcdmanager"

How to resolve it?There is no error in Compile time.

See the stack trace..

Caused by: com.sapportals.portal.prt.service.ServiceException: Service not found: pcdmanager

at com.sapportals.portal.prt.core.service.ServiceManager.getPortalServiceItem(ServiceManager.java:384)

at com.sapportals.portal.prt.core.service.ServiceManager.get(ServiceManager.java:184)

at com.sapportals.portal.prt.runtime.Portal$RuntimeResources.getService(Portal.java:132)

at com.shell.ep.sapportals.epone.deploymentchecker.model.PcdUtil.getPcdManager(PcdUtil.java:40)

at com.shell.ep.sapportals.epone.deploymentchecker.model.PcdUtil.getJavaIviewPath(PcdUtil.java:72)

at com.shell.ep.sapportals.epone.deploymentchecker.model.IvuData.getShortPcdDirectory(IvuData.java:87)

at com.shell.ep.sapportals.epone.deploymentchecker.model.IvuData.getPcdDirectory(IvuData.java:80)

at com.shell.ep.sapportals.epone.deploymentchecker.model.IvuData.getCatalog(IvuData.java:56)

at com.shell.ep.sapportals.epone.deploymentchecker.model.AbstractData.getCatalogModel(AbstractData.java:122)

at pagelet._sapportalsjsp_deploychecker.doContent(_sapportalsjsp_deploychecker.java:656)

... 43 more

Thankx in advance.

Regards,

Karthick

Former Member
0 Kudos

The last error is very clear .

It doesn't find any service with the name pcdmanger. Find of services is not checked during compile time(since it is a lookup with a string), so that is the reason you don't get the error before.

I am unable to find the IPCDManager class in an SP12 decompiled installation. What is the complete package name? Most probably this class doesn't inherit from IService and therefore it is not possible to retrieve as a Service.

However, I cannot explain the NoSuchMethodError yet.

Anyway I would use PortalRuntime.getRuntimeResources().getService("servicename") as my method of retrieving a portal service. I believe ServiceManager is a SAP internal class and it's interface might change with no notice between versions.

Dagfinn

Former Member
0 Kudos

Hi Dagfin,

jar file name of pcdmanager is "pcdmanager.jar".

and complete package structure is com.sapportals.portal.prt.service.pcdmanager

class name :IPCDManager

it implements IServie interface.

I checked these thing.still i could not find the clue of resoving this.I think i've done mistake in my portalapp.xml is there anyother suggestion.

Regards,

Karthick

Former Member
0 Kudos

Hi All,

Could anyone tell me if I try to run my application,

I am getting "Could not find portal application pcdservice." Error.

To resolve this which portal service -jar file I have to add in my build path.

any help will be appreciated.

Regards,

Karthick

Former Member
0 Kudos

Hi,

I haven't got a solution for you but you need to remember that:

1. All jar files you add to your build path in NWDS (or eclipse) will only help you get your code compiled and packaged into a par file

2. When the portal component is running in the portal it only uses the sharingreference property of the portalapp.xml

My gut feeling says that pcdservice was a valid service in earlier portal versions, but not anymore (the jar file you have is probably from an old portal). It could also be that it has changed names.

Dagfinn

Former Member
0 Kudos

Hi Dagfin,

Thank you for your reply.

Could you please tell me ,How to find the new service provided by sap as alternatives for "pcdservice" & "pcdmanager".

Regards,

Karthick