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

NullPointer when running gitblit on tomcat 7 #363

Closed
gitblit opened this issue Aug 12, 2015 · 4 comments
Closed

NullPointer when running gitblit on tomcat 7 #363

gitblit opened this issue Aug 12, 2015 · 4 comments

Comments

@gitblit
Copy link
Owner

@gitblit gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 67

What steps will reproduce the problem?
1. Deploy gitblit without the file /WEB-INF/web.properties
2. Start the application

What is the expected output? What do you see instead?

Gitblit startup fails with a NullPointer

 java.lang.NullPointerException
 #011at java.io.File.<init>(File.java:232)
 #011at com.gitblit.WebXmlSettings.<init>(WebXmlSettings.java:54)
 #011at com.gitblit.GitBlit.contextInitialized(GitBlit.java:1444)
 #011at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
 #011at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
 #011at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 #011at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
 #011at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:128)
 #011at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:151)
 #011at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:140)
 #011at java.security.AccessController.doPrivileged(Native Method)
 #011at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:840)
 #011at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
 #011at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:124)

What version of the product are you using? On what operating system?
0.7.0

Please provide any additional information below.

The javadoc of the method context.getRealPath says that it can return null. I'm not
sure why it does that in our case. Maybe the app is still packed when the method is
called.

An obvious workaround is to add an (empty) file "/WEB-INF/web.properties"

Reported by stefanlay1 on 2012-02-22 15:51:38

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Things are rearranged slightly in v0.8.x, although this nullpointer could still happen
there.

Reported by James.Moger on 2012-02-22 17:30:08

  • Status changed: Accepted
  • Labels added: Milestone-0.9.0

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Reported by James.Moger on 2012-02-23 22:46:05

  • Status changed: Queued

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Fixed in v0.9.1

Reported by James.Moger on 2012-03-28 00:02:10

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Fixed in v0.9.1. Closing.

Reported by James.Moger on 2012-03-28 00:03:13

  • Status changed: Fixed

@gitblit gitblit closed this as completed Aug 12, 2015
@flaix flaix added this to the 0.9.0 milestone Dec 13, 2016
@flaix flaix added this to the 0.9.0 milestone Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants