NamingException異常是什么情況?
[DEBUG] 2016-11-17 02:11:27 - JNDI lookup for name [jdbc.username] threw NamingException with message: Name [jdbc.username] is not bound in this Context. Unable to find [jdbc.username].. Returning null.
[DEBUG] 2016-11-17 02:11:27 - JNDI lookup for name [jdbc.password] threw NamingException with message: Name [jdbc.password] is not bound in this Context. Unable to find [jdbc.password].. Returning null.
2016-11-25
你有沒有配置正確 jdbc.properties,或者路徑?jīng)]找到
jdbc.properties
<!--?引入外部的屬性文件?--> ????<context:property-placeholder?location="classpath:jdbc.properties"/> ???? ????<!--?配置c3p0?連接池?--> ????<bean?id="dataSource"?class="com.mchange.v2.c3p0.ComboPooledDataSource">???????? ????????<property?name="driverClass"?value="${jdbc.driverClass}"/>???????? ????????<property?name="jdbcUrl"?value="${jdbc.url}"/>???????? ????????<property?name="user"?value="${jdbc.username}"/>???????? ????????<property?name="password"?value="${jdbc.password}"/>???????? ????</bean>