PDA

View Full Version : Unknown error: java.io.FileNotFoundException


Maryb
01-07-2011, 12:59 PM
I'm installing Alice 2.2 on a network for use for my students second semester. I resolved one issue with the workaround on the Alice site, but I am getting the following error when launching it while logged on as a student (but not as administrator).


Alice version: 2.2 09/10/2010
java.io.FileNotFoundException: C:\Program Files\Alice 2.2\Required\loggingData\1294418858424.txt (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at edu.cmu.cs.stage3.alice.authoringtool.util.ChangeL ogger.worldLoaded(ChangeLogger.java:79) at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.fireWorldLoaded(AuthoringTool.java:1157) at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.loadWorld(AuthoringTool.java:2032) at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.loadWorld(AuthoringTool.java:1912) at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.worldInit(AuthoringTool.java:905) at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.<init>(AuthoringTool.java:411) at edu.cmu.cs.stage3.alice.authoringtool.JAlice.main( JAlice.java:141) java.io.FileNotFoundException: C:\Program Files\Alice 2.2\Required\loggingData\1294418859518.txt (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at edu.cmu.cs.stage3.alice.authoringtool.util.ChangeL ogger.worldLoaded(ChangeLogger.java:79) at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.fireWorldLoaded(AuthoringTool.java:1157) at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.loadWorld(AuthoringTool.java:2032) at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.loadWorld(AuthoringTool.java:1912) at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.worldInit(AuthoringTool.java:905) at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.<init>(AuthoringTool.java:431) at edu.cmu.cs.stage3.alice.authoringtool.JAlice.main( JAlice.java:141)

I don't see in the program files the txt file referenced...maybe that's what the error is saying. I've looked at this error as it has occurred several times and the txt file referenced is always a different number.

I tried to look at the FAQ but I got a page saying the link was broken. thanks for any help anyone could pass along! We're a small private school and I have some offsite IT help, but they are unfamiliar with Alice.
Maryb

David B
01-07-2011, 06:31 PM
Funny you should mention trying to get Alice to work while logged in as a student, because I suggested that to you on this thread (http://www.alice.org/community/showthread.php?t=5809).

Maryb
01-10-2011, 12:05 PM
Thanks. I won't be able to copy the Alice files while logged in as a student due to permissions.

When I followed the instructions on installing on a networked machine, I edited the 'version' text file in the 'etc' folder to include 'H:\' which has taken care of the problem that wouldn't allow the gallery to load for students. But I'm still getting this java error when I launch and close while logged on as a student. I don't really know what to attempt to change. the text files in the folders mentioned in the error detail either don't exist, are hidden or didn't install. I could tell my students to disregard the error but I don't know what the implications of the error are.

paintflake
05-11-2011, 12:00 PM
Ditto.
I have the exact same issues on our network.
I am leery about creating a user account with higher privileges to override the gallery and JavaScript errors due to a crippling incident that some tech-savoy students with malicious intent took advantage of.
As for remapping to the H drive, did you have to specify each student path, or generically to the drive?

aikmin
05-23-2011, 10:15 AM
I have a fix for you, but i am not able to attach the required file. PM me your email, and i will e-mail you the file.

rjolliff
06-22-2011, 03:51 AM
I have the same problem

alice wants to write a log file to the network directory
which it cant as its read only

can you send me the fix file

Javik
07-16-2011, 12:44 AM
I'm installing Alice 2.2 on a network for use for my students second semester. I resolved one issue with the workaround on the Alice site, but I am getting the following error when launching it while logged on as a student (but not as administrator).

[COLOR="Red"]
Alice version: 2.2 09/10/2010
java.io.FileNotFoundException: C:\Program Files\Alice 2.2\Required\loggingData\1294418858424.txt (Access is denied) at


The basic problem here is that the Alice programmers do not understand how Windows user profiles and filesystem security is supposed to work.

This problem is a "Bug" and needs to be fixed by having the programmers correct where they store log files.

============

When a "User" account is logged on (non-Administrator) the entire Programs folder path is read-only, as is the entire Windows folder path.

The only locations writable on the local hard drive by a "User" account is inside their user profile.

Programs that need to store data for whatever reason that roams with the account from one computer to the next, are supposed to create a folder for themselves in the user's profile under Application Data. If they need to just temporarily store data for their application, then it goes in the user's profile in "Local Settings"

These folder paths change for each user that logs on, but the current state of the paths can always be found in the registry at:


HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\User Shell Folders

Javik
07-16-2011, 12:52 AM
The odd question is why the newfangled "Windows Vista/7 User Access Control" and "Windows File and Registry Virtualization" is not automatically fixing this.

This is exactly the sort of problem that UAC / File Virtualization is supposed to fix, for old misbehaving and poorly written programs that expect they can just write data to any location without regard to system security.

I do not see a way to tell UAC to explicitly virtualize the LoggingData folder, so that all Alice writes to there are redirected to a temporary location that is discarded at logoff.

Javik
07-16-2011, 09:45 PM
I have a partial fix for this, which is to say I have a ridiculous hack, but it is better than making the LoggingData folder writable by anyone on every computer.

1. Create a network share on a Windows file server somewhere, call it something like:
\\server\share\fixforAlice

2. For the folder "FixforAlice", go to Properties -> Security -> Advanced -> Change Permissions ->
Add "Everyone", applying to "This folder, subfolder, and files"
NO - Full Control
NO - Traverse/Execute
Yes - List/Read
Yes - Read Attributes
Yes - Read Extended Attributes
Yes - Create files / write data
NO - Create folders / append data
Yes - Write Attributes
Yes - Write Extended Attributes
NO - Delete subfolders and files
NO - Delete
Yes - Read permissions
NO - Change permissions
NO - Take ownership

This allows the program to write log files but users can't run programs from here or delete anything they put here.

3. Assuming C:\Program Files

open Command prompt, run as Administrator (if UAC is active)
cd C:\Program Files\Alice ....
cd Required
rd LoggingData
mklink /D LoggingData "\\server\share\fixforAlice"

========================

Now when any program tries to access

"C:\Program Files\Alice 2.2b\Required\Logging Data"
It is instead redirected to:

"\\server\share\fixforAlice"

And the permissions limit what students can do with that share, and prevent deletion of files if any students try to put their own files in there.

The downside is that the logs keep on accumulating but fortunately they are only a few kilobytes each.

If you want to go further, you can apply a directory quota on the share so that it cannot store more than a few megabytes. Looking at the log file sizes, setting the share's maximum size to 1-2 megs should get you through the year.

Mortgage FL
08-24-2011, 01:28 AM
Seems to be a good fix. I like to check this-out.