Problems with GlassFish trying to compile properties file

View: New views
4 Messages — Rating Filter:   Alert me  

Problems with GlassFish trying to compile properties file

by glassfish-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


RE: Problems with GlassFish trying to compile properties file

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try the following:

1. Put the JAR file property file anywhere on your filesystem,
   but not in the lib/ext directory of your JDK/JRE.

2. Open up the administration console and add a Classpath
   prefix pointing to the JAR file. See JVM Settings and
   then the Path Settings.

Let me know if that works ;)

-----Original Message-----
From: glassfish@... [mailto:glassfish@...]
Sent: Thursday, July 24, 2008 3:27 PM
To: users@...
Subject: Problems with GlassFish trying to compile properties file

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: RE: Problems with GlassFish trying to compile properties file

by glassfish-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This worked! Thank you.

To recap for others with similar problems: Having a properties file in the jre/lib/ext directory causes problems compiling jsps because the app server tries to treat the properties file as a jar file to use as the class path to compile jsps. For my case using the Ingrian device setup, the properties file is tied to the jar file location. The Ingrian device looks for the <path to ingrian.jar>/ingrian.properties file. By moving both of these out of jre/lib/ext directory and like you said adding the path to the ingrian.jar file to the jvm classpath options of Glassfish, the ingrian jar file was found and the properties file was no longer in the jre/lib/ext directory causing the jsp compile to fail.
[Message sent by forum member 'chile62' (chile62)]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: RE: Problems with GlassFish trying to compile properties file

by glassfish-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Let us take a look. Preferably, this should work without the workaround suggested by Manfred (but still, thanks for the workaround, Manfred!).
[Message sent by forum member 'jluehe' (jluehe)]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price