今天在完成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/beanshttp://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>

OperatorComparison的内部类。后来启动失败就出现上面的异常。解决方案其实很简单,只需要把配置修改为下面的就好:

    <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相关推荐

  1. Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1030E: The operator 'SUBTR

    Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1030E: The operator 'SUBTR ...

  2. springboot 异常 org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or fiel

    org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'timestamp' ...

  3. springboot启动报错:org/springframework/expression/ParserContext

    环境 1,maven 3.5.0 2,eclipse 4.7.1 3,spring boot 1.5.9.RELEASE spring boot启动报错 按照spring 用户手册创建新的spring ...

  4. 异常:java.lang.NoClassDefFoundError: org/springframework/expression/ParserContext

    异常:java.lang.NoClassDefFoundError: org/springframework/expression/ParserContext 解决方案:缺少spring-expres ...

  5. fastjson中出现(syntax error, expect {, actual string, pos 0)错误原因分析

    前言 在使用FastJson时出现报错 错误信息如下: syntax error, expect {, actual string, pos 0, fastjson-version 1.2.47 代码 ...

  6. QPainter::begin: Paint device returned engine == 0, type: 2 解决方法,在使用第三方库Qt可视化节点编辑器时

    QT节点编辑器:https://github.com/paceholder/nodeeditor 在使用的时候,沿着对角线缩放节点会出现崩溃的情况 报出来的错误却是:Qt begin: Paint d ...

  7. syntax error, expect [, actual {, pos 0, fieldName null解决方法

    JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(one)); 换成 Object parse = JSON.parse(JSO ...

  8. JSONException: syntax error, expect [, actual string, pos 0, fieldName null

    通过接口拿到了json字符串,明明是符合规范的格式,但是 JSONObject.parseArray 一直报这个错, 后来发现问题的根源就是json字符串套两层引号造成的,需要加一道工序就可以了 // ...

  9. QPainter::begin: Paint device returned engine == 0, type: 2 解决方法

    出问题的代码段希望将painterdevice设置为图片,如下: QPixmap picture; QPainter painter;if(painter.begin(&picture)) / ...

最新文章

  1. python3下载文件-python3 下载文件方法汇总
  2. 菜鸟学Linux 第052篇笔记 httpd-install and section2
  3. 五.激光SLAM框架学习之A-LOAM框架---项目工程代码介绍---3.laserOdometry.cpp--前端雷达里程计和位姿粗估计
  4. Spring MVC学习总结(6)——一些Spring MVC的使用技巧
  5. java 房贷计算器_求一房贷计算器java源程序
  6. 进程和线程的区别, 面相对象补充, 进程, 数据共享, 锁, 进程池, 爬虫模块(requests, bs4(beautifulsoup))...
  7. java学生通讯录_Java实现XML文件学生通讯录
  8. nginx rewrite 实现二级域名跳转
  9. 加载八叉树索引文件_mysql innodb索引原理
  10. 2016.3.24 OneZero站立会议
  11. ajax谷歌浏览器提示等待超时,调用谷歌浏览器爬虫,selenium webdriver等设置等待时间和超时时间...
  12. Python实例---爬取下载喜马拉雅音频文件
  13. properties语法
  14. 百万富翁问题--安全多方计算
  15. 关于fancybox打开动态加载的图片
  16. 如何进行安全可靠的API身份验证?
  17. 使用Vue完成记事本
  18. ignite 2.11.0 节点发现原理及源码分析
  19. 电路基础(第一章电路模型和电路定律)
  20. 《格局逆袭》读书笔记

热门文章

  1. C#中的代理(delegate)[转载]
  2. Envoy Proxy的多面性:边缘网关、服务网格和混合网桥
  3. vue中props的双向绑定
  4. springboot集合jpa使用
  5. Linux运维笔记-文档总结-NFS文件共享(网络文件系统)
  6. 如何理解Return的返回值?
  7. Android上的MVP:如何组织显示层的内容
  8. crontab 各参数详解及如何查看日志记录
  9. 数据库 第一、二、三范式
  10. ShardedJedis 错误使用