Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FITS web service classloading #31

Conversation

fkleon
Copy link
Contributor

@fkleon fkleon commented Nov 19, 2017

GitHub Issue: n/a

What does this Pull Request do?

Fixes the FITS web service that was not working correctly for me.

After bringing up the environment and accessing http://localhost:8080/fits/version (or using the /examine endpoint) this exception is displayed indicating a class loading problem:

HTTP Status 500 - Servlet execution threw an exception
[..]
javax.servlet.ServletException: Servlet execution threw an exception
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause
java.lang.NoClassDefFoundError: edu/harvard/hul/ois/fits/exceptions/FitsException
	edu.harvard.hul.ois.fits.service.pool.FitsWrapperFactory.create(FitsWrapperFactory.java:25)
	edu.harvard.hul.ois.fits.service.pool.FitsWrapperFactory.create(FitsWrapperFactory.java:18)
	org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:60)
	[..]
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause
java.lang.ClassNotFoundException: edu.harvard.hul.ois.fits.exceptions.FitsException
	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309)
	[..]
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

This PR removes the quotes around the configured fits home path in catalina.properties. In Java properties files, single-quotes or double-quotes are considered part of the string.

What's new?

  • Unquote fits.home value in catalina.properties
  • Make sure the fits symlink is also owned by the fits user

How should this be tested?

  • Reprovision FITS to an existing environments with:
    ansible-playbook -i ./inventory/vagrant/hosts playbook.yml --tags fits
  • Access the FITS web service and make sure it loads correctly:
    curl -vv http://localhost:8080/fits/version

Interested parties

@Islandora-CLAW/committers

* fits.home in catalina.properties must not be quoted
* FITS symlink should be owned by tomcat
@jonathangreen jonathangreen merged commit 9d619e1 into Islandora-Devops:master Nov 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants