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

Login popup fails to load, defaults.js 404 error #1408

Open
predogma opened this issue Sep 27, 2018 · 3 comments
Open

Login popup fails to load, defaults.js 404 error #1408

predogma opened this issue Sep 27, 2018 · 3 comments

Comments

@predogma
Copy link

predogma commented Sep 27, 2018

Following tutorial in chapter 1:

https://github.com/Alfresco/Aikau/blob/release-1.0.101.15/tutorial/chapters/Tutorial1.md

The home page is blank and there is 404 error regarding defaults.js page.

2018-09-27_16-04-59

The expectation is this which you see if using aikau versions < 1.0.101.10

2018-09-27_16-05-52

There was a modification to aikau to adjust for share/page services path not accessible, this was implemented in version 1.0.101.10 aikau. The archetype project pom lays down 1.0.101.15, the current aikau version is 1.0.105 (regardless any version you set in your pom > 1.0.101.9 will have this issue)

The tutorial project is missing a correction, to adjust for that change.

FIX

in src/main/webapp/WEB-INF/urlrewrite.xml

add rule:

^/noauth/(.*) /page/$1

in src/main/webapp/WEB-INF/web.xml

add the filter mapping:

UrlRewriteFilter
/noauth/*

mvn clean install
mvn jetty:run

@vincent-ks2
Copy link

I followed the tutorial, applied the fix and still face the issue described above but after applying the fix, a servlet exception appears in log: (aikau 1.0.101.15 in POM.xml).

Any idea ?

SEVERE: Servlet.service() for servlet Spring MVC Dispatcher Servlet threw exception
javax.servlet.ServletException: Could not resolve view with name 'noauth/1_0_101_15/defaults' in servlet with name 'Spring MVC Dispatcher Servlet'
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1198)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1001)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:743)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
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:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2549)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2538)
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:748)

@mickbird
Copy link

mickbird commented Apr 2, 2019

I followed the tutorial, applied the fix and still face the issue described above but after applying the fix, a servlet exception appears in log: (aikau 1.0.101.15 in POM.xml).

Any idea ?

Got the same issue.
Changing the rule from "^/noauth/(.)" to "/noauth/(.)" fixed it.

@vincent-ks2
Copy link

vincent-ks2 commented Apr 2, 2019

Thanks for your feedback. You're right.
The config to add;
urlrewrite.xml
<rule>
<from>/noauth/(.*)</from>
<to>/page/$1</to>
</rule>

web.xml
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/noauth/*</url-pattern>
</filter-mapping>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants