On 23/02/2013 14:56, Edward Siewick wrote:
OK, with fresh eyes, in the error messages is:

Feb 22, 2013 11:44:23 PM org.apache.catalina.core.NamingContextListener addResource WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool.DataSourceFactory]

This is more meaningful.

From:
http://stackoverflow.com/questions/12462842/org-apache-tomcat-jdbc-pool-datasource-is-no-longer-in-the-tomcat-7-dbcp-jar

"Class org.apache.tomcat.jdbc.pool.DataSource is included in tomcat-jdbc.jar, not tomcat-dbcp.jar. The Tomcat JDBC Connection Pool is a replacement for commons-dbcp, of which tomcat-dbcp is just a renamed version. The jar file tomcat-jdbc.jar is not included in the default Tomcat download. You can download it from Maven Central."

(http://search.maven.org/#search%7Cga%7C1%7Ctomcat-jdbc)

So, the "Run Syncope in real environments" documentation should note that for postgres we need both of
postgresql-9.2-1002.jdbc4.jar
tomcat-jdbc-7.0.37.jar
in $CATALINIA_HOME/lib/.

Hi Edward,
which Apache Tomcat 7 distribution have you downloaded?

We have been deploying Apache Syncope with Tomcat 7 and PostgreSQL in various environments and had no necessity to download anything but the standard Apache Tomcat 7 distribution (e.g. the "zip" or "tar.gz" right under Binary Distributions / core at [1])

As the comments of the StackOverflow answers mentioned above say, in fact:

It's included, at least, in 7.0.37 tar.gz -- Victor Sorokin 19 hours ago

You're right, I meant that it is not included in some installations, like the Debian/Ubuntu package for Linux. Edited my answer to make it more clear. -- David Levesque 19 hours ago

I guess this means that you installed Apache Tomcat 7 via apt-get. I have updated the wiki page at [2] with a warning about this.

I've put these in /usr/share/java/

cd /usr/share/tomcat7/lib

ln -s ../../java/postgresql-9.2-1002.jdbc4.jar ./postgresql.jar
ln -s ../../java/tomcat-jdbc-7.0.37.jar ./tomcat-jdbc.jar

And now,
/var/log/postgresql/postgresql-9.1-main.log
is full of:
FATAL:  password authentication failed for user

So this is good; at least we're hitting postgres....

One of the main issues with PostgreSQL is making a simple plain authentication working for JDBC, I know... :-S
I'd suggest you to take a look at [3] for this.

HTH

Regards.

[1] http://tomcat.apache.org/download-70.cgi
[2] https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments [3] http://stackoverflow.com/questions/4562471/connecting-to-local-instance-of-postgresql-with-jdbc

--
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/

Reply via email to