Connecting standalone site.war to repository

398 views
Skip to first unread message

gigi...@gmail.com

unread,
Jan 16, 2015, 4:55:24 AM1/16/15
to hippo-c...@googlegroups.com

Hi,

We are working on integrating Hippo CMS with our "shop" systems based on Spring MVC.

Following the Enterprise documentation found here:
http://www.onehippo.org/library/enterprise/installation-and-configuration/separate-hst-deployment-model.html

we tried getting a CrossContext solution working.

We have a standalone Hippo CMS ( site + cms ) running under:

http://localhost:8080

and we have our Spring app ( spring.war, site.war and repository.war ) running in another tomcat slot / instance.

The problem is that for this case we get the following errors when dispatching to the Hippo site:

avax.jcr.RepositoryException: javax.jcr.LoginException: Failed to borrow session from the pool. javax.jcr.LoginException: Wrong username or password.
	at org.hippoecm.hst.core.jcr.pool.LazyMultipleRepositoryImpl.login(LazyMultipleRepositoryImpl.java:200)
	at org.hippoecm.hst.core.jcr.pool.MultipleRepositoryImpl.login(MultipleRepositoryImpl.java:172)
	at org.onehippo.forge.rewriting.repo.RewritingManager.getSession(RewritingManager.java:288)
	at org.onehippo.forge.rewriting.repo.RewritingManager.load(RewritingManager.java:101)
	at org.onehippo.forge.rewriting.HippoRewriteFilter.fetchRules(HippoRewriteFilter.java:148)
	at org.onehippo.forge.rewriting.HippoRewriteFilter.doFilter(HippoRewriteFilter.java:242)
	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:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:744)
Caused by: javax.jcr.LoginException: Failed to borrow session from the pool. javax.jcr.LoginException: Wrong username or password.
	at org.hippoecm.hst.core.jcr.pool.BasicPoolingRepository.login(BasicPoolingRepository.java:339)
	at org.hippoecm.hst.core.jcr.pool.BasicPoolingRepository.login(BasicPoolingRepository.java:354)
	at org.hippoecm.hst.core.jcr.pool.LazyMultipleRepositoryImpl.login(LazyMultipleRepositoryImpl.java:182)
	... 22 more
Caused by: javax.jcr.LoginException: Wrong username or password.
	at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1493)
	at org.hippoecm.repository.impl.RepositoryDecorator.login(RepositoryDecorator.java:59)
	at org.hippoecm.repository.HippoRepositoryImpl.login(HippoRepositoryImpl.java:109)
	at org.hippoecm.repository.HippoRepositoryImpl.login(HippoRepositoryImpl.java:126)
	at org.hippoecm.hst.core.jcr.pool.JcrHippoRepository.login(JcrHippoRepository.java:195)
	at org.hippoecm.hst.core.jcr.pool.BasicPoolingRepository$SessionFactory.makeObject(BasicPoolingRepository.java:1101)
	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
	at org.hippoecm.hst.core.jcr.pool.BasicPoolingRepository.login(BasicPoolingRepository.java:326)
	... 24 more
Caused by: javax.security.auth.login.FailedLoginException: Wrong username or password.
	at org.hippoecm.repository.security.UnsuccessfulAuthenticationHandler.handle(UnsuccessfulAuthenticationHandler.java:27)
	at org.hippoecm.repository.security.HippoLoginModule.login(HippoLoginModule.java:149)
	at org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalAuthContext.java:86)
	at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1465)
	... 31 more

Is there any extra configuration that needs to be added to conf/context.xml for this case? The documentation did not provide clear examples on this and we are unsure what all of the configurations do.

The standalone Hippo is running with a repository on PostGres 9.3.5 database, seems to work fine although we sometimes get GC overhead limit errors and similar ( our IT OPS should be able to fix this on AC1 / LIVE with configurations )

Best regards,
Alex

Woonsan Ko

unread,
Jan 16, 2015, 1:42:02 PM1/16/15
to hippo-c...@googlegroups.com
Hi,

There's a configuration file for HST-2 container. [1]
If you have the default configuration file, /WEB-INF/hst-config.properties for example, then you should set proper credentials for *.repository.* parameters.

Regards,

Woonsan


--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--
w....@onehippo.com     www.onehippo.com
Boston - 745 Atlantic Ave, 8th Floor, Boston MA 02111
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

Woonsan Ko

unread,
Jan 16, 2015, 1:42:21 PM1/16/15
to hippo-c...@googlegroups.com

gigi...@gmail.com

unread,
Jan 19, 2015, 4:16:40 AM1/19/15
to hippo-c...@googlegroups.com, gigi...@gmail.com
Hi Woonsan,

I have the same configurations in both conf/hst.properties and webapp/WEB-INF/hst-config.properties.
Would I need extra configuration like another "repository.address = vm://"?
The thing is that even if I don't start the "complete" Hippo first ( with site + cms ), the "integrated" Hippo ( site + repository wars only ) gives the same error.
I read in the documentation that the CMS cluster should always be started first, but I don't see anything on the second cluster ( the one without a CMS ) that it can't find the repo or anything.

Any way to debug this there?

Regards,
Alex

Jeroen Reijn

unread,
Feb 2, 2015, 6:20:44 AM2/2/15
to hippo-c...@googlegroups.com, Alexandru Ionescu
Are you trying to deploy this within one container? Could you perhaps describe your existing setup in Tomcat?

Jeroen

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--
Jeroen Reijn
Hippo

Amsterdam office - Oosteinde 11, 1017 WT Amsterdam
Boston office - 745 Atlantic Ave, Eight Floor, Boston MA 02111, United states of America.


US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

gigi...@gmail.com

unread,
Feb 16, 2015, 5:52:58 AM2/16/15
to hippo-c...@googlegroups.com, gigi...@gmail.com
Hi Jeroen,

We got it working. It was mainly a configuration issue because of running it under Windows and having everything in the right place.

Best regards,
Alex
Reply all
Reply to author
Forward
0 new messages