1 Reply Latest reply on Jun 26, 2011 11:25 AM by grossetieg

    Resolve "New missing/unsatisfied dependencies" error

    grossetieg

      Hi,

       

      I'm currently trying to migrate my application from JBoss AS5 to JBoss AS7 but I'm stuck with this error :

      20:56:32,140 INFO  [org.jboss.as.server] (MSC service thread 1-7) Service status report
         New missing/unsatisfied dependencies:
            service jboss.deployment.subunit."my.ear"."a-impl.jar".component.ServiceBImpl.VIEW."com.foo.service.BLocal" (missing)
            service jboss.deployment.subunit."my.ear"."a-impl.jar".component.ServiceCImpl.VIEW."com.bar.service.CRemote" (missing)
      

       

      my.ear :

      |
      |--- a-impl.jar
      |--- b-impl.jar
      |--- c-impl.jar
      |
      |--- lib
      |--- |--- a.jar
      |--- |--- b.jar
      |--- |--- c.jar
      |
      

       

       

      a-impl/META-INF/MANIFEST.MF:

      ...
      Class-Path: b-impl.jar c-impl.jar
      

       

       

      My EAR classloading seems to work fine (no ClassNotFoundExceptions, NoClassDefFoundErrors, or ClassCastExceptions) but the dependency is still unsatisfied.

      In despair I tried to add the jboss specific deployment file descriptor jboss-deployment-structure.xml :

      <jboss-deployment-structure>
        <sub-deployment name="a-impl.jar">
          <dependencies>
            <module name="deployment.my.ear.b-impl.jar" />
            <module name="deployment.my.ear.c-impl.jar" />
          </dependencies>
        </sub-deployment>
      </jboss-deployment-structure>
      

       

      But the error is the same. Any help with this will be greatly appreciated.

       

       

      Guillaume.

        • 1. Re: Resolve "New missing/unsatisfied dependencies" error
          grossetieg

          Ok I give a try at the latest SNAPSHOT available : jboss-7.0.0.Beta4-SNAPSHOT and it's working fine !

          I can now enjoy really fast boot and fast deployment

           

          For people who want to use cache with JBoss-7.0.0.Beta4, you can modify your persistence.xml to use Infinispan (instead of ehcache) :

          <?xml version="1.0" encoding="UTF-8"?>
          <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
                    <persistence-unit name="my-ds" transaction-type="JTA">
                              <provider>org.hibernate.ejb.HibernatePersistence</provider>
                              <jta-data-source>java:/MyDS</jta-data-source>
                              <properties>
                                        <!-- Cache -->
                                        <property name="hibernate.cache.use_query_cache" value="true" />
                                        <property name="hibernate.cache.use_second_level_cache" value="true" />
          
                                        <!-- Inifinispan -->
                                        <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.TransactionManagerLookup"/>
                                        <property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.infinispan.JndiInfinispanRegionFactory"/>
                                        <property name="hibernate.cache.infinispan.cachemanager" value="java:jboss/infinispan/hibernate"/>
                                        <property name="hibernate.cache.infinispan.statistics" value="true"/>
          
                      </properties>
                    </persistence-unit>
          </persistence>
          

           

          In fact even the latest SNAPSHOT available ehcahe-core-2.5.0 is incompatible with hibernate-core-4.0.0.Beta1.jar.

          The following import statements are problematic (throw ClassNotFoundException) in net.sf.ehcache.hibernate.AbstractEhcacheRegionFactory :

          import org.hibernate.cache.CacheDataDescription;
          import org.hibernate.cache.CacheException;
          import org.hibernate.cache.CollectionRegion;
          import org.hibernate.cache.EntityRegion;
          import org.hibernate.cache.QueryResultsRegion;
          import org.hibernate.cache.RegionFactory;
          import org.hibernate.cache.Timestamper;
          import org.hibernate.cache.TimestampsRegion;
          import org.hibernate.cache.access.AccessType;
          import org.hibernate.cfg.Settings;
          

           

          Dont forget to modify CacheConcurrencyStrategy.NONSTRICT_READ_WRITE to CacheConcurrencyStrategy.TRANSACTIONAL to avoid CacheException :

          Caused by: org.hibernate.cache.CacheException: unsupported access type [nonstrict-read-write]
          

           

           

          Guillaume.