2015-07-06 3 views
0

BeanCreationException: ошибка при создании bean-компонента с именем «org.springframework.context.annotation.internalPersistenceAnnotationProcessor»: Ошибка создания бина; вложенное исключение java.lang.ClassFormatError: атрибут Отсутствует Код в методе, который не является родным или реферата файла класса javax/сохранение/PersistenceContextTypeBeanCreationException: ошибка при создании bean-компонента с именем 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor':

получает следующее сообщение об ошибке:

... 12 more 
2015-07-06 23:03:06 [main] DEBUG DefaultListableBeanFactory:512 - Destroying singletons in org.s[email protected]105fece7: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,baseSpringConfig,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor,org.openrepose.dbutil.spring.config.DbUtilsSpringConfig,sessionFactory,dataSource,hibernateUtil,hibernateUtils,org.openrepose.dao.model.spring.config.DaoSpringConfig,clientAuthConfigDao,ipIdentityConfigDao,rackspaceAuthorizationDao,quotaDao,rateLimitingConfigurationDao,systemModelDao,rackspaceAuthorizationConverter,ipIdentityConfigConverter,quotaConverter,rateLimitingConfigurationBase,clientAuthConfigConverter,rateLimitingConfigurationConverter,systemModelConverter,systemModelBase,quotaBase,ipIdentityConfigBase,clientAuthConfigBase,rackspaceAuthorizationBase]; root of factory hierarchy 
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor': Instantiation of bean failed; nested exception is java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/PersistenceContextType 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1093) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1038) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) 
    at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:199) 
    at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:615) 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:465) 
    at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84) 
    at org.openrepose.base.test.TestManagerBase.main(TestManagerBase.java:71) 
Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/PersistenceContextType 
    at java.lang.ClassLoader.defineClass1(Native Method) 
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760) 
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) 
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) 
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
    at java.lang.Class.getDeclaredMethods0(Native Method) 
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) 
    at java.lang.Class.privateGetMethodRecursive(Class.java:3048) 
    at java.lang.Class.getMethod0(Class.java:3018) 
    at java.lang.Class.getMethod(Class.java:1784) 
    at org.springframework.util.ClassUtils.getMethodIfAvailable(ClassUtils.java:668) 
    at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.<clinit>(PersistenceAnnotationBeanPostProcessor.java:173) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422) 
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) 
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1086) 
    ... 12 more 

Сценарий:
Я проект mutli module.
модели: зимовать объект
dbutils: спящий режим инъекции заводского сеанса модели как зависимости
дао: дао связанных операций вместе с autowire из спящего режима имеет dbutils как зависимость
баз: есть дао, как depedency и имеет то же классы, как и в модели без аннотация (бизнес-объект).

Я использовал конфигурацию на основе java для автоустановки. Для автоматического связывания для dbutils

package org.openrepose.dbutil.spring.config; 

import java.util.Properties; 

import javax.sql.DataSource; 

import org.apache.commons.dbcp2.BasicDataSource; 
import org.hibernate.SessionFactory; 
import org.openrepose.dbutil.constants.DbUtilsSpringConfigConstants; 
import org.openrepose.dbutil.dbconnection.HibernateUtils; 
import org.openrepose.dbutil.hibernateutil.HibernateUtil; 
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.context.annotation.Bean; 
import org.springframework.context.annotation.ComponentScan; 
import org.springframework.context.annotation.Configuration; 
import org.springframework.context.annotation.PropertySource; 
import org.springframework.context.annotation.Scope; 
import org.springframework.core.env.Environment; 
import org.springframework.orm.hibernate4.LocalSessionFactoryBuilder; 

/** 
* Spring IoC configuration. This class is responsible for building session 
* factory, hibernate util autowire and hibernateutils autowire 
* 
* @author Nitin gupta ([email protected]) 
* 
*/ 
@Configuration 
@PropertySource({ "classpath:persistence-mysql.properties" }) 
@ComponentScan({ "org.openrepose.dbutil" }) 
public class DbUtilsSpringConfig { 

