cancel
Showing results for 
Search instead for 
Did you mean: 

Using Development Components in WebDynpro components - runtime failures

Steven_UM
Contributor
0 Kudos

Hi folks,

I developed a couple of webdynpro components and those are working fine. As I found out that I had some common functionality ( for example tablesorter class) in there I decided to get that into a common java component that would be "used" by my other webdynpro components.

Also that works fine as I have build a java component with corresponding public interfaces, attached the java component to the webdynpro components, uses the java classes in there, I can build the webdynpro components without any issues, ...

But at runtime I get an exception telling me that basically the common class definitions cannot be found ...

This is what I did :

(1) Created a JAVA DC with a package with the common classes

(2) Defined 2 public interfaces - API and Assembly

(3) Created a J2EE Service Libary, added the JAVA DC Assembly Interface and build/deployed it ... No deployment issues. ( Also tried the same with "An external library" DC when the first one didn't work )

(4) Added a reference in the WebDynpro DC towards the API public interface ( buildtime ) and to the Assembly public interface ( RunTime ) (-> not sure that one was necessary ). The DC builds without any issues.

(5) I run the WD application and get a dump ...

Any ideas what I forgot or suggestions on solving this ?

Thanks,

Steven

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Goto Project>Properties>WebDynpro References--> Project References and select the projects that you are refering to in your application.

Now try to rebuild and deploy. Hope it works for you.

Regards,

Murtuza

Answers (3)

Answers (3)

Steven_UM
Contributor
0 Kudos

Hi folks,

I managed to get the problem solved by adding a reference to the library in the webdynpro references part of the project configuration.

Steven_UM
Contributor
0 Kudos

Thanks for your suggestions guys ...

I deployed the libary JAR seperately with the J2EE Library DC ... that worked fine according to the deployment logs.

And yes I referenced the project as well in the project configuration but that didn't do alot I am afraid ...

I did some reading up about JAVA class loaders within J2EE and it seems that by default each J2EE application ( I assume Webdynpro is one as well ) will have a dedicated class loader which only loads the classes needed within the application ( plus the default ones ). It seems that my library is not considered to be part of the application ... although by creating the link to the public interfaces I would assume it is ...

Only other thing to remark is that all the components are developed as 'local components' ... I cannot imagine that would have anything to do with it ?

Steven

sridhar_k2
Active Contributor
0 Kudos

Steven,

Have you deployed your common code to the Server? It is able to get build time bcz, all the dependencies are there at that time. But run time it cant able to find from the server.

Regards,

Sridhar