on 05-23-2011 11:01 AM
Hello,
I have a Portal Component in which I use Hibernate. I had the librarys included in the lib folder of the Application and it worked fine.
Now I want to put the Hibernate related libraries in a Library Project. I created one, deployed it and set a sharing reference to it like this:
<application-config>
<property name="PublicSharingReference" value="SAPJ2EE::library:com.myproject.hibernate"/>
</application-config>
Anyway I get a ClassNotFound Exception all the time
[EXCEPTION]
java.lang.NoClassDefFoundError: org/hibernate/Session
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:228)
at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getComponentInstance(PortalComponentItemFacade.java:160)
at com.sapportals.portal.prt.core.broker.PortalComponentItem.getComponentInstance(PortalComponentItem.java:732)
at com.sapportals.portal.prt.component.PortalComponentContext.getComponent(PortalComponentContext.java:103)
at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:242)
at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:271)
at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:316)
at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:387)
at com.sapportals.portal.prt.connection.PortalRequest.getRootContext(PortalRequest.java:488)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:607)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:235)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:541)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:430)
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:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
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:104)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
When I enter a wrong name for the library in the SharingReference I get a java.lang.NoClassDefFoundError: org/hibernate/Session Exception. That shows me, that at least the reference to the library seems to be correct, but anyway my Portal Component can't use the classes at runtime. Does anybody have an idea on that?
Thanks and best regards,
Dominik
Edited by: Dominik Fried on Jun 21, 2011 6:51 PM
Hello,
sorry, I think I was a little bit confused yesterday.
The problem seems to be, that the jar files, which are included in the sda file are not deployed to the server. In the Visual Admin I can't see any JAR files in the field "JARs Contained" and I can't find them on the file system. Any ideas on that? They are definitly included in the sda file.
Thanks and best regards,
Dominik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prashant,
sorry for the late reply, I was out of office for a few days.
1. I have not checked the run time box. The library is not a DC, it is just a normal Library Project. The only connection to the library project is in the portalapps.xml
2. In Visual Admin I see the project itself, but I can't see any JAR files in the field "JARs Contained"
Any further idea?
Thanks and best regards,
Dominik
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.