Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,

    If the directory ../.foo/bar/ doesn't exist, you can't create a file there, so make sure you create the directory first.

    File f = new File("somedirname1/somedirname2/somefilename");
    if (!f.getParentFile().exists())
        f.getParentFile().mkdirs();
    

Solutions on the web

via Google Groups by Anthony Shortland, 2 years ago
via Google Groups by Ferruccio Zamuner, 4 months ago
java.io.IOException: Permission denied	at java.io.UnixFileSystem.createFileExclusively(Native Method)	at java.io.File.createNewFile(File.java:828)	at bucket.util.FileUtils.copyFile(FileUtils.java:85)	at bucket.util.FileUtils.copyFile(FileUtils.java:60)	at com.atlassian.confluence.pages.DefaultAttachmentManager.saveNewAttachment(DefaultAttachmentManager.java:41)	at com.atlassian.confluence.pages.AbstractAttachmentManager.saveAttachment(AbstractAttachmentManager.java:79)	at com.atlassian.confluence.pages.DelegatorAttachmentManager.saveAttachment(DelegatorAttachmentManager.java:70)	at sun.reflect.GeneratedMethodAccessor590.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)	at java.lang.reflect.Method.invoke(Method.java:324)	at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61)	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116)	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152)	at undefined.$Proxy9.saveAttachment(Unknown Source)