Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hello, I have been demoing the otk java examples and decided to create my own project.
My custom action listener class is working fine within the otkexamples project.
Now that I created my own project, I am having issues in my main class. I practically copied and pasted the structure of otkExamplesmain.java but removed all the example methods.
The exception is throwing when trying to get the current session on launch when setting up the ribbon commands. I must have missed something when setting up my project but cannot figure out what that is.
Exception caught: java.lang.NullPointerException
com.ptc.cipjava.CIPRemoteApp.getTransport(CIPRemoteApp.java:40)
private void SetupRibbonCommands()
{
try
{
System.out.println("Get Session");
session = pfcSession.GetCurrentSession();
wSession = (WSession)session;
wSession.RibbonDefinitionfileLoad(ribbonFile);
//startCreoson();
addAbasCommands();
}
Solved! Go to Solution.
After playing around, and comparing the contents of each jar, there was something off in my artifacts settings. I noticed it was packaging the external otk libraries in with the jar, I'm not sure why. It's runnning correctly now that the otk library is not packaged in the jar. I'm not sure what the main issues were in intellij and if someone could comment on that it would be great.
Library settings.
Artifact settings
etc
After playing around, and comparing the contents of each jar, there was something off in my artifacts settings. I noticed it was packaging the external otk libraries in with the jar, I'm not sure why. It's runnning correctly now that the otk library is not packaged in the jar. I'm not sure what the main issues were in intellij and if someone could comment on that it would be great.
Library settings.
Artifact settings
etc
session = pfcGlobal.GetProESession();