javax.enterprise.inject.UnsatisfiedResolutionException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I'm trying to migrate an SDN project from the 2.3.3 version to the 3.0.0.RELEASE. The project is a WAR which is deployed on a Glassfish 3.1.2.2 server and uses EJBs which access Neo4j via an *@Autowired Neo4jOperations* object and *GraphRepository<T>* objects. The auto wiring is supported using the *SpringBeanAutowiringInterceptor* interceptor annotation on the EJBs. The SDN configuration is given by the following lines in the spring xml configuration file: {quote} <context:annotation-config/> <context:spring-configured/> <bean id="graphDatabaseService" class="org.springframework.data.neo4j.support.GraphDatabaseServiceFactoryBean" destroy-method="shutdown" scope="singleton"> <constructor-arg value="target/config-test"/> <constructor-arg> <map> <entry key="allow_store_upgrade" value="true"/> </map> </constructor-arg> </bean> <neo4j:config graphDatabaseService="graphDatabaseService"/> <neo4j:repositories base-package="com.my.neo4j.repository"/> <tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/> {quote} Everything works fine when using the 2.3.3 SDN version, whereas 3.0.0 gives the following error while deploying: {quote} javax.enterprise.inject.UnsatisfiedResolutionException: Unable to resolve a bean for 'org.springframework.data.neo4j.support.mapping.Neo4jMappingContext' with qualifiers [@javax.enterprise.inject.Any(), @javax.enterprise.inject.Default()]. at org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.createRepositoryBean(Neo4jCdiRepositoryExtension.java:107) at org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.afterBeanDiscovery(Neo4jCdiRepositoryExtension.java:82) ... {quote}
    via by Remigio Di Muzio,
  • I'm trying to deploy on a Glassfish 3.1.2.2 server a web application which uses the Neo4j embedded database from EJB objects. Everything worked fine until 2.3.5, but 3.x gives the following error while deploying: {quote} javax.enterprise.inject.UnsatisfiedResolutionException: Unable to resolve a bean for 'org.springframework.data.neo4j.support.mapping.Neo4jMappingContext' with qualifiers [@javax.enterprise.inject.Any(), @javax.enterprise.inject.Default()]. at org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.createRepositoryBean(Neo4jCdiRepositoryExtension.java:107) at org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.afterBeanDiscovery(Neo4jCdiRepositoryExtension.java:82) ... {quote} After some code examination I found that the graphDatabase object is never processed by the CDI infrastructure, so the createRepositoryBean method in the Neo4jCdiRepositoryExtension throws the above listed exception. The graphDatabase object is never discovered for two reasons: 1. in the META-INF folder of SDN there is no beans.xml file and this prevents Java EE from starting bean discovery; 2. the DelegatingGraphDatabase has no default constructor and so it's never considered as a bean. I've fixed both issues and now everything works fine. I've submitted both fixes as pull requests on the GitHub project: https://github.com/spring-projects/spring-data-neo4j/pull/179 https://github.com/spring-projects/spring-data-neo4j/pull/180
    via by Remigio Di Muzio,
  • I'm trying to migrate an SDN project from the 2.3.3 version to the 3.0.0.RELEASE. The project is a WAR which is deployed on a Glassfish 3.1.2.2 server and uses EJBs which access Neo4j via an *@Autowired Neo4jOperations* object and *GraphRepository<T>* objects. The auto wiring is supported using the *SpringBeanAutowiringInterceptor* interceptor annotation on the EJBs. The SDN configuration is given by the following lines in the spring xml configuration file: {quote} <context:annotation-config/> <context:spring-configured/> <bean id="graphDatabaseService" class="org.springframework.data.neo4j.support.GraphDatabaseServiceFactoryBean" destroy-method="shutdown" scope="singleton"> <constructor-arg value="target/config-test"/> <constructor-arg> <map> <entry key="allow_store_upgrade" value="true"/> </map> </constructor-arg> </bean> <neo4j:config graphDatabaseService="graphDatabaseService"/> <neo4j:repositories base-package="com.my.neo4j.repository"/> <tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/> {quote} Everything works fine when using the 2.3.3 SDN version, whereas 3.0.0 gives the following error while deploying: {quote} javax.enterprise.inject.UnsatisfiedResolutionException: Unable to resolve a bean for 'org.springframework.data.neo4j.support.mapping.Neo4jMappingContext' with qualifiers [@javax.enterprise.inject.Any(), @javax.enterprise.inject.Default()]. at org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.createRepositoryBean(Neo4jCdiRepositoryExtension.java:107) at org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.afterBeanDiscovery(Neo4jCdiRepositoryExtension.java:82) ... {quote}
    via by Remigio Di Muzio,
  • I'm trying to deploy on a Glassfish 3.1.2.2 server a web application which uses the Neo4j embedded database from EJB objects. Everything worked fine until 2.3.5, but 3.x gives the following error while deploying: {quote} javax.enterprise.inject.UnsatisfiedResolutionException: Unable to resolve a bean for 'org.springframework.data.neo4j.support.mapping.Neo4jMappingContext' with qualifiers [@javax.enterprise.inject.Any(), @javax.enterprise.inject.Default()]. at org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.createRepositoryBean(Neo4jCdiRepositoryExtension.java:107) at org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.afterBeanDiscovery(Neo4jCdiRepositoryExtension.java:82) ... {quote} After some code examination I found that the graphDatabase object is never processed by the CDI infrastructure, so the createRepositoryBean method in the Neo4jCdiRepositoryExtension throws the above listed exception. The graphDatabase object is never discovered for two reasons: 1. in the META-INF folder of SDN there is no beans.xml file and this prevents Java EE from starting bean discovery; 2. the DelegatingGraphDatabase has no default constructor and so it's never considered as a bean. I've fixed both issues and now everything works fine. I've submitted both fixes as pull requests on the GitHub project: https://github.com/spring-projects/spring-data-neo4j/pull/179 https://github.com/spring-projects/spring-data-neo4j/pull/180
    via by Remigio Di Muzio,
    • javax.enterprise.inject.UnsatisfiedResolutionException: Unable to resolve a bean for 'org.springframework.data.neo4j.support.mapping.Neo4jMappingContext' with qualifiers [@javax.enterprise.inject.Any(), @javax.enterprise.inject.Default()]. at org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.createRepositoryBean(Neo4jCdiRepositoryExtension.java:107) at org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.afterBeanDiscovery(Neo4jCdiRepositoryExtension.java:82)
    No Bugmate found.