cancel
Showing results for 
Search instead for 
Did you mean: 

Java DC not deployed with WebDynPro DC

former_member212767
Participant
0 Kudos

Hi,

I've been testing the DC functionality and I'm trying to create the following:

1) WebDynPro DC (DCA)

2) Java DC (DCB)

DCB has code for reading data from a database table (three classes, one is set as a public part). This code is functioning ok in another WebDynpro project where I've used it as an external jar file located in the lib directory and added to classpath.

DCA has a small table in the view that I'm filling (or trying to) with data from the database.

DCB has one java class as a Public Part. DCA has this PP defined in the Used DC's (DC Metadata --> DC definition --> Used DC's). I can see the DCB code fine from the DCA's view (I can use the methods from the class).

I see no code errors and everything compiles ok. I've built the DCA and DCB separately (Development Component --> Build) before doing the project build and deployment.

When I deploy, I'm getting java.lang.NoClassDefFoundError for the DCB class (User.class) when the program starts. So it seems that the DCB is not deployed with the DCA. I've tried to look at the properties and java classpath but nothing I've done has helped.

Purpose is set to compilation, and there is a

<at-build-time/>

tag in the .dcdef file.

Deployment of normal (no DC) Webdynpro projects works fine and the jars in the lib directory are deployed to the server OK.

Seems like I've tried everything but have found no solution yet. Refreshed every part, re-created everything, re-built, re-deployed etc...

Shortly: how to get DCB to deploy ?

Any help is appreciated here

Kind Regards,

Jari Pakarinen

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi Jari,

1) Create Enterprise Application project (DCEA)

2) In DCB create public part (with purpose=assembly) PPA

3) In DCB create public part (with purpose=compilation) PPC

4) Add public part PPA from DCB to DCEA as at-build-time

5) Add public part PPC from DCB to DCA as at-build-time

6) Build and deploy.

best regards, Maksim Rashchynski.

former_member212767
Participant
0 Kudos

Thanks, I will try this tomorrow.

Does this mean that I cannot use Java DC from a Webdynpro DC as I've tried to do ?

Regards,

Jari

former_member182372
Active Contributor
0 Kudos

With your initial approch java classes are not included to deployable unit.

So, it is better to separate WD and other parts to different deployable units.

former_member212767
Participant
0 Kudos

Hi,

What is the Java DC for then ? If it cannot be used as a part of another DC (deployable unit) then how should it be used ? What is the use if it does not end up at the server with Webdynpro code ?

The scenario I'm looking for is to include Java classes in a Webdynpro project as a part of the project (not jars done somewhere else, I can do that already) deployed to the server with the Webdynpro.

Thank you for your help, I'm not blaming you or anything

Regards,

Jari

former_member182372
Active Contributor
0 Kudos

Hi Jari,

For your scenario I suggest just put all neccessary java files under src\packages folder of your WD project (DC). You can even include this files to public part of web dynpro component and reuse them somwehre else.

best regards, Maksim Rashchynski.

former_member212767
Participant
0 Kudos

Hi Maksim,

This was exactly what I wanted to know. I can create an empty Webdynpro DC and add code to src/packages and voila I have a deployable reusable Java DC!

Thanks!

Jari

Answers (0)