cancel
Showing results for 
Search instead for 
Did you mean: 

class not found

Former Member
0 Kudos

Hello Everybody,

iam working within a WebDynPro Project and get the Exception "ClassNotFound Exception"

when i instantiate a class of a another application.

The Projects of the other application are checked out of the repository and there is no error

by importing the packages.

I think that in running time, the classes of the other application cannot be found,

but how can i give webdynpro information about where the classes of the other application are?

Thanking you in anticipation.

AE

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

I tried out a lot of things but i cannot create a DC like the SAP Help instruct me.

I have no "development configurations perspective" so i cannot

create a DC.

Can someone tell me why i do not have this perspective?

Edited by: arneeckertz on Jul 7, 2009 9:49 AM

Former Member
0 Kudos

Hi,

Go to Window>Open Prespective>Other-->Select Development Configurations

and then navigate to Develeopment Configurations prespective

Go to Local Development --> My Components -->Create New DC..

Here you can create a new local DC of any component type..

Regards,

Saleem

Former Member
0 Kudos

Hi,

If you are using a class and that class is deployed as part of another application. If that class is part of some external jar then you need to follwo the below procedure:

We can add external jars to this External Library DC. As this DC is non deployable DC we need to create two public parts. One public part is for compilation purpose (API) and another for runtime purpose (SDA deployable).

API Pubic part:. We need to add this as used dc in WebDynpro DC for design time purpose.

SDA Public part: We need to deploy this as part of some other EAR.

For deploying the SDA Public part there are two ways.

As WebDynproDC also contains an EAR we can deploy this as part of WebDynpro DC. For this we need to add this SDA public part to WebDynpro DC as used dc.

Note: If we are deploying into local server, then we should not deploy using RightClickOnDCàDeploy or RightClickApplicatonàDeploy New Archive and Run.

We should deploy using RightClickOnDC à Development Component à Deploy. If not the external jar will not be deployed into the server.

Help: /people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas

2. Create J2EE Library DC which is deployable dc, now add the SDA public part of External library dc to this J2EE library dc as used dc and deploy this J2EE lib dc into the server.

Give the library reference of this J2EE lib dc in the WebDynpro DC as u2018u2019sap.comtestjarsu201D (RightClickOnDC>Properties>WebDynpro References-->Library References)

Help: /people/bertram.ganz/blog/2008/11/24/how-to-use-external-jar-files-in-web-dynpro-development-components

For example if we want to use a class which is deployed as part of J2EE EAR dc then we need to give the shared reference of that dc in the below location:

RightClickon Dc>Properties>WebDynproReferences-->SharedReferences

Regards,

Charan

Former Member
0 Kudos

Hello,

The question is what kind of application is it,if its a Web dynpro application then create Public parts of the classes/packages and add them as Used DC in you application

Former Member
0 Kudos

hello everybody,

thank you all for your quick answers!

i tried to solve the problem by selecting the "checked out" projects ->right mous button and "export" as *jar file.

then i add this *jar file to my webdynpro project by properties->java build patth->add external jars.

but finally, "ClassNotFoundException".

I found out, that most projects show the warning: "classpath entry will not be exported. runtime classnotfoundexceptions

may result".

what does this warning mean?

Former Member
0 Kudos

Hi,

Where is that class located? If that class is deployed using an EAR project then give the reference of that EAR project in webdynpro project -> right click -> properties -> webdynpro references -> sharing references.

Regards,

Jaya.

former_member187439
Active Participant
0 Kudos

Right click your project and click on properties. Now select "java build path". If you find an error or warning symbol in any of the files in libraries or order and export, then click on add external jars, and browse to choose those files once again. Select all the files in order and export and say ok. After this, when you rebuild the project the "class not found" exception should go.

If your build output view displays a particular class file name near the "class not found" exception, then you can add the same by following the above procedure.

BTW, Can you tell me when you are getting this error?

Former Member
0 Kudos

How are you accessing classes? If you are using public parts,then you should perform a DC - > Build of parent DC before deploying the dependant DC.Also while adding public part ensure you select both design time and run time as well.

http://help.sap.com/saphelp_nw70/helpdata/EN/42/43973fade73c17e10000000a114084/frameset.htm