RE: PostgreSQL won't work - any ideas appreciated

2002-05-30 Thread Berin Loritsch

> From: Skip Carter [mailto:[EMAIL PROTECTED]] 
> 
> > Once I get this figured out I PROMISE TO CREATE DOCUMENTATION :)
> 
>   I have PostgreSQL working just fine here.  I had to add the
> location of postgres.jar to the classpath in catalina.sh
> since it is not normally in the default classpath on 
> my system.
> 
> The line in catalina.sh:
> 
> CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar
> 
> was changed to:
> 
> CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:/usr
> /local/java/postg
> resql.jar
> 
> 
>The  element of cocoon.xconf is just a reference to 
> the database URL for that particular data source:
> 
>jdbc:postgresql://dbserver.example.com:5432/books


Having written the datasource pooling code, I am aware of what the
 entry is supposed to be.  I was saying that you might want
to include the  element with the classname to that entry
in cocoon.xconf.

Regarding the location of the Driver jars, there are three solutions:

1) Include it in the WEB-INF/lib directory in your webapp
   * It is always included with the webapp
   * No additional install step is necessary
   * Not all servlet containers respect the WEB-INF/lib contract
 (IBM WebSPhere moves the libs, but most current containers
 work properly now).

2) Include it in the $JAVA_HOME/jre/lib/ext directory
   * It is available to all Java applications on the machine
   * It is an additional install step, but simple to do.
   * If the webapp is moved, you have to make sure the driver
 exists on the new machine or new JVM.

3) Do what you did and alter the Servlet Container's default
   CLASSPATH.
   * It is available to all webapps in the contianer
   * It is an additional install step, and in some cases not trivial
   * Each servlet container has a different method of doing this,
 and some don't allow it at all.

Of the three, 1 or 2 is preferred.  2 should only be considered for
jars that are not likely to cause a conflict like a database driver.
While the first option works 90% of the time, you do end up with
duplicate drivers.  It is not the end of the world though.


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: PostgreSQL won't work - any ideas appreciated

2002-05-30 Thread Skip Carter



> I would appreciate help on this from anyone - I've tried all suggestions -- error
> messages are below - Please note that I've already tried:
> 
> snip...
> * Add a org.postgresql.Driver element into your 
> config (under the  element is good).
> snip
> 
> as suggested by Berin.
> 
> Once I get this figured out I PROMISE TO CREATE DOCUMENTATION :)

I have PostgreSQL working just fine here.  I had to add the
location of postgres.jar to the classpath in catalina.sh
since it is not normally in the default classpath on my system.

The line in catalina.sh:

CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar

was changed to:

CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:/usr/local/java/postg
resql.jar


   The  element of cocoon.xconf is just a reference to the database
URL for that particular data source:

   jdbc:postgresql://dbserver.example.com:5432/books



-- 
 Dr. Everett (Skip) Carter  Phone: 831-641-0645 FAX:  831-641-0647
 Taygeta Scientific Inc.INTERNET: [EMAIL PROTECTED]
 1340 Munras Ave., Suite 314WWW: http://www.taygeta.com
 Monterey, CA. 93940












-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: PostgreSQL won't work - any ideas appreciated

2002-05-29 Thread Kenny Chow

Are you referring to this error, AbstractMethodError
at
org.apache.avalon.excalibur.datasource.JdbcConnection.prepareStatement(Unknown
Source) ? If so, I am sorry for reponding to the wrong
thread. 