    // autowire environment, properties read form 
    // classpath:persistence-mysql.properties 
    @Autowired 
    private Environment env; 

    /** 
    * Build a session factory 
    * 
    * @param dataSource 
    * @return 
    */ 
    @Autowired 
    @Bean(name = DbUtilsSpringConfigConstants.DB_SESSION_FACTORY) 
    @Scope("singleton") 
    public SessionFactory getSessionFactory(DataSource dataSource) { 
     LocalSessionFactoryBuilder sessionBuilder = new LocalSessionFactoryBuilder(dataSource); 
     sessionBuilder.addProperties(getHibernateProperties()); 
     sessionBuilder.scanPackages("org.openrepose.entities"); 
     return sessionBuilder.buildSessionFactory(); 

    } 

    /** 
    * Get The Data Source. Configure all Db related configuration here 
    * 
    * @return 
    */ 
    @Bean(name = DbUtilsSpringConfigConstants.DB_DATA_SOURCE) 
    @Scope("singleton") 
    public DataSource getDataSource() { 
     BasicDataSource dataSource = new BasicDataSource(); 
     dataSource.setDriverClassName(env.getProperty("jdbc.driverClassName")); 
     dataSource.setUrl(env.getProperty("jdbc.url")); 
     dataSource.setUsername(env.getProperty("jdbc.username")); 
     dataSource.setPassword(env.getProperty("jdbc.password")); 

     return dataSource; 
    } 

    /** 
    * get hibernate properties. Configure all hibernate related configuration 
    * 
    * @return 
    */ 
    public Properties getHibernateProperties() { 
     return new Properties() { 
      private static final long serialVersionUID = -4496310006095041101L; 

      { 

       setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto")); 

       setProperty("hibernate.dialect", env.getProperty("hibernate.dialect")); 

       setProperty("hibernate.globally_quoted_identifiers", 
         env.getProperty("hibernate.globally_quoted_identifiers")); 

       setProperty("hibernate.show_sql", env.getProperty("hibernate.show_sql")); 

       setProperty("hibernate.bytecode.use_reflection_optimizer ", 
         env.getProperty("hibernate.bytecode.use_reflection_optimizer")); 

       setProperty("cache.provider_class", env.getProperty("cache.provider_class")); 

       setProperty("current_session_context_class", env.getProperty("current_session_context_class")); 

       setProperty("hibernate.globally_quoted_identifiers", 
         env.getProperty("hibernate.globally_quoted_identifiers")); 
      } 
     }; 
    } 

    /** 
    * For autowiring Hibernateutil object. Pattern: By constructor 
    * 
    * @param sessionFactory 
    * @return 
    */ 
    @Autowired 
    @Bean(name = DbUtilsSpringConfigConstants.DB_HIBERNATE_UTIL) 
    @Scope("singleton") 
    public HibernateUtil getHibernateUtil(SessionFactory sessionFactory) { 
     return new HibernateUtil(sessionFactory); 
    } 

    /** 
    * For autowiring Hibernateutils object. Pattern: By constructor 
    * 
    * @param util 
    * @return 
    */ 
    @Autowired 
    @Bean(name = DbUtilsSpringConfigConstants.DB_HIBERNATE_UTILS) 
    @Scope("singleton") 
    public HibernateUtils getHibernateUtils(HibernateUtil util) { 
     return new HibernateUtils(util); 
    } 

} 

для Dao

автоматического связывания
package org.openrepose.dao.model.spring.config; 

