
异常处理
二木成林
这个作者很懒,什么都没留下…
展开
-
初始创建Android项目编译时报错Could not resolve com.android.tools.build:gradle:4.2.2
初始创建Android项目编译时报错如下:原因就是JDK的问题。点击,进入:选择面包,点击链接。在项中选择默认的Android studio下的。之后就会自动重新编译,就会好起来。但要注意,文件中的maven地址必须是可下载访问的,要是是在国外可能就不行。用如下镜像:原创 2025-05-07 22:12:25 · 383 阅读 · 0 评论 -
项目报错“BeanInitializationException: com.xxxxx.xx.dao.data.Dao can‘t get a sessionFactory“
BeanInitializationException: com.xxxxx.xx.dao.data.Dao can't get a sessionFactory原创 2022-07-16 23:56:24 · 976 阅读 · 0 评论 -
在脚本中获取系统中 tomcat 进程的进程号但却输出多个结果
在脚本中使用了这么一句 `ps -ef | grep tomcat | grep -v 'grep' | awk '{print $2}'` 用来获取系统中 tomcat 进程的进程号,但是结果却输出了多个进程号,导致后面的 `kill` 命令杀死 tomcat 进程失败。原创 2022-07-16 23:51:40 · 580 阅读 · 0 评论 -
IDEA 无法 debug 调试 Java Web 项目
IDEA 无法 debug 调试 Java Web 项目原创 2022-07-16 23:24:20 · 2153 阅读 · 0 评论 -
关于df命令由于设备名太长自动换行的问题
关于df命令由于设备名太长自动换行的问题原创 2022-07-16 23:18:40 · 436 阅读 · 0 评论 -
关于在使用ssh命令远程执行命令中有转义字符的问题
如果使用 `ssh` 命令在远程主机执行带有转义字符的命令,则不会输出我们想要的结果。原创 2022-07-16 23:17:45 · 1458 阅读 · 0 评论 -
使用sshj包报错“TransportException [HOST_KEY_NOT_VERIFIABLE] Could not verify `ssh-ed25519` host key”
Exception in thread "main" net.schmizz.sshj.transport.TransportException: [HOST_KEY_NOT_VERIFIABLE] Could not verify `ssh-ed25519` host key with fingerprint `95:be:4e:db:cd:69:c3:68:b2:bc:6d:54:93:81:0a:56` for `124.75.35.139` on port 22原创 2022-07-06 19:59:37 · 2471 阅读 · 0 评论 -
向数据库表中插入中文数据报错“1366 (HY000): Incorrect string value: ‘\xE5\x90\x95\xE5‘ for column ‘name‘ at row 1“
ERROR 1366 (HY000): Incorrect string value: '\xE5\x90\x95\xE5\xB8\x83' for column 'name' at row 1原创 2022-07-16 23:57:14 · 1394 阅读 · 1 评论 -
记录使用mRemoteNG软件启动后无法进行复制粘贴
打开 mRemoteNG 软件管理远程 Windows 服务器时,发现无法从当前的 Windows 系统中复制文件到远程服务器中,并且在本地的 Windows 系统中也无法进行任何复制粘贴操作,但发现关闭 mRemoteNG 软件之后就可以了。......原创 2022-07-16 23:57:07 · 1624 阅读 · 0 评论 -
开发idea插件在提交审核时因为兼容性问题未通过
The plugin distribution bundles IDE packages 'com.intellij.uiDesigner', 'com.intellij.uiDesigner.core'. Bundling IDE packages is considered bad practice and may lead to sophisticated compatibility problems.原创 2022-07-16 23:20:23 · 786 阅读 · 0 评论 -
JDK11安装完成后没有jre目录
JDK11下载jre文件夹原创 2022-07-16 23:10:33 · 6782 阅读 · 0 评论 -
Linux系统下使用wall命令发送广播消息中文乱码
在 Linux 系统(这里用的是 CentOS 7)下使用 `wall` 命令发送广播消息,中文乱码。原创 2022-06-13 21:08:47 · 1023 阅读 · 0 评论 -
在shell脚本中使用bind命令报错“bind: warning: line editing not enabled“
在shell脚本中使用bind命令报错“bind: warning: line editing not enabled“原创 2022-05-18 23:52:59 · 1424 阅读 · 0 评论 -
执行bind -X命令报错“-bash: bind: -X: invalid option“
执行bind -X命令报错“-bash: bind: -X: invalid option“原创 2022-05-18 23:50:03 · 494 阅读 · 0 评论 -
查看Kafka集群下所有的topic报错“Timed out waiting for a node assignment. Call: listTopics“
异常[root@centos7_101 kafka]# bin/kafka-topics.sh --bootstrap-server 192.168.88.142:9092 --list\^HError while executing topic command : Timed out waiting for a node assignment. Call: listTopics[2022-04-10 15:13:13,560] ERROR org.apache.kafka.common.errors原创 2022-05-15 20:56:52 · 15388 阅读 · 7 评论 -
关于串算法中使用free(str->ch);无法执行后继代码的情况
在写串算法时,有这么一段代码,添加之后下面的代码就无法正确执行了:```c if (str->ch) { free(str->ch); str->ch=NULL; }```原创 2022-05-11 21:44:49 · 386 阅读 · 0 评论 -
启动 tomcat 报错“Invalid bean definition with name ‘dataSource‘ defined in URL“
启动 tomcat 报错"Invalid bean definition with name 'dataSource' defined in URL"原创 2022-05-10 20:27:07 · 3282 阅读 · 0 评论 -
在线上环境启动tomcat没有报错,卡在 `ConnectionProviderFactory: Initializing connection provider` 处。
在线上环境启动tomcat没有报错,卡在 `ConnectionProviderFactory: Initializing connection provider` 处。原创 2022-05-10 20:26:56 · 429 阅读 · 0 评论 -
在idea中启动tomcat项目报错提示“java.util.zip.ZipException: error in opening zip file“
在idea中启动tomcat项目报错提示"java.util.zip.ZipException: error in opening zip file"原创 2022-05-15 20:55:33 · 1458 阅读 · 0 评论 -
使用Hibernate报错“Unknown column ‘account0_.note‘ in ‘field list‘“
使用Hibernate报错"Unknown column 'account0_.note' in 'field list'"原创 2022-05-15 20:55:49 · 1082 阅读 · 0 评论 -
Java API中kafka生产者发送消息没有成功
Java API中kafka生产者发送消息没有成功原创 2022-05-15 20:56:18 · 2095 阅读 · 2 评论 -
使用客户端API连接zookeeper报错“ConnectionLossException: KeeperErrorCode = ConnectionLoss for /“
使用客户端API连接zookeeper报错"ConnectionLossException: KeeperErrorCode = ConnectionLoss for /"原创 2022-05-15 20:57:34 · 4018 阅读 · 0 评论 -
查看zookeeper集群服务器启动状态报错“Error contacting service. It is probably not running.“
Error contacting service. It is probably not running.原创 2022-05-15 20:57:41 · 6908 阅读 · 1 评论 -
Spring相关项目启动报错“com.xxx.dao.relation.ConfigDao can‘t get a sessionFactory“
Spring相关项目启动报错"com.xxx.dao.relation.ConfigDao can't get a sessionFactory"原创 2022-05-15 20:57:52 · 453 阅读 · 0 评论 -
在Linux系统中使用hostname命令修改主机名报错“the specified hostname is invalid“
在Linux系统中使用hostname命令修改主机名报错"the specified hostname is invalid"原创 2022-04-30 09:39:17 · 7922 阅读 · 1 评论 -
在命令行窗口执行javac命令编译java文件报错“编码GBK的不可映射字符“
在 DOS 窗口执行 `javac` 命令编译 `.java` 文件报错:`编码GBK的不可映射字符`。原创 2022-03-20 20:24:01 · 2482 阅读 · 0 评论 -
Maven执行compile命令报错提示“on project xxx: Cannot create resource output directory“
在 IDEA 中执行 Maven 的 `compile` 命令报错提示:```txtFailed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources (default-resources) on project xxx: Cannot create resource output directory: C:\xxx\xxxxxx\target\classes```原创 2022-03-20 20:22:18 · 1603 阅读 · 0 评论 -
在idea中使用maven执行 `compile` 命令编译项目,发现报错:“找不到符号“。
在idea中使用maven执行 `compile` 命令编译项目,发现报错:"找不到符号"。原创 2022-03-20 20:21:10 · 12757 阅读 · 0 评论 -
项目中出现大量DEBUG级别的日志
项目打印大量的 DEBUG 级别的日志原创 2022-03-20 20:19:48 · 2415 阅读 · 0 评论 -
无法启动tomcat并且tomcat的catalina.out日志文件报错“ContainerBase.addChildInternal ContainerBase.addChild: start“
在线上服务器无法启动tomcat异常解决原创 2022-03-12 23:16:56 · 1873 阅读 · 0 评论 -
Dev-C++编译报错“expected unqualified-id before ‘delete‘“
[Error] expected unqualified-id before 'delete'原创 2022-03-12 23:13:08 · 8110 阅读 · 0 评论 -
Postman发送请求失败报错“Error: getaddrinfo ENOTFOUND xxx.xxx.xxx.xxx“
使用 Postman 发送 POST 请求报错原创 2022-02-21 22:10:01 · 32826 阅读 · 2 评论 -
使用Linux shell脚本远程启动tomcat报错Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At
在Linux的shell脚本中通过ssh命令启动远程服务器的tomcat失败,并且提示:[root@xxx ~]# ssh root@1.1.1.123 /home/apache-tomcat-8.5.13/bin/startup.shNeither the JAVA_HOME nor the JRE_HOME environment variable is definedAt least one of these environment variable is needed to run th原创 2022-02-21 21:55:52 · 1975 阅读 · 0 评论 -
使用JsonPath的read方法报错“read(Ljava/lang/String;Ljava/lang/String;[Lcom/jayway/jsonpath/Filter;)“
使用JsonPath的read方法报错:Exception in thread "main" java.lang.NoSuchMethodError: com.jayway.jsonpath.JsonPath.read(Ljava/lang/String;Ljava/lang/String;[Lcom/jayway/jsonpath/Filter;)Ljava/lang/Object;原创 2022-02-21 21:51:18 · 828 阅读 · 0 评论 -
在Linux中执行sed命令报错“-bash: s/test/big: No such file or directory“
-bash: s/test/big: No such file or directory原创 2021-12-22 20:58:07 · 1035 阅读 · 0 评论 -
在Linux中执行sed命令报错“-e expression #1, char 15: unterminated `s‘ command“
sed: -e expression #1, char 15: unterminated `s' command原创 2021-12-22 20:56:01 · 9162 阅读 · 2 评论 -
在一个maven项目中执行一个简单的测试类代码,没有在Run面板打印结果,而是在Build面板使用install命令编译整个模块
在一个maven项目中执行一个简单的测试类代码,没有在Run面板打印结果,而是在Build面板使用install命令编译整个模块。原创 2021-12-21 23:06:25 · 672 阅读 · 0 评论 -
使用Junit单元测试报错“No runnable methods“
异常使用Junit单元测试报错如下:java.lang.Exception: No runnable methods原创 2021-12-21 23:03:20 · 7912 阅读 · 0 评论 -
使用Junit单元测试报错“No tests found matching Method test01(Test01) from ClassRequest@5387f9e0“
异常在src/main/java包下的类中执行单元测试报错:java.lang.Exception: No tests found matching Method test01(Test01) from org.junit.internal.requests.ClassRequest@5387f9e0原创 2021-12-21 22:59:26 · 28204 阅读 · 0 评论 -
-bash: mlocate: command not found
异常执行mlocate Code.class命令报错:-bash: mlocate: command not found原因没有安装mlocate命令。解决执行如下命令进行安装:yum -y install mlocate然后使用locate Code.class查找报错:locate: can not stat () /var/lib/mlocate/mlocate.db': No such file or directory原因是安装完后没有更新库。执行如下命令更新索引库:原创 2021-12-21 22:57:14 · 911 阅读 · 0 评论