Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Question for WD model/NWDI experts

I have a WD that uses a JavaBean model. I'm trying to create a similar version of this application using NWDI. When I run the application, I am getting a runtime error as the framework tries to initialize my View controller - I get a NoClassDefFound on my model classes.

As follows:

My backend is a J2EE DC/application (jdidemo/maint/ejb). The J2EE app has an entity bean and a stateless session bean with CRUD operations (create, read, update, delete). The J2EE app defines a Data Transfer Object (named GreetingDTO) used as a return type or parameter type in some of the session bean's CRUD methods. The public part "client" (type compilation) contains the session bean and the GreetingDTO classes. The public part "ejbjar" (type assembly) contains everything.

My JavaBean model, defined in a Java DC (jdidemo/maint/java), has a business delegate class, named GreetingBizDelegate, that calls the J2EE session bean's CRUD methods and a JavaBean+command pattern class, named GreetingCommandBean. GreetingCommandBean has two properties, one typed as a single GreetingDTO, one a collection of GreetingDTOs. It also has "commands" (methods) that call methods in the GreetingBizDelegate. jdidemo/maint/java uses the "client" public part of jdidemo/maint/ejb (I also defined it to use the "ejbjar" pp, though I don't think it needs it). jdidemo/maint/java defines a pp "build" with the GreetingCommandBean as entity and a pp "assembly" with both GreetingCommandBean and GreetingBizDelegate as entities. [Note: I have designed the overall application in conformity with the 2006 TechEd CD 263 session, <i>Web Dynpro Best Practices for Connecting to Java APIs</i>.]

My WD DC/project (jdidemo/maint/wd) uses "client" and "ejbjar" from jdidemo/maint/ejb and "build" and "assembly" from jdidemo/maint/java. I can import the JavaBean model, establish the model relations, and do the context-to-model binding fine (I am using a custom controller to do this). In that state, I can build, deploy, and run the application without problems.

But when I do the context mapping of the GreetingCommandBean model class to my View, though the application builds and deploys fine, I get a WD runtime error NoClassDefFound for GreetingCommandBean. The line of code causing the error is the InternalMainView line initializing the View's context (currentGreeting is the model property typed as GreetingDTO):

    infoCurrentGreeting = GCIContext.createMappedNode("CurrentGreeting",, true, false, false, ".JavaBeanModelCust.GreetingCommandBean.CurrentGreeting", true, true, null,
      new IGCIAttributeInfo[] {
        GCIContext.createMappedAttribute("maintdate", "maintdate", false),
        GCIContext.createMappedAttribute("greeting", "greeting", false),
        GCIContext.createMappedAttribute("author", "author", false),
        GCIContext.createMappedAttribute("number", "number", false),
      (IGCINodeInfo[])null // no child nodes

I have never had this problem before, where the model import and component-model binding work fine (at design time and runtime) -- so the model classes are obviously recognized -- but context mapping the same model classes to a View causes the problem described.

Former Member
Not what you were looking for? View more on this topic or Ask a question