我正在尝试将saiku用户界面与我的自定义Web应用程序(例如x.com)集成。这与部署在其他地方的saiku服务器通信(例如y.com)
我修改了安全设置,以便匿名对用户进行身份验证,我使用这些更改来应用程序上下文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":["flatted"],"connect":["foodmart"],"曲库":["FoodMart"],"cube":["HR"],"type":["QM"]}'超文本传输协议://saiku/rest/saiku/admin/query/3A956804-01EC-6B3D-A8B9-31EEB8CC2747
我得到了这样的回应
catalina. out说
2014-01-01 17:50:09,877 DEBUG[org.saiku.web.rest资源.QueryResource]TRACK /query/3A956804-01EC-6B3D-A8B9-31EEB8CC2747POST xml:false但当我尝试使用相同的查询
curl-XGET超文本传输协议://saiku/rest/saiku/admin/query/3A956804-01EC-6B3D-A8B9-31EEB8CC2747
我得到“没有找到使用名称的查询”
org.saiku.service.util.exception.SaikuServiceException: No query found using name: 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(<generated>) 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(<generated>) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 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.AbstractResourceMethodDispatchProvider$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)
这里出了什么问题?
发生这种情况是因为没有会话上下文。通过模拟从我的Web服务登录来解决问题!