Announcement Announcement Module
Collapse
No announcement yet.
Oracle, Spring - JDBC exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Oracle, Spring - JDBC exception

    Im trying to setup a datasource with oracle via spring but getting an exception. Here is my spring context:

    Code:
    	<!-- Datasource Setup -->
    	<bean id="dataSource"
    		class="oracle.jdbc.pool.OracleConnectionCacheImpl">
    		<property name="driverType">
    			<value>oracle.jdbc.driver.OracleDriver</value>
    		</property>
    		<property name="URL">
    			<value>jdbc&#58;oracle&#58;thin&#58;@host&#58;1521&#58;db</value>
    		</property>
    		<property name="user">
    			<value>user</value>
    		</property>
    		<property name="password">
    			<value>password</value>
    		</property>
    	</bean>
    I've included some of the debug statements with the stack trace:
    Code:
    &#58;21,625&#93;&#91;INFO&#93;&#91;ContextLoader&#93;&#91;initWebApplicationContext&#93;&#91;146&#93;- Root WebApplicationContext&#58; initialization started
    &#91;2005-09-15 11&#58;04&#58;21,781&#93;&#91;DEBUG&#93;&#91;XmlBeanDefinitionReader&#93;&#91;loadBeanDefinitions&#93;&#91;145&#93;- Using JAXP implementation &#91;org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@800aa1&#93;
    &#91;2005-09-15 11&#58;04&#58;21,781&#93;&#91;INFO&#93;&#91;XmlBeanDefinitionReader&#93;&#91;loadBeanDefinitions&#93;&#91;150&#93;- Loading XML bean definitions from ServletContext resource &#91;/WEB-INF/config/spring-context.xml&#93;
    &#91;2005-09-15 11&#58;04&#58;21,796&#93;&#91;DEBUG&#93;&#91;BeansDtdResolver&#93;&#91;resolveEntity&#93;&#91;50&#93;- Trying to resolve XML entity with public ID &#91;-//SPRING//DTD BEAN//EN&#93; and system ID &#91;http&#58;//www.springframework.org/dtd/spring-beans.dtd&#93;
    &#91;2005-09-15 11&#58;04&#58;21,796&#93;&#91;DEBUG&#93;&#91;BeansDtdResolver&#93;&#91;resolveEntity&#93;&#91;56&#93;- Trying to locate &#91;spring-beans.dtd&#93; in Spring jar
    &#91;2005-09-15 11&#58;04&#58;22,000&#93;&#91;DEBUG&#93;&#91;BeansDtdResolver&#93;&#91;resolveEntity&#93;&#91;64&#93;- Found beans DTD &#91;http&#58;//www.springframework.org/dtd/spring-beans.dtd&#93; in classpath
    &#91;2005-09-15 11&#58;04&#58;22,031&#93;&#91;DEBUG&#93;&#91;DefaultXmlBeanDefinitionParser&#93;&#91;registerBeanDefinitions&#93;&#91;173&#93;- Loading bean definitions
    &#91;2005-09-15 11&#58;04&#58;22,031&#93;&#91;DEBUG&#93;&#91;DefaultXmlBeanDefinitionParser&#93;&#91;registerBeanDefinitions&#93;&#91;181&#93;- Default lazy init 'false'
    &#91;2005-09-15 11&#58;04&#58;22,031&#93;&#91;DEBUG&#93;&#91;DefaultXmlBeanDefinitionParser&#93;&#91;registerBeanDefinitions&#93;&#91;182&#93;- Default autowire 'no'
    &#91;2005-09-15 11&#58;04&#58;22,031&#93;&#91;DEBUG&#93;&#91;DefaultXmlBeanDefinitionParser&#93;&#91;registerBeanDefinitions&#93;&#91;183&#93;- Default dependency check 'none'
    &#91;2005-09-15 11&#58;04&#58;22,093&#93;&#91;DEBUG&#93;&#91;DefaultXmlBeanDefinitionParser&#93;&#91;registerBeanDefinitions&#93;&#91;188&#93;- Found 1 <bean> elements in ServletContext resource &#91;/WEB-INF/config/spring-context.xml&#93;
    &#91;2005-09-15 11&#58;04&#58;22,093&#93;&#91;DEBUG&#93;&#91;AbstractBeanDefinitionReader&#93;&#91;loadBeanDefinitions&#93;&#91;142&#93;- Loaded 1 bean definitions from location pattern &#91;/WEB-INF/config/spring-context.xml&#93;
    &#91;2005-09-15 11&#58;04&#58;22,109&#93;&#91;INFO&#93;&#91;AbstractRefreshableApplicationContext&#93;&#91;refreshBeanFactory&#93;&#91;90&#93;- Bean factory for application context &#91;Root WebApplicationContext&#93;&#58; org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans &#91;dataSource&#93;; root of BeanFactory hierarchy
    &#91;2005-09-15 11&#58;04&#58;22,140&#93;&#91;INFO&#93;&#91;AbstractApplicationContext&#93;&#91;refresh&#93;&#91;294&#93;- 1 beans defined in application context &#91;Root WebApplicationContext&#93;
    &#91;2005-09-15 11&#58;04&#58;22,171&#93;&#91;INFO&#93;&#91;CollectionFactory&#93;&#91;<clinit>&#93;&#91;61&#93;- JDK 1.4+ collections available
    &#91;2005-09-15 11&#58;04&#58;22,187&#93;&#91;INFO&#93;&#91;CollectionFactory&#93;&#91;<clinit>&#93;&#91;66&#93;- Commons Collections 3.x available
    &#91;2005-09-15 11&#58;04&#58;22,187&#93;&#91;DEBUG&#93;&#91;CollectionFactory&#93;&#91;createLinkedMapIfPossible&#93;&#91;108&#93;- Creating java.util.LinkedHashMap
    &#91;2005-09-15 11&#58;04&#58;22,203&#93;&#91;INFO&#93;&#91;AbstractApplicationContext&#93;&#91;initMessageSource&#93;&#91;432&#93;- Unable to locate MessageSource with name 'messageSource'&#58; using default &#91;[email protected]63&#93;
    &#91;2005-09-15 11&#58;04&#58;22,203&#93;&#91;DEBUG&#93;&#91;CollectionFactory&#93;&#91;createLinkedSetIfPossible&#93;&#91;84&#93;- Creating java.util.LinkedHashSet
    &#91;2005-09-15 11&#58;04&#58;22,218&#93;&#91;INFO&#93;&#91;AbstractApplicationContext&#93;&#91;initApplicationEventMulticaster&#93;&#91;454&#93;- Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster'&#58; using default &#91;org.springframework.context.event.SimpleApplicationEventMulticaster@f2c96c&#93;
    &#91;2005-09-15 11&#58;04&#58;22,218&#93;&#91;INFO&#93;&#91;UiApplicationContextUtils&#93;&#91;initThemeSource&#93;&#91;68&#93;- No ThemeSource found for &#91;Root WebApplicationContext&#93;&#58; using ResourceBundleThemeSource
    &#91;2005-09-15 11&#58;04&#58;22,234&#93;&#91;DEBUG&#93;&#91;CollectionFactory&#93;&#91;createLinkedMapIfPossible&#93;&#91;108&#93;- Creating java.util.LinkedHashMap
    &#91;2005-09-15 11&#58;04&#58;22,234&#93;&#91;INFO&#93;&#91;DefaultListableBeanFactory&#93;&#91;preInstantiateSingletons&#93;&#91;260&#93;- Pre-instantiating singletons in factory &#91;org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans &#91;dataSource&#93;; root of BeanFactory hierarchy&#93;
    &#91;2005-09-15 11&#58;04&#58;22,234&#93;&#91;INFO&#93;&#91;AbstractBeanFactory&#93;&#91;getBean&#93;&#91;222&#93;- Creating shared instance of singleton bean 'dataSource'
    &#91;2005-09-15 11&#58;04&#58;22,234&#93;&#91;DEBUG&#93;&#91;AbstractAutowireCapableBeanFactory&#93;&#91;createBean&#93;&#91;278&#93;- Creating instance of bean 'dataSource' with merged definition &#91;Root bean with class &#91;oracle.jdbc.pool.OracleConnectionCacheImpl&#93; defined in ServletContext resource &#91;/WEB-INF/config/spring-context.xml&#93;&#93;
    &#91;2005-09-15 11&#58;04&#58;22,250&#93;&#91;DEBUG&#93;&#91;AbstractAutowireCapableBeanFactory&#93;&#91;applyBeanPostProcessorsBeforeInstantiation&#93;&#91;216&#93;- Invoking BeanPostProcessors before instantiation of bean 'dataSource'
    &#91;2005-09-15 11&#58;04&#58;22,328&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;138&#93;- Getting BeanInfo for class &#91;oracle.jdbc.pool.OracleConnectionCacheImpl&#93;
    &#91;2005-09-15 11&#58;04&#58;22,359&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;154&#93;- Caching PropertyDescriptors for class &#91;oracle.jdbc.pool.OracleConnectionCacheImpl&#93;
    &#91;2005-09-15 11&#58;04&#58;22,375&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'TNSEntryName' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,375&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'URL' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,375&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'activeSize' of type &#91;int&#93;
    &#91;2005-09-15 11&#58;04&#58;22,375&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'cacheFixedWaitIdleTime' of type &#91;long&#93;
    &#91;2005-09-15 11&#58;04&#58;22,468&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'cacheFixedWaitTimeout' of type &#91;long&#93;
    &#91;2005-09-15 11&#58;04&#58;22,468&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'cacheInactivityTimeout' of type &#91;long&#93;
    &#91;2005-09-15 11&#58;04&#58;22,468&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'cacheScheme' of type &#91;int&#93;
    &#91;2005-09-15 11&#58;04&#58;22,468&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'cacheSize' of type &#91;int&#93;
    &#91;2005-09-15 11&#58;04&#58;22,468&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'cacheTimeToLiveTimeout' of type &#91;long&#93;
    &#91;2005-09-15 11&#58;04&#58;22,468&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'class' of type &#91;java.lang.Class&#93;
    &#91;2005-09-15 11&#58;04&#58;22,468&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'connection' of type &#91;java.sql.Connection&#93;
    &#91;2005-09-15 11&#58;04&#58;22,468&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'connectionCacheName' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,468&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'connectionCacheProperties' of type &#91;java.util.Properties&#93;
    &#91;2005-09-15 11&#58;04&#58;22,468&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'connectionCachingEnabled' of type &#91;boolean&#93;
    &#91;2005-09-15 11&#58;04&#58;22,484&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'connectionCleanupInterval' of type &#91;long&#93;
    &#91;2005-09-15 11&#58;04&#58;22,484&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'connectionErrorCodes' of type &#91;&#91;I&#93;
    &#91;2005-09-15 11&#58;04&#58;22,484&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'connectionPoolDataSource' of type &#91;javax.sql.ConnectionPoolDataSource&#93;
    &#91;2005-09-15 11&#58;04&#58;22,484&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'connectionProperties' of type &#91;java.util.Properties&#93;
    &#91;2005-09-15 11&#58;04&#58;22,484&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'dataSourceName' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,484&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'databaseName' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,484&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'description' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,484&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'driverType' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,484&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'explicitCachingEnabled' of type &#91;boolean&#93;
    &#91;2005-09-15 11&#58;04&#58;22,484&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'fastConnectionFailoverEnabled' of type &#91;boolean&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'implicitCachingEnabled' of type &#91;boolean&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'logWriter' of type &#91;java.io.PrintWriter&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'loginTimeout' of type &#91;int&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'maxLimit' of type &#91;int&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'maxStatements' of type &#91;int&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'minLimit' of type &#91;int&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'networkProtocol' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'password' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'portNumber' of type &#91;int&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'reference' of type &#91;javax.naming.Reference&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'serverName' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'serviceName' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'stmtCacheSize' of type &#91;int&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'threadWakeUpInterval' of type &#91;long&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'user' of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;<init>&#93;&#91;162&#93;- Found property 'warnings' of type &#91;java.sql.SQLWarning&#93;
    &#91;2005-09-15 11&#58;04&#58;22,500&#93;&#91;DEBUG&#93;&#91;CachedIntrospectionResults&#93;&#91;forClass&#93;&#91;85&#93;- Class &#91;oracle.jdbc.pool.OracleConnectionCacheImpl&#93; is cache-safe
    &#91;2005-09-15 11&#58;04&#58;22,531&#93;&#91;DEBUG&#93;&#91;BeanWrapperImpl&#93;&#91;setPropertyValue&#93;&#91;853&#93;- About to invoke write method &#91;public synchronized void oracle.jdbc.pool.OracleDataSource.setDriverType&#40;java.lang.String&#41;&#93; on object of class &#91;oracle.jdbc.pool.OracleConnectionCacheImpl&#93;
    &#91;2005-09-15 11&#58;04&#58;22,546&#93;&#91;DEBUG&#93;&#91;BeanWrapperImpl&#93;&#91;setPropertyValue&#93;&#91;858&#93;- Invoked write method &#91;public synchronized void oracle.jdbc.pool.OracleDataSource.setDriverType&#40;java.lang.String&#41;&#93; with value of type &#91;java.lang.String&#93;
    &#91;2005-09-15 11&#58;04&#58;22,921&#93;&#91;DEBUG&#93;&#91;BeanWrapperImpl&#93;&#91;setPropertyValue&#93;&#91;839&#93;- Could not read previous value of property 'URL
    java.lang.reflect.InvocationTargetException
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
    	at org.springframework.beans.BeanWrapperImpl.setPropertyValue&#40;BeanWrapperImpl.java&#58;836&#41;
    	at org.springframework.beans.BeanWrapperImpl.setPropertyValue&#40;BeanWrapperImpl.java&#58;734&#41;
    	at org.springframework.beans.BeanWrapperImpl.setPropertyValue&#40;BeanWrapperImpl.java&#58;886&#41;
    	at org.springframework.beans.BeanWrapperImpl.setPropertyValues&#40;BeanWrapperImpl.java&#58;913&#41;
    	at org.springframework.beans.BeanWrapperImpl.setPropertyValues&#40;BeanWrapperImpl.java&#58;902&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues&#40;AbstractAutowireCapableBeanFactory.java&#58;967&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean&#40;AbstractAutowireCapableBeanFactory.java&#58;768&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean&#40;AbstractAutowireCapableBeanFactory.java&#58;330&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;226&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;147&#41;
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons&#40;DefaultListableBeanFactory.java&#58;275&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;317&#41;
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;134&#41;
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext&#40;ContextLoader.java&#58;230&#41;
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext&#40;ContextLoader.java&#58;156&#41;
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized&#40;ContextLoaderListener.java&#58;48&#41;
    	at org.apache.catalina.core.StandardContext.listenerStart&#40;StandardContext.java&#58;3831&#41;
    	at org.apache.catalina.core.StandardContext.start&#40;StandardContext.java&#58;4323&#41;
    	at org.apache.catalina.core.ContainerBase.addChildInternal&#40;ContainerBase.java&#58;823&#41;
    	at org.apache.catalina.core.ContainerBase.addChild&#40;ContainerBase.java&#58;807&#41;
    	at org.apache.catalina.core.StandardHost.addChild&#40;StandardHost.java&#58;595&#41;
    	at org.apache.catalina.core.StandardHostDeployer.install&#40;StandardHostDeployer.java&#58;277&#41;
    	at org.apache.catalina.core.StandardHost.install&#40;StandardHost.java&#58;832&#41;
    	at org.apache.catalina.startup.HostConfig.deployDirectories&#40;HostConfig.java&#58;701&#41;
    	at org.apache.catalina.startup.HostConfig.deployApps&#40;HostConfig.java&#58;432&#41;
    	at org.apache.catalina.startup.HostConfig.start&#40;HostConfig.java&#58;983&#41;
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent&#40;HostConfig.java&#58;349&#41;
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent&#40;LifecycleSupport.java&#58;119&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1091&#41;
    	at org.apache.catalina.core.StandardHost.start&#40;StandardHost.java&#58;789&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1083&#41;
    	at org.apache.catalina.core.StandardEngine.start&#40;StandardEngine.java&#58;478&#41;
    	at org.apache.catalina.core.StandardService.start&#40;StandardService.java&#58;480&#41;
    	at org.apache.catalina.core.StandardServer.start&#40;StandardServer.java&#58;2313&#41;
    	at org.apache.catalina.startup.Catalina.start&#40;Catalina.java&#58;556&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
    	at org.apache.catalina.startup.Bootstrap.start&#40;Bootstrap.java&#58;287&#41;
    	at org.apache.catalina.startup.Bootstrap.main&#40;Bootstrap.java&#58;425&#41;
    Caused by&#58; java.sql.SQLException&#58; Invalid Oracle URL specified&#58; OracleDataSource.makeURL
    	at oracle.jdbc.driver.DatabaseError.throwSqlException&#40;DatabaseError.java&#58;125&#41;
    	at oracle.jdbc.driver.DatabaseError.throwSqlException&#40;DatabaseError.java&#58;162&#41;
    	at oracle.jdbc.driver.DatabaseError.check_error&#40;DatabaseError.java&#58;861&#41;
    	at oracle.jdbc.pool.OracleDataSource.makeURL&#40;OracleDataSource.java&#58;1090&#41;
    	at oracle.jdbc.pool.OracleDataSource.getURL&#40;OracleDataSource.java&#58;837&#41;
    	... 45 more
    Its complaining about the URL but I know this works as I use this in other projects (though not via Spring). Im using Tomcat 5 and Spring 1.2.3. What am I doing wrong?

    Jade

  • #2
    Re: Oracle, Spring - JDBC exception

    well, I'll say, you really use wrong url :-)
    are you sure, you don't miss a jdbc: prefix? what about spaces in url?

    Comment


    • #3
      the bean wrapper is calling getURL() to get the current url value (see the setExtractOldValueForEditor method on BeanWrapper). The resulting exeption is logged (debug level) but the URL property will still be set correctly. I don't know where to turn off this feature for BeanFactories but you can safely ignore this execption.

      Comment


      • #4
        The property name should be "url" - lower case, not upper case.

        Comment


        • #5
          I'm having a problem like yours. My bean definition is this:

          <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
          <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
          <property name="url" value="jdbc:oracle:thin:@localhost:1521:XE"/>
          <property name="username" value="pranxas"/>
          <property name="password" value="xpto"/>
          </bean>

          And the error is:

          nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/Step1-servlet.xml]: Error setting property values; nested exception is PropertyAccessExceptionsException (1 errors)

          Can anybody help me?

          Thanks a lot

          Comment


          • #6
            DataSource definition

            Hey PranxasDude...

            Try this :

            <bean id="dataSource" class="javax.sql.DataSource">
            <property name="driverClassName"><value>oracle.jdbc.OracleDr iver</value></property>
            <property name="url">
            <value>jdbc:oracle:thin:@localhost:1521:XE</value>
            </property>
            <property name="username"><value>HR</value></property>
            <property name="password"><value>ADMIN</value></property>
            </bean>

            Worked 4 me!

            Comment

            Working...
            X