用JNDI,启动项目时遇到cannot be cast to org.apache.tomcat.jdbc.pool.DataSource [问题点数:20分,结帖人bbos1994]

一键查看最优答案

确认一键查看最优答案?
本功能为VIP专享,开通VIP获取答案速率将提升10倍哦!
Bbs1
本版专家分:37
结帖率 99.36%
Bbs1
本版专家分:37
Bbs1
本版专家分:25
Bbs2
本版专家分:267
Blank
签到新秀 累计签到获取,不积跬步,无以至千里,继续坚持!
Bbs1
本版专家分:25
Bbs1
本版专家分:37
java.lang.String cannot be cast to org.springframework.http.MediaType 异常分析

在spring 3.0.5之前一般是这样使用的: 由于升级之后就不能写,必须如下所示:

java 解决 java.lang.Double cannot be cast to java.lang.String

从map中获取对象提示错误java.lang.Doublecannot be <em>cast</em> to java.lang.String,这个错误很明显是类型转换错误 解决方案: 1.直接使用tosting的方式 String str = entry.value().toString(); 2.使用String类的静态方法valueOf() String str = String.valueO...

项目遇到java.lang.Integer cannot be cast to java.lang.String

问题根源是枚举类上定义的属性为&lt;Integer,String&gt;类型如下图 但是在用ImmutableMap把枚举类的属性组装进去<em>时</em>,注意我这里的ImmutableMap里面泛型结构为&lt;String,String&gt;,如下图 问题就出现在这里 没有将Integer转换成String直接装入ImmutableMap&lt;String,String&gt;种,导致后面(如下...

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer异常

java.lang.ClassCastException: java.lang.String cannot be <em>cast</em> to java.lang.Integer异常 这个异常非常容易理解,String类型的数据转换为Integer,出错了。 如果发生这个异常,仔细检查你在应该填写数字的地方有没有填写除数字以外的字符。 在填写配置文件的<em>时</em>候容易出现这种错误,比如在应该填接口等数字的<em>时</em>候,你...

java.lang.Double cannot be cast to java.lang.String

list中查出来个别数据是dubbo类型数据,所以在此转换一下:String periodTime = String.valueOf(list.get(0));float 转String :float round = Float.parseFloat(score);还有简单的int转String :Integer.parseInt(periodTime)...

java.lang.ClassCastException: com.mysql.jdbc.Driver cannot be cast to javax.sql.DataSource

错误描述: Spring Boot <em>项目</em><em>启动</em><em>时</em>出现错误:java.lang.ClassCastException: com.mysql.<em>jdbc</em>.Driver cannot be <em>cast</em> to javax.sql.<em>DataSource</em> 完整错误信息: <em>org</em>.springframework.beans.factory.BeanCreationExce...

Cause: java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.ibatis.mapping.M...

我用的是pagehelper 4.2.0,利用其进行表单的分页处理并进行展示,在第一次执行的<em>时</em>候能够看到分页后的结果,刷新一下第二次就显示不出来,控制台出现: Cause: java.lang.ClassCastException: java.lang.String cannot be <em>cast</em> to <em>org</em>.<em>apache</em>.ibatis.mapping.MappedSt...

DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor

1.问题描述 一个老<em>项目</em><em>启动</em>的<em>时</em>候,各种问题,jar包也是比较混乱,其中一个问题值得记录一下,具体的报错内容是:“<em>org</em>.<em>apache</em>.catalina.util.DefaultAnnotationProcessor cannot be <em>cast</em> to <em>org</em>.<em>apache</em>.AnnotationProcessor”,<em>启动</em><em>项目</em>的<em>时</em>候不报错,但一访问就报以上错误。如图: 2.问题分析 ...

org.apache.tomcat.jdbc.pool.DataSource报错

<em>org</em>.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTx<em>DataSource</em>.startQuertz': <em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.PoolExhaustedException: [startQuertz_Worker-6] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:200; busy:200; idle:0; lastwait:30000]. [See nested exception: <em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.PoolExhaustedException: [startQuertz_Worker-6] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:200; busy:200; idle:0; lastwait:30000].] at <em>org</em>.quartz.impl.<em>jdbc</em>jobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:168) at <em>org</em>.quartz.impl.<em>jdbc</em>jobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3793) at <em>org</em>.quartz.impl.<em>jdbc</em>jobstore.JobStoreSupport.retryExecuteInNonManagedTXLock(JobStoreSupport.java:3758) at <em>org</em>.quartz.impl.<em>jdbc</em>jobstore.JobStoreSupport.triggeredJobComplete(JobStoreSupport.java:3055) at <em>org</em>.quartz.core.QuartzScheduler.notifyJobStoreJobComplete(QuartzScheduler.java:1804) at <em>org</em>.quartz.core.JobRunShell.run(JobRunShell.java:269) at <em>org</em>.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) Caused by: <em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.PoolExhaustedException: [startQuertz_Worker-6] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:200; busy:200; idle:0; lastwait:30000]. at <em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.ConnectionPool.borrowConnection(ConnectionPool.java:689) at <em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.ConnectionPool.getConnection(ConnectionPool.java:187) at <em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.<em>DataSource</em>Proxy.getConnection(<em>DataSource</em>Proxy.java:132) at <em>org</em>.springframework.scheduling.quartz.Local<em>DataSource</em>JobStore$2.getConnection(Local<em>DataSource</em>JobStore.java:131) at <em>org</em>.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:108) at <em>org</em>.quartz.impl.<em>jdbc</em>jobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:165) ... 6 more

tomcat 自带的 jdbc pool数据库连接池技术的使用

package com.action; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import <em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.<em>DataSource</em>; import <em>org</em>.<em>apache</em>.to

对象转换异常:[Ljava.lang.String; cannot be cast to java.lang.String

Entry.getValue() 返回的并不是单个字符串,而是数组。 所以以下代码将抛出: [Ljava.lang.String; cannot be <em>cast</em> to java.lang.String [code=&quot;java&quot;] if(obj instanceof Entry){ String param = (String)((Entry)obj).getValue()...

java.lang.String cannot be cast to java.lang.Integer解决办法

今天写SSM框架<em>时</em>候,后台界面报错,控制台输出java.lang.ClassCastException: java.lang.String cannot be <em>cast</em> to java.lang.Integer,如下图:报错原因是因为类型转换错误,不能将String类型转化成Integer类型,错误源代码如下图所示:biz业务层:bizimpl业务实现层:controller控制层:解决方法:将图...

java.lang.Long cannot be cast to java.lang.String解决方法

1.字面意思很简单,类型转换问题 2.出现问题背景:传两个日期参数是Long型的,对应的是Mysql中的两个字段,类型bigint,用的mybatis,贴代码 这代码看起来木有错啊!百思不得其解 3.解决方法:看了很多帖子,发现有种见解,就算mysql里面是没有泛型的,包装类通过mybatis传入数据库的<em>时</em>候因为没有找到相应的类型会被解析成Object,关键是Object强转成相应类型的<em>时</em>候,问题...

Mybatis报错: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Character

1.问题描述:mybatis中Insert的<em>时</em>候一直报错,在网上找了很久的答案没找到,结果自己debug知道在那一块出错了,然后各种调试,结果测通了三天前的问题。 2.直接上问题(idea编译器): DEBUG [main] - Logging initialized using 'class <em>org</em>.<em>apache</em>.ibatis.logging.slf4j.Slf4jImpl' adapte...

Spring boot 引用alibaba.druid的dataSource启动报错

![图片说明](https://img-ask.csdn.net/upload/201803/27/1522149996_227695.png) 报错信息如图所示,麻烦哪位大拿解释下,怎么还会调用<em>tomcat</em>呐 如果您看不到图片的话,报错信息如下: Failed to execute goal <em>org</em>.springframework.boot: spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) on project SpringBootDemo: An exception occurred while running. null: InvocationTargetException: Error creating bean with name 'dataSource' defined in class path resource [<em>org</em>/springframework/boot/autoconfigure/<em>jdbc</em>/<em>DataSource</em>Configuration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.<em>DataSource</em>]: Factory method 'dataSource' threw exception; nested exception is <em>org</em>.springframework.boot.autoconfigure.<em>jdbc</em>.<em>DataSource</em>Properties$<em>DataSource</em>BeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).

SpringBoot配置jdbc,无法获取DataSource问题。

工程地址 步骤 1.导入jar包 <dependency> <groupId><em>org</em>.springframework.boot</groupId> <artif

org.apache.catalina.core.DefaultInstanceManager cannot be cast to org.apache.tomcat.InstanceManager

Caused by: java.lang.ClassCastException: <em>org</em>.<em>apache</em>.catalina.core.DefaultInstanceManager cannot be <em>cast</em> to <em>org</em>.<em>apache</em>.<em>tomcat</em>.InstanceManager at <em>org</em>.<em>apache</em>.myfaces.spi.impl.Tom...

Executor.query(org.apache.ibatis.mapping.MappedStatement, java.lang.Object, org.apache.ibatis.sessi

在使用mybatis拦截器的<em>时</em>候报错. Executor.query(<em>org</em>.<em>apache</em>.ibatis.mapping.MappedStatement, java.lang.Object, <em>org</em>.<em>apache</em>.ibatis.session.RowBounds, <em>org</em>.<em>apache</em>.ibatis.session.ResultHandler) 发现Executor导入的是util.curren...

ibatis转换的一个问题

2016-10-15 17:18:39,162 ERROR (com.test.framework.progress.utils.ProgressUtils:126) - <em>pool</em>TaskExecutor 线程池:SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; --- The error occurred in com/test/framework/dao/ibatis2/ibatis.xml. --- The error occurred while applying a result map. --- Check the com.test.lol.code.sql.selectCodeInfoByCond-AutoResultMap. --- The error happened while setting a property on the result object. --- Cause: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be <em>cast</em> to java.lang.Long; nested exception is com.ibatis.common.<em>jdbc</em>.exception.NestedSQLException: --- The error occurred in com/test/framework/dao/ibatis2/ibatis.xml. --- The error occurred while applying a result map. --- Check the com.test.lol.code.sql.selectCodeInfoByCond-AutoResultMap. --- The error happened while setting a property on the result object. --- Cause: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be <em>cast</em> to java.lang.Long <em>org</em>.springframework.<em>jdbc</em>.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; --- The error occurred in com/test/framework/dao/ibatis2/ibatis.xml. --- The error occurred while applying a result map. --- Check the com.test.lol.code.sql.selectCodeInfoByCond-AutoResultMap. --- The error happened while setting a property on the result object. --- Cause: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be <em>cast</em> to java.lang.Long; nested exception is com.ibatis.common.<em>jdbc</em>.exception.NestedSQLException: --- The error occurred in com/test/framework/dao/ibatis2/ibatis.xml. --- The error occurred while applying a result map. --- Check the com.test.lol.code.sql.selectCodeInfoByCond-AutoResultMap. --- The error happened while setting a property on the result object. --- Cause: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be <em>cast</em> to java.lang.Long at <em>org</em>.springframework.<em>jdbc</em>.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83) at <em>org</em>.springframework.<em>jdbc</em>.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at <em>org</em>.springframework.<em>jdbc</em>.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at <em>org</em>.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203) at <em>org</em>.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:243) at com.test.framework.dao.ibatis2.Ibatis2SqlMapClientTemplate.query4VCommList(Ibatis2SqlMapClientTemplate.java:129) at com.test.framework.dao.ibatis2.Ibatis2SqlMapClientTemplate.queryForVCommList(Ibatis2SqlMapClientTemplate.java:225) at com.test.lol.code.service.CodeServiceImpl.selectCodeInfoByCond(CodeServiceImpl.java:2508) at com.test.lol.code.service.CodeServiceImpl$$FastClassByCGLIB$$740dee32.invoke() at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at <em>org</em>.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) at <em>org</em>.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at <em>org</em>.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:42) at <em>org</em>.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at <em>org</em>.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:55) at <em>org</em>.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at <em>org</em>.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at <em>org</em>.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at <em>org</em>.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90) at <em>org</em>.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at <em>org</em>.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) at com.test.lol.code.service.CodeServiceImpl$$EnhancerByCGLIB$$ab958bb2.selectCodeInfoByCond() at com.test.lol.code.action.CodeAction.selectCodeInfoByCond(CodeAction.java:243) at com.test.lol.code.action.ExportallAction.category(ExportallAction.java:306) at com.test.lol.code.action.ExportallAction.exportyAll(ExportallAction.java:274) at com.test.lol.code.action.ExportallAction$1.execute(ExportallAction.java:221) at com.test.framework.progress.utils.ProgressUtils$2.run(ProgressUtils.java:124) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: com.ibatis.common.<em>jdbc</em>.exception.NestedSQLException: --- The error occurred in com/test/framework/dao/ibatis2/ibatis.xml. --- The error occurred while applying a result map. --- Check the com.test.lol.code.sql.selectCodeInfoByCond-AutoResultMap. --- The error happened while setting a property on the result object. --- Cause: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be <em>cast</em> to java.lang.Long at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204) at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541) at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118) at com.test.framework.dao.ibatis2.Ibatis2SqlMapClientTemplate$1.doInSqlMapClient(Ibatis2SqlMapClientTemplate.java:131) at <em>org</em>.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:200) ... 26 more Caused by: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be <em>cast</em> to java.lang.Long at com.test.lol.code.valueobject.CodeInfo$$BulkBeanByCGLIB$$80c55f8f.setPropertyValues() at com.ibatis.sqlmap.engine.accessplan.EnhancedPropertyAccessPlan.setProperties(EnhancedPropertyAccessPlan.java:33) at com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(JavaBeanDataExchange.java:112) at com.ibatis.sqlmap.engine.mapping.result.ResultMap.setResultObjectValues(ResultMap.java:371) at com.ibatis.sqlmap.engine.mapping.result.AutoResultMap.setResultObjectValues(AutoResultMap.java:54) at com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback.handleResultObject(RowHandlerCallback.java:64) at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:385) at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300) at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189) at com.test.framework.dao.ibatis2.LimitSqlExecutor.executeQuery(LimitSqlExecutor.java:82) at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221) at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189) ... 32 more Caused by: java.lang.ClassCastException: java.lang.String cannot be <em>cast</em> to java.lang.Long ... 44 more

Tomcat数据源异常org.apache.tomcat.jdbc.pool.ConnectionPool abandon

查看数据源配置 是否有 logAbandoned:true 该项默认为false,只需 去掉logAbandoned,即可

什么是DataSource?入手tomcat-jdbc连接池

在前面我们已经实现了简单的SQL查询功能: http://blog.csdn.net/github_26672553/article/details/78183881在运行程序,连接mysql的<em>时</em>候,mysql的连接池会发生什么呢? 我们可以使用mysql的命令来查看:SHOW FULL PROCESSLIST;当我们的java程序连接上mysql的<em>时</em>候,这个SHOW FULL PROCESSL

javax.sql.DataSource

javax.sql.<em>DataSource</em>是一个用于连接到数据源对象所表示的物理数据源的工厂作为驱动程序管理器工具的另一种选择,<em>DataSource</em>对象是获得连接的首选方法。实现数据源接口的对象通常是注册一个命名服务基于Java™API命名和目录(<em>JNDI</em>)。 数据源接口由一个驱动程序供应商实现。有三种类型的实现: 基本实现——生成一个标准连接对象 连接池实现——生成一个连接对象,该对象将自动参与连

Springboot配置多数据源,加载dataSource Bean失败导致项目启动失败。

``` @Configuration public class DruidConfig { @Bean @ConfigurationProperties("spring.datasource.druid.master") public <em>DataSource</em> master<em>DataSource</em>() { return Druid<em>DataSource</em>Builder.create().build(); } @Bean @Qualifier("userDb<em>DataSource</em>") @ConfigurationProperties("spring.datasource.druid.userDb") @ConditionalOnProperty(prefix = "spring.datasource.druid.userDb", name = "enabled", havingValue = "true") public <em>DataSource</em> userDb<em>DataSource</em>() { return Druid<em>DataSource</em>Builder.create().build(); } @Bean @Qualifier("slave<em>DataSource</em>") @ConfigurationProperties("spring.datasource.druid.slave") @ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = "enabled", havingValue = "true") public <em>DataSource</em> slave<em>DataSource</em>() { return Druid<em>DataSource</em>Builder.create().build(); } @Bean(name = "dynamic<em>DataSource</em>") @Primary public Dynamic<em>DataSource</em> dataSource(<em>DataSource</em> master<em>DataSource</em>, <em>DataSource</em> userDb<em>DataSource</em> , <em>DataSource</em> slave<em>DataSource</em>) { Map target<em>DataSource</em>s = new HashMap<>(); target<em>DataSource</em>s.put(<em>DataSource</em>Type.MASTER.name(), master<em>DataSource</em>); target<em>DataSource</em>s.put(<em>DataSource</em>Type.USERDB.name(), userDb<em>DataSource</em>); target<em>DataSource</em>s.put(<em>DataSource</em>Type.SLAVE.name(), slave<em>DataSource</em>); return new Dynamic<em>DataSource</em>(master<em>DataSource</em>, target<em>DataSource</em>s); } ``` ![图片说明](https://img-ask.csdn.net/upload/202004/23/1587626645_961414.jpg)

spring boot在tomcat启动报错

spring boot使用<em>tomcat</em><em>启动</em>bao'cuoation via factory method failed; nested exception is <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.springframework.boot.web.servlet.ServletRegistrationBean]: Factory method 'loginFilterRegistration' threw exception; nested exception is java.lang.NoClassDefFoundError: <em>org</em>/springframework/context/ApplicationContext 2019-05-31 11:24:18.795 INFO 10140 --- [ost-startStop-1] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-05-31 11:24:18.811 ERROR 10140 --- [ost-startStop-1] o.s.boot.SpringApplication : Application run failed <em>org</em>.springframework.context.ApplicationContextException: Unable to start web server; nested exception is <em>org</em>.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginFilterRegistration' defined in class path resource [com/itrus/ApiConfig.class]: Bean instantiation via factory method failed; nested exception is <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.springframework.boot.web.servlet.ServletRegistrationBean]: Factory method 'loginFilterRegistration' threw exception; nested exception is java.lang.NoClassDefFoundError: <em>org</em>/springframework/context/ApplicationContext at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171) [spring-web-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.<em>apache</em>.catalina.core.StandardContext.startInternal(StandardContext.java:5167) [catalina.jar:8.5.3] at <em>org</em>.<em>apache</em>.catalina.util.LifecycleBase.start(LifecycleBase.java:152) [catalina.jar:8.5.3] at <em>org</em>.<em>apache</em>.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) [catalina.jar:8.5.3] at <em>org</em>.<em>apache</em>.catalina.core.ContainerBase.addChild(ContainerBase.java:702) [catalina.jar:8.5.3] at <em>org</em>.<em>apache</em>.catalina.core.StandardHost.addChild(StandardHost.java:734) [catalina.jar:8.5.3] at <em>org</em>.<em>apache</em>.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:596) [catalina.jar:8.5.3] at <em>org</em>.<em>apache</em>.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1805) [catalina.jar:8.5.3] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] Caused by: <em>org</em>.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginFilterRegistration' defined in class path resource [com/itrus/ApiConfig.class]: Bean instantiation via factory method failed; nested exception is <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.springframework.boot.web.servlet.ServletRegistrationBean]: Factory method 'loginFilterRegistration' threw exception; nested exception is java.lang.NoClassDefFoundError: <em>org</em>/springframework/context/ApplicationContext at <em>org</em>.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:235) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:226) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:101) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:88) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:261) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:234) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:185) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE] ... 21 common frames omitted Caused by: <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.springframework.boot.web.servlet.ServletRegistrationBean]: Factory method 'loginFilterRegistration' threw exception; nested exception is java.lang.NoClassDefFoundError: <em>org</em>/springframework/context/ApplicationContext at <em>org</em>.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] ... 38 common frames omitted Caused by: java.lang.NoClassDefFoundError: <em>org</em>/springframework/context/ApplicationContext at com.itrus.ApiConfig.loginFilterRegistration(ApiConfig.java:21) ~[classes/:0.0.1-SNAPSHOT] at com.itrus.ApiConfig$$EnhancerBySpringCGLIB$$c28d0d8a.CGLIB$loginFilterRegistration$0() ~[classes/:0.0.1-SNAPSHOT] at com.itrus.ApiConfig$$EnhancerBySpringCGLIB$$c28d0d8a$$FastClassBySpringCGLIB$$3101e92b.invoke() ~[classes/:0.0.1-SNAPSHOT] at <em>org</em>.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.1.7.RELEASE.jar:5.1.7.RELEASE] at <em>org</em>.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] at com.itrus.ApiConfig$$EnhancerBySpringCGLIB$$c28d0d8a.loginFilterRegistration() ~[classes/:0.0.1-SNAPSHOT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] at <em>org</em>.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] ... 39 common frames omitted Caused by: java.lang.ClassNotFoundException: <em>org</em>.springframework.context.ApplicationContext at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_121] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_121] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_121] ... 50 common frames omitted 31-May-2019 11:24:18.813 SEVERE [localhost-startStop-1] <em>org</em>.<em>apache</em>.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: <em>org</em>.<em>apache</em>.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/signingapi-0.0.1-SNAPSHOT]] at <em>org</em>.<em>apache</em>.catalina.util.LifecycleBase.start(LifecycleBase.java:158) at <em>org</em>.<em>apache</em>.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) at <em>org</em>.<em>apache</em>.catalina.core.ContainerBase.addChild(ContainerBase.java:702) at <em>org</em>.<em>apache</em>.catalina.core.StandardHost.addChild(StandardHost.java:734) at <em>org</em>.<em>apache</em>.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:596) at <em>org</em>.<em>apache</em>.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1805) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: <em>org</em>.springframework.context.ApplicationContextException: Unable to start web server; nested exception is <em>org</em>.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginFilterRegistration' defined in class path resource [com/itrus/ApiConfig.class]: Bean instantiation via factory method failed; nested exception is <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.springframework.boot.web.servlet.ServletRegistrationBean]: Factory method 'loginFilterRegistration' threw exception; nested exception is java.lang.NoClassDefFoundError: <em>org</em>/springframework/context/ApplicationContext at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157) at <em>org</em>.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) at <em>org</em>.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) at <em>org</em>.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) at <em>org</em>.springframework.boot.SpringApplication.run(SpringApplication.java:316) at <em>org</em>.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157) at <em>org</em>.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137) at <em>org</em>.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91) at <em>org</em>.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171) at <em>org</em>.<em>apache</em>.catalina.core.StandardContext.startInternal(StandardContext.java:5167) at <em>org</em>.<em>apache</em>.catalina.util.LifecycleBase.start(LifecycleBase.java:152) ... 10 more Caused by: <em>org</em>.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginFilterRegistration' defined in class path resource [com/itrus/ApiConfig.class]: Bean instantiation via factory method failed; nested exception is <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.springframework.boot.web.servlet.ServletRegistrationBean]: Factory method 'loginFilterRegistration' threw exception; nested exception is java.lang.NoClassDefFoundError: <em>org</em>/springframework/context/ApplicationContext at <em>org</em>.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627) at <em>org</em>.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456) at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) at <em>org</em>.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) at <em>org</em>.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:235) at <em>org</em>.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:226) at <em>org</em>.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:101) at <em>org</em>.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:88) at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:261) at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:234) at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:185) at <em>org</em>.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154) ... 21 more Caused by: <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.springframework.boot.web.servlet.ServletRegistrationBean]: Factory method 'loginFilterRegistration' threw exception; nested exception is java.lang.NoClassDefFoundError: <em>org</em>/springframework/context/ApplicationContext at <em>org</em>.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) at <em>org</em>.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622) ... 38 more Caused by: java.lang.NoClassDefFoundError: <em>org</em>/springframework/context/ApplicationContext at com.itrus.ApiConfig.loginFilterRegistration(ApiConfig.java:21) at com.itrus.ApiConfig$$EnhancerBySpringCGLIB$$c28d0d8a.CGLIB$loginFilterRegistration$0() at com.itrus.ApiConfig$$EnhancerBySpringCGLIB$$c28d0d8a$$FastClassBySpringCGLIB$$3101e92b.invoke() at <em>org</em>.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) at <em>org</em>.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) at com.itrus.ApiConfig$$EnhancerBySpringCGLIB$$c28d0d8a.loginFilterRegistration() at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at <em>org</em>.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 39 more Caused by: java.lang.ClassNotFoundException: <em>org</em>.springframework.context.ApplicationContext at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 50 more 31-May-2019 11:24:18.822 SEVERE [localhost-startStop-1] <em>org</em>.<em>apache</em>.catalina.startup.HostConfig.deployDescriptor Error deploying configuration descriptor C:\<em>apache</em>-<em>tomcat</em>-8.5.3-windows-x64\<em>apache</em>-<em>tomcat</em>-8.5.3\conf\Catalina\localhost\signingapi-0.0.1-SNAPSHOT.xml java.lang.IllegalStateException: ContainerBase.addChild: start: <em>org</em>.<em>apache</em>.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/signingapi-0.0.1-SNAPSHOT]] at <em>org</em>.<em>apache</em>.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:730) at <em>org</em>.<em>apache</em>.catalina.core.ContainerBase.addChild(ContainerBase.java:702) at <em>org</em>.<em>apache</em>.catalina.core.StandardHost.addChild(StandardHost.java:734) at <em>org</em>.<em>apache</em>.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:596) at <em>org</em>.<em>apache</em>.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1805) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

