Skip to Content
author's profile photo Former Member
Former Member

java classes from Library Dc can not be resolved at Runtime

java classes from Library Dc can not be resolved at Runtime

Hi ,

M working on Netweaver 7.1 WebDynpro DC. I have added jar to library DC. That jar file has been declared as public archive. I have added that library Dc as used DC for WebDynpro DC. In WebDynpro classes from tht jar are resolved at build time as well as deploy time. But at runtime i am getting following error

java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook -


Loader Info -


ClassLoader name: [asianpaints.com/erecdyn] Living status: alive Direct parent loaders: [system:Frame] [service:servlet_jsp] [service:ejb] [asianpaints.com/excldump] [library:tcblsecuritylib] [asianpaints.com/resdyn] [asianpaints.com/mastrdyn] [asianpaints.com/erecapp] [service:tcjesecurityapi] [library:tcblsecuritydestinationsapi] [asianpaints.com/erecnapp] Resources: /usr/sap/J2D/J00/j2ee/cluster/apps/asianpaints.com/erecdyn/servlet_jsp/webdynpro/resources/asianpaints.com/erecdyn/root/WEB-INF/lib/app.jar -


java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook

at com.apl.erec.dynapp.dyncomp.exceltemphandler.ExcelDownloader.populateBasicCandidateDetails(ExcelDownloader.java:236)

at com.apl.erec.dynapp.dyncomp.exceltemphandler.wdp.InternalExcelDownloader.populateBasicCandidateDetails(InternalExcelDownloader.java:589)

at com.apl.erec.dynapp.dyncomp.exceltemphandler.ExcelTemplateHandler.DownloadExcel(ExcelTemplateHandler.java:246)

at com.apl.erec.dynapp.dyncomp.exceltemphandler.wdp.InternalExcelTemplateHandler.wdInvokeMethod(InternalExcelTemplateHandler.java:195)

at com.sap.tc.webdynpro.progmodel.generation.ExternalControllerPI$ExternalInterface.invoke(ExternalControllerPI.java:291)

at $Proxy452.DownloadExcel(Unknown Source)

at com.apl.erec.dynapp.dyncomp.apptabledisplay.AgencyInProcessAppDisplayView.onActionGenerateExcel(AgencyInProcessAppDisplayView.java:620)

at com.apl.erec.dynapp.dyncomp.apptabledisplay.wdp.InternalAgencyInProcessAppDisplayView.wdInvokeEventHandler(InternalAgencyInProcessAppDisplayView.java:609)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:131)

at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:72)

at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.doHandleActionEvent(ProcessingEventPhase.java:156)

at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.execute(ProcessingEventPhase.java:91)

at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequestPartly(WindowPhaseModel.java:161)

at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doProcessRequest(WindowPhaseModel.java:109)

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

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

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

at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doExecute(ClientApplication.java:1431)

at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doProcessing(ClientApplication.java:1251)

at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToApplicationDoProcessing(AbstractExecutionContextDispatcher.java:158)

at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForAppProcessing.doService(DispatchHandlerForAppProcessing.java:35)

at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.AbstractDispatchHandler.service(AbstractDispatchHandler.java:116)

at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:93)

at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToApplicationDoProcessing(ExecutionContextDispatcher.java:114)

at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:81)

at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:507)

at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:527)

at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessingStandalone(ApplicationSession.java:458)

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

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

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

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

at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToRequestManager(AbstractExecutionContextDispatcher.java:205)

at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForRequestManager.doService(DispatchHandlerForRequestManager.java:38)

at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.AbstractDispatchHandler.service(AbstractDispatchHandler.java:116)

at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:93)

at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToRequestManager(ExecutionContextDispatcher.java:140)

at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:93)

at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:105)

at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)

at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doPost(AbstractDispatcherServlet.java:61)

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

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

at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:66)

at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:32)

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

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

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

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

at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:85)

at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)

at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:160)

at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)

at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67)

at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)

at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)

at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)

at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)

at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)

at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)

at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)

at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)

at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)

at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:309)

at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.run(Processor.java:222)

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

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

Caused by: java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook

-


Loader Info -


ClassLoader name: [asianpaints.com/erecdyn]

Living status: alive

Direct parent loaders:

[system:Frame]

[service:servlet_jsp]

[service:ejb]

[asianpaints.com/excldump]

[library:tcblsecurity~lib]

[asianpaints.com/resdyn]

[asianpaints.com/mastrdyn]

[asianpaints.com/erecapp]

[service:tcjesecurity~api]

[library:tcblsecuritydestinationsapi]

[asianpaints.com/erecnapp]

Resources:

/usr/sap/J2D/J00/j2ee/cluster/apps/asianpaints.com/erecdyn/servlet_jsp/webdynpro/resources/asianpaints.com/erecdyn/root/WEB-INF/lib/app.jar

-


at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:259)

at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:228)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:353)

how to resolve this problem????

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 07, 2008 at 09:28 AM

    Hi,

    You need to add a library reference for this library. Right click on your WD project>Properties>Webdynpro References-->Library References

    Put your library reference over here.

    Regards,

    Murtuza

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 12, 2008 at 04:04 AM

    Hi Kavita,

    From NWDS 7.0 SP 13 a new method has been introduced for adding the JAR fiels in DC Components.

    1. Create a new DC of type "J2EE Server Component Library"

    2. Add a build-time dependency to the "def" public part of the new facet DC tc/bi/fct/extlib

    3. Create a local "libs" folder below the root folder and put the jar file(s) into that folder

    4. Define that libs folder as source folder in the DC Metadata

    5. Build the DC

    You can use this method for adding your HSSF API Jar Files.

    Hope this might help you.

    Thanks

    Namrata

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.