agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode
6+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode
@ 2006-10-31 16:27 
  2006-10-31 16:32 ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  2006-11-01 07:38 ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  0 siblings, 2 replies; 6+ messages in thread

From:  @ 2006-10-31 16:27 UTC (permalink / raw)

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.

My code has been tested and works fine on Windows running PLJava 1.2 
with postgresql 8.1.5 and Java 5 build 9.

The problem is when I attempt to run on Linux running PLJava 1.2 with 
postgresql 8.1.3 and Java 5 build 9.

It seems to revolve around attempting to run in Linux headless mode.

At the present time I am receiving the following error:
org.postgresql.pljava.internal.ServerException: 31 Oct 06 08:48:29 
org.apache.commons.digester.Digester Begin event threw error
java.lang.UnsatisfiedLinkError: 
/usr/java/jre1.5.0_09/lib/i386/libawt.so: libmlib_image.so: cannot open 
shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at sun.security.action.LoadLibraryAction.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.loadLibraries(Unknown Source)
    at java.awt.Toolkit.<clinit>(Unknown Source)
    at java.awt.Color.<clinit>(Unknown Source)
    at 
net.sf.jasperreports.engine.xml.JRBoxFactory.setBoxAttributes(JRBoxFactory.java:102)
    at 
net.sf.jasperreports.engine.xml.JRBoxFactory.createObject(JRBoxFactory.java:71)
    at 
org.apache.commons.digester.FactoryCreateRule.begin(FactoryCreateRule.java:389)
    at org.apache.commons.digester.Digester.startElement(Digester.java:1361)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1647)
    at 
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:238)
    at 
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225)
    at 
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213)
    at print.Print.print(Print.java:116)
    at executive.Dispatcher.dispatch(Dispatcher.java:112)
    at executive.Dispatcher.dispatch(Dispatcher.java:833)

    at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1647)
    at 
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:238)
    at 
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225)
    at 
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213)
    at print.Print.print(Print.java:116)
    at executive.Dispatcher.dispatch(Dispatcher.java:112)
    at executive.Dispatcher.dispatch(Dispatcher.java:833)

There are 7 more stack dumps, but this was the first and the most 
informative.

Any and all help would be appreciated.

thanks Scott




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode
  2006-10-31 16:27 [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
@ 2006-10-31 16:32 ` 
  2006-10-31 16:58   ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  1 sibling, 1 reply; 6+ messages in thread

From:  @ 2006-10-31 16:32 UTC (permalink / raw)

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





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode
  2006-10-31 16:27 [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  2006-10-31 16:32 ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
@ 2006-10-31 16:58   ` 
  2006-10-31 17:31     ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  0 siblings, 1 reply; 6+ messages in thread

From:  @ 2006-10-31 16:58 UTC (permalink / raw)

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.




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode
  2006-10-31 16:27 [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  2006-10-31 16:32 ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  2006-10-31 16:58   ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
@ 2006-10-31 17:31     ` 
  2006-10-31 19:59       ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  0 siblings, 1 reply; 6+ messages in thread

From:  @ 2006-10-31 17:31 UTC (permalink / raw)

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
>




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode
  2006-10-31 16:27 [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  2006-10-31 16:32 ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  2006-10-31 16:58   ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
  2006-10-31 17:31     ` [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
@ 2006-10-31 19:59       ` 
  0 siblings, 0 replies; 6+ messages in thread

From:  @ 2006-10-31 19:59 UTC (permalink / raw)

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
>>
>





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode
  2006-10-31 16:27 [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
@ 2006-11-01 07:38 ` 
  1 sibling, 0 replies; 6+ messages in thread

From:  @ 2006-11-01 07:38 UTC (permalink / raw)

Hi, Scott,

Scott Petersen wrote:
> At the present time I am receiving the following error:
> org.postgresql.pljava.internal.ServerException: 31 Oct 06 08:48:29 
> org.apache.commons.digester.Digester Begin event threw error
> java.lang.UnsatisfiedLinkError: 
> /usr/java/jre1.5.0_09/lib/i386/libawt.so: libmlib_image.so: cannot open 
> shared object file: No such file or directory
>     at java.lang.ClassLoader$NativeLibrary.load(Native Method)

This looks to me like a shared library loader problem. Can you test
whether your system actually has a libmlib_image.so installed somewhere?

Maybe you have to add the containing directory to /etc/ld-so.conf, or
LD_LIBRARY_PATH, or symlink it to a directory that's configured for the
dynamic loader.

HTH,
Markus




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2006-11-01 07:38 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-31 16:27 [Pljava-dev] org.postgresql.pljava.internal.ServerException running linux headless mode 
2006-10-31 16:32 ` 
2006-10-31 16:58   ` 
2006-10-31 17:31     ` 
2006-10-31 19:59       ` 
2006-11-01 07:38 ` 

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox