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

DoUnlock fails with NullPointerException when accessed with Windows (or Linux) and MacOS concurrently. #4

Open
jackgene opened this issue Jan 7, 2014 · 2 comments

Comments

@jackgene
Copy link

jackgene commented Jan 7, 2014

The system seems to work fine in Windows-only, Linux-only or Mac-only environments. However, as soon as a Mac client and a Windows or Linux client tries to access the DAV mount, the next DoUnlock will fail with the following NullPointerException, and all subsequent write accesses will fail until lock times out for a given file.

@caarlos0
Copy link
Collaborator

caarlos0 commented Jan 7, 2014

Hi @jackgene, you forgot to add the exception.

Anyways, check out the file paths: / vs \ and remember that the URL encode process may not work as expected in some cases.

Cheers

@jackgene
Copy link
Author

jackgene commented Jan 7, 2014

Oops, here's the stack trace:
16:14:30.861 [http-nio-9642-exec-4] ERROR net.sf.webdav.WebDavServletBean - Exception: java.lang.NullPointerException
at net.sf.webdav.locking.LockedObject.removeLockedObjectOwner(LockedObject.java:123)
at net.sf.webdav.locking.ResourceLocks.unlock(ResourceLocks.java:136)
at net.sf.webdav.methods.DoUnlock.execute(DoUnlock.java:72)
at net.sf.webdav.WebDavServletBean.service(WebDavServletBean.java:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1571)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)

I've also submitted a pull request, looks like it's a pretty simple fix.

braully referenced this issue in braully/webdav-servlet Dec 22, 2021
UploadedFileRejectedException added
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

No branches or pull requests

2 participants