首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

配置文件修改后tomcat起步报错

2012-10-05 
配置文件修改后tomcat启动报错bean idproxoolDataSourceclassorg.logicalcobwebs.proxool.ProxoolDa

配置文件修改后tomcat启动报错
<bean id="proxoolDataSource"
class="org.logicalcobwebs.proxool.ProxoolDataSource" destroy-method="close">
<property name="alias" value="dataSource" />
<property name="driver" value="oracle.jdbc.driver.OracleDriver" />
<!-- <property name="driverUrl"
value="jdbc:oracle:thin:yjskczx/123@
(DESCRIPTION=(ADDRESS_LIST=
  (ADDRESS=(PROTOCOL=TCP)(HOST=10.202.76.11)(PORT=1521))
  (FAILOVER=on)(LOAD_BALANCE=on))
  (CONNECT_DATA= (SERVICE_NAME=orcl)))" /> -->
  <property name="driverUrl"
value="jdbc:oracle:thin:yjskczx/123@
(DESCRIPTION=(ADDRESS_LIST=
  (ADDRESS=(PROTOCOL=TCP)(HOST=10.22.23.53)(PORT=1521))
  (FAILOVER=on)(LOAD_BALANCE=on))
  (CONNECT_DATA= (SERVICE_NAME=orcl)))" />
<property name="user" value="yjskczx" /> 
<!-- <property name="password" value="yjskczx_zju" /> -->
<property name="password" value="123" />
<property name="minimumConnectionCount" value="20" />
<property name="maximumConnectionCount" value="200" />
<property name="prototypeCount" value="2" />
<property name="trace" value="true" />
<property name="delegateProperties" value=" foo=5" />
</bean> 
主要是这段,将配置修改成另外一个数据库后,就是正常的。

信息: Initializing Spring root WebApplicationContext
- Root WebApplicationContext: initialization started
- Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1e55d39: display name [Root WebApplicationContext]; startup date [Thu Sep 20 15:37:06 CST 2012]; root of context hierarchy
- Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-webservice.xml]
- Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-quatzt.xml]
- Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-model.xml]
- Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-dataSource.xml]
- Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-thread.xml]
- Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-ScheduledTimerTask.xml]
- Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-commen.xml]
- Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-dwr.xml]
- Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@1e55d39]: org.springframework.beans.factory.support.DefaultListableBeanFactory@2f1622
- Pre-instantiating singletons in 
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.entry(LinkedList.java:365)
at java.util.LinkedList.get(LinkedList.java:315)
at com.zfsoft.yjskczx.xtwh.timertask.XyInitializingCronTrigger.getCronExpressionFromDB(XyInitializingCronTrigger.java:33)
at com.zfsoft.yjskczx.xtwh.timertask.XyInitializingCronTrigger.setXyTimerTask(XyInitializingCronTrigger.java:21)
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:597)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:821)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645)


at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1127)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:424)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:281)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:131)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:424)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)


at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)


[解决办法]
不同数据库的用户名和密码是不同的吧
[解决办法]
很明显是数据里的数据有问题! Pre-instantiating singletons in
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.entry(LinkedList.java:365)
at java.util.LinkedList.get(LinkedList.java:315)
at com.zfsoft.yjskczx.xtwh.timertask.XyInitializingCronTrigger.getCronExpressionFromDB(XyInitializingCronTrigger.java:33)

[解决办法]
是不是这两个数据库中有的字段类型不完全相同啊

热点排行