解决配置spring配置环境出现的类找不到问题

写这个博客的<em>时</em>候,问题已经解决,不想再复现,所以问题只通过语言描述 出现类找不到的问题不是<em>项目</em>问题,是编译器问题,修饰类用的是aspect 出现这种情况,需要使用aspectJ的编译器需要到官网下载jar包安装,网址https://www.eclipse.<em>org</em>/aspectj/downloads.php cmd命令下打开jar,按照提示一步一步安装,前提要有jre 在Idea配置编译器(...

jdbc.Driver"类">spring下配置tomcat jdbc pool 报找不到"com.mysql.jdbc.Driver"类

2019独角兽企业重金招聘Python工程师标准&gt;&gt;&gt; ...

org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.ap解决方案

https://blog.csdn.net/zhiweianran/article/details/16839573   以上是原文章地址,原谅我不知道怎么转载~~只能手动写一篇了,请参考以上地址 我用的也是第二种方法,resolve!!...

第一次提问希望大家可以帮我解决这个问题

我是在做平安保险的接口,在<em>tomcat</em>下已经测试成功,但是客户部署到weblogic下就出现了问题: HttpsURLConnection connection = (HttpsURLConnecti

java控制台常见报错(有坑的)

使用jpa常见bug 关闭EntityManager的<em>时</em>间太早了,解决自己配置过滤器对没有返回的数据进行放行 could not initialize proxy - no Session Error reading 'name' on type cn.itsource.jpa.domain.ProductDir_$$_jvst42f_1 <em>org</em>.hibernate.LazyInitia...

异常怎么解决org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor

<em>org</em>.<em>apache</em>.catalina.util.DefaultAnnotationProcessor cannot be <em>cast</em> to <em>org</em>.<em>apache</em>.AnnotationProcessor

java.lang.Object;cannot be cast to java.util.map

String sql = "SELECT DISTINCT(qrcode_id) as qrcode_id ,scan_area as scan_area from ts_scan_recode where qrcode_id in ( SELECT id from ts_qrcode WHERE batch_id in (select p.id from ts_batch p INNER JOIN ts_product_batch z on p.id=z.batch_id and z.product_id in (:productId) OR z.product_id in (SELECT z.product_id from ts_batch p INNER join ts_product_batch z on p.id =z.batch_id and p.dealer_id =:daelerId))) and (date_time BETWEEN :beginDate and :endDate)" + unitSql; SQLQueryConfig SQLQueryConfig = new SQLQueryConfig(); List scalarConfigList = new ArrayList(); scalarConfigList.add(new ScalarConfig("qrcode_id", StringType.INSTANCE)); scalarConfigList.add(new ScalarConfig("scan_area", StringType.INSTANCE)); SQLQueryConfig.setScalarConfigList(scalarConfigList); SQLQueryConfig.setScalarResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP); 最后一句设置无用!! return<em>时</em>强转异常!return (List>) list.getResultList(); 那我不用这句设置,自己将List resultList = list.getResultList(); 封装成 (List>)的话,应该怎么转化?

