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資料夾刪除,再重新執行就解決了。
相關文章
- Unable to load SELinux PolicyLinux
- Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apacBeanApacheViewObjectAI
- Android:Unable to find explicit activity classAndroid
- Caused by: java.lang.IllegalArgumentException: Unable to instantiate SparkSession with Hive supportJavaExceptionSparkSessionHive
- 高手sos!!! Unable to load document from file...
- 【錯誤】 Unable to compile class for JSPCompileJS
- ORA-600 [unable to load XDB library] in AIXAI
- Unable to generate a temporary class (result=1)解決方法
- 啟動uwsgi報錯ImportError: No module named, unable to load appImportErrorAPP
- org.apache.jasper.JasperException: Unable to compile class for JSPApacheExceptionCompileJS
- 18、 Caused by: java.lang.NoSuchMethodException: [class android.content.Context..AttributeSetJavaExceptionAndroidContext
- Unable to load native-hadoop library for your platform解決HadoopPlatform
- Hive錯誤:Unable to load native-hadoop library for your platformHiveHadoopPlatform
- Latex編譯錯誤:Unable to load picture or PDF file 問題解決編譯
- OPatch not load inventory for given Oracle Ho-Unable create patchobj_1119465.1OracleOBJ
- ORA-00600: internal error code, arguments: [unable to load XDB library] 排查過程Error
- java編譯 Error: Could not find or load main class java執行包main方法Java編譯ErrorAI
- Centos 安裝JDK 出現Unable to load native library: libnsl.so.1CentOSJDK
- Hadoop問題解決:Unable to load native-hadoop library for your platform...HadoopPlatform
- 部署Hadoop2.x,出現Warn:Unable to load native-hadoop libraryHadoop
- SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"AI
- Caused by: android.os.Android
- Dictionary inconsistency caused by CTAS in PARALLELParallel
- 在linux as4上做asm時出現"Unable to load module oracleasm"問題的處理LinuxASMOracle
- 昨天裝RAC時遇到的一個錯誤Loading module "oracleasm": Unable to load module "oracleasm"[FAILED]OracleASMAI
- springboot專案打包提示Unable to find a single main class from the following candidates錯誤Spring BootAI
- crontab執行jar包時,Could not find or load main class(找不到或者載入不到主類)JARAI
- Caused by: Error: ' ' is not a valid resource name characterError
- Android學習開發(問題解決)——android Unable to inflate view tag without class attributeAndroidView
- Springboot:Caused by: java.lang.NoSuchMethodError...Spring BootJavaError
- Caused by: java.lang.NoClassDefFoundError: javax/persistence/EntityListenersJavaError
- (20200915Solved)Vscode出現Unable to open ‘hashtable_class_helper.pxi‘VSCode
- -Objc -all_load -force_loadOBJ
- iOS[super class]和[self class]iOS
- 解決Mybatis連線Sql server 出現 Cannot load JDBC driver class 'com.mysql.jdbc.Driver '的問題MyBatisServerJDBCMySql
- Caused by:.NoSuchBeanDefinitionException: No bean named 'userInfoServiceImpl' availableBeanExceptionAI
- Caused by: java.lang.NoClassDefFoundError: javax/servlet/GenericFilterJavaErrorServletFilter
- ORA-01555 caused by SQL statement belowSQL