glassfish - Deploying multiple Saiku applications in single application server: REST collision -
glassfish - Deploying multiple Saiku applications in single application server: REST collision -
in the glassfish application server deployed 1 instance of saiku.
rest back-end: saiku
front-end: saiku-ui
so, create next request:
http://external_ip_here/saiku-ui/
then pass authorization, create olap cubes need , works fine.
the problem begins when seek install instance of saiku in same application server, in different domain (let's say, domain
).
i renamed front-end part , rest back- end follows:
rest back- end: saiku-enterprise
front-end: analytic-ui
accordingly, ajax calls in javascript , url mapping replaced /saiku/
/saiku-enterprise/
applicationcontext-saiku-enterprise.xml (originally named applicationcontext-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_fully" /> <security:intercept-url pattern="/json/**" access="is_authenticated_fully" /> <security:intercept-url pattern="/**" access="is_authenticated_anonymously" /> <security:logout logout-url="/logout"/> <security:http-basic/> </security:http> <import resource="applicationcontext-spring-security.xml"/>
part of web.xml:
... <servlet> <servlet-name>jersey2</servlet-name> <servlet-class>org.codehaus.enunciate.modules.jersey.enunciatejerseyservletcontainer</servlet-class> <init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>org.saiku.web</param-value> </init-param> <init-param> <param-name>com.sun.jersey.spi.container.containerrequestfilters</param-name> <param-value>com.sun.jersey.api.container.filter.postreplacefilter</param-value> </init-param> <init-param> <param-name>org.codehaus.enunciate.modules.jersey.config.servletpath</param-name> <param-value>/rest</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>jersey2</servlet-name> <url-pattern>/rest/saiku/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>jersey2</servlet-name> <url-pattern>/rest/saiku/session</url-pattern> </servlet-mapping> ...
i reloaded new instance of saiku (just create changes in file \domain\applications\saiku-enterprise\.reload
- after saiku restarts automatically)
next create request:
http://external_ip_here/analytic-ui/
and error (i can see in fifebug or google chrome console):
http status 404: http://external_ip_here/saiku-enterprise/rest/saiku/session?_=1414754157176
accordingly, new instance of saiku not work.
in worked configuration(without renaming) resource available:
/saiku/rest/saiku/session?_=1414761814333 remote address:external_ip_here:80 request url:http://external_ip_here/saiku/rest/saiku/session?_=1414761814333 request method:get status code:200 ok request headersview source accept:application/json, text/javascript, */*; q=0.01 accept-encoding:gzip,deflate,sdch accept-language:ru-ru,ru;q=0.8,en-us;q=0.6,en;q=0.4 connection:keep-alive content-type:application/x-www-form-urlencoded cookie:... host:external_ip_here referer:http://external_ip_here/saiku-ui/ user-agent:mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/38.0.2125.111 safari/537.36 x-requested-with:xmlhttprequest query string parametersview sourceview url encoded _:1.... response headersview source connection:keep-alive content-type:application/json date:fri, 31 oct 2014 13:23:17 gmt keep-alive:timeout=5, max=86 server:glassfish server open source edition 3.1 transfer-encoding:chunked x-powered-by:servlet/3.0 jsp/2.2 (glassfish server open source edition 3.1 java/sun microsystems inc./1.6)
if on client- side specify base_url == http://127.0.0.1:8080
, shown below:
/** * alter settings here */ var settings = { version: "saiku 2.5", biplugin: false, base_url: "http://127.0.0.1:8080", tomcat_webapp: "/saiku-enterprise", rest_mount_point: "/rest/saiku/", dimension_prefetch: true, error_logging: false, // number of erroneous ajax calls in row before ui cant recover error_tolerance: 3, query_properties: { 'saiku.olap.query.automatic_execution': 'true', 'saiku.olap.query.nonempty': 'true', 'saiku.olap.query.nonempty.rows': 'true', 'saiku.olap.query.nonempty.columns': 'true', 'saiku.ui.render.mode' : 'table' }, /* valid values cellset_formatter: * 1) flattened * 2) flat */ cellset_formatter: "flattened", // limits number of rows in result // 0 - no limit result_limit: 0, members_from_result: true, plugins: [ "chart" ], telemetry_server: 'http://telemetry.analytical-labs.com:7000', localstorage_expiration: 10 * 60 * 60 * 1000 /* 10 hours, in ms */ };
then error:
aborted: http://external_ip_here/analytic-ui/
the application starts endlessly reload..
in order link front-end , rest back- end added 2 beans, as recommended:
<bean id="platformbean" class="org.saiku.service.platformutilsservice"> <property name="path" value="../../../docroot/analytic-ui/js/saiku/plugins/"/> </bean> <bean id="inforesource" class="org.saiku.web.rest.resources.inforesource"> <property name="platformutilsservice" ref="platformbean"/> </bean>
but did not help.
the same error:
http status 404: http://external_ip_here/saiku-enterprise/rest/saiku/session?_=14...
in problem? grateful information. all.
i understood. in static resources should create changes in file settings.js
, shown below:
/** * alter settings here */ var settings = { version: "saiku 2.5", biplugin: false, base_url: "", tomcat_webapp: "/saiku-enterprise", rest_mount_point: "/rest/saiku/", dimension_prefetch: true, error_logging: true, // number of erroneous ajax calls in row before ui cant recover error_tolerance: 3, query_properties: { 'saiku.olap.query.automatic_execution': 'true', 'saiku.olap.query.nonempty': 'true', 'saiku.olap.query.nonempty.rows': 'true', 'saiku.olap.query.nonempty.columns': 'true', 'saiku.ui.render.mode' : 'table' }, /* valid values cellset_formatter: * 1) flattened * 2) flat */ cellset_formatter: "flattened", // limits number of rows in result // 0 - no limit result_limit: 0, members_from_result: true, plugins: [ "chart" ], telemetry_server: 'http://telemetry.analytical-labs.com:7000', localstorage_expiration: 10 * 60 * 60 * 1000 /* 10 hours, in ms */ };
ie specify appropriate context - front-end must point right rest back-end.
tomcat_webapp: "/saiku-enterprise",
changes anywhere else not necessary (besides applicationcontext-spring-security-jdbc.xml
if utilize it).
now ok.
rest glassfish saiku
Comments
Post a Comment