cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Translate the entire conversation x

Data Model Error While UpgradeManager

AT_12233708
5-Regular Member

Data Model Error While UpgradeManager

I am using Windchill PDMLink Release 12.1 and Datecode with CPS 12.1.2.13

While upgrading from version 9.1 to 10.2 (first phase of a 9.1 to 12.1 upgrade project) we get inheritance exceptions.
We have Modelled class DesignChangeTask which is subtype of WTChangeActivity2, but Windchill is trying to treat DesignChangeTask as a Changeable2 during the Execute Server Migrators / Update the Pending Change Indicator and we are getting below error
Caused by: wt.util.WTException: (wt.query.queryResource/38) wt.query.QueryException: Class Attribute class "interface wt.change2.Changeable2" is not a super class of or equal to any of the table classes "class ext.ec.epp.change.DesignChangeTask"

Here are the errors that I faced
Nested exception is: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.ptc.windchill.upgrade.updates.directives.MigratorMethod.invoke(MigratorMethod.java:131)
at com.ptc.windchill.upgrade.updates.directives.LightWeightServiceDirective$Server.invokeLightWeightServiceApi(LightWeightServiceDirective.java:635)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at wt.method.MethodResultWriter.writeExternal(MethodResultWriter.java:152)
at wt.method.MethodResult.writeExternal(MethodResult.java:226)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1455)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:293)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:332)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: wt.util.WTException: (wt.query.queryResource/38) wt.query.QueryException: Class Attribute class "interface wt.change2.Changeable2" is not a super class of or equal to any of the table classes "class ext.ec.epp.change.DesignChangeTask"
Nested exception is: (wt.query.queryResource/38) wt.query.QueryException: Class Attribute class "interface wt.change2.Changeable2" is not a super class of or equal to any of the table classes "class ext.ec.epp.change.DesignChangeTask"
at wt.change2.ChangeStatusCalculator.updatePendingChangeIndicator(ChangeStatusCalculator.java:334)
at wt.change2.ChangeStatusCalculator.updatePendingChangeIndicator(ChangeStatusCalculator.java:295)
at wt.change2.ChangeStatusCalculator.updatePendingChangeIndicator(ChangeStatusCalculator.java:277)
at wt.change2.MigrateChangeStatusIndicators.runMigration(MigrateChangeStatusIndicators.java:38)
... 28 more
Caused by: (wt.query.queryResource/38) wt.query.QueryException: Class Attribute class "interface wt.change2.Changeable2" is not a super class of or equal to any of the table classes "class ext.ec.epp.change.DesignChangeTask"
at wt.query.ClassAttribute.validate(ClassAttribute.java:700)
at wt.query.SearchCondition.validate(SearchCondition.java:828)
at wt.query.ConditionsClause.append(ConditionsClause.java:365)
at wt.query.ConditionsClause.append(ConditionsClause.java:234)
at wt.query.QuerySpec.appendWhere(QuerySpec.java:1126)
at wt.change2.listeners.ResultingChangeEventHandler.appendResultingChangeCondition(ResultingChangeEventHandler.java:275)
at wt.change2.listeners.DefaultResultingChangeEventHandler.getChangeablesToSetIndicator(DefaultResultingChangeEventHandler.java:334)
at wt.change2.ChangeStatusCalculator.executeUpdatePendingChange(ChangeStatusCalculator.java:463)
at wt.change2.ChangeStatusCalculator.executeUpdatePendingChange(ChangeStatusCalculator.java:403)
at wt.change2.ChangeStatusCalculator.executeUpdatePendingChange(ChangeStatusCalculator.java:368)
at wt.change2.ChangeStatusCalculator.executeUpdatePendingChange(ChangeStatusCalculator.java:364)
at wt.change2.ChangeStatusCalculator.updatePendingChangeIndicator(ChangeStatusCalculator.java:317)
... 31 more
5 REPLIES 5

Strange since that interface is used for things that are on change tasks like affected and resulting items, not the task itself.  I suggest openning ticket with PTC. You do not have an errant inclusion of this interface in your modelled class do you?

AT_12233708
5-Regular Member
(To:avillanueva)

Hello and Thank you for your support:
we are investigating furter:
The problem happens during the Upgrade the Pending Change indicator of the Servers Migrator from 9.1 to 10.2

The issue seems caused by the unsuccesful execution of  the task    "Updates the associations of change objects and objects that can be changed
(that seems apparently completed sucecsfully).
As described in the article 
https://www.ptc.com/en/support/article/CS261042 the role  links seem not being inverted and the Upgrade the Pending Change indicator of the Servers Migrator picks up objects from the wrong list (and those objects don't have the required interface).

@AT_12233708 ,

 

I agree with @avillanueva assessment above. Are you able to share the source code for your modelled class or at least the class declaration with annotations?

AT_12233708
5-Regular Member
(To:jbraga)

it is not an issue related to the class, it is the object should not be considered to be treated with that interface since it is wrongly picked up by the UpgradeManager because of the article issue I explained above.
Thank you!

Could it be that your class was not versioned when you initially wrote it? Since that is the change its talking about, perhaps this class need to be rewritten or updated?

Announcements
Top Tags