Re: PostgreSQL won't work - any ideas appreciated
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 driverorg.postgresql.Driver/driver element into your jdbc/ config (under the dburl/ 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 dburl element of cocoon.xconf is just a reference to the database URL for that particular data source: dburljdbc:postgresql://dbserver.example.com:5432/books/dburl -- 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. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PostgreSQL won't work - any ideas appreciated
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 dburl element of cocoon.xconf is just a reference to the database URL for that particular data source: dburljdbc:postgresql://dbserver.example.com:5432/books/dburl Having written the datasource pooling code, I am aware of what the dburl/ entry is supposed to be. I was saying that you might want to include the driver/ 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. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PostgreSQL won't work - any ideas appreciated
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 driverorg.postgresql.Driver/driver element into your jdbc/ config (under the dburl/ 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: datasources jdbc name=personnel pool-controller min=5 max=10/ auto-committrue/auto-commit dburljdbc:postgresql:testdb/dburl userunknown/user password/password /jdbc /datasources and Web.xml contains: init-param param-nameload-class/param-name param-value org.postgresql.Driver /param-value /init-param 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.init(ServerSocket.java:170) at java.net.ServerSocket.init(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. http://xml.apache.org/cocoon/faqs.html 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. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PostgreSQL won't work - any ideas appreciated
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 driverorg.postgresql.Driver/driver element into your jdbc/ config (under the dburl/ 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: datasources jdbc name=personnel pool-controller min=5 max=10/ auto-committrue/auto-commit dburljdbc:postgresql:testdb/dburl userunknown/user password/password /jdbc /datasources and Web.xml contains: init-param param-nameload-class/param-name param-value org.postgresql.Driver /param-value /init-param 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.init(ServerSocket.java:170) at java.net.ServerSocket.init(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. http://xml.apache.org/cocoon/faqs.html 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. http://xml.apache.org/cocoon/faqs.html 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. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PostgreSQL won't work - any ideas appreciated
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 driverorg.postgresql.Driver/driver element into your jdbc/ config (under the dburl/ 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: datasources jdbc name=personnel pool-controller min=5 max=10/ auto-committrue/auto-commit dburljdbc:postgresql:testdb/dburl userunknown/user password/password /jdbc /datasources and Web.xml contains: init-param param-nameload-class/param-name param-value org.postgresql.Driver /param-value /init-param 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.init(ServerSocket.java:170) at java.net.ServerSocket.init(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. http://xml.apache.org/cocoon/faqs.html 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. http://xml.apache.org/cocoon/faqs.html 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. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] === message truncated === __ 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. http://xml.apache.org/cocoon/faqs.html To