on 03-05-2009 11:00 AM
Hello,
I am trying to build a test application which should use a JavaBean model.
For that matter I created a JavaBean (according to the command bean pattern), DTO and a business delegate class.
All these classes are located in one DC.
I put a reference (Used DCs) to the WebDynpro project.
During design time I am able to create the model using the Java Bean class.
Modeling is ok, but when I try to deploy and run the application (on a remote server), I get a
java.lang.NoClassDefFoundError
The detailed trace shows
...
Caused by: java.lang.NoClassDefFoundError: com.camelot.cmeio.beans.material.command.MaterialBean
at com.camelot.test.app.wdp.InternalTestApp.<init>(InternalTestApp.java:45)
So, it seems during runtime the WebDynpro project doesn't find the command bean.
Any idea how to solve this problem?
I already tried to pack the Bean classes in a library which is deployed on the server.
Thanks,
Michael
Hi Dear..
if create Java bean model. you wrote some code as DTO.then you go to DC META DATA then create one Public part as any name...then go to next ..after that you will gwt somw option like..folder,tree,package..you choose any one of them .then you see all source related to your model DC
then Click finis..now yopur public part has been created for model DC..
after that..go to main Dc which you want to use model Dc,,,go to DC mEtadata->Used Dc--right click->
add Used Dc..>then you choose your model Dc->expand your model Dc-->you will get youe publipart which you have created at time of public part...
then choose public part as you asisigned that name..
Thne in below you will gate 4 check box ...you have to do check od build time and run time..two option you have to checked...
now all source of model Dc available in your parent DC...
finish..
then you build all Dc and deploy your server...now Your application does not show any error,,,,
Thanks
Sudhira kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
well, that's what I did, BUT IT DOESN'T WORK.
The problem is that the DC which contains all my DTO and JavaBean definitions cannot be deployed since it is just a Java Project.
So, the missing part is just: how can I deploy the DTO and other Java classes from my Java project.
I understood from the whole thread that the only way is creating a library with external jars and deploy this,
Thanks,
Michael
Hi,
What I get is you have all the bean related classes in a DC project (probably EJB Module project). Do a DC build for this project.
Create an Enterprise Application DC project & add a reference to this bean DC project. Do a DC build, create archive & deploy for this project.
Now refer to this Enterprise Application DC project from your Web Dynpro DC project.
Hope this helps you.
Kind Regards,
Nitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you need to add the jar files using external library DC.
follow the blog below for the same.
/people/marion.schlotte/blog/2007/12/19/simplify-dc-structures-for-external-libraries
Thanks,
Prasanthi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Although this topic is also interesting, my problem is that my own classes are not found. So, is there really no other way than via an external library???
BTW: the solution showed in the blog does not work in my case either. I tried to create a libs folder, but the project in the NWDS just ignored this.
Thanks,
Michael
Hi
Even u maintained all the dependency still got java.lang.NoClassDefFoundError.
Let we consider some scenario
1. It might during runtime it found all the required dependency,but not the compiled classes.Jar classes are compiled classes once defined their uses they start serving to the component.
2.An External Library DC in Development is just like a Java DC (except that you don't have sources or do not want to compile them): It's a simple building block that is used during build. Maybe it has a specific "API" subset (in which case you could publish different Jar files in compilation/assembly public parts) or it hasn't (in which case the jars in compilation/assembly public parts would be identical). Anyway, public parts are relevant for build.
when u define the public part of user dc here u go for publish as archive.
To find this option (Tell me the version u r using of NWDS)
1.Select your External library Dc(if not then create that)---Under library folder put your jar files ---now select a that jar and right click --under development component --here u will find two option Publish as file and publish as archive select that and define Public Part for both compilation as well as assembly.
2 Build this Dc (No need to compile )
3.Define the uses relation-ship with your WebDynpro Component.
4.Build both the dc again
5.Compile and run your Webdynpro Dc only.
6. In this way Run time will find the physical reference of the used class
Hope I am bit clear this time?
Best Regards'
Satish Kumar
ok, thanks, that was the direction I was searching for. Since I don't have an EJB (early design decision), I need to deploy the Java classes otherwise.
So, I'll try this approach (although I was unlucky the first time with an external library. I couldn't create a libs folder in the library project. I will try again).
Thanks,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
I barely remember, but when you create the DC dependency you specify if it is going to be used at Design Time and at Run Time, check both and make sure the other DC is deployed before
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I misread the question first, Your bean class is not getting referenced? Am I right?
Edited by: Anagha Jawalekar on Mar 5, 2009 4:39 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is what I think: the deployment of the WebDynpro project worked on the target application server, but the necessary classes were not deployed.
So, for me the question is: how can I deply the bean classes on the target machine?
Via library or is there a way to include jars or libraries in the WebDynpro projects?
Thanks,
Michael
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.