1
votes

I am trying to run Tomcat with web-matrix.war, but I can not.

I am look at log file and see exception:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'lobHandlerDetector' while setting bean property 'lobHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)

..............................................

Caused by: java.lang.NullPointerException at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:524) at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:493) at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307) at java.sql.DriverManager.getDriver(DriverManager.java:262) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)

My settings are:

/usr/share/apache-tomcat-7.0.55/conf/Catalina/localhost/web-matrix.xml

<Context path="/web-matrix" reloadable="true">
<Resource
name="jdbc/webmatrix"
auth="Container"
type="javax.sql.DataSource"
username="webmatrix"
password="webmatrix"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@spb-fusion02:1521:orcl"
/>
</Context>

Does anyone help me?

I've checked the connection with listener. It's good.

[root@spb-fusionwm02 localhost]# /opt/oracle/app/oracle/product/11.2.0/dbhome_1/bin/tnsping spb-fusionwm02:1521/orcl

TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 30-SEP-2014 09:22:17

Copyright (c) 1997, 2011, Oracle. All rights reserved.

Used parameter files: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora

Used EZCONNECT adapter to resolve the alias Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=orcl))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.82.64)(PORT=1521))) OK (10 msec)

1
what is spb-fusion02 in url ? - user3145373 ツ
What was the solution? I suspect a missing classpath-ish dependency, like the OracleDriver that was mentioned? - RobertG

1 Answers

0
votes

in driverClassNamee try :

oracle.jdbc.driver.OracleDriver;

I think the url you are passing to it is not proper so that's why you are getting problem.

where's the oracle DB server reside ?

On your machine or other ?

The error shows that the source / url is null.