| From: | scottpetersen at softhome(dot)net (Scott Petersen) | 
|---|---|
| To: | |
| Subject: | [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode | 
| Date: | 2006-10-31 19:59:29 | 
| Message-ID: | 4547AB21.1090109@softhome.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pljava-dev | 
Thank you very much helpful mail list readers.
After checking I have verified that the problem is NOT PLJava (the code 
from Mark verified that the value of HEADLESS was TRUE).  PLJava is 
correctly handling HEADLESS mode.  But, I am still getting the error 
indicated.  I am going a new direction looking at a toolkit called PJA 
(www.eteks.com) to see if I can get around the issue that I am having.
Sorry for the band width, but THANKS for all of your help.
Scott.
.  Mark Mitchell wrote:
> Have you tried writing a simple java class to run just to make sure
> headless works outside of pljava?
>
> This class will do the check:
>
> import javax.swing.*;
>
> public class HTest {
>
>        public static void main(String[] args) {
>                JButton b = new JButton("Testing Headless");
>        }
> }
>
> If headless is not working, you'll get an exception.  I actually found
> that on my CentOS linux box, java.awt.headless was by default set to
> true, and therefore I only got the link exception when running with
> -Djava.awt.headless=false.
>
> -Mark
>
> On 10/31/06, Scott Petersen <scottpetersen at softhome.net> wrote:
>> Thomas Hallgren wrote:
>> > Scott Petersen wrote:
>> >> Supportive helpers,
>> >>
>> >> I am running Postgresql 8.1.3 on a Linux machine and attempting to
>> >> execute some Java code that needs to access libawt.so in headless
>> >> mode.  After looking at the page
>> >> http://wiki.tada.se/wiki/display/pljava/Module+Configuration I do not
>> >> seem to find a way to do this.  In reviewing the page
>> >> http://forum.java.sun.com/thread.jspa?threadID=760969&start=105 it
>> >> instructs me to start java with "-Djava.awt.headless=true".  I need
>> >> some direction on how to accomplish this task.
>> >>
>> > Did you try adding:
>> >
>> >  pljava.vmoptions = '-Djava.awt.headless=true'
>> >
>> > to the postgresql.conf file?
>> >
>> > Regards,
>> > Thomas Hallgren
>> >
>> >
>> Thomas,
>>
>> Thanks for the information.  I thought that I had set this previously,
>> but in order to verify that this was the case I checked my
>> postgresql.conf file and it contains the following:
>>
>> #--------------------------------------------------------------------------- 
>>
>> # CUSTOMIZED OPTIONS
>> #--------------------------------------------------------------------------- 
>>
>>
>> custom_variable_classes = 'pljava'              # list of custom
>> variable class names
>> pljava.classpath='/usr/local/pljava/pljava.jar'
>> pljava.statement_cache_size=10
>> pljava.release_lingering_savepoints = true
>> pljava.vmoptions = '-Djava.awt.headless=true'
>> pljava.debug = false
>>
>>
>>
>> I then stopped postgresql and then restarted postgresql.  I then reran
>> my application with the same error result.
>>
>> Any further help would be appreciated..
>>
>> Scott.
>> _______________________________________________
>> Pljava-dev mailing list
>> Pljava-dev at gborg.postgresql.org
>> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Markus Schaber | 2006-11-01 07:38:14 | [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode | 
| Previous Message | Mark Mitchell | 2006-10-31 17:31:14 | [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode |