on 11-30-2011 4:17 PM
Hello all,
We have followed the footsteps of these blogs but we can not make it work.
Details system: 7.02 SP3
We believe that the problem is in the library, because it finds them.
1) We created project as a DC external library with *.jars
2) Public part DC external library.
3) Add public part of DC Library into new project DC WebDynpro Java.
4) Development Component -> Build is OK
5) Development Component -> Deploy is OK
6) Test app ERROR.
When we run the application shows the error:
The initial exception that caused the request to fail, was:
java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRDataSource
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at com.unisys.tmb.View01.onActiongenerarPDF(View01.java:161)
at com.unisys.tmb.wdp.InternalView01.wdInvokeEventHandler(InternalView01.java:140)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
... 28 more
See full exception chain for details.
Regards,
Luis.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello John,
Thanks for the link. We have performed the steps in this blog:
1) Create DC Project "External Library" with name js/jars:
- Add *.jars in folder Libraries.[Screenshot Libraries|http://img846.imageshack.us/img846/8395/jsjars.jpg]
- Add archives (*.jar) to public part with name ExternalLib. Which option to choose?
a- Provides an API for developing/compiling other DCs (Option chosen)
b- Can be packaged into other build results (eg SDAs)
- Development Component -> Build
Step 1 is OK.
2) Create "J2EE Server Component / Library" DC with name js/lib:
- Add Used DC -> public part project ExternalLibrary -> "ExternalLib"
- Specify both build time and run-time dependency here and strong.
- Generated SDA file in <var>gen/default/deploy</var> How do we check that it contains <var>js.jar</var>?
- folder gen/default/plublic/defLib/lib/java then you meet *.jars files again. is OK.
- Development Component -> Deploy.
- Go to Visual Administrator. We found the library js/lib, but has no associated *. jar. It is the problem.[Screenshot Visual Administrator|http://img542.imageshack.us/img542/5537/visualadminlib.jpg]
3) Create "WebDynpro" DC with name pdf_jasper
- Add used DC (defLib) to WebDynpro DC with option "Build time".
- WebDynpro References -> Library references --> add <var>jslib
- Deploy
- Run error: java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRDataSource
Regards,
Luis.
Hi John Wu,
I'm facing the same issue. I followed all the steps mentioned above but no succes. When clicking the button to generate the HelloReport class shows up the following error:
java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRDataSource
The code lines are:
HashMap data = new HashMap();
data.put("NAME", wdContext.currentContextElement().getName());
ArrayList dataList = new ArrayList();
dataList.add(data);
HelloReport report = new HelloReport(dataList);
In the HelloReport.java:
public HelloReport(ArrayList dataList)
{
dataSourceMap = new JRMapCollectionDataSource(dataList);
}
Do you have any suggestions?
Thanks in advance.
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.