on 09-24-2007 3:15 PM
Hi All,
i want to access a KM resource (an excel file to be specific) using webdynpro. for this, i am trying to access it's parent folder first...
So, i have written the following line of code in the View's wdInit method::
My NDS's version is 7.0.11.
//get XLS file from KM -- "/documents/Test/myfile.xls"
com.sapportals.portal.security.usermanagement.IUser sapUser = null;
try {
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
sapUser = (com.sapportals.portal.security.usermanagement.IUser) wdClientUser.getSAPUser();
} catch (WDUMException e1) {
wdComponentAPI.getMessageManager().reportSuccess("Got an exception1234::");
}
IResourceContext resContext = new ResourceContext(sapUser);
ICollection parent = null;
IResourceFactory factory = null;
RID rid_parentFolder = null;
try {
rid_parentFolder = RID.getRID("/documents/Test");
factory = ResourceFactory.getInstance();
parent = (ICollection) factory.getResource(rid_parentFolder, resContext);
} catch (ResourceException e2) {
wdComponentAPI.getMessageManager().reportSuccess("Got an exception1235::");
e2.printStackTrace();
}
But, i am getting this error:
500 Internal Server Error
SAP NetWeaver Application Server 7.00/Java AS 7.00
Failed to process request. Please contact your system administrator.
[Hide]
Error Summary
While processing the current request, an exception occured which could not be handled by the application or the framework.
If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
Root Cause
The initial exception that caused the request to fail, was:
java.lang.NoClassDefFoundError: com/sapportals/wcm/repository/ResourceException
at com.test.km.comp.wdp.InternalKMView.<init>(InternalKMView.java:95)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
... 34 more
See full exception chain for details.
Correction Hints
It can't be determined from the exception chain, which class loader failed to load the above class. But at least the class loader of the current application does not contain a resource with name 'com/sapportals/wcm/repository/ResourceException'.
Note: the above hints are only a guess. They are automatically derived from the exception that occurred and therefore can't be guaranteed to address the original problem in all cases.
Detailed Error Information
Detailed Exception Chain
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create delegate for view com.test.km.comp.KMView. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:110)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.<init>(DelegatingView.java:41)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.createUninitializedView(ViewManager.java:657)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:694)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:183)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:178)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:748)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:283)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
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(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.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:74)
... 33 more
Caused by: java.lang.NoClassDefFoundError: com/sapportals/wcm/repository/ResourceException
at com.test.km.comp.wdp.InternalKMView.<init>(InternalKMView.java:95)
... 38 more
I found that this class is in <i>_webdynpro_services.jar</i> .. My system administrator told me that the <i>_webdynpro_services.jar</i> file on the server is different from the file on my developing system.
I even tried replacing the server jar with the jar from my system .. but in vain
Is there any folder on the server we have to put in the JAR ?????
plz let me know..
Any input is highly appreciated.
Thanx.
Hello SK,
Did u add following PORTAL:sap.com/com.sap.km.application under properties->webdynpro refernce->sharing reference?
Hope by adding this u'll be able to get ridd of exception
Abhinav Sharma
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.
Check with the weblog for External libraries.
Weblog External libraries:https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2361. [original link is broken] [original link is broken] [original link is broken]
If u want more informations about the jar files check with this link
JAR class finder:
http://www.alphaworks.ibm.com/tech/jarclassfinder
http://sourceforge.net/projects/classlocator
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.