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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to save a new EquivalenceLink?

TS_10782016
10-Marble

How to save a new EquivalenceLink?

Hi, 

 

I created an EquivalenceLink by passing an upstream WTPart (original) and a downstream WTPart (copy). The two parts are valid and already stored in the database. When I tried to save it, it showed an error. 

 

Here is the code.

-------------------------------------------------------------------

EquivalenceLink newLink = EquivalenceLink.newEquivalenceLink(original, copy);

PersistenceHelper.manager.store(newLink); // Error occurs there

-------------------------------------------------------------------

Here is the error message

-------------------------------------------------------------------

ERROR : wt.method.MethodContextMonitor.contexts.rmi wcadmin - 2024-02-22 13:54:19.202 +0900, -camsbqzd5;lswr0uex;13464;kyeh5p;1, -, -, -, wcadmin, 172.24.163.107, com.acme.APIs.BomTransformHelper$Server, remoteDuplicatePart, , 0, 102, 0.2574459, 44, 0.2534846, 1.15625, 1.5911344 wt.util.WTException: java.lang.NullPointerException
Nested exception: java.lang.NullPointerException
at wt.associativity.StandardBomService$DataAccess.findAllLinksWithMatchingEquivalenceIdentifier(StandardBomService.java:5153)
at wt.associativity.StandardBomService.populateEquivalenceIdentifier(StandardBomService.java:3176)
at wt.associativity.StandardBomService$2.notifyVetoableMultiObjectEvent(StandardBomService.java:2508)
at wt.events.StandardKeyedEventBranch.intDispatchEvent(StandardKeyedEventBranch.java:306)
at wt.events.StandardKeyedEventBranch.dispatchVetoableEvent(StandardKeyedEventBranch.java:255)
at wt.events.StandardKeyedEventDispatcher.intDispatchEvent(StandardKeyedEventDispatcher.java:304)
at wt.events.StandardKeyedEventDispatcher.dispatchVetoableEvent(StandardKeyedEventDispatcher.java:228)
at wt.services.StandardManagerService.intDispatchVetoableEvent(StandardManagerService.java:410)
at wt.services.StandardManagerService.dispatchVetoableEvent(StandardManagerService.java:303)
at wt.fc.StandardPersistenceManager.dispatchVetoableEvent(StandardPersistenceManager.java:2972)
at wt.fc.StandardPersistenceManager.dispatchVetoableEvent(StandardPersistenceManager.java:2952)
at wt.fc.StandardPersistenceManager.store(StandardPersistenceManager.java:1429)
at wt.fc.StandardPersistenceManager.store(StandardPersistenceManager.java:534)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at wt.services.ServiceFactory$ServerInvocationHandler.invoke(ServiceFactory.java:399)
at com.sun.proxy.$Proxy27.store(Unknown Source)
at com.acme.APIs.BomTransformHelper$Server.remoteDuplicatePart(BomTransformHelper.java:112)

-------------------------------------------------------------------

 

I also tried "PersistenceHelper.manager.save()", and it gives me the same error.

 

Does someone know the reason of this error? Thank you.

 

 

 

 

ACCEPTED SOLUTION
1 REPLY 1
Announcements

Top Tags