import org.openrepose.dao.model.constants.DaoSpringConfigConstants; 
import org.openrepose.dao.model.implementation.clientauthentication.ClientAuthDAO; 
import org.openrepose.dao.model.implementation.clientauthorization.ClientAuthorizationDAO; 
import org.openrepose.dao.model.implementation.ipidentity.IpIdentityDAO; 
import org.openrepose.dao.model.implementation.quota.QuotaDAO; 
import org.openrepose.dao.model.implementation.ratelimit.RatelimitDAO; 
import org.openrepose.dao.model.implementation.systemmodel.SystemModelDAO; 
import org.openrepose.dao.model.interfaces.IModelDao; 
import org.openrepose.dbutil.spring.config.DbUtilsSpringConfig; 
import org.openrepose.entities.clientauthentication.ClientAuthConfigEO; 
import org.openrepose.entities.clientauthorization.RackspaceAuthorizationConfigEO; 
import org.openrepose.entities.ipidentity.IpIdentityConfigEO; 
import org.openrepose.entities.quota.QuotaLimitsConfigEO; 
import org.openrepose.entities.ratelimit.RateLimitConfigEO; 
import org.openrepose.entities.systemmodel.SystemModelConfigEO; 
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.context.annotation.Bean; 
import org.springframework.context.annotation.ComponentScan; 
import org.springframework.context.annotation.Configuration; 
import org.springframework.context.annotation.Import; 
import org.springframework.context.annotation.Scope; 

/** 
* Spring IoC configuration. This class is responsible for autowiring the all 
* service exposed by Dao layer 
* 
* @author Nitin gupta ([email protected]) 
* 
*/ 
@Configuration 
@ComponentScan({ "org.openrepose.dao" }) 
@Import(DbUtilsSpringConfig.class) 
public class DaoSpringConfig { 

    @Autowired 
    @Bean(name = DaoSpringConfigConstants.DAO_CLIENT_AUTH) 
    @Scope("singleton") 
    public IModelDao<ClientAuthConfigEO> getClientAuth() { 
     return new ClientAuthDAO(); 
    } 

    @Autowired 
    @Bean(name = DaoSpringConfigConstants.DAO_IP_IDENTITY) 
    @Scope("singleton") 
    public IModelDao<IpIdentityConfigEO> getIpIdentity() { 
     return new IpIdentityDAO(); 
    } 

    @Autowired 
    @Bean(name = DaoSpringConfigConstants.DAO_RATE_LIMIT) 
    @Scope("singleton") 
    public IModelDao<RateLimitConfigEO> getRateLimit() { 
     return new RatelimitDAO(); 
    } 

    @Autowired 
    @Bean(name = DaoSpringConfigConstants.DAO_SYSTEM_MODEL) 
    @Scope("singleton") 
    public IModelDao<SystemModelConfigEO> getSystemModel() { 
     return new SystemModelDAO(); 
    } 

    @Autowired 
    @Bean(name = DaoSpringConfigConstants.DAO_CLIENT_AUTHORIZATION) 
    @Scope("singleton") 
    public IModelDao<RackspaceAuthorizationConfigEO> getClientAuthorization() { 
     return new ClientAuthorizationDAO(); 
    } 

    @Autowired 
    @Bean(name = DaoSpringConfigConstants.DAO_QUOTA) 
    @Scope("singleton") 
    public IModelDao<QuotaLimitsConfigEO> getQuotaLimits() { 
     return new QuotaDAO(); 
    } 

} 

и базы

автоматического связывания
package org.openrepose.base.spring.config; 

import org.openrepose.base.bos.constants.BaseSpringConfigConstants; 
import org.openrepose.base.clientauthentication.bos.ClientAuthConfig; 
import org.openrepose.base.clientauthentication.service.implementation.ClientAuthBaseImpl; 
import org.openrepose.base.clientauthorization.bos.RackspaceAuthorization; 
import org.openrepose.base.clientauthorization.service.implementation.ClientAuthorizationBaseImpl; 
import org.openrepose.base.conversion.utility.IObjectConverter; 
import org.openrepose.base.interfaces.IModelBase; 
import org.openrepose.base.ipidentity.bos.IpIdentityConfig; 
import org.openrepose.base.ipidentity.service.implementation.IpIdentityBaseImpl; 
import org.openrepose.base.quota.bos.Limits; 
import org.openrepose.base.quota.service.implementation.QuotaBaseImpl; 
import org.openrepose.base.ratelimit.bos.RateLimitingConfiguration; 
import org.openrepose.base.ratelimit.service.implementation.RateLimitBaseImpl; 
import org.openrepose.base.systemmodel.bos.SystemModel; 
import org.openrepose.base.systemmodel.service.implementation.SystemModelBaseImpl; 
import org.openrepose.dao.model.spring.config.DaoSpringConfig; 
import org.openrepose.entities.clientauthentication.ClientAuthConfigEO; 
import org.openrepose.entities.clientauthorization.RackspaceAuthorizationConfigEO; 
import org.openrepose.entities.ipidentity.IpIdentityConfigEO; 
import org.openrepose.entities.quota.QuotaLimitsConfigEO; 
import org.openrepose.entities.ratelimit.RateLimitConfigEO; 
import org.openrepose.entities.systemmodel.SystemModelConfigEO; 
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.context.annotation.Bean; 
import org.springframework.context.annotation.ComponentScan; 
import org.springframework.context.annotation.Configuration; 
import org.springframework.context.annotation.Import; 
import org.springframework.context.annotation.Scope; 

/** 
* Spring IoC configuration. This class is responsible for autowiring the all 
* service exposed by Base layer 
* 
* @author Nitin gupta ([email protected]) 
* 
*/ 
@Configuration 
@ComponentScan({ "org.openrepose.base" }) 
@Import({DaoSpringConfig.class}) 
public class BaseSpringConfig { 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.OBJECT_CONVERTER_CLIENT_AUTH) 
    @Scope("singleton") 
    public IObjectConverter<ClientAuthConfig, ClientAuthConfigEO> getClientAuthConverter() { 
     return new ClientAuthConfig(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.OBJECT_CONVERTER_CLIENT_AUTHORIZATION) 
    @Scope("singleton") 
    public IObjectConverter<RackspaceAuthorization, RackspaceAuthorizationConfigEO> getRackspaceAuthorizationConverter() { 
     return new RackspaceAuthorization(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.OBJECT_CONVERTER_IP_IDENTITY) 
    @Scope("singleton") 
    public IObjectConverter<IpIdentityConfig, IpIdentityConfigEO> getIpIdentityConverter() { 
     return new IpIdentityConfig(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.OBJECT_CONVERTER_QUOTA) 
    @Scope("singleton") 
    public IObjectConverter<Limits, QuotaLimitsConfigEO> getQuotaConverter() { 
     return new Limits(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.OBJECT_CONVERTER_RATE_LIMIT) 
    @Scope("singleton") 
    public IObjectConverter<RateLimitingConfiguration, RateLimitConfigEO> getRateLimitConverter() { 
     return new RateLimitingConfiguration(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.OBJECT_CONVERTER_SYSTEM_MODEL) 
    @Scope("singleton") 
    public IObjectConverter<SystemModel, SystemModelConfigEO> getSystemModelConverter() { 
     return new SystemModel(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.BASE_SYSTEM_MODEL) 
    @Scope("singleton") 
    public IModelBase<SystemModel> getSystemModelBase() { 
     return new SystemModelBaseImpl(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.BASE_RATE_LIMIT) 
    @Scope("singleton") 
    public IModelBase<RateLimitingConfiguration> getRateLimitBase() { 
     return new RateLimitBaseImpl(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.BASE_QUOTA) 
    @Scope("singleton") 
    public IModelBase<Limits> getLimitsBase() { 
     return new QuotaBaseImpl(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.BASE_IP_IDENTITY) 
    @Scope("singleton") 
    public IModelBase<IpIdentityConfig> getIpIdentityConfigBase() { 
     return new IpIdentityBaseImpl(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.BASE_CLIENT_AUTH) 
    @Scope("singleton") 
    public IModelBase<ClientAuthConfig> getClientAuthBase() { 
     return new ClientAuthBaseImpl(); 
    } 

    @Autowired 
    @Bean(name = BaseSpringConfigConstants.BASE_CLIENT_AUTHORIZATION) 
    @Scope("singleton") 
    public IModelBase<RackspaceAuthorization> getRackspaceAuthorizationBase() { 
     return new ClientAuthorizationBaseImpl(); 
    } 

} 

Теперь я пытаюсь тест делает эти работы автоматического связывания или нет. Я проверил ДО Daos слоя он работает, используя ниже код

@SuppressWarnings("resource") 
    AbstractApplicationContext context = new AnnotationConfigApplicationContext(DaoSpringConfig.class); 
    @SuppressWarnings({ "unchecked", "unused" }) 
    IModelDao<ClientAuthConfigEO> c = (IModelDao<ClientAuthConfigEO>) context 
      .getBean(DaoSpringConfigConstants.DAO_CLIENT_AUTH); 

Но когда я пытаюсь сделать SAME AT базового класса не работает (ИСПОЛЬЗОВАНИЕ НИЖЕ КОДА)

@SuppressWarnings("resource") 
AbstractApplicationContext context1 = new AnnotationConfigApplicationContext(BaseSpringConfig.class); 
@SuppressWarnings({ "unchecked", "unused" }) 
IObjectConverter<SystemModel, SystemModelConfigEO> c2 = (IObjectConverter<SystemModel, SystemModelConfigEO>) context1 
     .getBean(BaseSpringConfigConstants.OBJECT_CONVERTER_SYSTEM_MODEL); 

, даже если я попробовать поставить тот же код, который используется в слое dao в базовом слое .. он не работает над превышением исключения.

Пожалуйста, помогите, я на самом деле нужно, чтобы исправить это

Base Pom:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <parent> 
     <groupId>org.openrepose</groupId> 
     <artifactId>profile-support</artifactId> 
     <version>7.1.0.3-SNAPSHOT</version> 
    </parent> 
    <artifactId>repose-config-base</artifactId> 
    <dependencies> 
     <dependency> 
      <groupId>org.glassfish.main.extras</groupId> 
      <artifactId>glassfish-embedded-all</artifactId> 
      <version>3.1.1.2</version> 
      <scope>test</scope> 
     </dependency> 
     <!-- Spring 4 dependencies --> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-core</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-context</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-web</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-beans</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-test</artifactId> 
     </dependency> 


     <!-- logs --> 
     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-api</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>jcl-over-slf4j</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>com.google.guava</groupId> 
      <artifactId>guava</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.openrepose</groupId> 
      <artifactId>repose-config-models</artifactId> 
      <version>7.1.0.3-SNAPSHOT</version> 
     </dependency> 
     <dependency> 
      <groupId>org.openrepose</groupId> 
      <artifactId>repose-config-daos</artifactId> 
      <version>7.1.0.3-SNAPSHOT</version> 
     </dependency> 
     <dependency> 
      <groupId>org.openrepose</groupId> 
      <artifactId>repose-config-catalog</artifactId> 
      <version>7.1.0.3-SNAPSHOT</version> 
     </dependency> 
    </dependencies> 
</project> 

ответ

0

Есть возможны две причины, согласно моему пониманию

  1. Одним из таких сценариев я столкнулся в прошлом из-за файлов jar. В моем случае были файлы javaee. Проблема с файлом javaee.jar. Рекомендуемый способ - всегда получать оригинальную полную версию файла javaee.jar из http://www.oracle.com/technetwork/java/javaee/downloads/index.html. Просьба загрузить и установить J2EE SDK, а javaee.jar можно найти в папке «\ J2EE_SDK_FOLDER \ lib». Включите его в локальный репозиторий Maven или путь к классу проекта. Следовательно, здесь также может быть аналогичная проблема.
  2. Другой возможный сценарий может быть, что файлы не проверяется, следовательно, что-то неправильно с компонентом сканирования
+0

Привет, спасибо за ваш вклад. Но это не из-за javaee jar. Я тоже пытался включить эту банку. ничего не работает –

Смежные вопросы