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

Import types and attributes from one wc environment to another

SOLVED
AntonBagryanov
Visitor

Import types and attributes from one wc environment to another

Hi!

I have exported all types and them attributes (all soft types for WTPart) through windchill wt.load.LoadFromFile utility. But when export is going on I have an exception like following:

com.ptc.core.lwc.server.TypeDefinitionLoader wcadmin - (endProcessTypeDefinition):

wt.util.WTException: Attributes ' —' and 'null' on wt.part.WTPartreferr to the same iba definition.

at com.ptc.core.lwc.server.cache.AttValidatorHelper.validateDuplicateIbaUsage(AttValidatorHelper.java:880)

at com.ptc.core.lwc.server.cache.AttValidatorHelper.validateAllAtts(AttValidatorHelper.java:859)

at com.ptc.core.lwc.server.cache.AttHelper.persistAttDefs(AttHelper.java:216)

at com.ptc.core.lwc.server.cache.TypeDefinitionManager.persistTypeDef(TypeDefinitionManager.java:895)

at com.ptc.core.lwc.server.cache.TypeDefinitionManager.updateTypeDef(TypeDefinitionManager.java:1509)

at com.ptc.core.lwc.server.StandardTypeDefinitionService.updateTypeDef(StandardTypeDefinitionService.java:193)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at wt.services.ServiceFactory$ServerInvocationHandler.invoke(ServiceFactory.java:399)

at $Proxy12.updateTypeDef(Unknown Source)

at com.ptc.core.lwc.server.TypeDefinitionLoader.endProcessTypeDefinition(TypeDefinitionLoader.java:804)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at wt.ixb.handlers.netmarkets.CsvIxHandler.invokeLoad(CsvIxHandler.java:543)

at wt.ixb.handlers.netmarkets.CsvIxHandler.createObject(CsvIxHandler.java:239)

at wt.ixb.publicforhandlers.ClassExporterImporterTemplate.importElement(ClassExporterImporterTemplate.java:415)

at wt.ixb.publicforhandlers.ClassExporterImporterTemplate.importElements(ClassExporterImporterTemplate.java:539)

at wt.ixb.publicforapps.Importer.importElements(Importer.java:1456)

at wt.ixb.publicforapps.Importer.importElement(Importer.java:1428)

at wt.ixb.publicforapps.Importer.doRealImport(Importer.java:1193)

at wt.ixb.publicforapps.Importer.finalizeImport(Importer.java:507)

at wt.load.StandardLoadService.importData(StandardLoadService.java:825)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at wt.method.MethodResultWriter.writeExternal(MethodResultWriter.java:151)

at wt.method.MethodResult.writeExternal(MethodResult.java:226)

at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1426)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)

at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:313)

at sun.rmi.transport.Transport$1.run(Transport.java:159)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:155)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Import types and attributes from one wc environment to another

Hi guys, thanks for your replys. I have solved it. The problem was there: in the wnc env, where i try to import data WTPart already have an attribute that I want to import. I have add this attribute 2 months ago and forgot about it. After deleting it, import have went nice.

View solution in original post

7 REPLIES 7

Re: Import types and attributes from one wc environment to another

Sorry, I have this exception when import is going on

Re: Import types and attributes from one wc environment to another

Hello!

Not sure if this will help but we have found out in Windchill 10.2 M020 CPS4 you need to have the below settings in order to get it right:

<csvmode>3</csvmode>

<csvExportAncestorTypes>true</csvExportAncestorTypes>

Best regards,

Peter

Re: Import types and attributes from one wc environment to another

Peter, what this mode will give?

Re: Import types and attributes from one wc environment to another

Hello!

See below desciption for the different modes:

• 0—All localized values will be exported as part of the XML file. This is the default.

•1—All localized values will be exported into rbInfo files.

•2—Localized values on modeled types and attributes are excluded from the rbInfo files.

•3—Localized values on modeled types and attributes are excluded from the rbInfo files, and any invalid data, such as base definition objects that have been filtered from a type, is excluded. This prevents the subsequent import from failing because of the invalid data. (Only applies to systems which have been upgraded from releases prior to 10.2.)

Best regards,

Peter

Re: Import types and attributes from one wc environment to another

Thanks Peter!

Re: Import types and attributes from one wc environment to another

Hi,

Most important when you are using this tool, attributes should exsists already on the target System! Only then you are able to import types and layouts of the types to the target system.

Maybe it will help you!

Regards,

Vytautas

Re: Import types and attributes from one wc environment to another

Hi guys, thanks for your replys. I have solved it. The problem was there: in the wnc env, where i try to import data WTPart already have an attribute that I want to import. I have add this attribute 2 months ago and forgot about it. After deleting it, import have went nice.

View solution in original post

Announcements