目前的配置文件如下:
Proxool.xml
<?xml version= "1.0 " encoding= "UTF-8 "?>
<something-else-entirely>
<proxool>
<alias> DBPool </alias>
<driver-url> jdbc:oracle:thin:@127.0.0.16:1521:ora </driver-url>
<driver-class> oracle.jdbc.driver.OracleDriver </driver-class>
<driver-properties>
<property name= "user " value= "test "/>
<property name= "password " value= "1234 "/>
</driver-properties>
<maximum-connection-count> 10 </maximum-connection-count>
<house-keeping-test-sql> select sysdate from dual </house-keeping-test-sql>
<jndi-name> jdbc/mydatasource </jndi-name>
<jndi-java.naming.factory.initial> com.caucho.naming.InitialContextFactoryImpl </jndi-java.naming.factory.initial>
<jndi-java.naming.provider.url> localhost:1099 </jndi-java.naming.provider.url>
</proxool>
</something-else-entirely>
在web.xml加入了
<servlet>
<servlet-name> proxoolServletConfigurator </servlet-name>
<servlet-class> org.logicalcobwebs.proxool.configuration.ServletConfigurator </servlet-class>
<init-param>
<param-name> xmlFile </param-name>
<param-value> WEB-INF/src/proxool.xml </param-value>
</init-param>
<load-on-startup> 1 </load-on-startup>
</servlet>
启动Tomcat初始化Proxool时总是报如下错误:
2007-03-12 14:00:11] [INFO ] initialize Log4j over...
[2007-03-12 14:00:11] [INFO ] Proxool 0.9.0RC3 (10-Jan-2007 01:38)
[2007-03-12 14:00:11] [ERROR] JNDI DataSource binding of DBPool pool failed.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.logicalcobwebs.proxool.ProxoolFacade.registerDataSource(ProxoolFacade.java:780)
at org.logicalcobwebs.proxool.ProxoolFacade.registerConnectionPool(ProxoolFacade.java:116)