Friday, October 29, 2010

Errors running ADF application due to spaces in path or long path names.

At some point, you might run into the problem that you get all kind of 'weird' errors while running your ADF / WebCenter application.
One minute it works fine, the next it fails.

When you run into problems without any obvious cause, you might want to try this.

In the jdeveloper\jdev\jdev\bin folder is a file called jdev.boot.
This file contains a setting named ide.user.dir.var:

#
# The ide.user.dir.var specifies the name of the environment
# variable that points to the root directory for user files.
# The system and mywork directories will be created there. 
# If not defined, the IDE product will use its base directory 
# as the user directory.
#
ide.user.dir.var = JDEV_USER_HOME,JDEV_USER_DIR

It tells JDev what environment variables to use for the default user directory.
If these variables are not set, it defaults to the user directory.
In Windows, this happens to be Documents and settings. The path might look something like this:

C:\Documents and Settings\Application Data\JDeveloper\system11.1.1.2.36.55.36

Besides the fact that the folder contains spaces (which is more than once quite annoying) it's quite long as well.
You can add the two environment variables to the system to change the location of this folder.
Be aware: Any settings done before changing the variables are 'lost' as the folder structure is recreated.
This can be fixed of course by copying / moving the old structure to the new one.
You can change the variables by:
  1. Right click on My Computer
  2. Select Properties
  3. Click Advanced
  4. Click Environment Variables
  5. Add a User variable or System variable called JDEV_USER_HOME and point it to e.g. d:\oracle\jdev_home
  6. Add a User variable or System variable called JDEV_USER_DIR and point it to e.g. d:\oracle\jdev_home
  7. Click OK, OK and OK
  8. Start JDeveloper



No comments:

Post a Comment