× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Peter,

I'm not positive, but it looks to me like those properties are not being
picked up by the JVM when it starts.

Since you already changed the system-wide properties file, and didn't see
any change, I'm guessing that Tomcat has a user-specific
SystemDefault.properties file that is trumping the system-wide version.
(Either that, or the RUNJVA/JAVA/java command is specifying conflicting
properties, which would override the config files.)

User-specific SystemDefault.properties files are located in /home/USERID/
directory in the IFS (where USERID is the user profile that starts the
JVM).

If you know what userid the tomcat runs under (suppose it is MYTOMCAT),
then have a look in its home directory -- /home/MYTOMCAT -- and see if
there is a SystemDefault.properties file there.  (I'm guessing so...)  If
so, that's the one to add the java.version and java.awt.headless properties
to.  (And, unless there is a compelling reason to have the entire system
default to JDK 1.4 and headless AWT, I'd remove the entries you added to
the system-wide SystemDefault.properties file in /QIBM/UserData/Java400...)

If you are not sure what userid tomcat runs under, you could find it by
starting the server (if it starts) and looking at WRKACTJOB.  Of course,
that wouldn't help much if the tomcat doesn't come 'all the way up.'

Another possible scheme would involve finding the 'java' command that you
use to start the Tomcat, and adding these two properties directly to that
command (which trumps all SystemDefault.properties files everywhere.)

This might be the easiest thing to try right away -- if this works then we
know it's just a matter of finding/creating the correct
SystemDefault.properties file to edit.

So, if you want to try this tactic, just:
      1. find the java command (RUNJVA or JAVA or java in QShell) that
starts the server, and
      2. add the two properties directly to that command invocation, as
shown below:

   RUNJVA or JAVA command:
      PROP(('java.version' '1.4') ('java.awt.headless' 'true'))

   QSH java command:
      -Djava.version=1.4 -Dos400.awt.native=true

Again, command-line property specifications trump ALL
SystemDefault.properties files everywhere.

So, if this trickery does work, you have a couple options: you could just
leave the modified java command invocation as-is (dicey from an upgrade
standpoint), or remove the command line properties and put them in the
correct user-specific SystemDefault.properties file.

Anyway, sorry for all the 'guessing' (my memory isn't what it used to be,
IIRC) and I hope this helps.

-blair

java400-l-bounces@xxxxxxxxxxxx wrote on 01/06/2005 11:07:35 AM:
> We are running V5R3M0 at a customer site and have a Java servlet that
throws
> a:
>
> javax.servlet.ServletException: AWT class or API used without specifying
> property os400.awt.native=true or java.awt.headless=true
>
>
> Poking around in the archives a bit and reading the info center stuff I
> think I have set things up OK.  I put the following in the
> \QIBM\UserData\Java400\SystemDefault.properties file and restarted Tomcat
> (5.0):
>
> java.version=1.4
> java.awt.headless=true
>
> I still get the error.  So I have either put the properties in the wrong
> place or missed something somewhere else.  We also installed the PRPQ
> 5799PTL and have VNC running so I think the xWindows side of things is OK
> (the servlet renders a Jasper report in PDF format).
>
> Any ideas?
>
> Peter Helgren
> Value Added Software, Inc
> 801.581.1154 x202



  ___   _           Blair Wyman                  IBM Rochester
 ( /_)  /  _  ' _   (507)253-2891            blairw@xxxxxxxxxx
__/__)_/_<_/_/_/_'  Opinions expressed may not be those of IBM






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.