为什么总是说找不到org.apache.commons.dbcp.BasicDataSource这个类啊

destroy-meth

springboot-data-jpa默认数据库连接池为org.apache.tomcat.jdbc.pool.DataSource,源码分享

默认是<em>tomcat</em>-<em>jdbc</em>连接池<em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.<em>DataSource</em>。 具体跟踪如下: 查看最新配置文件位置为: <em>org</em>/springframework/boot/spring-boot-autoconfigure/2.2.0.RELEASE/spring-boot-autoconfigure-2.2.0.RELEASE.jar!/META-INF/...

在mybatis执行SQL语句之前进行拦击处理

本文已经过<em>时</em>,大家可以阅读,不要再使用了。 github 有个开源的 jar工程:https://github.com/pagehelper/Mybatis-PageHelper 比较适用于在分页<em>时</em>候进行拦截。对分页的SQL语句通过封装处理,处理成不同的分页sql。 实用性比较强。 import java.sql.Connection; import java.sql.Prep...

spring boot(10)-tomcat jdbc连接池

默认连接池 <em>tomcat</em> <em>jdbc</em>是从<em>tomcat</em>7开始推出的一个连接池,相比老的dbcp连接池要优秀很多。spring boot将<em>tomcat</em> <em>jdbc</em>作为默认的连接池,只要在pom.xml中引入了spring boot 的<em>jdbc</em>组件,就会自动引入<em>tomcat</em> <em>jdbc</em>连接池。关于引入<em>jdbc</em>和数据库的连接配置,参考第六篇 默认参数 以下是<em>org</em>.apac...

