Integration with S3 bucket

157 views
Skip to first unread message

Rahul

unread,
Oct 11, 2017, 5:56:39 AM10/11/17
to Hippo Community
HI,

Is there any way to upload and retrieve images from HippoCMS to S3 bucket?

Thanks
Rahul

Saimir Muco

unread,
Oct 11, 2017, 6:15:12 AM10/11/17
to hippo-c...@googlegroups.com
Hi Rahul,
you might use the external document picker community plugin to retrieve images in the cms from S3, see [1] for more details (you have to implement uploading yourself). A more integrated storage delegation to S3 can be found in this solution [2]

Regards,
Saimir


--
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-community@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-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--

Saimir Muço

Software Engineer

email-sig-logo.png

____________________________________________________________________________


WCM-MQ-leader-e-mail-signature.png


Rahul

unread,
Nov 16, 2017, 7:09:38 AM11/16/17
to Hippo Community
Hi All,

How do i set hostname for my S3 bucket when trying to integrate s3 bucket using S3DataStore?

I am getting following error.

Caused by: java.lang.IllegalArgumentException: hostname cannot be null at com.amazonaws.util.AwsHostNameUtils.parseRegionName(AwsHostNameUtils.java:59).

I am maintaining following item in a properties file:

hostname=xxxxxxx
accessKey=xxxxxxxxxx
secretKey=xxxxxxxxxx
s3Bucket=xxxxxxx
s3Region=US_EAST_1
connectionTimeout=120000
socketTimeout=120000
maxConnections=40
writeThreads=30
maxErrorRetry=10

Thanking you!

Rahul

Rahul

unread,
Nov 17, 2017, 1:42:32 PM11/17/17
to Hippo Community
Hi,

I have followed steps mentioned on below link to integrate to S3 bucket:


but i am facing issue for connection timed out. I am using S3DataStore.  I have attached screenshot of the error. PFA.

Please help.

Thanks
Rahul 

On Wednesday, October 11, 2017 at 3:45:12 PM UTC+5:30, saimir.muco wrote:
Hi Rahul,
you might use the external document picker community plugin to retrieve images in the cms from S3, see [1] for more details (you have to implement uploading yourself). A more integrated storage delegation to S3 can be found in this solution [2]

Regards,
Saimir

On Wed, Oct 11, 2017 at 11:56 AM, Rahul <cp....@gmail.com> wrote:
HI,

Is there any way to upload and retrieve images from HippoCMS to S3 bucket?

Thanks
Rahul

--
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.
s3error.png

Woonsan Ko

unread,
Nov 18, 2017, 2:56:38 PM11/18/17
to hippo-c...@googlegroups.com
Hi Rahul,

Sorry but, would you mind posting your question to us...@jackrabbit.apache.org [1] again?
I believe you will get better answers there. I’ll help you there too.

Regards,

Woonsan

<s3error.png>

Rahul

unread,
Nov 21, 2017, 6:53:42 AM11/21/17
to Hippo Community
Hi Woonsan,

Thanks for the reply. I am able to fix the earlier issue but now i am stuck at new one. This time it is more specific to hippo. I am facing class not found exception for "javaURLContextFactory".
I have added dependecy to CMS pom for that but it doesn't work. I have also tried by adding required jars to tomcat shared lib, but it doesn't work. Can you please help me here.

PFA screenshot of the error i am getting.

Thanks
Rahul
error.png

Saimir Muco

unread,
Nov 21, 2017, 7:19:43 AM11/21/17
to hippo-c...@googlegroups.com
Hi Rahul,
the issue seems to be generated during the deployment of essentials application. Are you trying to run with embedded cargo locally or in a deployment environment? In the latter case, you shouldn't deploy essentials which is only used for local development.
Regards,
Saimir

To post to this group, send email to hippo-community@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-community+unsubscribe@googlegroups.com.

Rahul

