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

Problem running Share in Jetty #83

Closed
mindthegab opened this issue Jul 20, 2014 · 5 comments
Closed

Problem running Share in Jetty #83

mindthegab opened this issue Jul 20, 2014 · 5 comments

Comments

@mindthegab
Copy link
Contributor

From ukdavo on April 17, 2012 12:15:11

What steps will reproduce the problem? 1. Create Alfresco AMP project with AMP archetype
2. Create Share project with Share archetype
3. Change value of 'alfresco.webapp.name' setting in 'src/main/properties/local/application.properties' to be 'alfresco-webapp' - done to match the context of the embedded Alfresco webapp
4. Run Alfresco with 'mvn integration-test -P webapp'
5. Run Share with 'mvn install -Prun' What is the expected output? What do you see instead? Expected: Successful login to Share

Actual: Authentication fails with following error:

[INFO] Configuring Jetty for project: Alfresco Share client
2012-04-17 17:08:18.554::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
[INFO] Context path = /share
[INFO] Tmp directory = determined at runtime
[INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
[INFO] Web overrides = none
[INFO] Starting jetty 6.1.21 ...
2012-04-17 17:08:18.615::INFO: jetty-6.1.21
2012-04-17 17:08:18.735::INFO: No Transaction manager found - if your webapp requires one, please configure one.
2012-04-17 17:08:19.005:/share:INFO: Initializing Spring root WebApplicationContext
2012-04-17 17:08:24.284:/share:INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
2012-04-17 17:08:24.330:/share:INFO: Initializing Spring FrameworkServlet 'Spring Surf Dispatcher Servlet'
2012-04-17 17:08:24.362::INFO: Started SelectChannelConnector@0.0.0.0:8081
[INFO] Started Jetty Server
17:08:45,860 INFO [web.site.EditionInterceptor] Unable to retrieve License information from Alfresco: 404
17:08:45,967 WARN [surf.persister.AbstractStoreObjectPersister] Failure to load model object for path: chrome/.keepme
org.springframework.extensions.surf.exception.ModelObjectPersisterException: Failure to load model object for path: chrome/.keepme
at org.springframework.extensions.surf.persister.ReadOnlyStoreObjectPersister.getObjectByPath(ReadOnlyStoreObjectPersister.java:613)
at org.springframework.extensions.surf.persister.AbstractStoreObjectPersister.getObjectsFromPaths(AbstractStoreObjectPersister.java:369)
at org.springframework.extensions.surf.persister.AbstractStoreObjectPersister.getAllObjects(AbstractStoreObjectPersister.java:306)
at org.springframework.extensions.surf.persister.MultiObjectPersister.getAllObjects(MultiObjectPersister.java:346)
at org.springframework.extensions.surf.ObjectPersistenceService.getAllObjects(ObjectPersistenceService.java:341)
at org.springframework.extensions.surf.ModelObjectService.getAllObjects(ModelObjectService.java:602)
at org.springframework.extensions.surf.ModuleDeploymentService.getAllConfiguredExtensionModules(ModuleDeploymentService.java:112)
at org.springframework.extensions.surf.ModuleDeploymentService.getDeployedModules(ModuleDeploymentService.java:139)
at org.springframework.extensions.surf.extensibility.impl.BasicExtensibilityModuleHandler.evaluateModules(BasicExtensibilityModuleHandler.java:240)
at org.springframework.extensions.surf.support.AbstractRequestContext.getEvaluatedModules(AbstractRequestContext.java:929)
at org.springframework.extensions.surf.support.AbstractRequestContext.getExtendingModuleFiles(AbstractRequestContext.java:950)
at org.springframework.extensions.webscripts.WebTemplateProcessor.executeScriptBodyExtensions(WebTemplateProcessor.java:235)
at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:333)
at org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)
at org.springframework.extensions.surf.render.RenderService.processTemplate(RenderService.java:722)
at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.calculateComponentDependencies(TemplateInstanceRenderer.java:61)
at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:118)
at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
at org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:85)
at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
at org.springframework.extensions.surf.render.RenderService.renderPage(RenderService.java:763)
at org.springframework.extensions.surf.mvc.PageView.dispatchPage(PageView.java:419)
at org.springframework.extensions.surf.mvc.PageView.renderView(PageView.java:258)
at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:316)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:307)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectC...

Original issue: http://code.google.com/p/maven-alfresco-archetypes/issues/detail?id=83

@mindthegab
Copy link
Contributor Author

From ukdavo on April 17, 2012 09:16:22

I forgot to mention that I am able to login to Alfresco Explorer with admin/admin but am not able to login to Share with the same credentials.

@mindthegab
Copy link
Contributor Author

From mauri...@session.it on April 17, 2012 09:31:04

It seems that share cannot find alfresco instance; as you correctly pointed out, you should align application.properties to the alfresco http instance; please double-check host, port and context (unless, I'm afraid you did already :-)

Could you also please check the file your-share-extension/target/share/WEB-INF/classes/alfresco/share-config.xml and see if there are any unresolved placeholders like ${...} ? Might be connected with https://code.google.com/p/maven-alfresco-archetypes/issues/detail?id=71 ?

Last question, which Maven version are you using? If lower, could you give this a try with Maven 3.0.3?

Thanks!

@mindthegab
Copy link
Contributor Author

From ukdavo on April 17, 2012 11:47:16

The application.properties is pretty standard. There's just a single change:

#alfresco.webapp.name=alfresco
alfresco.webapp.name=alfresco-webapp

The target/share/WEB-INF/classes/alfresco/share-config.xml seems fine - there's no trace of any unresolved placeholders.

I was using Maven 2.2.1 but switched to 3.0.3 as suggested. I ran clean builds against both the Alfresco AMP project and the Share project but got the same result as before.

@mindthegab
Copy link
Contributor Author

From ukdavo on April 17, 2012 12:09:31

Managed to resolve it. The Remote section of share-config-custom.xml currently defines the endpoint-url as:

${alfresco.server.scheme}://${alfresco.server.name}:${alfresco.server.port}/alfresco/s

By default the AMP archetype specifies the webapp as ${artifactId}-webapp. So I was able to workaround the issue by updating the endpoint-url to be:

${alfresco.server.scheme}://${alfresco.server.name}:${alfresco.server.port}/${alfresco.webapp.name}/s

..and updating src/main/properties/local/application.properties:

#alfresco.webapp.name=alfresco
alfresco.webapp.name=alfresco-webapp

@mindthegab
Copy link
Contributor Author

From colum...@gmail.com on October 29, 2012 17:08:15

Jetty run is completely refactored in the AMP and in the allinone archetypes of the new Maven Alfresco SDK 1.0.0 .

Resolving this issue.

Status: Fixed
Labels: Milestone-Release-sdk-1.0.0

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

No branches or pull requests

1 participant