cancel
Showing results for 
Search instead for 
Did you mean: 

Reg : IPrivateView ,wdContext can't be resolved

Former Member
0 Kudos

Hi All,

I am getting errors IPrivateView ,wdContext can't be resolved.

I set the classpath and repaired project also.

Plz give me the reply.It's urgent.

Thanks

Shirisha

Accepted Solutions (1)

Accepted Solutions (1)

former_member201361
Active Contributor
0 Kudos

hi,

the IprivateView is not resolved because you have to import the class.

rightclick>source>organizeimports.

will resolve ur problem

thanks and regards

fazal

Former Member
0 Kudos

Hi ,

Thank You for reply. Already I have done this.

Still I am getting errors.

Thanks

Shirisha

Former Member
0 Kudos

hai Shrisha,

Lets try it this way,

Create a new web dynpro project.Check if there is any prob in that.If no problem then Check the library references ,object.lang are there in the project which your using.May be some files get missed out during project restructure.So you check all and if you find rt.jar or any files missing do find the location from the new project and add them to your project.hope this helps.

Thanks n Regards

Sharanya.R

Former Member
0 Kudos

Once I also got the similiar error. Then after looking in to the code structure carefully I found out that one of my Action had no methods associated with it. I had deleted a method without deleting it's associated Action.

Navigate to Actions tab in IPrivateView and see whether any of Actions have been dis associated with it's method. If it is then either delete that Action or restore the method which was associated with that Action.

Regards,

Gopal

Former Member
0 Kudos

Collection col = new ArrayList();

IPublicApp.IDummynodeElement ele = wdContext.createDummynodeElement();

int size = wdContext.nodeFamily().size();

for (int i = 0 ; i< size-1;i++)

{

if (wdContext.nodeFamily().isSelected(i))

{

ele.setSecondaddress(wdContext.nodeFamily().getFamilyElementAt(i).getSecondaddress());

ele.setStreet(wdContext.nodeFamily().getFamilyElementAt(i).getStreet());

ele.setSubtype(wdContext.nodeFamily().getFamilyElementAt(i).getSubtype());

ele.setSurnameprefix(wdContext.nodeFamily().getFamilyElementAt(i).getSurnameprefix());

ele.setTaxnumber(wdContext.nodeFamily().getFamilyElementAt(i).getTaxnumber());

ele.setTaxoffice(wdContext.nodeFamily().getFamilyElementAt(i).getTaxoffice());

ele.setTelephonenumber(wdContext.nodeFamily().getFamilyElementAt(i).getTelephonenumber());

ele.setThirdaddress(wdContext.nodeFamily().getFamilyElementAt(i).getThirdaddress());

ele.setValidbegin(wdContext.nodeFamily().getFamilyElementAt(i).getValidbegin());

ele.setValidend(wdContext.nodeFamily().getFamilyElementAt(i).getValidend());

col.add(ele);

}

}

wdContext.nodeDummynode().bind(col);

and call this method in view controller(first u creat one method in component controller and write that above coading)

one more thing i wnat to know for what ur using that code please reply

Former Member
0 Kudos

Hi ,

I checked rt.jar file also. Still I am getting errors.

thanks

Shirisha

Former Member
0 Kudos

Hi,

You are getting that error in the View controller or component controller?First of all,build the project and Check the problems tab.Fix all the other errors in all the controllers.If errors are there in the used controllers then you will get this error.

Regards,

Sudhir.

Former Member
0 Kudos

Hi,

In Controller there are no errors. In View Controller only getting errors.

In implementation tab it's not showing IPrivate view import statement.I am trying to import IPrivate View statement.

Plz do help out.

Thanks

Shirisha

Former Member
0 Kudos

Hi Shirisha,

If u delete any Mapping from Controller to view u ill get this error.

Delete all the links you have with controller i.e model and value node mapping and also all the nodes under context and also comment the custom code you have written.

Rebuild the Project and check.

If all the errors are Resolved then map the controller and view again

Regards,

Sunitha.

Former Member
0 Kudos

Hi Shirisha,

BTW, did you try restarting the NWDS.

this might sound stupid, but i have seen that it can do wonders...

If this does not help, then as suggested earlier, try to find out any error that has been induced by your code.

Correcting that also fixes these kind of errors.

Satyaki.

Former Member
0 Kudos

Hi Sunitha,

Errors are resolved with ur solution.Thank You very much.

But I am getting new error

""This Compilation Unit indirectly references the missing type java.lang.object(typically some required class file is referencing a type outside the classpath)"".

