Tuesday, September 18, 2012

APEX Listener 1.1.4 on Windows ... ILLEGAL_CHARACTER problems

I am currently setting up the APEX Listener at a new customer. Unfortunately they are running Windows ;).

To be more precise, they are running Windows 2008 Server R2 (64bit). I have installed Apache http server 2.2.22 and Apache Tomcat 7.0.30.

Everything went fine so far. Then I went on installing the APEX Listener 1.1.4. But I couldn't get it to work, I always received the following errors:

18.09.2012 09:59:23 org.apache.catalina.core.StandardContext listenerStart
SCHWERWIEGEND: Exception sending context initialized event to listener instance of class oracle.dbtools.rt.web.SCListener
java.lang.IllegalArgumentException: oracle.dbtools.rt.util.FilePathSyntaxException: ILLEGAL_CHARACTER
at oracle.dbtools.rt.util.Files.checkLegal(Files.java:133)
at oracle.dbtools.rt.util.Files.file(Files.java:98)
at oracle.dbtools.apex.config.ApexConfigFile.chooseExistingFile(ApexConfigFile.java:80)
at oracle.dbtools.apex.config.ApexConfigFile.choose(ApexConfigFile.java:57)
at oracle.dbtools.apex.config.ApexConfig.init(ApexConfig.java:149)

Upon researching the issue, I have found the following threads on the APEX Listener forum: 

The problem seems to be the within the APEX listener. In order to find the proper location for the configuration files, it will look in different locations on the server. It also checks the environment, the user home variable and the temp directory. Somehow the validation algorithm didn't account for Windows ;).

There is a workaround to set these specific environment variables for Java manually, but I didn't want to change the environment there to fix the problem. 

Anyway, I just reverted to 1.1.3 and everything worked fine!