--- daniel robinson <[EMAIL PROTECTED]> wrote:
> Kenny,
> 
> Thanks for the response but I have no idea what you
> mean by "two resources"
> could you explain?
> 
> Thanks,
> 
> Dan
> 
> Kenny Chow wrote:
> 
> > If I understand it correctly, there should be two
> > resources are configured to bind to the same
> address.
> >
> > So look for that. Just an idea.
> >
> > --- daniel robinson <[EMAIL PROTECTED]> wrote:
> > > Anyone,
> > >
> > > I would appreciate help on this from anyone -
> I've
> > > tried all suggestions -- error
> > > messages are below - Please note that I've
> already
> > > tried:
> > >
> > > snip...
> > > * Add a org.postgresql.Driver
> > > element into your 
> > > config (under the  element is good).
> > > ...snip
> > >
> > > as suggested by Berin.
> > >
> > > Once I get this figured out I PROMISE TO CREATE
> > > DOCUMENTATION :)
> > >
> > > Thanks,
> > >
> > > Dan
> > >
> > > Lajos Moczar wrote:
> > >
> > > > I don't know PostgreSQL, but you might try
> putting
> > > the jar file in
> > > > cocoon/WEB-INF/lib. I have found cases where
> > > cocoon doesn't have access
> > > > to the jars in $CATALINA_HOME/common/lib, even
> > > though it is supposed to.
> > > >
> > > > If that doesn't fix the problem, you'll have
> to
> > > post the error message.
> > > >
> > > > Lajos
> > > >
> > > > daniel robinson wrote:
> > > >
> > > > > Ok,
> > > > >
> > > > > I commented out the hsqldb stuff and this
> error
> > > has gone away - but I can't
> > > > > get PostgreSQL to work correctly.
> > > > >
> > > > > I've created the sample DB and modified
> > > cocoon.xconf:
> > > > >
> > > > >   
> > > > > 
> > > > >   
> > > > >   true
> > > > >   jdbc:postgresql:testdb
> > > > >   unknown
> > > > >   
> > > > > 
> > > > >   
> > > > >
> > > > > and Web.xml contains:
> > > > >
> > > > >  
> > > > >   load-class
> > > > >   
> > > > > org.postgresql.Driver
> > > > >   
> > > > > 
> > > > >
> > > > > and pgjdbc1.jar (containing
> > > org.postresql.Driver) is in Tomcat/common/lib
> and
> > > > > I have created the sample tables in testdb
> > > within PostgreSQL.
> > > > >
> > > > > Help appreciated.
> > > > >
> > > > > Lajos Moczar wrote:
> > > > >
> > > > >
> > > > >>Comment out the hsqldb stuff in
> cocoon.xconf,
> > > unless you really need it.
> > > > >>
> > > > >>Lajos
> > > > >>
> > > > >>daniel robinson wrote:
> > > > >>
> > > > >>
> > > > >>>List,
> > > > >>>
> > > > >>>Is there some comprehensive DB configure
> doc
> > > for C2?  I've looked
> > > > >>>throught the listserv but its very
> piecemeal
> > > (sp?).  I keep getting this
> > > > >>>error from tomcat:
> > > > >>>
> > > > >>>Loading catalog:
> > > /localhost/cocoon/resources/entities/catalog
> > > > >>>Server.run/init: java.net.BindException:
> > > Address in use: JVM_Bind
> > > > >>>java.net.BindException: Address in use:
> > > JVM_Bind
> > > > >>>at
> > > java.net.PlainSocketImpl.socketBind(Native
> Method)
> > > > >>>at
> > >
> >
>
java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405)
> > > > >>>at
> > >
> java.net.ServerSocket.(ServerSocket.java:170)
> > > > >>>at
> > >
> java.net.ServerSocket.(ServerSocket.java:82)
> > > > >>>at
> > > org.hsqldb.Server.run(Server.java:131)
> > > > >>>at
> > > org.hsqldb.Server.main(Server.java:78)
> > > > >>>at
> > > >
> > >
> >
>
>>>org.apache.cocoon.components.hsqldb.ServerImpl.run(ServerImpl.java:101)
> > > > >>>at
> > > java.lang.Thread.run(Thread.java:484)
> > > > >>>Starting service Tomcat-Apache
> > > > >>>Apache Tomcat/4.0.3
> > > > >>>
> > > > >>>help appreciated.
> > > > >>>
> > > > >>>Dan
> > > > >>>
> > >
> > >
> > >
> >
>
-
> > > Please check that your question has not already
> been
> > > answered in the
> > > FAQ before posting.
> > > 
> > >
> > > To unsubscribe, e-mail:
> > > <[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <[EMAIL PROTECTED]>
> > >
> >
> > __
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> >
> >
>
-
> > Please check that your question has not already
> been answered in the
> > FAQ before posting.
> 
> >
> > To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <[EMAIL PROTECTED]>
> 
> 
>
-
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> 
> 

Re: PostgreSQL won't work - any ideas appreciated

2002-05-29 Thread daniel robinson

Kenny,

Thanks for the response but I have no idea what you mean by "two resources"
could you explain?

Thanks,

Dan

Kenny Chow wrote:

> If I understand it correctly, there should be two
> resources are configured to bind to the same address.
>
> So look for that. Just an idea.
>
> --- daniel robinson <[EMAIL PROTECTED]> wrote:
> > Anyone,
> >
> > I would appreciate help on this from anyone - I've
> > tried all suggestions -- error
> > messages are below - Please note that I've already
> > tried:
> >
> > snip...
> > * Add a org.postgresql.Driver
> > element into your 
> > config (under the  element is good).
> > ...snip
> >
> > as suggested by Berin.
> >
> > Once I get this figured out I PROMISE TO CREATE
> > DOCUMENTATION :)
> >
> > Thanks,
> >
> > Dan
> >
> > Lajos Moczar wrote:
> >
> > > I don't know PostgreSQL, but you might try putting
> > the jar file in
> > > cocoon/WEB-INF/lib. I have found cases where
> > cocoon doesn't have access
> > > to the jars in $CATALINA_HOME/common/lib, even
> > though it is supposed to.
> > >
> > > If that doesn't fix the problem, you'll have to
> > post the error message.
> > >
> > > Lajos
> > >
> > > daniel robinson wrote:
> > >
> > > > Ok,
> > > >
> > > > I commented out the hsqldb stuff and this error
> > has gone away - but I can't
> > > > get PostgreSQL to work correctly.
> > > >
> > > > I've created the sample DB and modified
> > cocoon.xconf:
> > > >
> > > >   
> > > > 
> > > >   
> > > >   true
> > > >   jdbc:postgresql:testdb
> > > >   unknown
> > > >   
> > > > 
> > > >   
> > > >
> > > > and Web.xml contains:
> > > >
> > > >  
> > > >   load-class
> > > >   
> > > > org.postgresql.Driver
> > > >   
> > > > 
> > > >
> > > > and pgjdbc1.jar (containing
> > org.postresql.Driver) is in Tomcat/common/lib and
> > > > I have created the sample tables in testdb
> > within PostgreSQL.
> > > >
> > > > Help appreciated.
> > > >
> > > > Lajos Moczar wrote:
> > > >
> > > >
> > > >>Comment out the hsqldb stuff in cocoon.xconf,
> > unless you really need it.
> > > >>
> > > >>Lajos
> > > >>
> > > >>daniel robinson wrote:
> > > >>
> > > >>
> > > >>>List,
> > > >>>
> > > >>>Is there some comprehensive DB configure doc
> > for C2?  I've looked
> > > >>>throught the listserv but its very piecemeal
> > (sp?).  I keep getting this
> > > >>>error from tomcat:
> > > >>>
> > > >>>Loading catalog:
> > /localhost/cocoon/resources/entities/catalog
> > > >>>Server.run/init: java.net.BindException:
> > Address in use: JVM_Bind
> > > >>>java.net.BindException: Address in use:
> > JVM_Bind
> > > >>>at
> > java.net.PlainSocketImpl.socketBind(Native Method)
> > > >>>at
> >
> java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405)
> > > >>>at
> > java.net.ServerSocket.(ServerSocket.java:170)
> > > >>>at
> > java.net.ServerSocket.(ServerSocket.java:82)
> > > >>>at
> > org.hsqldb.Server.run(Server.java:131)
> > > >>>at
> > org.hsqldb.Server.main(Server.java:78)
> > > >>>at
> > >
> >
> >>>org.apache.cocoon.components.hsqldb.ServerImpl.run(ServerImpl.java:101)
> > > >>>at
> > java.lang.Thread.run(Thread.java:484)
> > > >>>Starting service Tomcat-Apache
> > > >>>Apache Tomcat/4.0.3
> > > >>>
> > > >>>help appreciated.
> > > >>>
> > > >>>Dan
> > > >>>
> >
> >
> >
> -
> > Please check that your question has not already been
> > answered in the
> > FAQ before posting.
> > 
> >
> > To unsubscribe, e-mail:
> > <[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <[EMAIL PROTECTED]>
> >
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: PostgreSQL won't work - any ideas appreciated

2002-05-29 Thread Kenny Chow

If I understand it correctly, there should be two
resources are configured to bind to the same address. 

So look for that. Just an idea.

--- daniel robinson <[EMAIL PROTECTED]> wrote:
> Anyone,
> 
> I would appreciate help on this from anyone - I've
> tried all suggestions -- error
> messages are below - Please note that I've already
> tried:
> 
> snip...
> * Add a org.postgresql.Driver
> element into your 
> config (under the  element is good).
> ...snip
> 
> as suggested by Berin.
> 
> Once I get this figured out I PROMISE TO CREATE
> DOCUMENTATION :)
> 
> Thanks,
> 
> Dan
> 
> Lajos Moczar wrote:
> 
> > I don't know PostgreSQL, but you might try putting
> the jar file in
> > cocoon/WEB-INF/lib. I have found cases where
> cocoon doesn't have access
> > to the jars in $CATALINA_HOME/common/lib, even
> though it is supposed to.
> >
> > If that doesn't fix the problem, you'll have to
> post the error message.
> >
> > Lajos
> >
> > daniel robinson wrote:
> >
> > > Ok,
> > >
> > > I commented out the hsqldb stuff and this error
> has gone away - but I can't
> > > get PostgreSQL to work correctly.
> > >
> > > I've created the sample DB and modified
> cocoon.xconf:
> > >
> > >   
> > > 
> > >   
> > >   true
> > >   jdbc:postgresql:testdb
> > >   unknown
> > >   
> > > 
> > >   
> > >
> > > and Web.xml contains:
> > >
> > >  
> > >   load-class
> > >   
> > > org.postgresql.Driver
> > >   
> > > 
> > >
> > > and pgjdbc1.jar (containing
> org.postresql.Driver) is in Tomcat/common/lib and
> > > I have created the sample tables in testdb
> within PostgreSQL.
> > >
> > > Help appreciated.
> > >
> > > Lajos Moczar wrote:
> > >
> > >
> > >>Comment out the hsqldb stuff in cocoon.xconf,
> unless you really need it.
> > >>
> > >>Lajos
> > >>
> > >>daniel robinson wrote:
> > >>
> > >>
> > >>>List,
> > >>>
> > >>>Is there some comprehensive DB configure doc
> for C2?  I've looked
> > >>>throught the listserv but its very piecemeal
> (sp?).  I keep getting this
> > >>>error from tomcat:
> > >>>
> > >>>Loading catalog:
> /localhost/cocoon/resources/entities/catalog
> > >>>Server.run/init: java.net.BindException:
> Address in use: JVM_Bind
> > >>>java.net.BindException: Address in use:
> JVM_Bind
> > >>>at
> java.net.PlainSocketImpl.socketBind(Native Method)
> > >>>at
>
java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405)
> > >>>at
> java.net.ServerSocket.(ServerSocket.java:170)
> > >>>at
> java.net.ServerSocket.(ServerSocket.java:82)
> > >>>at
> org.hsqldb.Server.run(Server.java:131)
> > >>>at
> org.hsqldb.Server.main(Server.java:78)
> > >>>at
> >
>
>>>org.apache.cocoon.components.hsqldb.ServerImpl.run(ServerImpl.java:101)
> > >>>at
> java.lang.Thread.run(Thread.java:484)
> > >>>Starting service Tomcat-Apache
> > >>>Apache Tomcat/4.0.3
> > >>>
> > >>>help appreciated.
> > >>>
> > >>>Dan
> > >>>
> 
> 
>
-
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> 
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




