Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class
用spring+hibernate+tomcat+IDea時遇到一個問題,在此記錄解決方法。
專案正常執行以後,再刪掉有@Entity標籤的class檔案,再執行專案時會出現
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class bean.User
然後在所有檔案中也沒有出現錯誤提示的那個類,本不應該出現這個問題。
網上搜尋有人說是hibernate的對映問題,不過我的配置中進行了自動掃描,不需要對映。
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="cms" />
<property name="dataSource" ref="dataSource" />
<property name="persistenceXmlLocation" value="file:${CONF_HOME}/persistence.xml"/>
<property name="packagesToScan" value="bean" />
<property name="loadTimeWeaver">
<bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>
</property>
</bean>
最後把執行生成的target資料夾刪除,再重新執行就解決了。
相關文章
- Caused by: java.lang.IllegalArgumentException: Unable to instantiate SparkSession with Hive supportJavaExceptionSparkSessionHive
- Unable to load native-hadoop library for your platform解決HadoopPlatform
- org.apache.jasper.JasperException: Unable to compile class for JSPApacheExceptionCompileJS
- 啟動uwsgi報錯ImportError: No module named, unable to load appImportErrorAPP
- Latex編譯錯誤:Unable to load picture or PDF file 問題解決編譯
- Hadoop問題解決:Unable to load native-hadoop library for your platform...HadoopPlatform
- Centos 安裝JDK 出現Unable to load native library: libnsl.so.1CentOSJDK
- (20200915Solved)Vscode出現Unable to open ‘hashtable_class_helper.pxi‘VSCode
- Android學習開發(問題解決)——android Unable to inflate view tag without class attributeAndroidView
- Caused by: android.os.Android
- crontab執行jar包時,Could not find or load main class(找不到或者載入不到主類)JARAI
- Caused by:.NoSuchBeanDefinitionException: No bean named 'userInfoServiceImpl' availableBeanExceptionAI
- Springboot:Caused by: java.lang.NoSuchMethodError...Spring BootJavaError
- Caused by: Error: ' ' is not a valid resource name characterError
- Unable to find a specification for ''
- Lazy Load
- 解決Mybatis連線Sql server 出現 Cannot load JDBC driver class 'com.mysql.jdbc.Driver '的問題MyBatisServerJDBCMySql
- OUTLOOK - Unable to Delete Meetingsdelete
- Caused by: java.lang.NumberFormatException: For input string: "18446744073709551615"JavaORMException
- Caused by: java.lang.NoClassDefFoundError: javax/servlet/GenericFilterJavaErrorServletFilter
- Domcontentloaded、load、finish
- load與initialize
- 理解load averages
- This is my Load.
- gRPC Load BalancingRPC
- iOS[super class]和[self class]iOS
- class
- Caused by: java.lang.IllegalArgumentException: port out of range:-1JavaException
- Typescript的interface、class和abstract classTypeScript
- Unable to boot ApiServiceProvider configure..bootAPIIDE
- Unable to locate factory with name [default]
- Laravel pivot 新增 loadLaravel
- transformers(1) 、load模型ORM模型
- linux load解釋Linux
- docker tag save loadDocker
- jQuery – AJAX load() 方法jQuery
- ORACLE GoldenGate Initial LoadOracleGo
- torch.save(),torch.load(),state_dict(),load_state_dict()