2

我正在尝试将 saiku-ui 与我的自定义 Web 应用程序(比如 x.com)集成。这与部署在其他地方的 saiku-server 通信(比如 y.com)

我已经修改了安全设置,以便对用户进行匿名身份验证,这是我使用对application-context-saiku-webapp.xml 的这些更改获得的

<security:http auto-config='true' access-denied-page="/login.jsp">
<security:intercept-url pattern="/serverdocs/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:intercept-url pattern="/rest/saiku/session*" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:intercept-url pattern="/rest/saiku/session/" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:intercept-url pattern="/rest/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:intercept-url pattern="/json/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />

我面临的问题是我无法匿名保存查询

当我打电话时,

curl -X POST -H "Content-Type: application/json" --data '{"schema":["FoodMart"],"formatter":["flattened"],"connection":["foodmart"], “目录”:[“FoodMart”],“立方体”:[“HR”],“类型”:[“QM”]}' http:///saiku/rest/saiku/admin/query/3A956804-01EC- 6B3D-A8B9-31EEB8CC2747

我得到这个回应

{"uniqueName":"[foodmart].[FoodMart].[FoodMart].[HR].[3A956804-01EC-6B3D-A8B9-31EEB8CC2747]","name":"3A956804-01EC-6B3D-A8B9-31EEB8CC2747" ,"cube":{"uniqueName":"[foodmart].[FoodMart].[FoodMart].[HR]","name":"HR","connectionName":"foodmart","catalogName":"FoodMart ","schemaName":"FoodMart","caption":"HR","visible":true,"cubeName":"[HR]"},"mdx":"SELECT\nFROM [HR]","type ":"QM","properties":{"saiku.olap.query.limit":"true","saiku.olap.query.filter":"true","org.saiku.query.explain":"真","org.saiku.connection.scenario":"假","saiku.olap.query.nonempty":"true","saiku.olap.query.nonempty.rows":"true","saiku.olap.query.nonempty.columns":"true","saiku.olap .query.drillthrough":"true"},"saikuAxes":[{"uniqueName":"COLUMNS","name":"COLUMNS","dimensionSelections":[],"ordinal":0,"sortOrder": null,"sortLiteral":null,"limitFunction":null,"limitFunctionN":null,"limitFunctionSortLiteral":null,"filterCondition":null},{"uniqueName":"ROWS","name":"ROWS", "dimensionSelections":[],"ordinal":1,"sortOrder":null,"sortLiteral":null,"limitFunction":null,"limitFunctionN":null,"limitFunctionSortLiteral":null,"filterCondition":null},{"uniqueName":"FILTER","name":"FILTER","dimensionSelections":[],"ordinal":-1,"sortOrder":null," sortLiteral":null,"limitFunction":null,"limitFunctionN":null,"limitFunctionSortLiteral":null,"filterCondition":null}]}

和 catalina.out 说

2014-01-01 17:50:09,877 调试 [org.saiku.web.rest.resources.QueryResource] 跟踪 /query/3A956804-01EC-6B3D-A8B9-31EEB8CC2747 POST xml:false 但是当我尝试获取相同的查询时使用

curl -XGET http:///saiku/rest/saiku/admin/query/3A956804-01EC-6B3D-A8B9-31EEB8CC2747

我收到“未找到使用名称的查询”

org.saiku.service.util.exception.SaikuServiceException:找不到使用名称的查询:3A956804-01EC-6B3D-A8B9-31EEB8CC2747
org.saiku.service.olap.OlapQueryService.getIQuery(OlapQueryService.java:1015)
org.saiku.service.olap.OlapQueryService.getQuery(OlapQueryService.java:175)
org.saiku.web.rest.resources.QueryResource.getQuery(QueryResource.java:126)
org.saiku.web.rest.resources.QueryResource$$FastClassByCGLIB$$e130f1a0.invoke(<生成>)
net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:617)
org.saiku.web.rest.resources.QueryResource$$EnhancerByCGLIB$$e19ca8a4.getQuery(<生成>)
sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
com.sun.jersey.server.impl.model.method.dispatch.Abs​​tractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)

这里出了什么问题?

4

1 回答 1

0

发生这种情况是因为没有会话上下文。通过模拟从我的 Web 服务登录来解决问题!

于 2014-01-13T16:36:24.830 回答