关于java 中执行linux中export 报错的问题

String shell ="export LD_LIBRARY_PATH=/opt/glibc-2.14/lib";
我在 java 里面执行这个shell 但是 告诉我
图片说明
这样的报错 我该怎么解决。。。

2个回答

没有找到这个命令

export 这个命令没有安装。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
ffmpeg配了环境变量,在cmd中可以正常使用,Java使用processbuilder调用cmd命令就报错无法执行?

ffmpeg配了环境变量,在cmd中可以正常使用,Java使用processbuilder调用cmd命令就报错无法执行, ```java public void test3() throws Exception { ProcessBuilder builder = new ProcessBuilder("ffmpeg -i E:\\football.mp4"); builder.redirectErrorStream(true); try { Process process = builder.start(); final StringBuilder stringBuilder = new StringBuilder(); final InputStream inputStream = process.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream,"GBK")); String line; int i = 1; try { while ((line = reader.readLine()) != null) { System.out.println("读取第"+ i++ +"行:"+line); stringBuilder.append(line); } reader.close(); } catch (IOException e) { e.printStackTrace(); } } catch (Exception e) { throw new RuntimeException("ffmpeg执行异常" + e.getMessage()); } } ``` 报错信息 ``` java.lang.RuntimeException: ffmpeg执行异常Cannot run program "ffmpeg -i E:\football.mp4": CreateProcess error=2, 系统找不到指定的文件。 ``` 文件位置是对的,也是存在的 同样的命令 cmd直接执行时可以的 文件权限和ffmpeg文件夹的权限也修改过: D:\ffmpeg /T /E /C /G everyone:F 到底是为什么啊?

在linux中执行java.jar时报错

[devafs:/home/devafs/batch/sbin] sh start.sh Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -client to select the "client" VM -server to select the "server" VM -hotspot is a synonym for the "client" VM [deprecated] The default VM is server, because you are running on a server-class machine. -cp <class search path of directories and zip/jar files> -classpath <class search path of directories and zip/jar files> A : separated list of directories, JAR archives, and ZIP archives to search for class files. -D<name>=<value> set a system property -verbose[:class|gc|jni] enable verbose output -version print product version and exit -version:<value> require the specified version to run -showversion print product version and continue -jre-restrict-search | -jre-no-restrict-search include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:<packagename>...|:<classname>] -enableassertions[:<packagename>...|:<classname>] enable assertions -da[:<packagename>...|:<classname>] -disableassertions[:<packagename>...|:<classname>] disable assertions -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions -agentlib:<libname>[=<options>] load native agent library <libname>, e.g. -agentlib:hprof see also, -agentlib:jdwp=help and -agentlib:hprof=help -agentpath:<pathname>[=<options>] load native agent library by full pathname -javaagent:<jarpath>[=<options>] load Java programming language agent, see java.lang.instrument -splash:<imagepath> show splash screen with specified image invalid file (bad magic number): Exec format error invalid file (bad magic number): Exec format error invalid file (bad magic number): Exec format error invalid file (bad magic number): Exec format error invalid file (bad magic number): Exec format error Failed to load Main-Class manifest attribute from /home/devafs/batch/lib/db2jcc.jar start.sh #!/bin/sh export args="" while [ $# -ne 0 ] do export args="$args""$1 " shift done java -Xms512M -Xmx512M -Dfile.encoding=GBK -classpath ../lib/c3p0-0.9.1.2.jar;../lib/commons-beanutils-1.8.0.jar;../lib/commons-digester-2.0.jar;../lib/commons-io-1.4.jar;../lib/commons-lang-2.5.jar;../lib/commons-logging-1.1.1.jar;../lib/db2jcc.jar;../lib/freemarker-2.3.8.jar;../lib/junit-4.8.1.jar;../lib/log4j-1.2.16.jar;../lib/slf4j-api-1.6.1.jar;../lib/slf4j-log4j12-1.6.1.jar;../lib/spring-asm-3.0.4.RELEASE.jar;../lib/spring-core-3.0.4.RELEASE.jar;../lib/topbatch-1.2.jar com.huateng.topafs.frame.BatchRunner $args 描述:代码在doc界面中执行成功,但是在linux下执行则报此错误,请知道的朋友指点。

Linux tomcat发布项目出错

java maven项目,在本机eclipse上运行没有问题,数据库直接连的服务器。 在服务运行时一直出错。 根据网上的方法,用run as maven build生成过war,直接用export生成war试过,最后 用本机eclipse运行的tomcat里的项目直接拷贝出来拿过去发布还是出错,错误要么说 没有初始化,要么就是数据库连接错误。本机windows10、macos/BSD生成都试过。 用macos的eclipse跑没问题,把eclipse的tomcat里的项目直接拉出来放到单独的tomcat 运行还是出错,错误跟服务器一致。错误如下: ![图片说明](https://img-ask.csdn.net/upload/201712/03/1512276500_806508.png) 求大神解释,是不是tomcat少什么配置?

求救,阿里云Linux服务器Tomcat报错,被折磨了一下午也没找到问题出在哪儿。

我的流程:1、阿里云Linux,重装系统盘CentOS7.6 x64,清空磁盘内容。2、用Xftp传输apache-tomcat-7.0.82和jdk-7u80-linux-x64.tar.gz并用指令解压。3、向etc/profile内export JAVA环境变量并用sorce刷新文件。4、用vim指令更改Tomcat/conf/server.xml中的8080接口为80。5、转到/bin目录下启动startup.sh,可ping通但外网无法访问,随后启动shutdown.sh。 第5步的控制台内容如下: [root@iZj6c1q38vbvbchvmhrp3gZ bin]# ./startup.sh Using CATALINA_BASE: /usr/web/apache-tomcat-7.0.82 Using CATALINA_HOME: /usr/web/apache-tomcat-7.0.82 Using CATALINA_TMPDIR: /usr/web/apache-tomcat-7.0.82/temp Using JRE_HOME: /usr/web/jdk1.7.0_80/jre Using CLASSPATH: /usr/web/apache-tomcat-7.0.82/bin/bootstrap.jar:/usr/web/apache-tomcat-7.0.82/bin/tomcat-juli.jar Tomcat started. [root@iZj6c1q38vbvbchvmhrp3gZ bin]# ./shutdown.sh Using CATALINA_BASE: /usr/web/apache-tomcat-7.0.82 Using CATALINA_HOME: /usr/web/apache-tomcat-7.0.82 Using CATALINA_TMPDIR: /usr/web/apache-tomcat-7.0.82/temp Using JRE_HOME: /usr/web/jdk1.7.0_80/jre Using CLASSPATH: /usr/web/apache-tomcat-7.0.82/bin/bootstrap.jar:/usr/web/apache-tomcat-7.0.82/bin/tomcat-juli.jar Oct 07, 2017 3:12:04 PM org.apache.catalina.startup.Catalina stopServer SEVERE: Could not contact localhost:8005. Tomcat may not be running. Oct 07, 2017 3:12:05 PM org.apache.catalina.startup.Catalina stopServer SEVERE: Catalina.stop: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at java.net.Socket.<init>(Socket.java:425) at java.net.Socket.<init>(Socket.java:208) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:499) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:343) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:430) [root@iZj6c1q38vbvbchvmhrp3gZ bin]# 不尽感激!!!!

Unix/Linux下遇到java.awt.HeadlessException

准备做一个截屏功能,要求在JSP提交前,对当前屏幕进行截图。 [code="java"] public void snapShot() { try { Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); BufferedImage screenshot = (new Robot()).createScreenCapture( new Rectangle(0, 0, (int) dimension.getWidth(), (int) dimension.getHeight())); String fileName = this.fileName + "." + this.format; File file = new File(fileName); File parentFile = file.getParentFile(); if (parentFile != null && !parentFile.exists()) { parentFile.mkdir(); } ImageIO.write(screenshot, format, file); } catch (AWTException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } [/code] 实现截图的这段代码都很简单,具体的方法调用点,是放在servlet里面完成的。 之后在windows系统tomcat容器上面完成了首次测试,截屏功能成功。 但是项目移至aix系统weblogic容器后,截屏功能抛出以下异常: [code="java"] java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:281) at ScreenCapture.main(ScreenCapture.java:23) [/code] 在网上搜索了此种问题的相关解决方案,大致上有三种: 1.export DISPLAY=127.0.0.1:0.0 2.-Djava.awt.headless=true 3.利用PJA 以上三种方案我都尝试过,但是都没能解决当前问题。 唯独在startWebLogic.sh中加入-Djava.awt.headless=true时,抛出的异常没有“No X11 DISPLAY variable was set, but this program performed an operation which requires it.”这句话。 在此请教各位,这个问题该怎么解决,谢谢。

linux source配置文件不生效

问题背景: 在搭建hadoop-2.6.0时,启动时发现安装包里面少了bin目录,所以就改装hadoop-2.5.1之后开始修改配置文件。 并且全程就只修改~/.bash_profile这个配置文件。 详情: 配置hadoop-2.6.0时的配置文件: export PATH export JAVA_HOME=/usr/java/jdk1.8.0_111 export PATH=$PATH:$JAVA_HOME/bin export ZOOKEEPER_HOME=/usr/bigData/soft/zookeeper-3.4.9 export PATH=$PATH:$ZOOKEEPER_HOME/bin export HADOOP_HOME=/usr/bigData/soft/hadoop-2.6.0 export PATH=$PATH:$HADOOP_HOME/sbin export PATH=$PATH:$HADOOP_HOME/bin 配置hadoop-2.5.1时的配置文件: export PATH export JAVA_HOME=/usr/java/jdk1.8.0_111 export PATH=$PATH:$JAVA_HOME/bin export ZOOKEEPER_HOME=/usr/bigData/soft/zookeeper-3.4.9 export PATH=$PATH:$ZOOKEEPER_HOME/bin export HADOOP_HOME=/usr/bigData/soft/hadoop-2.5.1 export PATH=$PATH:$HADOOP_HOME/sbin export PATH=$PATH:$HADOOP_HOME/bin 问题: 在将配置文件里的Hadoop版本变成2.5.1之后,source ~/.bash_profie 然而在启动hadoop-daemon.sh start journalnode的时候一直报haddoop-2.6下面缺少bin目录.一直没有引用到2.5下的bin目录。(2.5软件包因为之前安装过没有什么问题,推断是source 没有生效)求大神告知这是什么问题,以及如何修改。

spring boot项目eclipse可以正常运行,打包成jar包之后就报错

