Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

push error #17

Closed
danielvoilaLEGO opened this issue Mar 22, 2021 · 5 comments
Closed

push error #17

danielvoilaLEGO opened this issue Mar 22, 2021 · 5 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@danielvoilaLEGO
Copy link

Hello guys,

I manged to set up my Git Thing but on push I receive the below error. On pull everything works great. I tried also with different git repositories but none of them works.
PS: the token has rights to do it.

java.lang.ClassCastException: com.thingworx.types.primitives.StringPrimitive cannot be cast to com.thingworx.types.primitives.BooleanPrimitive
at gb.GitBackupTemplate.Push(GitBackupTemplate.java:221)
at sun.reflect.GeneratedMethodAccessor140.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.thingworx.common.processors.ReflectionProcessor.processService(ReflectionProcessor.java:230)
at com.thingworx.handlers.ReflectionServiceHandler.processService(ReflectionServiceHandler.java:50)
at com.thingworx.handlers.ServiceHandlerBase.processServiceWithMetrics(ServiceHandlerBase.java:48)
at com.thingworx.things.Thing.processServiceRequestDirect(Thing.java:8151)
at com.thingworx.things.Thing.processAPIServiceRequest(Thing.java:8088)
at com.thingworx.webservices.BaseService.handleInvoke(BaseService.java:3304)
at com.thingworx.webservices.BaseService.service(BaseService.java:489)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.thingworx.security.contenttype.ContentTypeFilter.doFilter(ContentTypeFilter.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.thingworx.security.contenttype.ContentLengthFilter.doFilter(ContentLengthFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.thingworx.security.filter.ValidationFilter.doFilter(ValidationFilter.java:22)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.thingworx.security.authentication.AuthenticationFilter.propagateRequest(AuthenticationFilter.java:689)
at com.thingworx.security.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:229)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
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:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.thingworx.security.filter.ClickjackFilter.doFilter(ClickjackFilter.java:208)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.thingworx.security.filter.HttpResponseHeadersFilter.doFilter(HttpResponseHeadersFilter.java:172)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

@cbadici
Copy link

cbadici commented Mar 23, 2021

Hi, The push operation has been tested and it works. I would like to know more details about your scenario and how you configured your Git Backup Thing:
-Are you trying to push some files to an empty Git repository or to a repository where you already have some files? If you already have some files in the repository, you first need to pull them in thingworx...add your additional/modified files and then push it.
-What repository path are you using in your ThingWorx repository ? Try using a path like "/myproject" instead of the root path of the ThingWorx repository
-Have you tested the Push operation in the Mashup or also by executing the service in the Git Backup Thing?

@danielvoilaLEGO
Copy link
Author

Hi, The push operation has been tested and it works. I would like to know more details about your scenario and how you configured your Git Backup Thing:
-Are you trying to push some files to an empty Git repository or to a repository where you already have some files? If you already have some files in the repository, you first need to pull them in thingworx...add your additional/modified files and then push it.
-What repository path are you using in your ThingWorx repository ? Try using a path like "/myproject" instead of the root path of the ThingWorx repository
-Have you tested the Push operation in the Mashup or also by executing the service in the Git Backup Thing?

  1. I already have some files on the git. I did the pull first, and the pull works fine.
  2. I am already using a path like /entities instead of root path
  3. I tested Push operation in the Mashup but also in the Git Backup Thing. - same error

@cbadici
Copy link

cbadici commented Mar 23, 2021

Thanks for sharing the information. One additional questions: are you using the latest Git extension on ThingWorx 9+ ? Please also share the version of the extension that you are using.

The error you provided can appear if the UserExtensions thing shape has not been initialized correctly. It is supposed to be initialized when you first open the Git Main Mashup. If you edit any user inside the Composer, can you let me know if it has the property "UseGitCommitUserValues" in the User Extensions?

@danielvoilaLEGO
Copy link
Author

Thanks for sharing the information. One additional questions: are you using the latest Git extension on ThingWorx 9+ ? Please also share the version of the extension that you are using.

The error you provided can appear if the UserExtensions thing shape has not been initialized correctly. It is supposed to be initialized when you first open the Git Main Mashup. If you edit any user inside the Composer, can you let me know if it has the property "UseGitCommitUserValues" in the User Extensions?

  1. Yes, I am using the latest Git Extension, version 4.1.0.

  2. I am not that expert in TWX. Maybe you can give me more details how can I do this?

@cbadici cbadici added question Further information is requested wontfix This will not be worked on labels Mar 24, 2021
@cbadici
Copy link

cbadici commented Mar 24, 2021

In the ThingWorx Composer, click on Browse, click on Users and then select a User. Go to the UserExtensions tab and verify the list of properties displayed. There should be a property called "UseGitCommitUserValues"
I have attached a screenshot.

Also, I will close this issue since it doesn't represent a bug and the push operation has been verified and works as expected. If you have further questions about how to use the Git extension, you can contact me by e-mail, which is displayed in my profile.
image

@cbadici cbadici closed this as completed Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants