Caused by: java.lang.IllegalArgumentException 是因为jdk较高而项目需要的是低版本的问题

1.将idea或idea里的语言级别调到适合自己项目的版本比如安装的是1.8 项目需要1.6的环境 这样之后本地运行应该就没问题了(只用过idea eclipse还没试) 在没加下面这步之前 不要用maven打包 这样idea会用你打好的包 这样也会报错。

2.如果要解决服务器上报这样错 在pom文件里加以下: 这样过后即便是打了包也没问题

pom文件里加

<build>
<finalName>xxxxxx</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>

<configuration>
<!-- 以下是修改我们编译时的jdk版本 即使是高版本jdk 设置之后打包编译会根据你的设置的版本去执行 -->
<!-- use the Java 6 language features -->
<source>1.6</source>
<!-- want the compiled classes to be compatible with JVM 1.6 -->
<target>1.6</target>
<!-- The -encoding argument for the Java compiler. -->
<encoding>UTF8</encoding>
</configuration>

   </plugin>

</plugins>
</build>

Caused by: java.lang.IllegalArgumentException的更多相关文章

  1. mybatis报错:Caused by: java.lang.IllegalArgumentException: Caches collection already contains value for com.crm.dao.PaperUserMapper

    一.问题 eclipse启动时报下面的错误: Caused by: java.lang.IllegalArgumentException: Caches collection already cont ...

  2. 解决Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.geek.dao.ContentDao.Integer

    mybatis报错:Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain val ...

  3. 解决Caused by: java.lang.IllegalArgumentException: A universal match pattern ('/**') is defined before other patterns in the filter chain, causing them to be ignored. Please check the ordering in your

    写项目时应用了SpringSecurity框架来进行登陆验证,之前单独的写简单的SpringSecrity的Demo时并没有报错,但是当和SpringMVC一起整合时却发生了报错 报错如下: Caus ...

  4. Caused by: java.lang.IllegalArgumentException: argument type mismatch

    下面是我的报错信息 at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java: ...

  5. java.sql.SQLException: Error setting driver on UnpooledDataSource.Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for IStudentDaoMapper.Mapperdao.selectcou

    是因为 Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for ...

  6. spring .cloud ------------java.lang.RuntimeException: com.netflix.client.ClientException,Caused by: java.lang.IllegalArgumentException: MIME type may not contain reserved characters

    1.问题的发生 Feign在默认情况下使用的是JDK原生的URLConnection发送HTTP请求,没有连接池,但是对每个地址会保持一个长连接,即利用HTTP的persistence connect ...

  7. Caused by: java.lang.IllegalArgumentException: Can not set int field reyo.sdk.enity.xxx.xxx to java.lang.Long

    由于数据库字段设置不正确引起的,不能选中 alter <table> modify <column> int unsigned; 关于unsigned int类型,可以看看它的 ...

  8. Caused by: java.lang.IllegalArgumentException: Modifying queries can only use void or int/Integer as return type!

    Caused by: java.lang.IllegalArgumentException: Modifying queries can only use void or int/Integer as ...

  9. SpringBoot启动报:Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel must be present!

    使用spring boot对项目改造,启动报错: Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel m ...

  10. kettle添加hadoop cluster时报错Caused by: java.lang.IllegalArgumentException: Does not contain a valid host:port authority: hadoop:password@node56:9000

    完整报错是: Caused by: java.lang.IllegalArgumentException: Does not contain a valid host:port authority: ...

随机推荐

  1. Service层在MVC框架中的意义和职责

    https://blog.csdn.net/u012562943/article/details/53462157 mvc框架由model,view,controller组成,执行流程一般是:在con ...

  2. 吴裕雄--天生自然 R语言开发学习:重抽样与自助法(续一)

    #-------------------------------------------------------------------------# # R in Action (2nd ed): ...

  3. idea如何打包项目(java)

    1.右击项目打开open module settings 2.依次打开 3.选择你的程序主入口 JAR files from libraies ①和设置库中的jar文件选择第一个打包时会把依赖库(li ...

  4. mysql 系列错误解决

    参考文章来源 https://segmentfault.com/a/1190000015678751 https://blog.csdn.net/Tong_zhi/article/details/84 ...

  5. 淘宝网-接口测试白皮书V0.1

    <软件自动化测试开发> 出版了 淘宝(中国)软件有限公司 接口测试白皮书   V0.1 淘宝网平台测试组(qa.taobao.com) 淘宝网-接口测试白皮书 2 目录 1  接口测试的背 ...

  6. Ubuntu 14.10 进入单用户模式

    1. 开机,进入grub界面 2. 此时会有一个选项:Advanced Options for Ubuntu(ubuntu高级), 选中直接回车 3. 看到里面有很多选项,选中后面带recovery ...

  7. iMX287A多种方法实现流水灯效果

    目录 1.流水灯在电子电路中的地位 2.硬件电路分析 3.先点个灯吧 4.shell脚本实现流水灯 5.ANSI C文件操作实现流水灯 6.Linux 系统调用实现流水灯 @ 1.流水灯在电子电路中的 ...

  8. file_put_contents生成ansi文件

    $line_body = array('张三','李四','王五'); $line_body = array_map(function ($element){return iconv('UTF-8', ...

  9. 前端每日实战:85# 视频演示如何用纯 CSS 创作一个小球反弹的动画

    效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/OwWROO 可交互视频 此视频是可 ...

  10. 前端每日实战:70# 视频演示如何用纯 CSS 创作一只徘徊的果冻怪兽

    效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/VdOKQG 可交互视频 此视频是可 ...