ssh+tomcat+myeclipse6.5配置项目时的异常3

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/daven1314/article/details/83917997
[color=red]严重: Exception starting filter struts2
Cannot locate the chosen ObjectFactory implementation: spring - [unknown location][/color] at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:224)
at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:195)
at org.apache.struts2.config.BeanSelectionProvider.register(BeanSelectionProvider.java:153)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
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)
[size=large][color=indigo] ---------------------------------------------
项目中缺少struts2-spring-plugin-x.x.x.x.jar包,将相应的jar包复制到项目的WebRoot/WEB-INF/lib下面[/color][/size]
展开阅读全文

SSH框架整合 tomcat启动报错的异常

12-05

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: com.accp.action.InformationsAction; nested exception is java.io.FileNotFoundException: class path resource [com/opensymphony/xwork2/ActionSupport.class] cannot be opened because it does not existrn at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:180)rn at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:132)rn at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:584)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:601)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rnCaused by: java.io.FileNotFoundException: class path resource [com/opensymphony/xwork2/ActionSupport.class] cannot be opened because it does not existrn at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:141)rn at org.springframework.core.type.classreading.SimpleMetadataReader.(SimpleMetadataReader.java:45)rn at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)rn at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:82)rn at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)rn at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:110)rn at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:85)rn at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:176)rn ... 21 morern用的是注解注入rnrnrn rn rn $resultrn $resultrn $resultrn /toLogin.jsprn $resultrn rn rn rn rn下面是actionrn@Controller("informationsAction")rn@Scope("prototype")rnpublic class InformationsAction extends GenericActionrn /**rn * rn */rn private static final long serialVersionUID = 1L;rn private IIformationsService infoservice;rn private List list;rn rn @Autowiredrn public void setInfoservice(IIformationsService infoservice) rn this.infoservice = infoservice;rn rn rn public List getList() rn return list;rn rnrn public void setList(List list) rn this.list = list;rn rnrn public String sel()rn list=infoservice.allinfor();rn result="/index.jsp";rn return SUCCESS;rn rnrnGenericAction是工具类 论坛

tomcat 配置https 异常

06-10

1.首先用jdk自带的工具keytool生成一个"服务器证书"rnrnJAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore C:\tomcat.keyrn提示输入密码,使用Tomcat的默认值changeitrn输入相关信息后确认rn将生成PCKS1.2格式的数字证书于C:\tomcat.keyrnrnrn在tomcat server.xml中配置了如下:rnrnrnrnJDK1.5rnrn配置应该没错吧,但是服务器启动的时候出现了下面的异常,也访问不了rnrnrnrnjava.io.IOException: Cannot recover keyrn at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:125)rn at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)rn at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:138)rn at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)rn at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)rn at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:503)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:523)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)rn- Catalina.startrnLifecycleException: Protocol handler initialization failed: java.io.IOException: Cannot recover keyrn at org.apache.catalina.connector.Connector.initialize(Connector.java:1018)rn at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)rn at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:503)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:523)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)rn- Initialization processed in 672 msrn- Starting service Catalinarn- Starting Servlet Engine: Apache Tomcat/5.5.16rn- XML validation disabledrn- Starting Coyote HTTP/1.1 on http-7777rn- Error starting endpointrnjava.io.IOException: Cannot recover keyrn at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:125)rn at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312)rn at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:150)rn at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75)rn at org.apache.catalina.connector.Connector.start(Connector.java:1089)rn at org.apache.catalina.core.StandardService.start(StandardService.java:459)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:551)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rn- Catalina.start: rnLifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.io.IOException: Cannot recover keyrn at org.apache.catalina.connector.Connector.start(Connector.java:1096)rn at org.apache.catalina.core.StandardService.start(StandardService.java:459)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:551)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnrnrnrnrnrn是不是还需要在哪配置下呢?rnrnrnrnrnrnrn 问答

启动tomcat时的异常

10-25