unread,
Nov 21, 2017, 7:45:39 AM11/21/17
to Hippo Community
Hi Saimir,

I am trying to run embedded cargo locally. As you have suggested error is getting generated during deployment of essentials application, i have added dependency to essentials pom too but it didn't work. I am getting same error.

Please guide.

Thanks
Rahul

Saimir Muco

unread,
Nov 21, 2017, 9:44:16 AM11/21/17
to hippo-c...@googlegroups.com
Hi Rahul,
unfortunately this issue is specific to the dependencies on your project, you can use mvn dependency:tree to retrieve and compare the dependencies with a standard archetype project. Please check also the hippo version you are using when you want to set up an integration from Woonsan's blog. The blog is relative to Hippo 11 and 10 but I'm not sure whether could work with Hippo 12.
Cheers,
Saimir

To post to this group, send email to hippo-community@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-community+unsubscribe@googlegroups.com.

Ate Douma

unread,
Nov 21, 2017, 7:08:52 PM11/21/17
to hippo-c...@googlegroups.com
Hi Rahul,

On 2017-11-21 12:53, Rahul wrote:
> Hi Woonsan,
>
> Thanks for the reply. I am able to fix the earlier issue but now i am
> stuck at new one. This time it is more specific to hippo. I am facing
> class not found exception for "javaURLContextFactory".

Accidentally I was investigating a similar error today and discovered
the cause.
If you look at the root of your stacktrace, you'll see this is triggered
from the Java System FinalizerThread, which invokes the Jackrabbit
SessionImpl.finalize method.

Within that method Jackrabbit logs a warning if a session was
created but not properly logged out.

So far so good.

But the log4j2-dev.xml, which is by default has a logger to actually
log the above warning, also uses a special LookupFilter for "context
based logging" see: [1].
And that LookupFilter tries to lookup the current context from JNDI.

Here the problem arises: while normally this works just fine in Tomcat,
when fails when invoked from the System FinalizerThread.
Reason: the FinalizerThread doesn't have the right contextClassloader
(actually: it has none, its contextClassLoader is null!), which causes
the ClassNotFoundException.

I already have a local fix ready (by temporarily setting the
contextClassLoader), and this therefore probably will be fixed in
the next maintenance release (which can be expected soon), see: [2].

For the time being, you can workaround *this* specific error by
temporarily adjusting your log4j2-dev.xml as follows:

Find and replace the following logger definition in log4j2-dev.xml
(by default it is the first defined logger in the file):

<Logger name="org.apache.jackrabbit.core" level="warn"/>

with:

<Logger name="org.apache.jackrabbit.core" level="warn"
additivity="false">
<AppenderRef ref="console"/>
</Logger>

This will ensure the actual warning from Jackrabbit gets properly logged
to your console (only), bypassing the problem with the LookupFilter
which is configured on the "cms" and "site" appenders.
And of course, you then should investigate where the culprit Jackrabbit
session was created but not properly logged out.

Once the problem with the LookupFilter is fixed in the next maintenance
release you should revert the above change, so you then will get these
warnings also logged again to either the hippo-cms.log or hippo-site.log
file.

HTH,
Ate

[1] https://www.onehippo.org/library/deployment/context-based-logging.html
[2] https://issues.onehippo.com/browse/CMS-10991