打包是使用eclipse中export--->runable-->cope required的方式,然后使用 cmd-->java -jar *.jar 的方法来运行的。然后就一直报错 ![图片说明](https://img-ask.csdn.net/upload/201805/31/1527754179_858780.png) ![图片说明](https://img-ask.csdn.net/upload/201805/31/1527754233_388346.png) ![图片说明](https://img-ask.csdn.net/upload/201805/31/1527754294_387599.png) 网上说的方法基本上都试了,没有效果,不知道哪位大神有遇到过这样的问题,并成功解救的,麻烦分享一下方法,非常感谢!

java在linux里设置环境变量后,提示没有那个目录?

我是放在、/opt下的,所属人, 所属组也都设置完了, 请大牛。这是怎么回事,在线等

Linux tomcat 自启动问题

``` #!/bin/bash # chkconfig: 2345 20 80 # description: Starts and Stops the Tomcat daemon. export JAVA_HOME=${java_home} TOMCAT_HOME=/opt/${tomcat_service_name} TOMCAT_START=/opt/${tomcat_service_name}/bin/startup.sh TOMCAT_STOP=/opt/${tomcat_service_name}/bin/shutdown.sh case $1 in start) sh $TOMCAT_START ;; stop) sh $TOMCAT_STOP ;; restart) sh $TOMCAT_STOP sleep 3 sh $TOMCAT_START ;; esac exit 0 ``` 里面有一些变量可以忽略 现在问题是centos6开机自启动没问题centos7开机脚本没有运行。

执行source /etc/profile 报错,很多命令不可使用,怎么解决?

执行source /etc/profile 报错,很多命令不可使用 ``` # /etc/profile # System wide environment and startup programs, for login setup # Functions and aliases go in /etc/bashrc # It's NOT a good idea to change this file unless you know what you # are doing. It's much better to create a custom.sh shell script in # /etc/profile.d/ to make custom changes to your environment, as this # will prevent the need for merging in future updates. pathmunge () { case ":${PATH}:" in *:"$1":*) ;; *) if [ "$2" = "after" ] ; then PATH=$PATH:$1 else PATH=$1:$PATH fi esac } if [ -x /usr/bin/id ]; then if [ -z "$EUID" ]; then # ksh workaround EUID=`/usr/bin/id -u` UID=`/usr/bin/id -ru` fi USER="`/usr/bin/id -un`" LOGNAME=$USER MAIL="/var/spool/mail/$USER" fi # Path manipulation if [ "$EUID" = "0" ]; then pathmunge /usr/sbin pathmunge /usr/local/sbin else pathmunge /usr/local/sbin after pathmunge /usr/sbin after fi HOSTNAME=`/usr/bin/hostname 2>/dev/null` HISTSIZE=1000 if [ "$HISTCONTROL" = "ignorespace" ] ; then export HISTCONTROL=ignoreboth else export HISTCONTROL=ignoredups fi export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL # By default, we want umask to get set. This sets it for login shell # Current threshold for system reserved uid/gids is 200 # You could check uidgid reservation validity in # /usr/share/doc/setup-*/uidgid file if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then umask 002 else umask 022 fi for i in /etc/profile.d/*.sh /etc/profile.d/sh.local ; do if [ -r "$i" ]; then if [ "${-#*i}" != "$-" ]; then . "$i" else . "$i" >/dev/null fi fi done unset i unset -f pathmunge if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi export JAVA_HOME=/usr/local/apps/jdk1.8/jdk1.8.0_161 export PATH=$JAVA_HOME/bin:$PATH export HADOOP_HOME=/usr/local/apps/hadoop-2.8.4 export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin export ZOOKEEPER_HOME=/usr/local/apps/zookeeper-3.4.7 export PATH=$PATH:$ZOOKEEPER_HOME/bin export HBASE_HOME=/usr/local/apps/hbase-1.1.2 export PATH=$PATN:$HBASE_HOME/bin:$HBASE_HOME/conf export KAFKA_HOME=/usr/local/apps/kafka_2.11-0.10.2.1 export PATH=$PATH:$KAFKA_HOME/bin export HIVE_HOME=/usr/local/apps/apache-hive-1.2.0-bin export PATH=$PATH:$HIVE_HOME/bin export CLASS_PATH=$CALSSPATH:$HIVE_HOME/lib export SCALA_HOME=/usr/local/apps/scala-2.11.8 export PATH=$PATH:$SCALA_HOME/bin export SPARK_HOME=/usr/local/apps/spark-2.2.0-bin-hadoop2.7 export PATH=$PATH:$SPARK_HOME/bin:$SPARK_HOME/sbin export PATH=$PATH:/usr/local/mysql//bin<br>source /etc/profile export ODBCINI=/etc/odbc.ini export ODBCSYSINI=/etc export MAVEN_HOME=/usr/local/apps/apache-maven-3.6.1 export PATH=$PATH:$MAVEN_HOME/bin export SQOOP_HOME=/usr/local/apps/sqoop-1.4.6 export PATH=$PATH:$SQOOP_HOME/bin ``` ![图片说明](https://img-ask.csdn.net/upload/201908/01/1564650725_86379.jpg)

linux服务器部署javaweb项目,导出excel格式的表单数据中文乱码

在本机的eclipse上导出不会乱码,都是UTF-8格式,但是在linux服务器上的程序导出会乱码,linux的字符集编码是zh_ch.utf-8, 有没有帮我解决一下 if (oper.equals("del")) { } else if (oper.equals("excel")) { response.setContentType("application/msexcel;charset=UTF-8"); try { response.addHeader("Content-Disposition", "attachment;filename=exportfile.xls"); OutputStream out = response.getOutputStream(); out.write(URLDecoder.decode(request.getParameter("csvBuffer"),"UTF-8").getBytes()); out.flush(); out.close(); } catch (Exception e) { e.printStackTrace(); } 导出的代码这么写的,找不到原因了,一直觉得是服务器和tomcat编码不知道的问题,服务器上的tomcat我已经在配置文件里边都弄成了UTF-8

我使用scp -r 将linux(A)中的/usr目录复制到另一台linux(B)中的/usr中,我用shh连不上了B了

公司让我将一台linux服务器中的资源复制到另一台中,我使用scp -r /usr/* usrname@ip:/usr/ 将linux (A) 中的/usr目录复制到另一台linux (B)中的/usr中,目录被覆盖了,现在我用shh连不上了B了,求解决方案,在线等,急!!!!!!!!请大家帮帮忙,真的很急

linux部署springboot项目的问题

![图片说明](https://img-ask.csdn.net/upload/201801/16/1516082219_509397.png) 如图所示,我的项目结构,lib包里放的依赖jar包,resources包内放的配置文件,现在要部署到linux服务器上去,启动和关闭的sh脚本应该怎么写? 我的启动脚本如下,但是没有启动成功. ``` JARS="resources" LIB="lib" if [ -d $LIB ]; then for i in $LIB/*.jar; do JARS="$JARS":$i done fi JARS="$JARS":"FillDataService.jar" JARS="$JARS":"./" echo "JARS:$JARS" echo "LIB:$LIB" export JARS java -Xms2048M -Xmx6144M -XX:MaxPermSize=256m -Dprogram.name=FillDataService -Dfile.encoding=utf-8 -cp $JARS com.westcredit.main ```

hadoop运行start-dfs.sh时,报master: ERROR: JAVA_HOME is not set and could not be found.

我已经在hadoop _ env.sh中设置了JAVA _ HOME的绝对路径,还是会报错 ``` ### # Generic settings for HADOOP ### # Technically, the only required environment variable is JAVA_HOME. # All others are optional. However, the defaults are probably not # preferred. Many sites configure these options outside of Hadoop, # such as in /etc/profile.d # The java implementation to use. By default, this environment # variable is REQUIRED on ALL platforms except OS X! export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_211 ``` 我的虚拟机VMware Workstation14.0.0 linux是ubuntu 12.04 desktop amd64 jdk是jdk-1.8.0_211 hadoop是 3.1.2

web前端调试时 浏览器报错 type:Status report

错误是这样的:![图片说明](https://img-ask.csdn.net/upload/201603/04/1457078870_206422.png) 具体出现的时机:点击界面中的一个按钮,onClick监听: ``` function exportReport() { var diag = new Dialog(); diag.Width = 540; diag.Height = 350; diag.Title = "导出报表到本地"; diag.URL = ""; diag.InvokeElementId = "exportReportDialog"; diag.show(); } ``` exportReportDialog的div: ``` <div id="exportReportDialog" style="display:none;"> <div class="bt" style="margin:10px 0">导出报表到本地</div> <table cellpadding="0" cellspacing="0" width="100%" style="margin-top:30px; margin-left:20px; font-size:14px; line-height:40px"> <tr> <td align="right">用&nbsp;&nbsp;户&nbsp;&nbsp;名:</td> <td align="left" style="padding-left:10px;"> <input id="adfasdf" class="input" type="text" value="" style="width:200px" disabled/> </td> </tr> </table> </div> ``` 点击按钮后,dialog会显示一下,然后一闪而过,就报前面说的问题了。

我是新手 在linux 下 安装了 tomcat7 可启动不了啊 求大神指教

我安装完 tomcat 后在 执行 sh startup.sh 出现: /usr/local/soft/tomcat7/bin/catalina.sh: line 549: syntax error: unexpected end of file 我jdk 已经正确安装 能编码 和执行 java 文件 看网上帖子 我在 tomcat/bin/catalina.sh 中 添加了 export CATALINA_HOME=/usr/local/soft/tomcat7 export JAVA_HOME=/usr/local/soft/jdk1.6.0_43 别的什么也没懂 为什么tomcat 就启动不了 啊

java poi导出excel文档 后台报下标越界 但文档正常导出且损坏

public static SXSSFWorkbook createCSVUtil2(int startRow, String sheetName, SXSSFWorkbook wb, Map<String, List<CellModel>> cellListMap, Integer cellRowNum, List<LinkedHashMap> exportData, int[] columnWidth, int totalcolumn, GgreportingtemplateDto ggreportingtemplateDto, int countRow) throws Exception { // 设置表格名称 SXSSFSheet sheet = (SXSSFSheet) wb.createSheet(sheetName); sheet.trackAllColumnsForAutoSizing(); // 设置表格标题 一般都是第一行第一个格子 // 标题样式 if (ggreportingtemplateDto.getTitle() != null) { XSSFCellStyle cellStyleTitle = (XSSFCellStyle) wb.createCellStyle(); cellStyleTitle.setWrapText(true); SXSSFRow rowTitle = (SXSSFRow) sheet.createRow(0); XSSFFont fontTitle = (XSSFFont) wb.createFont(); fontTitle.setFontHeightInPoints((short) 16); cellStyleTitle.setFont(fontTitle); // 合并标题单元格 sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, totalcolumn - 1)); for (int i = 0; i < totalcolumn; i++) { if (i == 0) { SXSSFCell cell = (SXSSFCell) rowTitle.createCell(0); cell.setCellValue(ggreportingtemplateDto.getTitle()); cell.setCellStyle(cellStyleTitle); } else { SXSSFCell cell = (SXSSFCell) rowTitle.createCell(i); cell.setCellStyle(cellStyleTitle); } } } if (ggreportingtemplateDto.getCondition() != null) { // 设置筛选条件格子 一般是第二行第一列 // 条件样式 XSSFCellStyle cellStyleCondition = (XSSFCellStyle) wb.createCellStyle(); cellStyleCondition.setWrapText(true); SXSSFRow rowCondition = (SXSSFRow) sheet.createRow(1); XSSFFont fontCondition = (XSSFFont) wb.createFont(); fontCondition.setFontHeightInPoints((short) 16); cellStyleCondition.setFont(fontCondition); // 合并条件单元格 sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 4)); for (int i = 0; i < 4; i++) { if (i == 0) { SXSSFCell cell = (SXSSFCell) rowCondition.createCell(0); cell.setCellValue(ggreportingtemplateDto.getCondition()); cell.setCellStyle(cellStyleCondition); } else { SXSSFCell cell = (SXSSFCell) rowCondition.createCell(i); cell.setCellStyle(cellStyleCondition); } } } // 设置表格通用样式 XSSFCellStyle cellStyle = (XSSFCellStyle) wb.createCellStyle(); // 设置边框 // 设置单元格内容水平对齐 cellStyle.setAlignment(XSSFCellStyle.ALIGN_CENTER); // 设置单元格内容垂直对齐 cellStyle.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER); // 设置自动换行 cellStyle.setWrapText(true); // 设置双边框 XSSFCellStyle cellStyleDouble = (XSSFCellStyle) wb.createCellStyle(); // 设置边框 // 设置单元格内容水平对齐 cellStyleDouble.setAlignment(XSSFCellStyle.ALIGN_CENTER); // 设置单元格内容垂直对齐 cellStyleDouble.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER); // 设置自动换行 cellStyleDouble.setWrapText(true); // 合并单元格 for (int t = 0; t < cellRowNum; t++) { SXSSFRow row = (SXSSFRow) sheet.createRow(t + startRow); List<CellModel> cellNameList = cellListMap.get(String.valueOf(t)); for (CellModel cellModel : cellNameList) { // 如果被合并的元素只占用了一个单元格则不进行合并 if (cellModel.getStartColumn() == cellModel.getEndColumn() && cellModel.getEndRow() == cellModel.getStartRow()) { continue; } sheet.addMergedRegion(new CellRangeAddress(cellModel.getStartRow(), cellModel.getEndRow(), cellModel.getStartColumn(), cellModel.getEndColumn())); } // create的cell Set<Integer> create = new HashSet<Integer>(); for (int i = 0; i < cellNameList.size(); i++) { CellModel cellModel = cellNameList.get(i); // 遍历插入表头 SXSSFCell cell = (SXSSFCell) row.createCell(cellModel.getStartColumn()); // 设置字体 XSSFFont font = (XSSFFont) wb.createFont(); font.setFontName("Times New Roman"); font.setFontHeightInPoints((short) 8); // 设置行高 if (i == 1) { row.setHeight((short) 500); } cellStyle.setFont(font); cell.setCellValue(cellModel.getCellName()); cell.setCellStyle(cellStyle); create.add(cellModel.getStartColumn()); } // 把所有没有create的cell都create for (int i = 0; i < totalcolumn; i++) { if (!(create.contains(i))) { // 设置字体 XSSFFont font = (XSSFFont) wb.createFont(); font.setFontName("Times New Roman"); font.setFontHeightInPoints((short) 8); cellStyle.setFont(font); SXSSFCell cell = (SXSSFCell) row.createCell(i); cell.setCellStyle(cellStyle); } } } for (LinkedHashMap hashMap : exportData) { SXSSFRow rowValue = (SXSSFRow) sheet.createRow(cellRowNum + startRow); Iterator<Map.Entry> iteratorRow = hashMap.entrySet().iterator(); while (iteratorRow.hasNext()) { Map.Entry entryRow = iteratorRow.next(); Integer key = Integer.valueOf(entryRow.getKey().toString()); String value = ""; if (entryRow.getValue() != null) { value = entryRow.getValue().toString(); } else { value = ""; } SXSSFCell cellValue = (SXSSFCell) rowValue.createCell(key - 1); // 设置字体 XSSFFont font = (XSSFFont) wb.createFont(); font.setFontName("Times New Roman"); font.setFontHeightInPoints((short) 8); cellValue.setCellValue(value); cellStyle.setFont(font); cellValue.setCellStyle(cellStyle); } cellRowNum++; } // 设置备注栏 List<String> reMarkList = ggreportingtemplateDto.getRemake(); if (reMarkList != null) { for (int i = 0; i < reMarkList.size() + 1; i++) { int rowNum = i + startRow + cellRowNum + 1; XSSFCellStyle cellStyleRemake = (XSSFCellStyle) wb.createCellStyle(); SXSSFRow rowRemake = (SXSSFRow) sheet.createRow(rowNum); XSSFFont fontRemake = (XSSFFont) wb.createFont(); fontRemake.setFontHeightInPoints((short) 8); cellStyleRemake.setFont(fontRemake); String cellValue = "Notes:"; // 合并条件单元格 if (i != 0) { sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 0, 4)); cellValue = reMarkList.get(i - 1); SXSSFCell cell = (SXSSFCell) rowRemake.createCell(0); cell.setCellValue(cellValue); cell.setCellStyle(cellStyleRemake); } else { SXSSFCell cell = (SXSSFCell) rowRemake.createCell(0); cell.setCellValue(cellValue); cell.setCellStyle(cellStyleRemake); } } } // 设置列宽 if (columnWidth != null) { for (int i = 0; i < columnWidth.length; i++) { sheet.setColumnWidth(i, columnWidth[i]); } } return wb; } 以上是我生成sheet表的内容 //exceptional Rpt public SXSSFWorkbook exceptionalRpt (GgreportingtemplateDto ggreportingtemplateDto, String startInputDate,String endInputDate) throws Exception { // 设置最大数据行数 SXSSFWorkbook wb = new SXSSFWorkbook(5050);//这里之前看到是说能设置这个表格最多能含有多少数据 Map<String, List<CellModel>> map = new HashMap<String, List<CellModel>>(); // 设置数据 // 第一级表头 List<CellModel> firstRow = new ArrayList<CellModel>(); CellModel cellModel1 = new CellModel(); // 总占用1行 Integer cellRow = 1; cellModel1.setCellName("Member English Name"); cellModel1.setStartRow(0); cellModel1.setEndRow(0); cellModel1.setStartColumn(0); cellModel1.setEndColumn(0); CellModel cellModel2 = new CellModel(); cellModel2.setCellName("Member Chinese Name"); cellModel2.setStartRow(0); cellModel2.setEndRow(0); cellModel2.setStartColumn(1); cellModel2.setEndColumn(1); CellModel cellModel3 = new CellModel(); cellModel3.setCellName("Staff No."); cellModel3.setStartRow(0); cellModel3.setEndRow(0); cellModel3.setStartColumn(2); cellModel3.setEndColumn(2); CellModel cellModel4 = new CellModel(); cellModel4.setCellName("HKID/Passport No."); cellModel4.setStartRow(0); cellModel4.setEndRow(0); cellModel4.setStartColumn(3); cellModel4.setEndColumn(3); CellModel cellModel5 = new CellModel(); cellModel5.setCellName("Sex"); cellModel5.setStartRow(0); cellModel5.setEndRow(0); cellModel5.setStartColumn(4); cellModel5.setEndColumn(4); CellModel cellModel6 = new CellModel(); cellModel6.setCellName("Plan Code"); cellModel6.setStartRow(0); cellModel6.setEndRow(0); cellModel6.setStartColumn(5); cellModel6.setEndColumn(5); CellModel cellModel7 = new CellModel(); cellModel7.setCellName("Plan Description"); cellModel7.setStartRow(0); cellModel7.setEndRow(0); cellModel7.setStartColumn(6); cellModel7.setEndColumn(6); CellModel cellModel8 = new CellModel(); cellModel8.setCellName("Effective Date"); cellModel8.setStartRow(0); cellModel8.setEndRow(0); cellModel8.setStartColumn(7); cellModel8.setEndColumn(7); CellModel cellModel9 = new CellModel(); cellModel9.setCellName("Status"); cellModel9.setStartRow(0); cellModel9.setEndRow(0); cellModel9.setStartColumn(8); cellModel9.setEndColumn(8); firstRow.add(cellModel1); firstRow.add(cellModel2); firstRow.add(cellModel3); firstRow.add(cellModel4); firstRow.add(cellModel5); firstRow.add(cellModel6); firstRow.add(cellModel7); firstRow.add(cellModel8); firstRow.add(cellModel9); map.put("0", firstRow); // 业务数据 List<LinkedHashMap> exportData = new ArrayList<LinkedHashMap>(); GuPolicyCopyItemMedgMembDto guPolicyCopyItemMedgMembDto = new GuPolicyCopyItemMedgMembDto(); List<GuPolicyCopyItemMedgMembDto> list = ServiceManager.prpall.getGuPolicyCopyItemMedgMembService().findALL(guPolicyCopyItemMedgMembDto, null);//这里查询出来是295条 //增加数据 用这端代码增加5000条数据 /*for (int i = 0; i < 5000; i++) { list.add((GuPolicyCopyItemMedgMembDto)list.get(0)); }*/ int countRow = 0; for (int i = 0; i < list.size(); i++) { GuPolicyCopyItemMedgMembDto data = (GuPolicyCopyItemMedgMembDto) list.get(i); LinkedHashMap<String,String> row = new LinkedHashMap<String,String>(); String struts = ""; String ename = ""; String cname = ""; String idno = ""; String staffno = ""; String sex = ""; String rationType = ""; String rationName = ""; String entryDate = ""; String chineseName = ""; String hKIDandPassportNo = ""; if(data.getFlag()==null||data.getFlag().equals("I")) { struts = "Add"; }else if(data.getFlag().equals("U")){ struts = "Amendment"; }else if(data.getFlag().equals("D")){ struts = "Deletion"; }else if(data.getFlag().equals("B")){ struts = "Cancellation"; } if(data.getClientEName() != null&&!(data.getClientEName().equals(""))) { ename = data.getClientEName(); } if(data.getClientCName() != null&&!(data.getClientCName().equals(""))) { cname = data.getClientCName(); } if(data.getIdNo() != null&&!(data.getIdNo().equals(""))) { idno = data.getIdNo(); } if(data.getStaffNo() != null&&!(data.getStaffNo().equals(""))) { staffno = data.getStaffNo(); } if(data.getSex() != null&&!(data.getSex().equals(""))) { sex = data.getSex(); } if(data.getRationType() != null&&!(data.getRationType().equals(""))) { rationType = data.getRationType(); } if(data.getRationName() != null&&!(data.getRationName().equals(""))) { rationName = data.getRationName(); } if(data.getEntryDate() != null) { entryDate = sim.format(data.getEntryDate()); } /*row.put("1", ""+ename+""); row.put("2", ""+cname+""); row.put("3", ""+staffno+""); row.put("4", ""+idno+""); row.put("5", ""+sex+""); row.put("6", ""+rationType+""); row.put("7", ""+rationName+""); row.put("8", ""+entryDate+""); row.put("9", ""+struts+"");*/ row.put("1", "1"); row.put("2", "2"); row.put("3", "3"); row.put("4", "4"); row.put("5", "5"); row.put("6", "6"); row.put("7", "7"); row.put("8", "8"); row.put("9", "9"); exportData.add(row); countRow++; } // 用于写入文件 // 列宽数组 int[] columnWidth = { 10000, 7500, 5000, 7500, 5000, 7500, 10000, 5000, 5000 }; // 报表标题 ggreportingtemplateDto.setTitle(null); List<String> remakeList = null; // 报表备注 ggreportingtemplateDto.setRemake(remakeList); ggreportingtemplateDto.setCondition(null); //数据分页 if(exportData.size()>5000) { double size = exportData.size(); double divisor = size/5000; int forNumber = (new Double(Math.ceil(divisor))).intValue(); for (int i = 0; i < forNumber; i++) { if((i+1)==forNumber) { List<LinkedHashMap> exportDataTemp = exportData.subList(0+(i*5000), exportData.size()-1); wb = this.createCSVUtil2(0, "Exceptional Rpt"+(i+1), wb, map, cellRow, exportDataTemp, columnWidth, columnWidth.length, ggreportingtemplateDto, 0); }else { List<LinkedHashMap> exportDataTemp = exportData.subList(0+(i*5000), 5000+(i*5000 )); wb = this.createCSVUtil2(0, "Exceptional Rpt"+(i+1), wb, map, cellRow, exportDataTemp, columnWidth, columnWidth.length, ggreportingtemplateDto, 0); } } }else { wb = this.createCSVUtil2(0, "Exceptional Rpt", wb, map, cellRow, exportData, columnWidth, columnWidth.length, ggreportingtemplateDto, 0); } /*wb = this.createCSVUtil2(0, "Exceptional Rpt", wb, map, cellRow, exportData, columnWidth, columnWidth.length, ggreportingtemplateDto, 0);*/ return wb; } 一开始SXSSFWorkbook wb = new SXSSFWorkbook(5050)这里的值给的5000 ,然后当数据量大于5000时直接报错,文件不能正常导出,然后我把5000改成7000,会报错但是文件能导出,是损坏文件,一条数据都没有,后来修改成分页导出,自己测试的时候任然报了数组下标越界,且越界的下标为负值,文件能正常导出,但导出的文件显示已损坏,看不到数据。报错代码图片以上传,求大神解答,解答有效我微信转账请大神喝奶茶 java.lang.ArrayIndexOutOfBoundsException: -20527 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at org.apache.poi.xssf.model.StylesTable.getFontAt(StylesTable.java:386) at org.apache.poi.xssf.usermodel.XSSFWorkbook.getFontAt(XSSFWorkbook.java:954) at org.apache.poi.xssf.streaming.SXSSFWorkbook.getFontAt(SXSSFWorkbook.java:857) at org.apache.poi.ss.util.SheetUtil.getCellWidth(SheetUtil.java:148) at org.apache.poi.xssf.streaming.AutoSizeColumnTracker.updateColumnWidth(AutoSizeColumnTracker.java:367) at org.apache.poi.xssf.streaming.AutoSizeColumnTracker.updateColumnWidths(AutoSizeColumnTracker.java:333) at org.apache.poi.xssf.streaming.SXSSFSheet.flushOneRow(SXSSFSheet.java:1892) at org.apache.poi.xssf.streaming.SXSSFSheet.flushRows(SXSSFSheet.java:1871) at org.apache.poi.xssf.streaming.SXSSFSheet.flushRows(SXSSFSheet.java:1882) at org.apache.poi.xssf.streaming.SXSSFWorkbook.write(SXSSFWorkbook.java:931) at com.sinosoft.application.platform.web.action.GgReportingTemplateAction.download(GgReportingTemplateAction.java:267) 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 com.sinosoft.application.common.BaseProcessAction.execute(BaseProcessAction.java:213) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:216) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:117) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.sinosoft.application.common.CAS_LANGUATE.doFilter(CAS_LANGUATE.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.sinosoft.sysframework.web.control.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.sinosoft.application.common.CompatibleFilter.doFilter(CompatibleFilter.java:29) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.sinosoft.application.common.ValidateSalt.doFilter(ValidateSalt.java:56) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:160) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.sinosoft.application.common.LoadSalt.doFilter(LoadSalt.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) 此问题已解决,导致报错的原因是sheet.trackAllColumnsForAutoSizing();poi自动设置列宽的代码,注释这行之后问题解决。

hadoop-common-2.8.2搭建环境,报错 org.apache.htrace.core.Tracer$Builder.<init>(Ljava/lang/String;)V

# 报错:Exception in thread "main" java.lang.NoSuchMethodError: org.apache.htrace.core.Tracer$Builder.<init>(Ljava/lang/String;)V Exception in thread "main" java.lang.NoSuchMethodError: org.apache.htrace.core.Tracer$Builder.<init>(Ljava/lang/String;)V at org.apache.hadoop.fs.FsTracer.get(FsTracer.java:42) at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2806) at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:100) at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2849) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2831) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:389) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:181) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:373) at org.apache.hadoop.fs.Path.getFileSystem(Path.java:356) at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.addInputPath(FileInputFormat.java:526) at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.addInputPaths(FileInputFormat.java:491) at com.knn.c.SortMR.main(SortMR.java:65) 换了三个版本的架包htrace-core-3.0.4,htrace-core-3.1.0-incubating,htrace-core-4.0.0-incubating,htrace-core-2.00都试过了,但是还是依旧报错,被这个问题烦死了,在这里卡住了

easypoi导出excel遇到的问题,搭配spring+springmvc+mybatis

18:08:20.146 [http-nio-8080-exec-5] ERROR o.j.poi.cache.ExcelCache - null java.lang.NullPointerException: null at org.jeecgframework.poi.cache.ExcelCache.getWorkbook(ExcelCache.java:61) ~[easypoi-base-2.4.0.jar:na] at org.jeecgframework.poi.excel.export.template.ExcelExportOfTemplateUtil.getCloneWorkBook(ExcelExportOfTemplateUtil.java:217) [easypoi-base-2.4.0.jar:na] at org.jeecgframework.poi.excel.export.template.ExcelExportOfTemplateUtil.createExcleByTemplate(ExcelExportOfTemplateUtil.java:182) [easypoi-base-2.4.0.jar:na] at org.jeecgframework.poi.excel.ExcelExportUtil.exportExcel(ExcelExportUtil.java:165) [easypoi-base-2.4.0.jar:na] at com.TQES.sysmanager.controller.ExportController.fe_map(ExportController.java:170) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_31] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_31] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_31] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_31] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) [spring-web-4.1.7.jar:4.1.7.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) [spring-web-4.1.7.jar:4.1.7.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) [spring-webmvc-4.1.7.jar:4.1.7.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) [spring-webmvc-4.1.7.jar:4.1.7.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) [spring-webmvc-4.1.7.jar:4.1.7.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [spring-webmvc-4.1.7.jar:4.1.7.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) [spring-webmvc-4.1.7.jar:4.1.7.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) [spring-webmvc-4.1.7.jar:4.1.7.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) [spring-webmvc-4.1.7.jar:4.1.7.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858) [spring-webmvc-4.1.7.jar:4.1.7.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) [spring-webmvc-4.1.7.jar:4.1.7.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [catalina.jar:8.0.27] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.27] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.27] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.27] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.27] at com.TQES.filter.AuthFilter.doFilter(AuthFilter.java:32) [classes/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.27] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.27] at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123) [druid-1.0.15.jar:1.0.15] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.27] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.27] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) [spring-web-4.1.7.jar:4.1.7.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.jar:4.1.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.27] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.27] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) [catalina.jar:8.0.27] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.27] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:8.0.27] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [catalina.jar:8.0.27] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.27] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) [catalina.jar:8.0.27] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.27] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [catalina.jar:8.0.27] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-coyote.jar:8.0.27] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673) [tomcat-coyote.jar:8.0.27] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-coyote.jar:8.0.27] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-coyote.jar:8.0.27] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_31] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_31] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.27] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31] 六月 26, 2018 6:08:20 下午 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet [spring] in context with path [/TQES] threw exception [Handler processing failed; nested exception is com.google.common.util.concurrent.ExecutionError: java.lang.NoSuchMethodError: org.apache.poi.util.IOUtils.closeQuietly(Ljava/io/Closeable;)V] with root cause java.lang.NoSuchMethodError: org.apache.poi.util.IOUtils.closeQuietly(Ljava/io/Closeable;)V at org.jeecgframework.poi.cache.manager.FileLoadeImpl.getFile(FileLoadeImpl.java:62) at org.jeecgframework.poi.cache.manager.POICacheManager$1.load(POICacheManager.java:57) at org.jeecgframework.poi.cache.manager.POICacheManager$1.load(POICacheManager.java:52) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201) at com.google.common.cache.LocalCache.get(LocalCache.java:3953) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957) at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875) at org.jeecgframework.poi.cache.manager.POICacheManager.getFile(POICacheManager.java:67) at org.jeecgframework.poi.cache.ExcelCache.getWorkbook(ExcelCache.java:44) at org.jeecgframework.poi.excel.export.template.ExcelExportOfTemplateUtil.getCloneWorkBook(ExcelExportOfTemplateUtil.java:217) at org.jeecgframework.poi.excel.export.template.ExcelExportOfTemplateUtil.createExcleByTemplate(ExcelExportOfTemplateUtil.java:182) at org.jeecgframework.poi.excel.ExcelExportUtil.exportExcel(ExcelExportUtil.java:165) at com.TQES.sysmanager.controller.ExportController.fe_map(ExportController.java:170) 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:483) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

