Skip to Content
avatar image
Former Member

java DC to WebDynPro dc

Hi

I am using DC first time .

I created Java DC and class Class1 which has method which returns string "Hello".

I created public part.

Now I created WD dc and Use dc of Java DC.

I want to get "Hello" string in textView.

I created context of view and assign it to textView.

I used .jar file of java project in webdyn project.

i write code..

public void wdDoInit()

{

//@@begin wdDoInit()

Class1 c=new Class1();

wdContext.currentContextElement().setStringvalue(c.getStr());

//@@end

}

It shows error....

java.lang.NoClassDefFoundError: com/dhan/java/Class1

at com.dhan.wdp.FirstView.wdDoInit(FirstView.java:99)

at com.dhan.wdp.wdp.InternalFirstView.wdDoInit(InternalFirstView.java:112)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)

at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)

at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)

Thanks for helping me..

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 20, 2008 at 07:34 AM

    Hi,

    Have you clicked on the runtime dependency?

    Regards

    Ayyapparaj

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Yes, I selected both. Compile time and run time.

      I got the .jar file of java public part into wd project.

      But still error.(for your information. I can build java dc but do not deploy it unlike wd dc.)

  • avatar image
    Former Member
    Aug 20, 2008 at 12:50 PM

    Hi Dhananjay,

    I think you are getting this error message because your Java class is not deployed on server.

    Try Putting the Java class in WD DC source folder in a new Package through Navigator view.

    And Deploy the WD DC.

    Regards,

    Siddharth

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I copied and try. But still error.

      I tried a lot but lack of knowledge i failed.

      Can u explain me whole project step wise.

      Project is : Creation of java class in java dc which return simple string, and this string should display in textView in wd. using wd dc.

  • avatar image
    Former Member
    Aug 21, 2008 at 04:30 AM

    Hi ,

    You can try the following locally:

    1. Create an Enterprise Application DC.

    2. Make Two public parts in your java DC which refer your java classes

    1.Assembly PP(2nd option can be packaged in .sda etc)

    2.Compilation pp(1st option)

    3 Use Assembly PP in your EA DC as Build and runtime Dependencies

    4.Use Compilation PP in WD DC with Build time Qualifier.

    5. Build and Deploy the EA DC Ear.

    6. Reload and rebuild then Deploy your WD Dc and run.

    Also give the shared referance of your EA Dc in WD Dc by right clicking on WD go to Project properties--Shared references and give the value like this.

    sap.com >/

    Hope this will Help

    Regards,

    Siddharth

    Edited by: Siddharth Jain on Aug 25, 2008 8:33 AM

    Add comment
    10|10000 characters needed characters exceeded