Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] java.lang.NoSuchMethodError: org.eclipse.wst.common.frameworks.datamodel.IDataModel.getDefaultOperation()Lorg/eclipse/wst/common/frameworks/datamodel/IDataModelOperation;


I'm checking in the change for IDataModel.getDefaultOperation().  If there is any breakage, it may be fixed using the cast example below

I'm also refactoring the following classes to an internal package.  These were all very recently added, so the risk is minimal.  If there is any breakage, it may be fixed with an organize imports.

old package = org.eclipse.wst.common.frameworks.datamodel
new package = org.eclipse.wst.common.frameworks.internal.datamodel

IDataModelPausibleOperation
IDataModelPausibleOperationEvent
IDataModelPausibleOperationListener


Thank you,

Jason A. Sholl
jsholl@xxxxxxxxxx
919-543-0011 (t/l 441-0011)



Jason A Sholl/Raleigh/IBM@IBMUS
Sent by: wtp-dev-bounces@xxxxxxxxxxx

05/15/2006 04:10 PM

Please respond to
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>

To
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>
cc
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>, wtp-dev-bounces@xxxxxxxxxxx
Subject
Re: [wtp-dev] java.lang.NoSuchMethodError:        org.eclipse.wst.common.frameworks.datamodel.IDataModel.getDefaultOperation()Lorg/eclipse/wst/common/frameworks/datamodel/IDataModelOperation;






OK I'll revert it back.  Thanks for the help.


Thank you,

Jason A. Sholl
jsholl@xxxxxxxxxx
919-543-0011 (t/l 441-0011)



Arthur Ryman <ryman@xxxxxxxxxx>
Sent by: wtp-dev-bounces@xxxxxxxxxxx

05/15/2006 03:52 PM

Please respond to
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>

To
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>
cc
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>, wtp-dev-bounces@xxxxxxxxxxx
Subject
Re: [wtp-dev] java.lang.NoSuchMethodError:        org.eclipse.wst.common.frameworks.datamodel.IDataModel.getDefaultOperation()Lorg/eclipse/wst/common/frameworks/datamodel/IDataModelOperation;








Jason,


You changed the signature so the existing class files think the original method is missing. However, you're on the right track. The way to evolve a return type is to keep the signature but return an object that extends the return type. Then new clients of the API can do an instanceof check on the returned object and typecast it safely to the extended interface. That way old clients still work and new clients can take advantage of the new extended interface.


The code for new clients is something like this:


IDataModelOperation operation = model.getDefaultOperation(..);


if (operation instanceof IDataModelPlausibleOperation) {


      IDataModelPlausibleOperation plausible = (IDataModelPlausibleOperation) operation;

      ...


}


We are "morally" obligated to revert the signature to "unbreak" Geronimo. Any new WTP 1.5 code that uses the new signature should revert and do the typesafe typecast.



Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@xxxxxxx

Jason A Sholl <jsholl@xxxxxxxxxx>
Sent by: wtp-dev-bounces@xxxxxxxxxxx

05/15/2006 03:20 PM

Please respond to
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>


To
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>
cc
wtp-dev@xxxxxxxxxxx, wtp-dev-bounces@xxxxxxxxxxx
Subject
Re: [wtp-dev] java.lang.NoSuchMethodError:        org.eclipse.wst.common.frameworks.datamodel.IDataModel.getDefaultOperation()Lorg/eclipse/wst/common/frameworks/datamodel/IDataModelOperation;










I did change this back in March, but am not sure why this is broken.  The change was to return an
IDataModelPausibleOperation instead of IDataModelOperation, however, IDataModelPausibleOperation extends IDataModelOperation..  Why would that cause breakage?

Thank you,

Jason A. Sholl
jsholl@xxxxxxxxxx
919-543-0011 (t/l 441-0011)

Arthur Ryman <ryman@xxxxxxxxxx>
Sent by: wtp-dev-bounces@xxxxxxxxxxx

05/15/2006 03:07 PM

Please respond to
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>


To
wtp-dev@xxxxxxxxxxx
cc
Subject
[wtp-dev]         java.lang.NoSuchMethodError: org.eclipse.wst.common.frameworks.datamodel.IDataModel.getDefaultOperation()Lorg/eclipse/wst/common/frameworks/datamodel/IDataModelOperation;












Did someone delete a method from this interface? This was reported at Geronimo. I opened a bug to track it [1]


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=141850


Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@xxxxxxx
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top