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

Webapp root null #11

Closed
jendib opened this issue Jun 25, 2013 · 2 comments
Closed

Webapp root null #11

jendib opened this issue Jun 25, 2013 · 2 comments
Assignees
Labels
Milestone

Comments

@jendib
Copy link
Member

jendib commented Jun 25, 2013

It seems that FilterConfig.getSerlvetContext().getRealPath("/") returns null in some cases, so theme directory search fails in DirectoryUtil.getThemeDirectory()

Maybe http://stackoverflow.com/a/536260 is an answer?

@ghost ghost assigned naku Jun 26, 2013
@naku
Copy link
Member

naku commented Aug 20, 2013

Reproduced with the following settings:

  • Tomcat 8
  • In server.xml: unpackWARs="false"

The theme resource returns a NPE.

Aug 20, 2013 7:23:50 PM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.lang.NullPointerException
at com.sismics.reader.core.util.DirectoryUtil.getThemeDirectory(DirectoryUtil.java:93)
at com.sismics.reader.core.dao.file.theme.ThemeDao.findAll(ThemeDao.java:30)
at com.sismics.reader.rest.resource.ThemeResource.list(ThemeResource.java:34)

@naku
Copy link
Member

naku commented Aug 20, 2013

The reader.home property is not used if unpackWARs="false", check DirectoryUtil:41
if (EnvironmentUtil.getWebappRoot() != null)

@naku naku closed this as completed Sep 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants