users@glassfish.java.net

Problems with GlassFish trying to compile properties file

From: <glassfish_at_javadesktop.org>
Date: Thu, 24 Jul 2008 14:26:30 PDT

I'm migrating a web app from Tomcat to GlassFish and have run into a problem with a 3rd party library that handles network-attached encryption. We are using an Ingrian NAE device for the encryption which requires as setup to drop in a IngrianNAE.jar file and a IngrianNAE.properties file in the [b]<JAVA_JDK_HOME>\jre\lib\ext[/b] directory. This setup works just fine for Tomcat. When I deploy to GlassFish though and I launch my web application I get the following error:

--------------------------------------------------------------------------------------------------------------------
org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP

PWC6199: Generated servlet error:
    [javac] error: error reading C:\tools\java\jdk1.5.0_06\jre\lib\ext\IngrianNAE.properties; error in opening zip file

PWC6199: Generated servlet error:
    [javac] Note: C:\tools\glassfish\nodeagents\nodeagent1\instance-1\generated\jsp\j2ee-modules\MyWebApp\org\apache\jsp\login_jsp.java uses unchecked or unsafe operations.

PWC6199: Generated servlet error:
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error
--------------------------------------------------------------------------------------------------------------------

So it looks like GlassFish is trying to read the IngrianNAE.properties file as a jar file. When I remove this file the app will compile and launch but the encryption through the NAE device will fail because it needs the properties file there. I can then add the properties file back in and it will work. It looks like GlassFish only complains about the properties file when it first compiles the jsps when I first start up the app. So how can I fix this so I can deploy apps without having to do all this manual work (hide the properties file, compile app, then add the properties file back in, restart server)? And why would Tomcat not have a problem with this same Ingrian setup?

I have already tried to place the properties file in a jar file, this keeps GlassFish from complaining about compilation but the Ingrian encryption will not work with the properties file in a jar file. I can't place the properties file anywhere else, this is how the Ingrian device and library works and it's 3rd party so can't change that. Ideally there would be a way to make GlassFish ignore the properties file when "compiling the jsps".

Any ideas? I am really stuck and this needs to figured out for a successful migration into GlassFish. Several of our other apps use the Ingrian NAE device and library the same way too.
[Message sent by forum member 'chile62' (chile62)]

http://forums.java.net/jive/thread.jspa?messageID=289187