Static assets 404 not found, despite being in correct location on file system

72 views
Skip to first unread message

ldriver

unread,
Aug 24, 2016, 6:34:44 PM8/24/16
to Hippo Community
I have a project deployed to Tomcat.  On my page on the site, I'm getting 404 Not Found for some CSS and PNG files.  I do see the files in the correct location on the file system, for example:

/opt/hippo/<myproject>/bootstrap/webfiles/src/main/resources/site/images

I have done mvn clean verify, and build the tar with mvn -Pdist.  If I explode the war files and bootstrap jar file, I do see the files.  But yet they are not showing when I deploy the wars to Tomcat.  Does anyone have any ideas why?  Or is there somewhere I can debug for this?  hippo-site and hippo-cms log files are basically clean, so no help there.

ldriver

unread,
Aug 24, 2016, 6:40:12 PM8/24/16
to Hippo Community
Here is an example of a link that gives 404:


Some css files do load, and others do not, I have confirmed the files exist on the file system.

ldriver

unread,
Aug 25, 2016, 3:32:31 PM8/25/16
to Hippo Community
I upaded hst-whitelist.txt, and ran the mvn commands to build the war files, I extracted the Jar file and verified the hst-whitelist is correct.  Is something cached somewhere?  Do I need to increment the version everytime I change webfiles?

Woonsan Ko

unread,
Aug 25, 2016, 3:39:32 PM8/25/16
to hippo-c...@googlegroups.com
Probably you need to set reloadonstartup=true with a version number. See below:


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



--
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,
Aug 25, 2016, 3:41:11 PM8/25/16
to hippo-c...@googlegroups.com
And with the system property repo.bootstrap=true when starting up the tomcat:

ldriver

unread,
Aug 25, 2016, 4:11:23 PM8/25/16
to Hippo Community
Ok it's working now.  I did have reloadonstartup, but the version was still the default 0.1.0-SNAPSHOT, what I had to do was change the version in the poms to something else (I did 0.1.1), and then the static assets showed up.  It seems like even though I changed the hst-whitelist and built the war, since the version did not change maybe the old version was still cached in the maven repo.  Thanks!

On Thursday, August 25, 2016 at 3:41:11 PM UTC-4, w.ko wrote:
And with the system property repo.bootstrap=true when starting up the tomcat:
On Thu, Aug 25, 2016 at 3:39 PM, Woonsan Ko <w....@onehippo.com> wrote:
Probably you need to set reloadonstartup=true with a version number. See below:

On Thu, Aug 25, 2016 at 3:32 PM, ldriver <ldri...@gmail.com> wrote:
I upaded hst-whitelist.txt, and ran the mvn commands to build the war files, I extracted the Jar file and verified the hst-whitelist is correct.  Is something cached somewhere?  Do I need to increment the version everytime I change webfiles?


On Wednesday, August 24, 2016 at 6:40:12 PM UTC-4, ldriver wrote:
Here is an example of a link that gives 404:


Some css files do load, and others do not, I have confirmed the files exist on the file system.


On Wednesday, August 24, 2016 at 6:34:44 PM UTC-4, ldriver wrote:
I have a project deployed to Tomcat.  On my page on the site, I'm getting 404 Not Found for some CSS and PNG files.  I do see the files in the correct location on the file system, for example:

/opt/hippo/<myproject>/bootstrap/webfiles/src/main/resources/site/images

I have done mvn clean verify, and build the tar with mvn -Pdist.  If I explode the war files and bootstrap jar file, I do see the files.  But yet they are not showing when I deploy the wars to Tomcat.  Does anyone have any ideas why?  Or is there somewhere I can debug for this?  hippo-site and hippo-cms log files are basically clean, so no help there.

--
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.
--
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,
Aug 25, 2016, 6:01:18 PM8/25/16
to hippo-c...@googlegroups.com
The version of initialize item in hippoecm-extension.xml should be increased if it's to be reloaded in a new deployment. It doesn't matter whether or not the version is the same as your project version number. From project management perspective, it could make more sense to match the versions though.
However, in that case, I prefer following common release process: a) create a release branch (with version 0.1.1) from the develop branch (0.1.0-SNAPSHOT) for instance, b) cut a release from the release branch (0.1.1) and deploy it even during the sprint, and c) after production deployment later (e.g., 0.1.N), merge the release branch to master branch.
So, whenever deploying a project version whether or not production release or sprint release, it always bumps up the version of the project as well as the initialize-item version. This way, it should be more consistent and easy to trace problems, IMHO.

Regards,

Woonsan



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.
Reply all
Reply to author
Forward
0 new messages