org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.io.Serializable]:

<em>项目</em>背景:SpringMVC + redis + MongoDB 架构的收集用户访问网站的日志数据的<em>项目</em>,我在实现把收集到的数据放到消息队列-redis<em>时</em>报错。   13:42:21.834 [http-bio-8080-exec-4] DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'spring'

tomcat数据库连接池数据源转换出错BasicDataSource cannot be cast to javax.activation.DataSource

java.lang.ClassCastException: <em>org</em>.<em>apache</em>.<em>tomcat</em>.dbcp.dbcp.Basic<em>DataSource</em> cannot be <em>cast</em> to javax.ac

weblogic中oracle数据源 利用JNDI 测试报错:java.lang.Object cannot be cast to java.io.Serial

测试类如下: import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import j

springboot为什么我配置了数据源仍然提示dataSource创建不成功?

spring: datasource: driver-class-name: com.mysql.<em>jdbc</em>.Driver url: <em>jdbc</em>:mysql://localhost:3306/test713?serverTimezone=GMT username: XFour password: xuqingyuan753 <em>org</em>.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [<em>org</em>/springframework/boot/autoconfigure/<em>jdbc</em>/XA<em>DataSource</em>AutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.<em>DataSource</em>]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Unable to create XA<em>DataSource</em> instance from 'com.mysql.<em>jdbc</em>.<em>jdbc</em>2.optional.MysqlXA<em>DataSource</em>' at <em>org</em>.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at <em>org</em>.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at <em>org</em>.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at <em>org</em>.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at <em>org</em>.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at <em>org</em>.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at com.xfour.AppRun.main(AppRun.java:16) [main/:na] Caused by: <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.<em>DataSource</em>]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Unable to create XA<em>DataSource</em> instance from 'com.mysql.<em>jdbc</em>.<em>jdbc</em>2.optional.MysqlXA<em>DataSource</em>' at <em>org</em>.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] at <em>org</em>.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] ... 20 common frames omitted Caused by: java.lang.IllegalStateException: Unable to create XA<em>DataSource</em> instance from 'com.mysql.<em>jdbc</em>.<em>jdbc</em>2.optional.MysqlXA<em>DataSource</em>' at <em>org</em>.springframework.boot.autoconfigure.<em>jdbc</em>.XA<em>DataSource</em>AutoConfiguration.createXa<em>DataSource</em>Instance(XA<em>DataSource</em>AutoConfiguration.java:103) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE] at <em>org</em>.springframework.boot.autoconfigure.<em>jdbc</em>.XA<em>DataSource</em>AutoConfiguration.createXa<em>DataSource</em>(XA<em>DataSource</em>AutoConfiguration.java:90) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE] at <em>org</em>.springframework.boot.autoconfigure.<em>jdbc</em>.XA<em>DataSource</em>AutoConfiguration.dataSource(XA<em>DataSource</em>AutoConfiguration.java:72) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_112] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_112] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_112] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_112] at <em>org</em>.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] ... 21 common frames omitted