In JavaBuild Path -> Libraries there is no rt.jar file.Previously this file is showing in Libraries.

Plz help me.

Thanks

Shirisha

former_member751941
Active Contributor
0 Kudos

Hi Shirisha,

1> Close Your project first then Close the NWDS

2> Delete the .registry file from .metadata

C:\Documents and Settings\Administrator\Documents\SAP\workspace\.metadata

3> Open NWDS and check

To Add the rt.jar file follow the steps.

Go to the Java Build Path => Select Add Variable…

Click on Edit =>Click on New Enter

Name : JRE_LIB

Path : C:/j2sdk1.4.2_09/jre/lib/rt.jar

Click on OK.

Select JRE_LIB click on OK.

Select JRE_LIB click on OK.

Click on OK

Regards,

Mithu

Former Member
0 Kudos

Hi Mithu,

I 've done this. Still I am getting error "This Compilation Unit indirectly references the missing type java.lang.object(typically some required class file is referencing a type outside the classpath)"

Plz help out.

Thanks

Shirisha

former_member751941
Active Contributor
0 Kudos

Hi Shirisha,

R you getting this error for a single project or for the all the projects that are in your NWDS workspace? If you are getting the error for all the project then reinstall your NWDS.Other wise import this project in another NWDS setup and check whether u r getting same error or not? Before copy the project into the other system must close the project and NWDS.

If you get the same error recreated a new project and copy paste the nodes, implementation from the corrupted project and do the mapping.

I don’t know other way around it.

Regards,

Mithu

Anmol_Kumar
Participant
0 Kudos

Hi,

I also had similar issues. I applied refresh->reload->organize imports and most of the errors are resolved. I am still getting few more errors like

IPublicContractCompInterface cannot be resolved or is not a type in file InternalSearchView.java

any solution for this?

Thanks

Anmol

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi All,

Thank You for help..

IPrivateView , wdContext errors are resolved.

But I am getting new error

""This Compilation Unit indirectly references the missing type java.lang.object(typically some required class file is referencing a type outside the classpath)"".

In JavaBuild Path -> Libraries there is no rt.jar file.Previously this file is showing in Libraries.

Plz help me.

Thanks

Shirisha

former_member201361
Active Contributor
0 Kudos

hi,

please check the import statement . have you imported the IprivateView.

for eg:

import com.sap.demo.IPrivateTestView;

import <Package Name >.IPrivate<View Name>View;

Hope your Problem get resolved

thanks and regards

fazal

Former Member
0 Kudos

ok u write the same code in component conproller and call that method in view ( when ur using in component controller u use

Collection col = new ArrayList();

IPublicApp.IDummynodeElement ele = wdContext.createDummynodeElement();

int size = wdContext.nodeFamily().size();

for (int i = 0 ; i< size-1;i++)

{

if (wdContext.nodeFamily().isSelected(i))

{

ele.setSecondaddress(wdContext.nodeFamily().getFamilyElementAt(i).getSecondaddress());

ele.setStreet(wdContext.nodeFamily().getFamilyElementAt(i).getStreet());

ele.setSubtype(wdContext.nodeFamily().getFamilyElementAt(i).getSubtype());

ele.setSurnameprefix(wdContext.nodeFamily().getFamilyElementAt(i).getSurnameprefix());

ele.setTaxnumber(wdContext.nodeFamily().getFamilyElementAt(i).getTaxnumber());

ele.setTaxoffice(wdContext.nodeFamily().getFamilyElementAt(i).getTaxoffice());

ele.setTelephonenumber(wdContext.nodeFamily().getFamilyElementAt(i).getTelephonenumber());

ele.setThirdaddress(wdContext.nodeFamily().getFamilyElementAt(i).getThirdaddress());

ele.setValidbegin(wdContext.nodeFamily().getFamilyElementAt(i).getValidbegin());

ele.setValidend(wdContext.nodeFamily().getFamilyElementAt(i).getValidend());

col.add(ele);

}

}

wdContext.nodeDummynode().bind(col);

Former Member
0 Kudos

Check the "Problems" or "Tasks" view in Eclipse if there are any errors in the meta-data. Fix them and rebuild the project.

Armin

nikhil_bose
Active Contributor
0 Kudos

still have problem? then go to navigator tab, refresh the project and reloading and then organize imports.

regards,

nikhil

Former Member
0 Kudos

Hi,

Try to do repair poject structure and class path.

Or CTRLSHIFTO short cut to organize imports

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

Thank You for reply. Already I've done this.

Still I am geting errors.Any other solution?

Thanks

Shirisha