2012-10-25 10:12:01 [org.hibernate.connection.ConnectionProviderFactory]-[INFO] Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProviderrn2012-10-25 10:12:01 [com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource]-[INFO] Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 5, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge16c8q15j7re5115y0nz|1a998c7, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge16c8q15j7re5115y0nz|1a998c7, idleConnectionTestPeriod -> 60, initialPoolSize -> 10, jdbcUrl -> jdbc:oracle:thin:@222.73.24.169:1521:orcl, lastAcquisitionFailureDefaultUser -> null, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 60, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 30, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> user=******, password=******, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]rn2012-10-25 10:12:21 [com.mchange.v2.async.ThreadPoolAsynchronousRunner]-[WARN] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@17c50b9 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!rn2012-10-25 10:12:21 [com.mchange.v2.async.ThreadPoolAsynchronousRunner]-[WARN] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@17c50b9 -- APPARENT DEADLOCK!!! Complete Status: rn Managed Threads: 3rn Active Threads: 3rn Active Tasks: rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@18a6890 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1d6d61d (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@183268e (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)rn Pending Tasks: rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@15872f5rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1e33bb8rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@165d0e0rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@17447c5rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@113f501rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@13a3d36rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@88b858rnPool thread stack traces:rn Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]rn java.net.PlainSocketImpl.socketConnect(Native Method)rn java.net.PlainSocketImpl.doConnect(Unknown Source)rn java.net.PlainSocketImpl.connectToAddress(Unknown Source)rn java.net.PlainSocketImpl.connect(Unknown Source)rn java.net.SocksSocketImpl.connect(Unknown Source)rn java.net.Socket.connect(Unknown Source)rn oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:141)rn oracle.net.nt.ConnOption.connect(ConnOption.java:123)rn oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:337)rn oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:422)rn oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:672)rn oracle.net.ns.NSProtocol.connect(NSProtocol.java:237)rn oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)rn oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)rn oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:531)rn oracle.jdbc.driver.T4CConnection.(T4CConnection.java:221)rn oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)rn oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)rn com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)rn com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)rn com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)rn com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)rn com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)rn com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)rn com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)rn Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]rn java.net.PlainSocketImpl.socketConnect(Native Method)rn java.net.PlainSocketImpl.doConnect(Unknown Source)rn java.net.PlainSocketImpl.connectToAddress(Unknown Source)rn java.net.PlainSocketImpl.connect(Unknown Source)rn java.net.SocksSocketImpl.connect(Unknown Source)rn java.net.Socket.connect(Unknown Source)rn oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:141)rn oracle.net.nt.ConnOption.connect(ConnOption.java:123)rn oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:337)rn oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:422)rn oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:672)rn oracle.net.ns.NSProtocol.connect(NSProtocol.java:237)rn oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)rn oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)rn oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:531)rn oracle.jdbc.driver.T4CConnection.(T4CConnection.java:221)rn oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)rn oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)rn com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)rn com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)rn com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)rn com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)rn com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)rn com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)rn com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)rn Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]rn java.net.PlainSocketImpl.socketConnect(Native Method)rn java.net.PlainSocketImpl.doConnect(Unknown Source)rn java.net.PlainSocketImpl.connectToAddress(Unknown Source)rn java.net.PlainSocketImpl.connect(Unknown Source)rn java.net.SocksSocketImpl.connect(Unknown Source)rn java.net.Socket.connect(Unknown Source)rn oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:141)rn oracle.net.nt.ConnOption.connect(ConnOption.java:123)rn oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:337)rn oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:422)rn oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:672)rn oracle.net.ns.NSProtocol.connect(NSProtocol.java:237)rn oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)rn oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)rn oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:531)rn oracle.jdbc.driver.T4CConnection.(T4CConnection.java:221)rn oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)rn oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)rn com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)rn com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)rn com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)rn com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)rn com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)rn com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)rn com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)rn com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)rnrnrn连接数据库用的是c3p0 论坛

SSH 项目配置出错

08-06

rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn cn/bean/Person.hbm.xmlrn rn rn rn rn hibernate.dialect=org.hibernate.dialect.MySQL5Dialectrn hibernate.hbm2ddl.auto=updatern hibernate.show_sql=falsern hibernate.format_sql=falsern hibernate.cache.use_second_level_cache=truern hibernate.cache.use_query_cache=falsern hibernate.cache.provider_class=org.hibernate.cache.EhCacheProviderrn rn rn rnrn rn rn rn rn rn rnrn错误!!!!rnlog4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).rnlog4j:WARN Please initialize the log4j system properly.rnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [beans.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)rn at junit.test.PersonServiceTest.setUpBeforeClass(PersonServiceTest.java:19)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)rn at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)rn at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)rn at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)rn at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)rn at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)rnCaused by: org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge]rn at org.hibernate.cfg.SettingsFactory.createRegionFactory(SettingsFactory.java:412)rn at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:271)rn at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)rn ... 29 morernCaused by: java.lang.reflect.InvocationTargetExceptionrn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at org.hibernate.cfg.SettingsFactory.createRegionFactory(SettingsFactory.java:407)rn ... 37 morernCaused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheExceptionrn at java.lang.Class.getDeclaredConstructors0(Native Method)rn at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)rn at java.lang.Class.getConstructor0(Unknown Source)rn at java.lang.Class.newInstance0(Unknown Source)rn at java.lang.Class.newInstance(Unknown Source)rn at org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge.(RegionFactoryCacheProviderBridge.java:63)rn ... 42 morern 论坛

求助myeclipse6.5 + tomcat

09-03

