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

CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

SOLVED
Regular Member

CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

We have integrated PostgreSQL (version 9.4/9.5)  with Thingworx7.2 . We are getting below error when calling CreateDashboard

Resources["DashboardFunctions"].CreateDashboard(params);


NOTE: Please note that this works fine with Thingworx 7.2 WITHOUT PostgreSQL

Error =>

: Wrapped java.lang.Exception: Import Failed: Not authorized for Create Cause: Import Failed: Not authorized for

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

there were permissions defined in data table.
The data table was not imported correctly.

After importing the issue is resolved.

14 REPLIES 14

Re: CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

Are you logged in as  Administrator?

Re: CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

Hi Thomas, could you please clarify what you meant with integrated PostgreSQL version 9.4 & 9.5? Which version is used as the persistence provider for ThingWorx 7.2?

What sort of user did you use to create the dashboard?

Re: CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

We are using  PostgresSQL 9.5 as thingsworx storage.

We are using  ThingworxPersistenceProvider (Persistence provider package :).

CreateDashboard is being executed by user .

Please note that it works fine with Thingworx 7.2 with Neo4j as ThingworxPersistenceProvider .

Re: CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

PostgreSQL 9.5 is currently not supported. Please install the latest minor version of 9.4 (9.4.12)

Re: CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

We have different instance, which is configured to 9.4 and getting same below error

Wrapped java.lang.Exception: Import Failed: Not authorized for Create Cause: Import Failed: Not authorized for Create]

Re: CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

Is the User an Administrator? Because otherwise this is just a permission issue.

Highlighted

Re: CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

User has permission to execute "CreateDashboard", user is not Administrator

Please note that it works fine with Thingworx 7.2 with Neo4j as ThingworxPersistenceProvider .

Re: CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

Please check if it works with Administrator user, then we will look into permissions layer by layer

Re: CreateDashboard fails in Thingworx 7.2 (PostgreSQL)

It works fine with Administrator user.

Below is the stack trace of normal user.

Error= 

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

 

  1. com.thingworx.common.exceptions.InvalidRequestException: Not authorized for Create

 

        at com.thingworx.system.managers.BaseManager.generateSecurityException(BaseManager.java:499)

 

        at com.thingworx.system.managers.BaseManager.checkDesignTimePermission(BaseManager.java:458)

 

        at com.thingworx.system.managers.BaseManager.checkCreatePermission(BaseManager.java:503)

 

        at com.thingworx.system.managers.BaseManager.createEntity(BaseManager.java:224)

 

        at com.thingworx.contentmanagement.ImportProcessor.processImport(ImportProcessor.java:471)

 

        at com.thingworx.resources.dashboards.DashboardFunctions.CreateDashboard(DashboardFunctions.java:96)

 

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

 

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

 

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

 

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

 

        at com.thingworx.common.processors.ReflectionProcessor.processService(ReflectionProcessor.java:261)

 

        at com.thingworx.handlers.ReflectionServiceHandler.processService(ReflectionServiceHandler.java:48)

 

        at com.thingworx.entities.helpers.InternalServiceHelper.processServiceRequestDirect(InternalServiceHelper.java:115)

 

        at com.thingworx.entities.helpers.InternalServiceHelper.processServiceRequest(InternalServiceHelper.java:71)

 

        at com.thingworx.entities.ServiceProviderEntity.processServiceRequest(ServiceProviderEntity.java:53)

 

        at com.thingworx.dsl.engine.adapters.VirtualFunction.call(VirtualFunction.java:145)

 

        at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)

 

        at org.mozilla.javascript.gen.PopulateDashboardByDefault_543._c_script_0(PopulateDashboardByDefault:7)

 

        at org.mozilla.javascript.gen.PopulateDashboardByDefault_543.call(PopulateDashboardByDefault)

 

        at org.mozilla.javascript.gen.PopulateDashboardByDefault_543.exec(PopulateDashboardByDefault)

 

        at com.thingworx.dsl.engine.DSLProcessor.executeService(DSLProcessor.java:167)

 

        at com.thingworx.dsl.DSLServiceHandler.processService(DSLServiceHandler.java:37)

 

        at com.thingworx.things.Thing.processServiceRequestDirect(Thing.java:6657)

 

        at com.thingworx.things.Thing.processServiceRequest(Thing.java:6575)

 

        at com.thingworx.dsl.engine.adapters.VirtualFunction.call(VirtualFunction.java:145)

 

        at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)

 

        at org.mozilla.javascript.gen.SetCurrentMainDashboard_498._c_script_0(SetCurrentMainDashboard:2)

 

        at org.mozilla.javascript.gen.SetCurrentMainDashboard_498.call(SetCurrentMainDashboard)

 

        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)

 

        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3090)

 

        at org.mozilla.javascript.gen.SetCurrentMainDashboard_498.call(SetCurrentMainDashboard)

 

        at org.mozilla.javascript.gen.SetCurrentMainDashboard_498.exec(SetCurrentMainDashboard)

 

        at com.thingworx.dsl.engine.DSLProcessor.executeService(DSLProcessor.java:167)

 

        at com.thingworx.dsl.DSLServiceHandler.processService(DSLServiceHandler.java:37)

 

        at com.thingworx.things.Thing.processServiceRequestDirect(Thing.java:6657)

 

        at com.thingworx.things.Thing.processAPIServiceRequest(Thing.java:6595)

 

        at com.thingworx.webservices.BaseService.handleInvoke(BaseService.java:2931)

 

        at com.thingworx.webservices.BaseService.service(BaseService.java:327)

 

        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:111)

 

        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:370)

 

        at com.thingworx.security.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:150)

 

        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:32)

 

        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:119)

 

        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:52)

 

        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:106)

 

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

 

        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:616)

 

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

 

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)

 

        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)

 

        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)

 

        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)

 

        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)

 

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

 

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

 

        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

 

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