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

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

Failed to import a database thing

htran-21
15-Moonstone

Failed to import a database thing

Hi,

 

I have failed to import a database Thing, that is exported from a DEV system, into a QA system. That was failed because of password fields in the XML exported file. What is the best way to migrate changes in a database Thing from a system to another system? Both systems are running the same version 7.4.19-b262

 

Any suggestion would be greatly appreciated!

 

My Bests,

Hung Tran

1 ACCEPTED SOLUTION

Accepted Solutions
htran-21
15-Moonstone
(To:vangne)

Hi @vangne

 

The suggested solution "binary mode" does not work cause that will lead to lose the existing configuration of these Things on the target system. I've written a small tool that help me migrate changes without losing any configuration.

 

Sincerely,

Hung Tran

View solution in original post

6 REPLIES 6

@htran-21 Are you seeing any specific errors in the logs for failed import?

htran-21
15-Moonstone
(To:vangne)

Hi @vangne 

 

The error is 406 Not Acceptable.

 

2019-08-27 03:20:20.484-0500 [L: ERROR] [O: E.c.t.w.Importer] [I: ] [U: tranh] [S: ] [T: http-nio-192.168.230.139-443-exec-32] [message: Conversion Error on Field password : Unable To Convert From com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl to PASSWORD]

 

2019-08-27 03:20:20.484-0500 [L: ERROR] [O: E.c.t.w.Importer] [I: ] [U: tranh] [S: ] [T: http-nio-192.168.230.139-443-exec-32] [message: Conversion Error on Field password : Unable To Convert From com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl to PASSWORD] java.lang.Exception: Conversion Error on Field password : Unable To Convert From com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl to PASSWORD
	at com.thingworx.types.collections.ValueCollection.fromXMLTypedImport(ValueCollection.java:583)
	at com.thingworx.types.collections.ValueCollectionList.fromXMLTypedImport(ValueCollectionList.java:315)
	at com.thingworx.types.ConfigurationTable.fromXMLImport(ConfigurationTable.java:201)
	at com.thingworx.types.collections.ConfigurationTableCollection.fromXMLImport(ConfigurationTableCollection.java:362)
	at com.thingworx.entities.utils.EntitySerializationUtilities.readConfigurationDataFromXMLImport(EntitySerializationUtilities.java:79)
	at com.thingworx.entities.RootEntity.readRootEntityFromXMLGeneric(RootEntity.java:3827)
	at com.thingworx.entities.RootEntity.readRootEntityFromXMLImport(RootEntity.java:3841)
	at com.thingworx.things.Thing.fromXMLImport(Thing.java:8889)
	at com.thingworx.system.managers.ThingManager.fromXMLImport(ThingManager.java:129)
	at com.thingworx.entities.collections.RootEntityCollection.fromXML(RootEntityCollection.java:454)
	at com.thingworx.contentmanagement.XmlEntityUnmarshaller.getRootEntityCollectionByName(XmlEntityUnmarshaller.java:52)
	at com.thingworx.contentmanagement.Import.parseImportDocument(Import.java:42)
	at com.thingworx.contentmanagement.Import.parseImportDocument(Import.java:23)
	at com.thingworx.webservices.Importer.processImport(Importer.java:311)
	at com.thingworx.webservices.Importer.importFromAttachment(Importer.java:195)
	at com.thingworx.webservices.Importer.service(Importer.java:153)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at com.thingworx.security.contenttype.ContentTypeFilter.doFilter(ContentTypeFilter.java:109)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at com.thingworx.security.filter.ValidationFilter.doFilter(ValidationFilter.java:22)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at com.thingworx.security.authentication.AuthenticationFilter.propagateRequest(AuthenticationFilter.java:479)
	at com.thingworx.security.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:172)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at com.thingworx.security.filter.ClickjackFilter.doFilter(ClickjackFilter.java:188)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at com.thingworx.security.filter.ProhibitIfNotLeaderFilter.doFilter(ProhibitIfNotLeaderFilter.java:120)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at com.thingworx.security.filter.HttpResponseHeadersFilter.doFilter(HttpResponseHeadersFilter.java:173)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)

 

I tried to export the same database thing from both systems into XML files, and compare, the different section is password tag. I did manually merge changes without password tag, and it works. However, that way is a pain.

 

My Bests,

Hung Tran

 

@htran-21  Please check this article for more info on this issue.

 

Thanks,

Vibhuti

 

 

htran-21
15-Moonstone
(To:vangne)

Hi @vangne 

 

Thank you, however the configuration setup is lost. Is there any way that lets me migrate changes without losing of configuration setup? Those systems have a different configuration setup on that database Thing.

 

My Bests,

Hung Tran

@htran-21  

If you were able to resolve your issue, please post it here and mark it as the Accepted Solution for the benefit of others on the community.  If you are still experiencing issues, please check below feedback.

Have you had an opportunity to take a look at these articles?

1. https://www.ptc.com/en/support/article?n=CS297147

2. https://www.ptc.com/en/support/article?n=CS285629

 

If this does not resolve your issue, then please open a support case for further investigation.

 

Thanks,

Vibhuti

htran-21
15-Moonstone
(To:vangne)

Hi @vangne

 

The suggested solution "binary mode" does not work cause that will lead to lose the existing configuration of these Things on the target system. I've written a small tool that help me migrate changes without losing any configuration.

 

Sincerely,

Hung Tran

Top Tags