cancel
Showing results for 
Search instead for 
Did you mean: 

iText - problems importing library

fabio_bellocchio
Participant
0 Kudos

Please, somebody help me!

Why I can't add the iText (PDF) library within an existing WD Project?

It seems to be fine, until the time I run it and get the error: "java.lang.NoClassDefFoundError: com/lowagie/text/Phrase ".

PS.: My WD is not a DC, and I can't change it.

Thanks !!

Fabio

Accepted Solutions (0)

Answers (2)

Answers (2)

fabio_bellocchio
Participant
0 Kudos

I've given up of using iText for generating PDF.

I'm using Interactive Forms instead.

Thanks!

former_member182372
Active Contributor
0 Kudos

Fabio, are you familiar with /people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro ?

Make sure you have a sharing reference to library which contains itext jar`s on !server!.

fabio_bellocchio
Participant
0 Kudos

Thanks a lot, Maksim.

Very helpful document!

Yet, I think I have an inconvenience: do you think that I can apply this, even if my WD Project is not a DC Project?

Tks

former_member182372
Active Contributor
0 Kudos

Yes, if iText`s jars are available on the server (thoriugh library) you can reference them using sharing reference. Just put correct reference.

fabio_bellocchio
Participant
0 Kudos

Fine, Maksim!

Just 1 more question: how to check the correct name of the reference?

It means, according to Valery's Blog, how do I access the "Visual Administrator"?

Thanks.

Fabio B.

former_member182372
Active Contributor
0 Kudos

C:\usr\sap\J2E\JC00\j2ee\admin\go.bat

J2E (Or your SID if different)->Server->Services->ClassLoader Viewer

In right pane tree expand and select Components->Libraries-><your library>

In right pane you will see in the middle name of your library. it MUST contain "library:" prefix. For example "library:tccolapi". Put this name as sharing reference for your WD project.

fabio_bellocchio
Participant
0 Kudos

Hi Maksim,

I didn't understand very well what you said with "It MUST contain "library:" prefix".

In the Visual Administrator, my library has the name "itext".

In my project, I've tried everything:

Sharing Reference: itext

Sharing Reference: library:itext

Library Reference: library:text

But when I deploy, it gives the message "The referenced application can't be started".

Only when I put "Library Reference: itext" it deploys ok, but still gives the message "java.lang.NoClassDefFoundError: com/lowagie/text/Phrase", on run-time.

May I have done something wrong??

Can I create everything again?

Thank you!

Regards