Things I learned Last Week Part 2

Eric PughMarch 18, 2010

Favicon and Rails?

Want to use a favicon.ico but don’t want to put it at the root as favicon.ico? Then add <LINK REL=”SHORTCUT ICON” href=”<%=image_path(‘limelight.ico’)%>”>. The use of image_path means that you get all the goodness of Rails routing to generate a complete image path that will work. Even if you deploy under some sub URL, like a war file in JBoss!

Are you working with ISO-8859-1 encoded text, (more info at

ISO 8859-1 Characters

And look at the character  (should be a capital A with a caret on top called a grave accent). That will kill Solr, regardless of container deployed in, like Jetty versus Tomcat. But the other ways of representing this entity work great:


Of course, there is a bit of confusion on this, as supposedly if the XML document posted to Solr is UTF-8 encoded, then Solr shouldn’t have any issues. So, still some digging to do!

Solritas and JBoss and Velocity Oh My

I recently ran into a Java Classloader issue between JBoss and Solr when loading Velocity. If you are getting in the browser:

TTP Status 500 – loader constraint violation: when resolving method “org.apache.velocity.Template.merge

or messages like “SEVERE: java.lang.LinkageError: loader constraint violation: when resolving method “org.apache.velocity.Template.merge” in the logs, then that means a conflict in the velocity jars. Oddly enough, I could not actually find a velocity.jar anywhere in my JBoss app. However, the fix was to copy the velocity jar from Solr into my JBoss ./lib/ directory.

More blog articles:

Let's do a project together!

We provide tailored search, discovery and analytics solutions using Solr and Elasticsearch. Learn more about our service offerings