> I have added dependecy to CMS pom for that but it doesn't work. I have
> also tried by adding required jars to tomcat shared lib, but it doesn't
> work. Can you please help me here.
>
> PFA screenshot of the error i am getting.
>
> Thanks
> Rahul
>
> On Saturday, November 18, 2017 at 1:56:38 PM UTC-6, woonsan.ko wrote:
>
> Hi Rahul,
>
> Sorry but, would you mind posting your question to
> us...@jackrabbit.apache.org <javascript:> [1] again?
> I believe you will get better answers there. I’ll help you there too.
>
> Regards,
>
> Woonsan
>
> [1] http://jackrabbit.apache.org/jcr/mailing-lists.html
> <http://jackrabbit.apache.org/jcr/mailing-lists.html>
>
>
> Sent from my iPhone
>
> On Nov 17, 2017, at 1:42 PM, Rahul <cp....@gmail.com <javascript:>>
>> <https://groups.google.com/group/hippo-community>.
>> For more options, visit https://groups.google.com/d/optout
>> <https://groups.google.com/d/optout>.
>>
>>
>>
>>
>> --
>>
>> Saimir Muço
>>
>> Software Engineer
>>
>> email-sig-logo.png <http://www.bloomreach.com/>
>>
>> ____________________________________________________________________________
>>
>>
>> WCM-MQ-leader-e-mail-signature.png
>> <http://go.bloomreach.com/gartner-magic-quadrant-for-web-content-management-2017.html>
>>
>>
>> --
>> 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
>> <javascript:>
>> RSS:
>> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
>> <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 <javascript:>.
>> <https://groups.google.com/group/hippo-community>.
>> For more options, visit https://groups.google.com/d/optout
>> <https://groups.google.com/d/optout>.
>> <s3error.png>
>
> --
> 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
> <mailto:hippo-communi...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/hippo-community.
> For more options, visit https://groups.google.com/d/optout.

--
--
Ate Douma
Principal Product Architect BloomReach Experience, Platform Team, Amsterdam

mailto:ate....@bloomreach.com or mailto:hippo...@bloomreach.com
https://www.bloomreach.com https://www.onehippo.com
https://www.onehippo.org
_______________________________________________________________________________
This e-mail may be privileged and/or confidential, and the sender does not
waive any related rights and obligations. Any distribution, use or
copying of
this e-mail or the information it contains by other than an intended
recipient
is unauthorized. If you received this e-mail in error, please advise me (by
return e-mail or otherwise) immediately.

Rahul

unread,
Nov 22, 2017, 9:19:09 AM11/22/17
to Hippo Community
Hi Ate,

Thanks, now i am able to get rid of class not found exception with the workaround you have provided. I have one more query, how do i close this session? As explained by you i am able to find "unclosed session detected" in sessionImpl.finalize.

Thanks
Rahul

Ate Douma

unread,
Nov 22, 2017, 11:34:32 AM11/22/17
to hippo-c...@googlegroups.com


On 2017-11-22 15:19, Rahul wrote:
> Hi Ate,
>
> Thanks, now i am able to get rid of class not found exception with the
> workaround you have provided. I have one more query, how do i close this
> session? As explained by you i am able to find "unclosed session
> detected" in sessionImpl.finalize.

That depends on your code, there is no predefined answer to that.
Look at the warning now logged again by the Jackrabbit
SessionImpl.finalize() method, which should show you where that session
gets created (where in the source).
Then analyze how that session is used and where it no longer needs to be
used and/or is 'unreferenced'. That's where you should logout that
session object.
> >>     <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> >>     <s3error.png>
> >
> > --
> > 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
> <javascript:>
> > RSS:
> >
> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> <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 <javascript:>
> > <mailto:hippo-communi...@googlegroups.com <javascript:>>.
> --
> --
> Ate Douma
> Principal Product Architect BloomReach Experience, Platform Team,
> Amsterdam
>
> mailto:ate....@bloomreach.com <javascript:> or
> mailto:hippo...@bloomreach.com <javascript:>
> https://www.bloomreach.com https://www.onehippo.com
> https://www.onehippo.org
> _______________________________________________________________________________
>
> This e-mail may be privileged and/or confidential, and the sender
> does not
> waive any related rights and obligations. Any distribution, use or
> copying of
> this e-mail or the information it contains by other than an intended
> recipient
> is unauthorized. If you received this e-mail in error, please advise
> me (by
> return e-mail or otherwise) immediately.
>
> --
> 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
> <mailto:hippo-communi...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages