cancel
Showing results for 
Search instead for 
Did you mean: 

errors in automatically generated code

Former Member
0 Kudos

I am creating an application in dyn pro and i have got errors at the code which is generated by dyn pro automatically. I have imported the zip file TutWD_EJBinWD_Init .The errors are generated on the following lines.

  private final com.sap.tc.webdynpro.progmodel.api.IWDViewController wdControllerAPI;
 private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;
this.wdControllerAPI = wdThis.wdGetAPI();
    this.wdComponentAPI = wdThis.wdGetAPI().getComponent();
public void onActionSubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  public void onActionReset(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I've had the same problem and reason has never been the generated code, it has always been something i did wrong and that was reflected in the generated code.

The reasons for me have been from a bad mapped context attribute to common errors like a unresolved . , ; or {

It really hard to find errors lik that and for me, rebuilding the project only made worse things (when it was of bad mapping context)

The bad mapping i remember was actually with model attributes which cannot be individually bound, I have always to delete all the node content and recreate and rebind everything inside.

Hope that helps a little

Former Member
0 Kudos

HiFabian,

I do have the standard SAP API files and classes as the automatically generated code in other applications can access these classes stored in com.sap.tc.

I cant access the api functions only in this particular application..

I am using Nwds v 7.0.10 an java 1.4.2

Edited by: Nikhil Tapkir on Aug 12, 2008 6:47 AM

Former Member
0 Kudos

Hi,

Have you tried to create project with a different workspace?

Instead of using the sample, if you try to create a new WD project does it work?

If that too doesnt work , please reinstall the NWDS.

Regards

Ayyapparaj

Former Member
0 Kudos

hi,

changing the workspace does not help but the lines of code generated automatically are woking perfectly fine for other applications . So i do not think i need to re install nwds again.

Former Member
0 Kudos

Hi,

Try deleting all the import statements do it once again using SHIFTCTRLO or source->Organize imports

Repair context structure and Project classpath too would be helpfull

Regards

Ayyapparaj

Answers (7)

Answers (7)

Former Member
0 Kudos

i really coudnt find a solution to this.. thank u all for helping i wld probably go wid the opton of reinstalling NWDS

Former Member
0 Kudos

Hello Nikhil,

so in fact that u can access the WD API i think that something went wrong when you have importet the tutorial.

In fact that it is an tutorial i do not think that there is any error inside it and i dont think that you have to check all the code for any errors.

I think maybe you have choosen a diffrent packe or application name while creating the application and now after the import the package qualifier or the application name or anything like this does not match with the tutorial code.

Was there any information which name and packages do you have to use for the tutorial?

Where can i download the tutorial? Did you have an link so that i'm able to import it in my development workplace. It would be easier for me to find the error.

kind regards

Fabian

Former Member
0 Kudos

I have faced such issues so many times and in the beginning I thought the same that the autmatic code generation process isn't efficient and error free. I tried all the stuff and suggestions mentioned here, but all in vain. But with time I learned that my programming errors that are causing series of errors that are actually not there.

My suggestion is, go to through the every line of error message(not in the code but in the task list section, may on right side tab), i hope you will find one or two culprits that might be causing this series of errors.

Former Member
0 Kudos

Hello,

is it possible, that you do not have the standard SAP API files and classes?

I think if the compiler says that he can't find or resolve com.sap.tc i think you haven't got these classes.

What Version of NWDS do you have installed and which application server and Java version are you using?

Can you access any standard web dynpro api functions?

kind regards

Fabian

Former Member
0 Kudos

hi jhansi,

even your solution did not help. thanks 4 tryin.

former_member194668
Active Participant
0 Kudos

Hi Nikhil,

Some times the rebuild doesn't happen properly (this happens especially when you create a from NWDI or import a project).

In this case, open the project in Navigator view and delete gen, gen_ddic and gen_wdp folders manually.

Then reload + rebuild.

It should work for you.

-Aarthi.

Former Member
0 Kudos

when i try clearing the errors it says com.sap.tc cannot be resolved

Former Member
0 Kudos

Hi Nikhil,

Try doing Reload + Repair to the project. Before doing that close and open the project and then do that.

Thanks & Regards,

Jhansi Miryala

Former Member
0 Kudos

Hi,

Go to the Problems tab and clear all the errors first.