PostgreSQL won't work - any ideas appreciated

2002-05-29 Thread daniel robinson

Anyone,

I would appreciate help on this from anyone - I've tried all suggestions -- error
messages are below - Please note that I've already tried:

snip...
* Add a org.postgresql.Driver element into your 
config (under the  element is good).
...snip

as suggested by Berin.

Once I get this figured out I PROMISE TO CREATE DOCUMENTATION :)

Thanks,

Dan

Lajos Moczar wrote:

> I don't know PostgreSQL, but you might try putting the jar file in
> cocoon/WEB-INF/lib. I have found cases where cocoon doesn't have access
> to the jars in $CATALINA_HOME/common/lib, even though it is supposed to.
>
> If that doesn't fix the problem, you'll have to post the error message.
>
> Lajos
>
> daniel robinson wrote:
>
> > Ok,
> >
> > I commented out the hsqldb stuff and this error has gone away - but I can't
> > get PostgreSQL to work correctly.
> >
> > I've created the sample DB and modified cocoon.xconf:
> >
> >   
> > 
> >   
> >   true
> >   jdbc:postgresql:testdb
> >   unknown
> >   
> > 
> >   
> >
> > and Web.xml contains:
> >
> >  
> >   load-class
> >   
> > org.postgresql.Driver
> >   
> > 
> >
> > and pgjdbc1.jar (containing org.postresql.Driver) is in Tomcat/common/lib and
> > I have created the sample tables in testdb within PostgreSQL.
> >
> > Help appreciated.
> >
> > Lajos Moczar wrote:
> >
> >
> >>Comment out the hsqldb stuff in cocoon.xconf, unless you really need it.
> >>
> >>Lajos
> >>
> >>daniel robinson wrote:
> >>
> >>
> >>>List,
> >>>
> >>>Is there some comprehensive DB configure doc for C2?  I've looked
> >>>throught the listserv but its very piecemeal (sp?).  I keep getting this
> >>>error from tomcat:
> >>>
> >>>Loading catalog: /localhost/cocoon/resources/entities/catalog
> >>>Server.run/init: java.net.BindException: Address in use: JVM_Bind
> >>>java.net.BindException: Address in use: JVM_Bind
> >>>at java.net.PlainSocketImpl.socketBind(Native Method)
> >>>at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405)
> >>>at java.net.ServerSocket.(ServerSocket.java:170)
> >>>at java.net.ServerSocket.(ServerSocket.java:82)
> >>>at org.hsqldb.Server.run(Server.java:131)
> >>>at org.hsqldb.Server.main(Server.java:78)
> >>>at
> >>>org.apache.cocoon.components.hsqldb.ServerImpl.run(ServerImpl.java:101)
> >>>at java.lang.Thread.run(Thread.java:484)
> >>>Starting service Tomcat-Apache
> >>>Apache Tomcat/4.0.3
> >>>
> >>>help appreciated.
> >>>
> >>>Dan
> >>>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>