cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.NoClassDefFoundError: jxl/Workbook

Former Member
0 Kudos

Hi Friends,

I´m trying add the external jar "jxl.jar" in my DC project.

I have created the Exernal Library DC with two public parts: Compilation version and External library with SDA. I added the "jxl.jar" the two public part.

I have added the two public part of External Library to the actual application with Used DCs. Selecting the options: At Build Time and At Run Time.

I also copied the "jxl.jar" to the Lib folder of my project.

I didn't get any errors while deploying and running the application, but when i click on Upload button i am getting this error...java.lang.NoClassDefFoundError: jxl/Workbook ..Could anybody tell me why i am getting this error

Thanks,

Cristian.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

May be of use for you

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

I had read this Thread, it shows how to use "jxl.jar". But in my case, I am having problems in accessing the jar.

I am working with "DC Project".

Thank you for your answer,

Cristian.

Former Member
0 Kudos

Does the jar become part of the .war/.ear when you build the DC?

Former Member
0 Kudos

Pascal,

No..the jar doesn´t become in .ear..

I tried remove the .jar of the lib folder and add again...but, after I added the .jar in lib folder, I can´t put the jar in the DTR, the option to add the DTR is disabled.

Why this happens? How can force the upload of the jar for the DTR?

Thanks for help!

former_member751941
Active Contributor
0 Kudos

Hi Cristian,

Add the external library DC (that contains the jar file) in the project Reference of your DC Project (where you are using the External Library).

Regards,

Mithu

Former Member
0 Kudos

Chandran S,

The problems happens before of the line code that will open the Excel file...

Mithu,

I already added the external library DC in the project Reference of the webdynpro project DC..

Thanks for all answers!

Regards,

Cristian.

former_member751941
Active Contributor
0 Kudos

Hi Cristian,

Before adding the external library DC in the Project Reference have you created the public part of type ASSEMBLY? With Deploy Time and Run time option And added the jar in the public part?

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/194bdc4f-0901-0010-82ba-bf73af5d...

Regards,

Mithu

Former Member
0 Kudos

Hi

Plz Explain from where you are acccesing the excel file.

Please send that piece of code that you had writtened for the button action.

Regards

Chandan S

Former Member
0 Kudos

Hi

To use jxl api you need to add it at two places only

1) add external jars

2)Copy jar file to the lib folder of the project

As you said- you are doing both, so the problem may be with the jar file. It might be corrupted. So download jxl.jar file again and do the same.

For using this api you need not give any project references.

Regards

Deepak

Former Member
0 Kudos

Hi,

I could solve the problem.

It was missing create a project of the type J2ee Library.

Thank you to all.

Regards,

Cristian.

Former Member
0 Kudos

Hi Cristian,

I am facing the same problem, Can you explain, how did you solve the problem?

Thanks,

Sandy

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

The problem may be the Excel file.

The present version of jxl.jar supports only Excel files with .xls extension and it will not support .xlsx Extension.

Plz check your Excel file extension.....

Let me know whether your problem get solved.

Regards

Chandran S