cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.IllegalArgumentException: Attribute name 'DateStart' not defined

Former Member
0 Kudos

When I tried to do this:

wdContext.currentCheck_Material_PriceElement().setDateStart("2009-04-27");

It gives the error:

java.lang.IllegalArgumentException: Attribute name 'DateStart' not defined

What could be the error?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jackson,

Try to change the cardinality of the node Check_Material_PriceElement to 1..1 or 1..n.

Cheers,

Arafat

Former Member
0 Kudos

I am not able to change it.. is it because it is fixed by the model?

Former Member
0 Kudos

But I am able to change the node 1 level above it though.

Former Member
0 Kudos

Hi Jackson,

Looks like problem is with the webservice. May be webservice is not having the 'DateStart' attribute now.

Try downloading the latest wsdl file and check whether 'DateStart' attribute is available or not.

Thanks & Regards,

Jaya.

Former Member
0 Kudos

No, I tried using Web Services Navigator.. it can work ( return values)

Former Member
0 Kudos

Hi Jackson,

'DateStart', is it a input parameter or output parameter?

Which model you are using?

Regards,

VJR.

Former Member
0 Kudos

It is an input parameter.

I am using Webservice Model.

Former Member
0 Kudos

I checked the model "Check_Unit_Price", indeed the variable is found!

/* ***************************************************************************

  • ModelAttribute -> DateStart

  • **************************************************************************/

/** getter for ModelAttribute -> DateStart

  • @return value of ModelAttribute DateStart */

public java.lang.String getDateStart() {

return (java.lang.String)super.getAttributeValue("DateStart");

}

/** setter for ModelAttribute -> DateStart

  • @param value new value for ModelAttribute DateStart */

public void setDateStart(java.lang.String value) {

super.setAttributeValue("DateStart", value);

}

Former Member
0 Kudos

Hi,

Are you sure that the webservice in webservice navigator is taking 'DateStart' also as input parameter? Check once again with the latest wsdl.

If every thing is fine there then try deleting and recreating the webservice model again with the latest wsdl.

Regards,

VJR.

Former Member
0 Kudos

Yes I am sure, just that the first letter is not capitalised.

Ok I will try to reimport the model again..

ARGH this is driving me crazy.. ;(

Former Member
0 Kudos

SIGH..

java.lang.IllegalArgumentException: Attribute name 'DateStart' not defined for model class 'Check_Material_Price'

I reimported the whole model again.. the webservice is surely working.. but in the application, it just can't find DateStart even though I could use the setter setDateStart ? This is strange..

pravesh_verma
Active Contributor
0 Kudos

Hi Jackson,

This is exactly what I said in my first reply. It is possible that the attribute 'DateStart' is not even existing any more in the model.

The reason why the webservice was having this attribute and it was working fine, is may be due to the earlier deployment of the webservice.

I am sure if you redeploy the webservice then even that wil not work.. Please revert back in case you have some issues.

Iguess now your issue would be resolved. After the reimport of the model, restart the server and deploy your application before testing.

Thanks and Reagrds,

Pravesh

Former Member
0 Kudos

still trying.. i re deployed but its still the same error..

Former Member
0 Kudos

I don't know why!! I restart the server and it works!! Thanks for all the help!! -_-

Answers (2)

Answers (2)

Former Member
0 Kudos

Jackson,

check the type of 'DateStart'?

if it is of type Date, then you cannot pass a string in the argument as "2009-04-27".

you need to pass a 'Date' Parameter!

regards,

Former Member
0 Kudos

try to do the following:

java.sql.Date startDate = new java.sql.Date(2009-04-27); 
wdContext.currentCheck_Material_PriceElement().setDateStart(startDate);

regards,

Former Member
0 Kudos

Yep it is a string.. that's why I pass in a string.. but I wonder why it says parameter undefined?! -_-

Former Member
0 Kudos

Can't set that.. cos startDate is a string..

pravesh_verma
Active Contributor
0 Kudos

Hi Jackson,

Please check in the Check_Material_Price node that whether the DateStart attribute is present or not. I guess that is not present.

However if that is present then is this node a model imported node. If this is a model imported node then it might be the case that there is some chnages in the model. You need to check in the backend RFC that whether this attribute actually exist in backend or not.

Finally, Just restart your server and redeploy the application, and then try to run the application again. I have a feeling that if all the above mentioned things are correct then your application is not getting deployed properly.

You can just try to undeploy your application and then redeploy of that once again.

I hope this solves your issue. Please revert back in case there is still some problem.

Thanks and Regards

Pravesh

Former Member
0 Kudos

Yep DateStart attribute exists.

My j2ee webservices could work, backend could work too when i enter value for dateStart, but from the UI itself when I tried to set the value for UI, it gives me the error?

Help

pravesh_verma
Active Contributor
0 Kudos

Hi jackson,

Hve you tried to undeploy and then redeploy the application. This is one last thing I have mentioned in my reply above. Try this, may be this can help.

Thanks and Regards,

Pravesh

Former Member
0 Kudos

Yes I tried redeployed all the services, and the application too.. it still gives the error which I have no idea why..