Skip to main content
12-Amethyst
August 21, 2023
Solved

Windchill Java Lang Error

  • August 21, 2023
  • 2 replies
  • 3440 views

I am trying to create more instances in a part with CREO, and then when i check in Windchil an error appears:

"java.lang.IllegalArgumentException 
Nested exception is: java.lang.IllegalArgumentException"

The "Java Lang" error appears too in other situations, without explanations, for example when I import a part to Windchill:

"java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap')"

We are at the beginning of the Windchill implementation. Does anyone know how to solve this problem?

 

 

Best answer by d_graham

I’d bet big money you have an attribute and a designated parameter with the same name and the the parameter is a String that Windchill is attempting to push its value into a Real Number (or Real Number w/Units attribute.

 

If this is what’s happening the OOTB way to solve it is to make sure the datatypes of the attribute and the parameter are the same.

There’s no way OOTB to change the datatype of an attribute. However, you can either delete the attribute and make a new one as a String.

Or a direct edit of the dB can be done but that requires really knowing what you’re doing.

And that’s not something I’d explain in detail here.

2 replies

avillanueva
23-Emerald I
23-Emerald I
August 21, 2023

Were there any attributes added to the WTPart object? Post your object init rules for Parts as well.

luiz.hnm12-AmethystAuthor
12-Amethyst
August 21, 2023

Yes, a new attribute was created for categorization of the parts. Sorry, but i don't have access to this init rules for Parts. But do you have a guess what the problem might be?

HelesicPetr
22-Sapphire II
22-Sapphire II
August 21, 2023

Hello @luiz.hnm 

The issue can be that designated parameters in models are different type then the attributes in Windchill. Designated parameters have to match with attributes in windchill database. Type and Attribute management is the right place where admin can check that. 

 

I would check configuration  with your administrator who should know what was set on the windchill side. 

 

PetrH

d_graham18-OpalAnswer
18-Opal
August 22, 2023

I’d bet big money you have an attribute and a designated parameter with the same name and the the parameter is a String that Windchill is attempting to push its value into a Real Number (or Real Number w/Units attribute.

 

If this is what’s happening the OOTB way to solve it is to make sure the datatypes of the attribute and the parameter are the same.

There’s no way OOTB to change the datatype of an attribute. However, you can either delete the attribute and make a new one as a String.

Or a direct edit of the dB can be done but that requires really knowing what you’re doing.

And that’s not something I’d explain in detail here.