-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Jakub,
On 1/28/14, 6:17 PM, Ja kub wrote: > Problem dissapeared when I added ha-jdbc-2.0.16 dependencies into > tomcat/lib ! You would have seen the missing dependency if you had read further along in the stack trace. "Could not initialize class" usually has a "Caused by" portion for the stack trace which would have probably told you exactly which classes were missing. - -chris > j@j-Dell-System-XPS-L702X:/szkolenie/tomcat/lib_hajdbc$ unzip -v > ../hajdbc3.0_lib/ha-jdbc-3.0.0.jar | grep > net.sf.hajdbc.sql.Driver 3429 Defl:N 1646 52% 2013-12-31 > 10:17 55394556 net/sf/hajdbc/sql/DriverDatabase.class 1232 Defl:N > 524 58% 2013-12-31 10:17 fbbe1ce9 > net/sf/hajdbc/sql/DriverProxyFactory.class 2630 Defl:N 1004 > 62% 2013-12-31 10:17 35b4d591 net/sf/hajdbc/sql/Driver$1.class 1487 > Defl:N 669 55% 2013-12-31 10:17 c17fd96a > net/sf/hajdbc/sql/Driver$2.class 1522 Defl:N 672 56% > 2013-12-31 10:17 ee4dde44 net/sf/hajdbc/sql/Driver$3.class 435 > Defl:N 236 46% 2013-12-31 10:17 4834ccfd > net/sf/hajdbc/sql/Driver$DriverInvoker.class 8018 Defl:N 2794 > 65% 2013-12-31 10:17 21b57c25 net/sf/hajdbc/sql/Driver.class 719 > Defl:N 340 53% 2013-12-31 10:17 ec305738 > net/sf/hajdbc/sql/DriverInvocationHandler.class 2384 Defl:N > 1034 57% 2013-12-31 10:17 fffd8294 > net/sf/hajdbc/sql/DriverDatabaseClusterConfiguration$DriverNestedConfiguration.class > > 1574 Defl:N 605 62% 2013-12-31 10:17 72344bd7 > net/sf/hajdbc/sql/DriverDatabaseClusterConfiguration.class > j@j-Dell-System-XPS-L702X:/szkolenie/tomcat/lib_hajdbc$ unzip -v > ha-jdbc-2.0.16-rc-1-jdk1.6.jar | grep net.sf.hajdbc.sql.Driver 1640 > Defl:N 718 56% 2009-06-21 22:46 76b28996 > net/sf/hajdbc/sql/Driver$1.class 1684 Defl:N 726 57% > 2009-06-21 22:46 912651b8 net/sf/hajdbc/sql/Driver$2.class 5843 > Defl:N 2392 59% 2009-06-21 22:46 317b828f > net/sf/hajdbc/sql/Driver.class 7381 Defl:N 2819 62% > 2009-06-21 22:46 34e95098 net/sf/hajdbc/sql/DriverDatabase.class > 5270 Defl:N 1902 64% 2009-06-21 22:46 906454c7 > net/sf/hajdbc/sql/DriverDatabaseCluster.class 431 Defl:N 212 > 51% 2009-06-21 22:46 c33f88df > net/sf/hajdbc/sql/DriverDatabaseClusterMBean.class 788 Defl:N > 356 55% 2009-06-21 22:46 769c6e43 > net/sf/hajdbc/sql/DriverInvocationHandler.class 1635 Defl:N > 661 60% 2009-06-21 22:46 783a57aa > net/sf/hajdbc/sql/DriverReadInvocationStrategy.class 2755 Defl:N > 1088 61% 2009-06-21 22:46 1ad7452d > net/sf/hajdbc/sql/DriverWriteInvocationStrategy.class > > I put only one jar into tomcat/lib, and no into > petclinic/WEB-INF/lib (when it was put into petclinic/WEB-INF/lib > there where also all dependencies added by maven, and no ha-jdbc in > tomcat/lib) > > Problem dissapeared when I added ha-jdbc-2.0.16 dependencies into > tomcat/lib ! I added jibx-run-1.2.1.jar slf4j-api-1.5.7.jar > slf4j-simple-1.5.7.jar and it helped !! there is no more > > Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot > load JDBC driver class 'net.sf.hajdbc.sql.Driver' at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429) > > ~[tomcat-dbcp.jar:7.0.50] > at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371) > > ~[tomcat-dbcp.jar:7.0.50] > at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) > > ~[tomcat-dbcp.jar:7.0.50] > at > org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) > > ~[spring-jdbc-4.0.0.RELEASE.jar:4.0.0.RELEASE] > at > org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) > > ~[spring-jdbc-4.0.0.RELEASE.jar:4.0.0.RELEASE] > ... 30 common frames omitted Caused by: > java.lang.NoClassDefFoundError: Could not initialize class > net.sf.hajdbc.sql.Driver at java.lang.Class.forName0(Native Method) > ~[na:1.6.0_37] at java.lang.Class.forName(Class.java:169) > ~[na:1.6.0_37] at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1415) > > ~[tomcat-dbcp.jar:7.0.50] > ... 34 common frames omitted Jan 29, 2014 12:10:06 AM > org.apache.catalina.core.StandardContext startInternal SEVERE: > Error listenerStart > > Strange, > > Thx for help. BR Jakub > > > > > > > On Tue, Jan 28, 2014 at 11:37 PM, Caldarale, Charles R < > chuck.caldar...@unisys.com> wrote: > >>> From: Christopher Schultz >>> [mailto:ch...@christopherschultz.net] Subject: Re: class from >>> jar in tomcat/lib not found >> >>>> Caused by: java.lang.NoClassDefFoundError >> >>> Have you put both JAR files in lib/ at once? >> >> Or one in Tomcat's lib directory and another in the app's >> WEB-INF/lib. Having the same class visible to nested classloaders >> can cause the exception above. >> >> - Chuck >> >> >> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE >> PROPRIETARY MATERIAL and is thus for use only by the intended >> recipient. If you received this in error, please contact the >> sender and delete the e-mail and its attachments from all >> computers. >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJS6RhlAAoJEBzwKT+lPKRYCi0P/jq1/8r0SjHQtKwXvU1b7RpJ qCz0d0Wo2L0mEqcOOQVN6h11nUmLzrNrSUvch4eUghWjnENREl8G4MkOD7B2fxbR 8BFFO6YghFESEmwchOyQ4i3kxWRJRXe7JooDdnxABZ868pzAHwMoklLqRXyVUruu O/9DZTREsQzlgaaOE22If8grjquJXHr1XgxLOSUhOhq8PaY+Zyk+2HLwieGxFEz1 qvo3N5ZuLjJa8tymrfvQzrIWvDUD6LvkodoWci0TJRK1RB9cFkqf/ypG7MgvhhM+ L4w+eFaqF9MmmSd7QLa3NRP4S7ZYz0DaLWiIIW3SAEKYi5mOMFZisheL8EFkb5m3 hqjVo6fsAtkWehaFSrV1VFlVRKPMrQo/wUbDCO18E+PRSpk2iqxn1DxzYuuxOcPJ 2utd0goWigVlqQDI1tsoA+dQBFZe4Ab+jR+Oanyf+UkkOwauGLTi9IoBOGRXgQ0E 3YrBLacn21oSo9K6tZpVDSyFpsbLxV40XueHK6OtjDKK2lq5WyRkS5LNL2DXNHcg H09au9eXZDARzMn9/JDPHKPKy+mEBynqIGsD5ot5W4vwN5GAa/cIY+woFJ54nnXa BNgt9dK7Er/J/Ebr0dNbOvJ6jn5nqChmgDa2d7myi5XGrSeVSFoP7I5Hqy1Aptlv 8FISKwrUKj8D3CcfmI1H =OCId -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org