1、 org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
這個異常是客戶端讀取超時關閉了連接,這時候服務器端再向客戶端已經斷開的連接寫數據時就發生了broken pipe異常!
2、Permission denied
tomcat如果遇到諸如無法找到目錄以及文件地問題,一般是因爲文件權限造成地問題,可以如此解決:
sudo chmod 755 Library/Tomcat/apache-tomcat-8.0.8/bin/*.sh
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Protocol wrong type for socket
3、java.lang.nullpointerexception
空指針異常一般最好解決了,你看看報的哪行錯誤,然後看涉及到的變量。一種情況是沒實例化。另一種情況是用框架時例如spring沒有注入,或者注入後沒有交給spring容器處理。
4、The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...
configuration 中的元素,不但有類型限制,也有順序限制
5、unreachable statement
編譯器決定永遠不會執行它
6、java.sql.SQLException: ORA-01747: user.table.column, table.column 或列說明無效
會發現多了一個,號,
7、The method xxx of type must override a superclass method.
java1.5中繼承接口是不需要@Override的,而在1.6中是需要添加@Override註解的,如果項目的編譯器是1.5版本的就可能報錯
8、ORA-01658: 無法爲表空間 TRAFFICPLATFORM_SPACE 中的段創建 INITIAL 區
9、javax.management.InstanceAlreadyExistsException:com.zaxxer.hikari:name = dataSource,type = HikariDataSource
1、禁用jmx:
application.yml:
spring:
jmx:
enabled: false
或application.properties:
spring.jmx.enabled= false
2、如果需要啓用jmx,請設置以下屬性。
設置默認域和唯一名稱
application.yml:
spring:
jmx:
default-domain: com.application.name
unique-names: true
10、org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Unable to resolve persistence unit root URL
解決方法是,可以通過添加以下更改來關閉Hibernate的spring-boot自動配置。
添加@EnableAutoConfiguration(exclude = HibernateJpaAutoConfiguration.class)到應用程序啓動類
添加spring.data.jpa.repositories.enabled=false到application.properties/yml文件