Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

Query-Links thrown NullPointerException for more than one value to object_ref parameter

AD_10574558
4-Participant

Query-Links thrown NullPointerException for more than one value to object_ref parameter

Query-Links webject thrown NullPointerException
This exception thrown when 2 or more id send to object_ref
Exception thrown for following inputs to Query-Links:
TYPE|DIRECTION|output_type|auto_navigate|attribute
wt.part.MasterIteration|master|FULL|false|iteration,number,masterReference
wt.part.WTPartDescribeLink|describesDoc|FULL|true|describes,name,number,masterReference
wt.part.WTPartReferenceLink|referencesDoc|FULL|true|referencedBy,name,number,masterReference

 

Windchill: 12, 13

 

Exception:
Nested exception is: java.lang.NullPointerException
at com.ptc.core.adapter.server.impl.AbstractWebject.addTypeInstance(AbstractWebject.java:925)
at com.ptc.core.adapter.server.impl.AbstractWebject.addTypeInstance(AbstractWebject.java:901)
at com.ptc.core.adapter.server.impl.QueryLinksWebjectDelegate.invoke(QueryLinksWebjectDelegate.java:497)
at com.ptc.core.adapter.server.impl.WebjectDelegateFactory.invokeDelegate(WebjectDelegateFactory.java:434)
at jdk.internal.reflect.GeneratedMethodAccessor1027.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at wt.method.WTAdapterImpl.processWebject(WTAdapterImpl.java:840)
at wt.method.WTAdapterImpl.processRequest(WTAdapterImpl.java:537)
at com.infoengine.procunit.adapter.Adapter.send(Adapter.java:199)
at com.infoengine.SAK.ObjectWebject.invoke(ObjectWebject.java:319)
 
Webject:
<ie:webject name="Query-Links" type="OBJ">
<ie:param name="INSTANCE" data="<%=com.infoengine.au.NamingService.getVMName()%>" valueSeparator=";" delim=";" />
<ie:param name="TYPE" data="wt.part.MasterIteration"/>
<ie:param name="object_ref" data="VR:wt.part.WTPart:4655178:591698760-1730379217407-1158614409-186-30-168-192@vinw16wc30186.eqvm.local#VR:wt.part.WTPart:4655819:591698760-1730379217407-1158614409-186-30-168-192@vinw16wc30186.eqvm.local" valueSeparator="#" delim="#"/>
<ie:param name="DIRECTION" data="master"/>
<ie:param name="output_type" data="FULL"/>
<ie:param name="auto_navigate" data="false"/> 
<ie:param name="attribute" data="iteration,number,masterReference" delim=","/>
<ie:param name="group_out" data="objects"/>
</ie:webject>

 

Nested exception is: java.lang.NullPointerException
at wt.adapter.query.QueryLinksWebjectDelegate.navigate(QueryLinksWebjectDelegate.java:549)
at wt.adapter.query.QueryLinksWebjectDelegate.navigate(QueryLinksWebjectDelegate.java:465)
at com.ptc.core.adapter.server.impl.QueryLinksWebjectDelegate.invoke(QueryLinksWebjectDelegate.java:265)
at com.ptc.core.adapter.server.impl.WebjectDelegateFactory.invokeDelegate(WebjectDelegateFactory.java:434)
at jdk.internal.reflect.GeneratedMethodAccessor307.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at wt.method.WTAdapterImpl.processWebject(WTAdapterImpl.java:840)
at wt.method.WTAdapterImpl.processRequest(WTAdapterImpl.java:537)
at com.infoengine.procunit.adapter.Adapter.send(Adapter.java:199)
at com.infoengine.SAK.ObjectWebject.invoke(ObjectWebject.java:319)

<ie:webject name="Query-Links" type="OBJ">
<ie:param name="INSTANCE" data="<%=com.infoengine.au.NamingService.getVMName()%>" valueSeparator=";" delim=";" />
<ie:param name="TYPE" data="wt.part.WTPartDescribeLink"/>
<ie:param name="object_ref" data="VR:wt.part.WTPart:4751222:591698760-1730379217407-1158614409-186-30-168-192@vinw16wc30186.eqvm.local" valueSeparator="#" delim="#"/>
<ie:param name="DIRECTION" data="describesDoc"/>
<ie:param name="output_type" data="FULL"/>
<ie:param name="auto_navigate" data="true"/>
<ie:param name="attribute" data="describes,name,number,masterReference" delim=","/>
<ie:param name="group_out" data="objects"/>
</ie:webject>

ACCEPTED SOLUTION

Accepted Solutions

The direction should be either describes or describedBy

 

e.g. link from the part to doc

(the part is described by the doc)

 

<ie:webject name="Query-Links" type="OBJ">
	<ie:param name="instance" data="<%= wtadapterVMName %>" valueSeparator=";" delim=";" default="Windchill" />
	<ie:param name="object_ref" data="VR:wt.part.WTPart:605752690"/>
	<ie:param name="TYPE" data="wt.part.WTPartDescribeLink"/>
	<ie:param name="DIRECTION" data="describedBy"/>
	<ie:param name="output_type" data="FULL"/>
</ie:webject>

 

 

 e.g. link from the doc to the part

(the doc describes the part)

 

<ie:webject name="Query-Links" type="OBJ">
	<ie:param name="instance" data="<%= wtadapterVMName %>" valueSeparator=";" delim=";" default="Windchill" />
	<ie:param name="object_ref" data="VR:wt.doc.WTDocument:1249683439"/>
	<ie:param name="TYPE" data="wt.part.WTPartDescribeLink"/>
	<ie:param name="DIRECTION" data="describes"/>
	<ie:param name="output_type" data="FULL"/>
</ie:webject>

 

 

View solution in original post

3 REPLIES 3

Hi @AD_10574558 

Thank you for your question. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant. It sometimes helps to have screenshots to better understand what you are trying to do.

 

Best regards,

Catalina
PTC Community Moderator

The direction should be either describes or describedBy

 

e.g. link from the part to doc

(the part is described by the doc)

 

<ie:webject name="Query-Links" type="OBJ">
	<ie:param name="instance" data="<%= wtadapterVMName %>" valueSeparator=";" delim=";" default="Windchill" />
	<ie:param name="object_ref" data="VR:wt.part.WTPart:605752690"/>
	<ie:param name="TYPE" data="wt.part.WTPartDescribeLink"/>
	<ie:param name="DIRECTION" data="describedBy"/>
	<ie:param name="output_type" data="FULL"/>
</ie:webject>

 

 

 e.g. link from the doc to the part

(the doc describes the part)

 

<ie:webject name="Query-Links" type="OBJ">
	<ie:param name="instance" data="<%= wtadapterVMName %>" valueSeparator=";" delim=";" default="Windchill" />
	<ie:param name="object_ref" data="VR:wt.doc.WTDocument:1249683439"/>
	<ie:param name="TYPE" data="wt.part.WTPartDescribeLink"/>
	<ie:param name="DIRECTION" data="describes"/>
	<ie:param name="output_type" data="FULL"/>
</ie:webject>

 

 

AD_10574558
4-Participant
(To:rhart)

Hello @rhart, Thank you very much for the response! 

 Similar to "DescribeBy" attribute, "DescribeDoc" reference attribute also shown in logical attribute report, that's why I used it to fetch document form part

AD_10574558_1-1739337665538.png

Not sure why Windchill is still showing it, as it looks like it is deprecated or not working for direction parameter. If I missed anything or any understanding please let me know.
Can you please also let me know why wt.part.MasterIteration is not working?

 

Announcements


Top Tags