org.springframework.expression.spel.SpelEvaluationException: EL1005E:(pos 0): Type cannot be found
今天在完成Spring项目的时候遇到了一个类似于下面的异常:
10.03.2010 13:53:53 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet default threw exception
org.springframework.expression.spel.SpelEvaluationException: EL1005E:(pos 0): Type cannot be found 'com.example.Comparison.Operator'
at org.springframework.expression.spel.support.StandardTypeLocator.findType(StandardTypeLocator.java:79)
at org.springframework.expression.spel.ExpressionState.findType(ExpressionState.java:136)
at org.springframework.expression.spel.ast.TypeReference.getValueInternal(TypeReference.java:45)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:52)
at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:93)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:88)
at org.springframework.web.servlet.tags.EvalTag.doEndTag(EvalTag.java:118)
大致描述一下场景:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<util:map id="contractQueryStrategyHolder">
<entry key="#{T(com.example.Comparison.Operator).xxx}" value-ref="bbbb" />
</util:map>
</beans>
Operator为Comparison的内部类。后来启动失败就出现上面的异常。解决方案其实很简单,只需要把配置修改为下面的就好:
<util:map id="contractQueryStrategyHolder">
<entry key="#{T(com.example.Comparison$Operator).xxx}" value-ref="bbbb" />
</util:map>
org.springframework.expression.spel.SpelEvaluationException: EL1005E:(pos 0): Type cannot be found的更多相关文章
- org.springframework.expression.spel.SpelEvaluationException: EL1011E: Method call: Attempted to call method test() on null context object
前言 本文中提到的解决方案,源码地址在:springboot-thymeleaf,希望可以帮你解决问题. 至于为什么已经写了一篇文章thymeleaf模板引擎调用java类中的方法,又多此一举的单独整 ...
- org.springframework.expression.spel.SpelEvaluationException: EL1004E: Method call: Method service() cannot be found on com.my.blog.springboot.thymeleaf.util.MethodTest type
前言 本文中提到的解决方案,源码地址在:springboot-thymeleaf,希望可以帮你解决问题. 至于为什么已经写了一篇文章thymeleaf模板引擎调用java类中的方法,又多此一举的单独整 ...
- 【spring data jpa】使用jpa的@Query,自己写的语句,报错:org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'status' cannot be found on null
报错: org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'status' ...
- 【spring data jpa】jpa中使用in查询或删除 在@Query中怎么写 ,报错:org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'goodsConfigUid' cannot be found on null 怎么处理
示例代码如下: @Modifying @Transactional @Query("delete from GoodsBindConfigMapping gbc " + " ...
- org.springframework.expression.spel.SpelEvaluationException: EL1030E
问题与分析 在本地开发项目时发现报错如下: org.springframework.expression.spel.SpelEvaluationException: EL1030E: The oper ...
- spring-boot 集成ehcache报错:org.springframework.expression.spel.SpelEvaluationException: EL1008E:
错误信息:org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'pageab ...
- Caused by: java.lang.ClassNotFoundException: org.springframework.expression.ExpressionParser
1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...
- 腾讯云提示invalid pos, pos is bigger than filesize! pos: 0, file_size: 0错误
腾讯云提示invalid pos, pos is bigger than filesize! pos: 0, file_size: 0错误 起因 使用hdfs dfs -text xxx命令提示下面错 ...
- java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor
这个异常原因种类不一,网上有各个版本,本人的是因为缺少了spring-expression-3.2.1.RELEASE.jar 2015-9-18 23:19:11 org.apache.catali ...
随机推荐
- shiro退出登陆清空缓存实现
上一篇介绍了使用springmvc集成shiro登陆过程(http://www.cnblogs.com/nosqlcoco/p/5579081.html),通过FormAuthenticationFi ...
- java动态代理浅析
最近在公司看到了mybatis与spring整合中MapperScannerConfigurer的使用,该类通过反向代理自动生成基于接口的动态代理类. 于是想起了java的动态代理,然后就有了这篇文章 ...
- FineUI小技巧(1)简单的购物车页面
起因 最初是一位 FineUI 网友对购物车功能的需求,需要根据产品单价和数量来计算所有选中商品的总价. 这个逻辑最好在前台使用JavaScript实现,如果把这个逻辑移动到后台C#实现,则会导致过多 ...
- jquery 使用方法(转)
原文: http://www.cnblogs.com/Chenfengtao/archive/2012/01/12/2320490.html jQuery是目前使用最广泛的javascript函数库. ...
- 数据契约(DataContract)及序列化指定输出字段
服务契约定义了远程访问对象和可供调用的方法,数据契约则是服务端和客户端之间要传送的自定义数据类型. 一旦声明一个类型为DataContract,那么该类型就可以被序列化在服务端和客户端之间传送,如下所 ...
- [bzoj2286][Sdoi2011]消耗战(虚树上的DP)
题目:http://www.lydsy.com:808/JudgeOnline/problem.php?id=2286 分析:对于普通的树形dp:f[x]=min(∑f[son],m[x]),其中f[ ...
- PLSQL Developer不支持Oracle 64位客户端解决方法
问题描述: 在虚拟机同网段,搭建Oracle 11.2.04数据库64位的,本机操作系统Win10 x64和PLSQL 9.03,目前想利用PLSQL远程登录ORACLE数据库操作.当初用 insta ...
- Java网络编程——概述
一.网络模型 OSI七层模型 应用层 表示层 会话层 传输层: 网络层: 链路层 物理层:比特流 TCP/IP四层模型 应用层 传输层:数据包,TCP/UDP 网络层:数据帧 物理层:比特流 二.网络 ...
- ElasticSearch的各种服务的URL
1.curl192.168.106.58:9200/_cat/health?v 集群健康查看 epoch timestamp cluster status node.total ...
- [转]fastjson
原文地址:http://www.cnblogs.com/zhenmingliu/archive/2011/12/29/2305775.html FastJSON是一个很好的java开源json工具类库 ...