才开始学习jsp,自己写了一个通过jsp操作Oracle的程序(实质是照着书本例子抄的),代码应该没有问题。通过tomcat部署的时候,Myeclipse提示错误如下:rnProblems occurred when invoking code from plug-in: "org.eclipse.jface".rn查看了error log 具体如下:rnrnProblems occurred when invoking code from plug-in: "org.eclipse.jface".rnrnjava.lang.NullPointerExceptionrnat com.genuitec.eclipse.ast.deploy.core.ui.dialog.DeploymentLabelProvider.getColumnText(Unknown Source)rnat org.eclipse.jface.viewers.TableColumnViewerLabelProvider.update(TableColumnViewerLabelProvider.java:70)rnat org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:135)rnat org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:386)rnat org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:466)rnat org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)rnat org.eclipse.core.runtime.Platform.run(Platform.java:857)rnat org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)rnat org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)rnat org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2026)rnat org.eclipse.jface.viewers.AbstractTableViewer.createItem(AbstractTableViewer.java:264)rnat org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:741)rnat org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:633)rnat org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:620)rnat org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:576)rnat org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1368)rnat org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1330)rnat org.eclipse.jface.viewers.CheckboxTableViewer.preservingSelection(CheckboxTableViewer.java:295)rnat org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:574)rnat org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:251)rnat org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1606)rnat com.genuitec.eclipse.ast.deploy.core.ui.dialog.DeploymentManagerDialog.updateDeploymentsViewerForProject(Unknown Source)rnat com.genuitec.eclipse.ast.deploy.core.ui.dialog.DeploymentManagerDialog.handleProjectsComboBoxModified(Unknown Source)rnat com.genuitec.eclipse.ast.deploy.core.ui.dialog.DeploymentManagerDialog$1.modifyText(Unknown Source)rnat org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:166)rnat org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)rnat org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)rnat org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)rnat org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943)rnat org.eclipse.swt.widgets.Combo.wmCommandChild(Combo.java:2327)rnat org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:3801)rnat org.eclipse.swt.widgets.Control.windowProc(Control.java:3675)rnat org.eclipse.swt.widgets.Display.windowProc(Display.java:4351)rnat org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)rnat org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2179)rnat org.eclipse.swt.widgets.Combo.callWindowProc(Combo.java:282)rnat org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)rnat org.eclipse.swt.widgets.Combo.windowProc(Combo.java:2045)rnat org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)rnat org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)rnat org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2265)rnat org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3291)rnat org.eclipse.jface.window.Window.runEventLoop(Window.java:820)rnat org.eclipse.jface.window.Window.open(Window.java:796)rnat com.genuitec.eclipse.ast.deploy.core.ui.action.DeploymentMgmtActionDelegate.runWithEvent(Unknown Source)rnat org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)rnat org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)rnat org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)rnat org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)rnat org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:443)rnat org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)rnat org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)rnat org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)rnat org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)rnat org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)rnat org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)rnat org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)rnat org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)rnat org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)rnat org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)rnat org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)rnat org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)rnat org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)rnat org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)rnat org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)rnat org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)rnat org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)rnat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rnat sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rnat sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rnat java.lang.reflect.Method.invoke(Unknown Source)rnat org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)rnat org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)rnat org.eclipse.equinox.launcher.Main.run(Main.java:1173)rnat org.eclipse.equinox.launcher.Main.main(Main.java:1148)rnrnrn小白不知道这个问题如何解决,请大家帮帮忙!先谢谢了!rnrnPS:有一点困惑想咨询大家一下,写程序的时候如何对待API呢,比如操作数据库用到了statement接口,查看API时,是一个挨着一个看方法呢,还是只看方法大概介绍,然后等下次用到了再查方法呢?目前的学习方法就是敲书本上的例子,然后自己调试程序,求分享学习方法!rn 论坛

SSH spring tomcat jdni 配置

05-03

tomcat 报错:rnException in thread "main" [olr] INFO [main] org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(282) | Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@d19bc8: defining beans [dataSource,sessionFactory]; root of factory hierarchyrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initialrnCaused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initialrn at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)rn at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)rn at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)rn at javax.naming.InitialContext.lookup(Unknown Source)rn at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123)rn at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)rn at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121)rn at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:146)rn at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:93)rn at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)rn at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:197)rn at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:184)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:285)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:122)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:66)rn at test.main(test.java:13)rnserver.xml 数据源配置[code=XML][/code]rncontext.xml[code=XML] [/code]rnspring applicationcontext.xmlrn[code=XML]rn rn rn rn rn rn rn rn rn rn rn org.hibernate.dialect.SQLServerDialectrn rn truern falsern rn rn rn rn org/olr/model/HistoryRcd.hbm.xmlrn org/olr/model/Dish.hbm.xmlrn org/olr/model/User.hbm.xmlrn org/olr/model/ReservationRcd.hbm.xmlrn org/olr/model/Available.hbm.xmlrn org/olr/model/SysUser.hbm.xmlrn rn rn [/code] 论坛

没有更多推荐了,返回首页