点沙成金:英特尔芯片制造全过程揭密

“亚马逊丛林里的蝴蝶扇动几下翅膀就可能引起两周后美国德州的一次飓风……” 这句人人皆知的话最初用来描述非线性系统中微小参数的变化所引起的系统极大变化。 而在更长的时间尺度内,我们所生活的这个世界就是这样一个异常复杂的非线性系统…… 水泥、穹顶、透视——关于时间与技艺的蝴蝶效应 公元前3000年,古埃及人将尼罗河中挖出的泥浆与纳特龙盐湖中的矿物盐混合,再掺入煅烧石灰石制成的石灰,由此得来了人...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

外包程序员的幸福生活

今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...

C++11:一些微小的变化(新的数据类型、template表达式内的空格、nullptr、std::nullptr_t)

本文介绍一些C++的两个新特性,它们虽然微小,但对你的编程十分重要 一、Template表达式内的空格 C++11标准之前建议在“在两个template表达式的闭符之间放一个空格”的要求已经过时了 例如: vector&lt;list&lt;int&gt; &gt;; //C++11之前 vector&lt;list&lt;int&gt;&gt;; //C++11 二、nullptr ...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

深入剖析Springboot启动原理的底层源码,再也不怕面试官问了!

大家现在应该都对Springboot很熟悉,但是你对他的启动原理了解吗?

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

【阿里P6面经】二本,curd两年,疯狂复习,拿下阿里offer

二本的读者,在老东家不断学习,最后逆袭

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

微软为一人收购一公司?破解索尼程序、写黑客小说,看他彪悍的程序人生!...

作者 | 伍杏玲出品 | CSDN(ID:CSDNnews)格子衬衫、常掉发、双肩包、修电脑、加班多……这些似乎成了大众给程序员的固定标签。近几年流行的“跨界风”开始刷新人们对程序员的...

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

我说我懂多线程,面试官立马给我发了offer

不小心拿了几个offer,有点烦

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

立即提问
相关内容推荐