[Pljava-dev] Posmaster start and stop automatically

Thomas Hallgren thhal at mailblocks.com
Mon Sep 13 20:50:08 UTC 2004


Rodrigo,

 >     Excuse-me Thomas, when i refer classpath isn't a postgresql 
pljava.classpath, but classpath Windows XP.
 > 
I understand that. What I'm trying to say is that the postmaster process 
(your service) doesn't need the Windows XP classpath. The classpath for 
the service should be set using the postgresql.conf and it should only 
appoint the pljava.jar.

 >     In the postgresql.conf, I use
 >  
 >     dynamic_library_path = 'E:\\PostgreSQL80_Beta2\\data'
 >     custom_variable_classes = pljava
 >     #pljava.classpath = 'E:\\PostgreSQL80_Beta2\\data\\pljava.jar'
 >  
 >
 >     Note that pljava.classpath is commented, when i discomment this 
line, an error bellow ocurr and postmaster doesn't
 > start.
 >  
 >  "The PostgreSQL Database Server 8.0-beta2-dev3 service on local 
computer started and then stopped. Some
 >  services stop automatically if they have no work to do, for example, 
the Performance Logs and Alerts Services".
 >  
Are you 100% sure this happens when you uncomment that exact line? The 
reason I ask is that the line is just read and stored in a placeholder 
variable and not in any way used when the postmaster starts! Unless you 
have a syntax error or have misspelled "pljava" or "pljava.classpath", 
there's no way this can cause the postmaster to fail. The example above 
looks very OK though. Do you have a stray character at the end of the 
line or something?

The PL/Java module is not loaded until you actually call the first Java 
function (install_jar in this case) and that's when the pljava.classpath 
is examined for the first time. An error at that time will not cause the 
service to fail, it will just be reported in your current session and 
rollback the transaction.

Just to prove my point; I copied the lines above into my own 
postgresql.conf and started my postmaster without any problems, with or 
without the comment. PL/Java won't work with for me using your setting 
of course, but there's no problem starting the postmaster.

Regards,

Thomas Hallgren




More information about the Pljava-dev mailing list