IDEA搭建springmvc 环境出现的org/springframework/transaction/TransactionException 异常

<em>org</em>/springframework/transaction/TransactionException 异常

【springboot错误】 Failed to instantiate [org.springframework.transaction.interceptor.BeanFactoryTransac

在起来的一个<em>项目</em>中,使用原有的配置,进行<em>启动</em>,发现一直有一个错误循环打印,都是fegin类: getTypeForFactoryBean:1516] : Bean creation exception on non-lazy FactoryBean type check: <em>org</em>.springframework.beans.factory.UnsatisfiedDependencyExcep...

spring boot集成mybatis,启动报无法创建dataSource问题

错误信息如下: [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: <em>org</em>.springframework.beans.factory.BeanCreationException: E

SpringBoot运行dataSource创建失败的解决办法

先贴错误信息: Caused by: <em>org</em>.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/Drui...

JNDI学习总结(三)——Tomcat下使用Druid配置JNDI数据源

  com.alibaba.druid.<em>pool</em>.Druid<em>DataSource</em>Factory实现了javax.naming.spi.ObjectFactory,可以作为<em>JNDI</em>数据源来配置。 一、下载Druid的jar包   下载地址:http://mvnrepository.com/artifact/com.alibaba/druid/1.0.9,如下图所示:      druid.j...

tomcat_jdbc配置

<em>tomcat</em> <em>jdbc</em>配置 背景 最近在导入数据<em>时</em>经常出现connection has been closed的异常,排除了数据库8小<em>时</em>问题后(将wait_timeout值设置了一个比较大的值),然并卯,最后捣腾到<em>时</em>数据库连接池上,最终通过增加ResetAbandonedTimer拦截器可以使得处理长<em>时</em>间查询不断开 原作者博客地址:Apache Tomcat <em>jdbc</em>-<em>pool</em> tom...

JUnit调试出现错误 Failed to load ApplicationContext 的解决方法(不一定适合所有人)

在我写一个小型的ssm框架的系统是,调试运行出现如下结果: 九月 01, 2017 3:56:28 下午 <em>org</em>.springframework.test.context.support.DefaultTestContextBootstrapper getDefaultTestExecutionListenerClassNames 信息: Loaded default TestExecutio

关于spring配置文件中报错,求高手指点

报的这个错怎么解决? 好焦急

org.apache.tomcat.dbcp.dbcp.BasicDataSource强制转换失败问题

获取数据库连接池的<em>时</em>候,强制转换Basic<em>DataSource</em> ds = (Basic<em>DataSource</em>)OaPubSQLManager.ds;结果报错<em>org</em>.<em>apache</em>.<em>tomcat</em>.dbcp.

apache tomcat jdbc-pool如何使用及其属性解释

sping的配置文件中这样写,数据源配置,mysql的数据源 <property na

Cannot find class [org.springframework.jdbc.database.DataSourceTransactionManager] for bean with nam

缺少spring-<em>jdbc</em>的jar包

求教,神奇的异常

框架是spring+mybatis,单独测试service,dao没问题,但一运行dao就报错 2015-01-30 17:19:53 :DispatcherServlet with name 'di

jdbc.Driver"类">JavaConfig配置spring使用tomcat jdbc pool 后报找不到"com.mysql.jdbc.Driver"类

这是原本的<em>DataSource</em>配置        @Bean public <em>DataSource</em> <em>pool</em>Data(){ <em>DataSource</em> dt = new <em>DataSource</em>(); //设置基本属性 dt.setDriverClassName(env.getProperty(&quot;sheshan.driver&quot;)); dt.setUrl(env.getProperty(&quot;sh...

tomcat jdbc 连接池

这是数据库端的配置。 wait_timeout:表示客户端和数据库建立连接,执行sql语句后,保持连接300s才释放连接,若300s内又有新的sql执行,则重新计<em>时</em>。 最近有个问题,基于前任<em>项目</em>管理者<em>遇到</em>在使用<em>tomcat</em>连接池连接oracle/mysql<em>时</em>,经常出现建立的链接用不上了。是因为数据库服务器设置了wait_timeout参数,导致客户端持有的链接用不上。就将数据库连接wait_t

连接池c3p0 ,Proxool ,Druid ,Tomcat Jdbc Pool对比测试

这次所要做的测试是比较几种我们常用的数据库连接池的性能,他们分别是:c3p0 ,Proxool ,Druid ,Tomcat Jdbc Pool这四种,测试将采用统一的参数配置力求比较“公平”的体现统一水平下几种连接池的不同。         1.创建类TestDAO,封装统一的查询方法 : import java.sql.Connection; import java.sql.Result...

请大家帮帮忙,java web项目发布正常,进入网页就报如下错误,实在是找不到

利用Tomcat发布web<em>项目</em>,<em>启动</em>正常,进入网页就报以下错误,请大家帮帮忙,谢谢! 严重: Servlet.service() for servlet in context with path th

java.lang.NoClassDefFoundError: Lorg/apache/tomcat/InstanceManage Tomcat异常处理

如果你的<em>项目</em>在<em>tomcat</em>7跑过以后又直接使用Tomcat6来跑这个<em>项目</em>就会报这样的错误。 经过查找,只需要将你的<em>项目</em>中的work文件夹下内容全部删除以后再使用Tomcat6<em>启动</em>即可。

tomcat启动报错:java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot be cast to o

<em>tomcat</em><em>启动</em>报错:java.lang.ClassCastException: <em>org</em>.<em>apache</em>.jasper.runtime.ELContextImpl cannot be <em>cast</em> to <em>org</em>.<em>apache</em>.jasper.el.ELContextImpl

org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.ap解决方法

http://blog.sina.com.cn/s/blog_675762e501017rw4.html

cannot be cast to org.apache.AnnotationProcessor 错误解决方案

<em>org</em>.<em>apache</em>.catalina.util.DefaultAnnotationProcessor cannot be <em>cast</em> to <em>org</em>.<em>apache</em>.AnnotationProcessor这个错误。后来查资料问群友,终于搞明白。是<em>tomcat</em>的lib文件夹jar包和项

Eclipse启动Tomcat的问题

1、8080端口被占用,关掉 javaw classnotfound contextloaderlistener 2、Tomcat包冲突 [java.lang.ClassCastException: <em>org</em>.<em>apache</em>.catalina.core.DefaultInstanceManager cannot be <em>cast</em> to <em>org</em>.<em>apache</em>.<em>tomcat</em>.Insta

java.lang.ClassNotFoundException: org.apache.tomcat.InstanceManager

<em>tomcat</em> <em>启动</em>报错:java.lang.ClassNotFoundException: <em>org</em>.<em>apache</em>.<em>tomcat</em>.InstanceManager用myeclipse开发的<em>时</em>候用的<em>tomcat</em>7,结果换成<em>tomcat</em>6之后,访问<em>项目</em>的<em>时</em>候报了这个错。原因是原来用<em>tomcat</em>7编译的<em>项目</em>,在换到<em>tomcat</em>6之后没有重新编译解决:清空对应Tomcat中的work目录、如果<em>项目</em>中生成wor...

org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache

在做<em>项目</em><em>时</em>发布一个工程后来出现下面错误<em>org</em>.<em>apache</em>.catalina.util.DefaultAnnotationProcessor cannot be <em>cast</em> to <em>org</em>.<em>apache</em>.AnnotationProcessor 看错误<em>时</em> <em>org</em>.<em>apache</em>.catalina.util.DefaultAnnotationProcessor cannot be <em>cast</em> to <em>org</em>...

Cannot find class [org.apache.commons.dbcp.BasicDataSource] 问题

applicationContex.xml配置文件 eclipse console 抛出异常 原因已经解决办法: eclipse console 抛出异常 <em>org</em>.springframework.beans.factory.CannotLoadBeanClassException: Cannot find

新搭建的SpringBoot项目启动报错Failed to determine suitable jdbc url

<em>项目</em><em>启动</em>类 @EnableAutoConfiguration(exclude={<em>DataSource</em>AutoConfiguration.class}) @SpringBootApplication p

Cannot load driver class: com.mysql.jdbc.Driver

Unsatisfied dependency expressed through constructor parameter 0; nested exception is <em>org</em>.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource’ defined in clas

java.lang.ClassCastException:org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcesso

 在<em>tomcat</em> 中测试comet技术,结果工程出现这样的错误,<em>org</em>.<em>apache</em>.jasper.JasperException: java.lang.ClassCastException:<em>org</em>.<em>apache</em>.catalina.util.DefaultAnnotationProcessor cannot be <em>cast</em> to <em>org</em>.<em>apache</em>.AnnotationProcessor at <em>org</em>.<em>apache</em>.jasper.servlet.JspSer

快被Tomcat连接Mysql连接池问题弄疯了!

有三天了吧! 一下停留在这个问题上,几乎看遍了网上所有的文章了,可总有各种各样的错误跑来来。 去参考官方网站,按提示写,还有有错误: 网页上的报错是: <em>org</em>.<em>apache</em>.jasper.Jasper

springboot+ maven项目启动报错

小弟初学springboot 想连接oracle数据库 但是<em>启动</em>报错 报错 信息如下 求大神解答

spring boot 项目使用junit报错 Failed to load ApplicationContext

测试代码片段: package test; import <em>org</em>.junit.Assert; import <em>org</em>.junit.Test; import <em>org</em>.junit.runner.RunWit

springboot整合jpa报错

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2017-12-25 16:35:58.957 ERROR 8816 --- [ main] o.s.boot.SpringApplication : Application startup failed <em>org</em>.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '<em>org</em>.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is <em>org</em>.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [<em>org</em>/springframework/boot/autoconfigure/<em>jdbc</em>/<em>DataSource</em>Configuration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.<em>DataSource</em>]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: oracle.<em>jdbc</em>.driver.OracleDriver Caused by: <em>org</em>.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [<em>org</em>/springframework/boot/autoconfigure/<em>jdbc</em>/<em>DataSource</em>Configuration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.<em>DataSource</em>]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: oracle.<em>jdbc</em>.driver.OracleDriver Caused by: <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.<em>DataSource</em>]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: oracle.<em>jdbc</em>.driver.OracleDriver Caused by: java.lang.IllegalStateException: Cannot load driver class: oracle.<em>jdbc</em>.driver.OracleDriver

关于Springboot:Cannot determine embedded database driver class for database type NONE解决办法

Cannot determine embedded database driver class for database type NONE 谷歌翻译: 无法确定数据库类型无嵌入式数据库驱动程序类

SpringBoot报错(十) WARN:ationConfigEmbeddedWebApplicationContext

2017-12-25 09:54:11.645 WARN 1852 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: <em>org</em>.springframewo...

Eclipse Spring Boot搭建中的问题

1. The type javax.servlet.ServletContext cannot be resolved     原因默认生成的pom.xml <em>org</em>.springframework.boot spring-boot-starter-<em>tomcat</em> provided     下面这个属性,表示使用本机已经存在的东西,不会下载对应的东西。 provi

spriing boot 启动报错:Cannot determine embedded database driver class for database type NONE

最近在学习使用spring boot。使用maven创建好工程,只引用需要用到的spring boot相关的jar包,除此之外没有任何的配置。写了一个最简单的例子,如下所示: 1 package com.torlight; 2 3 import <em>org</em>.springframework.boot.SpringApplication; 4 import <em>org</em>.springframework....

springboot启动报错:Error starting ApplicationContext. To display the auto-configuration report re-run yo

今天想做个分布式的小demo,结果跑springboot的<em>时</em>候出错: log4j:ERROR Could not find value for key log4j.appender.socket log4j:ERROR Could not instantiate appender named &quot;socket&quot;. . ____ _ __ _ _ ...

SpringBoot启动报错(Cannot determine embedded database driver class for database type NONE)

Springboot<em>启动</em>报错: Caused by: <em>org</em>.springframework.beans.BeanInstantiationException: Failed to instantiate [<em>org</em>.<em>apache</em>.<em>tomcat</em>.<em>jdbc</em>.<em>pool</em>.<em>DataSource</em>]: Factory method 'dataSource' threw exception; nested ex...

求高手指教 maven项目ibatis 错误

一个通过junit 测试通过的<em>项目</em>,在另一<em>项目</em>中引用<em>时</em>出现如下错误: <em>org</em>.<em>apache</em>.ibatis.reflection.ReflectionException: Could not set p

Caused by: org.apache.ibatis.reflection.ReflectionException我碰到的情况,原因不唯一

映射文件:                  SELECT * FROM 表名1          where 1=1                          and ID=#{userId,<em>jdbc</em>Type=NUMERIC})                   dao层 public List selectKeyByUserId(long userId)

【MyBatis】常见错误记录

错误类型一: 错误提示:<em>org</em>.<em>apache</em>.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: <em>org</em>.<em>apache</em>.ibatis.reflection.ReflectionException: There is no getter for property named 'values' i

MyBatis中常见的几种错误解决方法

错误类型一: [html] view plain copy 错误提示:   [html] view plain copy <em>org</em>.<em>apache</em>.ibatis.exceptions.PersistenceException:    ### Error querying database.  Caus

mybatis学习笔记--常见的错误

昨天刚学了下mybatis,用的是3.2.2的版本,在使用过程中<em>遇到</em>了些小问题,现总结如下,会不断更新. 1.没有在configuration.xml配置对应的sql配置文件 错误: Error updating database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not

mybatis异常

<em>org</em>.<em>apache</em>.ibatis.binding.BindingException: Invalid bound statement (not found): me.tspace.pm.dao.UserDao.getUser     at <em>org</em>.<em>apache</em>.ibatis.binding.MapperMethod$SqlCommand.(MapperMethod.java:178)

求SpringAOP中org.aspectj.lang.JoinPoint接口的完整资源包

我要www.springsource.<em>org</em>网站中的下载链接…,源码…jar包…api都有的zip完整压缩包下载… 顺便问下…SpringAOP用public void before(JoinPoin

使用 报错

config.xml http://www.springframework.<em>org</em>/schem

NoClassDefFoundError: org/aspectj/lang/JoinPoint

<em>org</em>.springframework.beans.factory.BeanCreationException: Error creating bean with name '<em>org</em>.springframework.context.event.internalEventListenerProcessor': BeanPostProcessor before instantiation of bean

org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilde

jboss <em>org</em>.<em>apache</em>.xerces.jaxp.DocumentBuilderFactoryImpl cannot be <em>cast</em> to javax.xml.parsers.DocumentBuilderFactory     使用jboss 访问Java程序,调用ireport打印功能<em>时</em>报错,jboss <em>org</em>.<em>apache</em>.xerces.jaxp.DocumentBuilder

jms异常 weblogic.jms.client.JMSConnectionFactory cannot be cast to javax.jms.ConnectionFactory

weblogic.jms.client.JMSConnectionFactory cannot be <em>cast</em> to javax.jms.ConnectionFactory 处理

工程启动报错cannot be cast to javax.servlet.Servlet

错误: 严重: Servlet [SendMailServlet] in web application [/SendMail] threw load() exception java.lang.ClassCastException: com.rl.mail.SendMailTask cannot be <em>cast</em> to javax.servlet.Servlet at <em>org</em>.<em>apache</em>.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1050) at <em>org</em>.<em>apache</em>.catalina.core.StandardWrapper.load(StandardWrapper.java:989) at <em>org</em>.<em>apache</em>.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4913) at <em>org</em>.<em>apache</em>.catalina.core.StandardContext.startInternal(StandardContext.java:5223) at <em>org</em>.<em>apache</em>.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at <em>org</em>.<em>apache</em>.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) at <em>org</em>.<em>apache</em>.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 代码是网上的,内容比较多,下面是地址 地址:https://blog.csdn.net/suyu_yuan/article/details/50668236

Spring - Tomcat jdbc pool 配置

Spring 配置文件 class="<em>org</em>.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> destroy-method="close"> ${connection.url} ${connection.driverClassName}

c3p0、dbcp、tomcat jdbc pool 连接池区别(推荐使用jdbc pool

查看资料,得知dbcp和c3p0都是单线程的,在高并发的环境下性能会非常低下, 决定换用<em>tomcat</em>自带的<em>jdbc</em>-<em>pool</em>,关于<em>jdbc</em>-<em>pool</em>的<em>项目</em>介绍。 区别参考链接:http://www.open-open.com/lib/view/open1329182303124.html class="<em>org</em>.<em>apache</em>.<em>tomcat</em>.dbcp.dbcp.BasicDataS

JDBC Connection Pool org.apache.tomcat.jdbc.pool

<em>apache</em>出品,用来取代老旧的dbcp

安卓代码实现计算器下载

安卓编写代码实现简单的计算器,可以进行加减乘除的简单运算 相关下载链接:[url=//download.csdn.net/download/niuxiangtaoge/6272109?utm_source=bbsseo]//download.csdn.net/download/niuxiangtaoge/6272109?utm_source=bbsseo[/url]

oa管理系统下载

后台管理系统。 参考使用。 相关下载链接:[url=//download.csdn.net/download/u013206765/9038141?utm_source=bbsseo]//download.csdn.net/download/u013206765/9038141?utm_source=bbsseo[/url]

Enterprise_JavaBeans_3.chm下载

Enterprise_JavaBeans_3.chm 相关下载链接:[url=//download.csdn.net/download/suzoncn/228208?utm_source=bbsseo]//download.csdn.net/download/suzoncn/228208?utm_source=bbsseo[/url]

我们是很有底线的