Archive for category General
Nasty Class loader issue: “java.lang.LinkageError: loader constraint violation: loader previously initiated loading for a different type…”
First a bit of background, I am working as part of a team responsible for building a bespoke content management system for educational uses and the back end uses the following technologies:
- Java Tomcat 7.0 server
- Rest Easy 3.0.6.Final
- ElasticSearch 1.0.1
- Google Guice 3.0 for dependency injection
- Eclipse Kepler Build 20130919-0819
- Counterclockwise (Clojure plugin For Eclipse) 0.20.0 & 0.24.1.STABLE001 – This becomes important later even though I am not using it really.
Now to describe the problem. For some reason after integrating ElasticSearch with our project a nasty error as seen below started happening (and breaking the whole site at runtime when running within eclipse):
SEVERE: Servlet.service() for servlet [jsp] in context with path [/rutherford-server] threw exception [Filter execution threw an exception] with root cause
java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/catalina/loader/WebappClassLoader) previously initiated loading for a different type with name "javax/servlet/http/HttpSession"
This problem seemed to refer at a random place in our code in the stack trace. This random place had previously worked (and is totally unrelated to the Elastic Search stuff I was working on) in my case it occurred in a User Manager class that deals with sessions (hence the reference to HttpSession). The elastic search stuff didn’t have anything to do with the user manager or even use the HttpSession class as far as I was aware but seemed to trigger the error when the code for the elasticsearch java api was inserted.
Read the rest of this entry »
Today I was having trouble wrapping text in a label on an SWT shell in an eclipse plugin.
I found a useful guide that explains what was going wrong. It can be found here.
The problem was I hadn’t defined a widthHint for the grid data object. This is apparently used by the label component to work out whether it needs to wrap or not.
This is a good Guide. for setting up port forwarding with putty and squid.
I am currently a PhD Candidate studying Technology Enhanced Learning at Durham University. Have a little look at my website for more info.
More specifically I am looking at folksonomies and programming to see if there are any applications that could be used to improve undergraduate programming courses.
I have started this blog to help other coders who are programming on similiar things to me. Primarily, for things that I had problems with or got frustrated with, when I couldnt find help online or on irc.