Getting FileNotFoundException on file in temp folder

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting FileNotFoundException on file in temp folder

IceTeaAddict
Hi everyone!

I'm pretty new to OpenGL and I've just tried to set up JOCL.

However, I keep getting a FileNotFoundException, full error message:

Catched FileNotFoundException: C:\Users\IceTeaAddict\AppData\Local\Temp\jogamp_0000\file_cache\jln1406580160446837149\jln7109698135609362659\gluegen-rt.dll (The process cannot access the file because it is being used by another process), while addNativeJarLibsImpl(classFromJavaJar class com.jogamp.opencl.llb.impl.CLDynamicLibraryBundleInfo, classJarURI jar:file:/C:/Users/IceTeaAddict/.m2/repository/org/jogamp/jocl/jocl/2.1.5-01/jocl-2.1.5-01.jar!/com/jogamp/opencl/llb/impl/CLDynamicLibraryBundleInfo.class, nativeJarBaseName jocl-2.1.5-01-natives-windows-amd64.jar): [ file:/C:/Users/IceTeaAddict/.m2/repository/org/jogamp/jocl/jocl/2.1.5-01/jocl-2.1.5-01.jar -> file:/C:/Users/IceTeaAddict/.m2/repository/org/jogamp/jocl/jocl/2.1.5-01/ ] + jocl-2.1.5-01-natives-windows-amd64.jar -> slim: jar:file:/C:/Users/IceTeaAddict/.m2/repository/org/jogamp/jocl/jocl/2.1.5-01/jocl-2.1.5-01-natives-windows-amd64.jar!/

The exception occurs pretty much on the first line of my program, when calling CLContext context = CLContext.create();

In other threads it was noted that Java 8 might be causing the problem. Therefore I even uninstalled Java 8 and re-installed Java 7, but the problem still exists.

I also tried deleting the folder mentioned in the error message, but to no avail.

Dependency management: Maven
Included dependencies: org.jogamp.jocl.jocl-main:2.1.5-01 and org.jogamp.gluegen.gluegen-rt-main:2.1.5-01
Architecture is Windows 8 64-bit

Is there a way to fix this issue? I really want to render some Mandelbrot sets ^^
Reply | Threaded
Open this post in threaded view
|

Re: Getting FileNotFoundException on file in temp folder

gouessej
Administrator
Hi

Try to disable your virus scanner. The error message is explicit for me.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Getting FileNotFoundException on file in temp folder

IceTeaAddict
Unfortunately didn't solve it.
The same error message appeared with avast disabled and after I deleted the temp folder contents again.

This is the tree of the folder, just in case something's going wrong there:

C:\USERS\ICETEAADDICT\APPDATA\LOCAL\TEMP\JOGAMP_0000
└───file_cache
    │   jln185876432709473263.lck
    │   jln185876432709473263.tmp
    │
    └───jln185876432709473263
        │   jln3619852133582798781.tmp
        │
        └───jln3619852133582798781
                gluegen-rt.dll

I also noticed that after the JVM terminated, no files are locked anymore.
Reply | Threaded
Open this post in threaded view
|

Re: Getting FileNotFoundException on file in temp folder

gouessej
Administrator
Is there a way of knowing which process locks a file under Windows?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Getting FileNotFoundException on file in temp folder

Wade Walker
Administrator
ProcessExplorer (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) is a good way to see what process has a file open on Windows. This error is very unusual, since both JOGL and JOCL use the same way of unpacking files in a temporary directory, and we've tested it on many different types of systems without a problem. Maybe the user is somehow trying to run two copies of JOCL at once, and they're interfering with each other?
Reply | Threaded
Open this post in threaded view
|

Re: Getting FileNotFoundException on file in temp folder

IceTeaAddict
So I tried running ProcessExplorer when the program was running.
The JVM launched by Eclipse was the only process which was accessing the gluegen DLL.

The file lock would not be released until I closed the JFrame.

I also wanted to be certain that it was not caused by JOCL being used in the AWT EventQueue, so I moved it to both the main thread and a new, separate thread. Same result :/

gluegen-file.PNG
Reply | Threaded
Open this post in threaded view
|

Re: Getting FileNotFoundException on file in temp folder

IceTeaAddict
This post was updated on .
Deleted the org.jogamp folder in my local maven repository, let maven redownload all files, and it suddenly worked.

And this is why you should always re-install a program first before filing a bug report about it not working...
Maven really screwed me over this time ^^

Thank you very much for helping me, though.

/closed

EDIT: Added Mandelbrot set of victory :D
Thanks again!