cancel
Showing results for 
Search instead for 
Did you mean: 

using itext to creating pdf's in NW mobile

Former Member
0 Kudos

Hi ,

I am using itext to create pdf's. I have used it in regular java applications for windows it works fine. I am trying to use it with MI 7.1. I developed a handheld application and created appropriate DC's etc. But now i get the following error. Can someone let me know if they used iText for mobile applications or is there an other way to create pdf's for mobile applications based on handhelds.

error starting the framework

java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.sap.tc.mobile.cfs.startup.pda.Startup.main(Unknown Source)

Caused by: java.lang.NoClassDefFoundError: com/lowagie/text/Document

at com.sap.demo.uicompmobapp.testmobapp.comp.TestMobCompView.wdDoInit(TestMobCompView.java:87)

at com.sap.tc.mobile.wdlite.progmodel.core.Controller.enter(Controller.java:21)

at com.sap.tc.mobile.wdlite.progmodel.core.View.enter(View.java:45)

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Srikumar,

Find the blog,which describes how to create pdf.

/message/394590#394590 [original link is broken]

Regards,

Sri

Edited by: Srikanth Thatipally on Jan 20, 2009 11:20 AM

Former Member
0 Kudos

hi this is for portal based applications. I have done this and it works fine. But i want to use iText for webdynpro mobile and it gives java.lang.noclassdeffounderror. It cannot find the class fiels for the Document object or rather any lowagie files.

So please let me know what is alternate solution or if the itext can be used with mobile webdynpro

Former Member
0 Kudos

Dear Srikumar,

Just as a confirmation, is your jar file present in your mobile app's lib folder in the hand held or emulator?

Regards,

Veera

Former Member
0 Kudos

it is there in the lib folder of the handheld.

Basically two thing i have done:

1) Keeping the jar in the lib folder of the handheld project (Mobile UI Component) and addign the same in the java build path

2) Also created a seprate DC with the jar file and created compilation assembly and deploy time public parts and added them as dependcies in the handheld project.

Is there somethign else that i need to do.

One more thign i created a sample project for Mobile laptop there also does not work. It gave me the same NoClassDefFoundErrror as in while accessign the simulator.

Thanks please advice.

regards

Srikumar V

Former Member
0 Kudos

I have the same problem

Former Member
0 Kudos

hi,

Normally "java.lang.reflect.InvocationTargetException" occurs when java compiler finds 2 different classes with same name in 2 different packages.

refer this link

http://java.ittoolbox.com/groups/technical-functional/javaee-l/how-to-resolve-the-errorjavalangrefle...

Regards

Manohar

Edited by: Gouri Manohar Gadhamsetty on Jan 20, 2009 10:29 AM