Jboss as 7 ear deploy error ClassNotFoundException
===

Hello i try to deploy ear file on jboss as 7.0.2. I migrate from jboss 4.2.3. I can't properly build jboss-deployment-structure.xml which look like this

    <jboss-deployment-structure>
      <!-- Make sub deployments isolated by default, so they cannot see each others classes without a Class-Path entry -->
      <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
      <!-- This corresponds to the top level deployment. For a war this is the war's module, for an ear -->
      <!-- This is the top level ear module, which contains all the classes in the EAR's lib folder     -->
      <deployment>
        <!-- Exclusions allow you to prevent the server from automatically adding some dependencies     -->
        <exclusions>
            <module name="org.javassist" />
        </exclusions>
        <!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
        <dependencies>
    		
    		 
    	
       <!--   <module name="deployment.javassist.proxy" />
      
          <module name="deployment.myjavassist" /> -->
        </dependencies>
        <!-- These add additional classes to the module. In this case it is the same as including the jar in the EAR's lib directory -->
        <resources>
        </resources>
      </deployment>
      <sub-deployment name="dts.war">
     
        <!-- This corresponds to the module for a web deployment -->
        <!-- it can use all the same tags as the <deployment> entry above -->
        <dependencies>
   
        </dependencies>
    	 <resources>
          <resource-root path="../richfaces-api-3.3.3.Final.jar" />
        </resources>
      </sub-deployment>
      <!-- Now we are going to define two additional modules -->
      <!-- This one is a different version of javassist that we have packaged -->
      
      <!-- This is a module that re-exports the containers version of javassist.util.proxy -->
      <!-- This means that there is only one version of the Proxy classes defined          -->
     
    </jboss-deployment-structure>

 and give me this error 

    16:40:26,304 INFO  [org.jboss.as.server.deployment] (pool-1-thread-31) Content added at location D:\liferay-portal-6.1.0-ce-ga1\jboss-7.0.2\standalone\data\content\63\3ca18879f9150e8a8ca79ce04d865e443cf9c9\content
    16:40:26,305 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "dts.ear"
    16:40:28,654 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "dts.jar"
    16:40:28,655 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "loginHook-hook.war"
    16:40:28,655 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "dts.war"
    16:40:28,655 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "xpp3_min-1.1.3.4.O.jar"
    16:40:28,655 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Starting deployment of "jboss-el-1.0_02.CR3.jar"
    16:40:28,655 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "dts.sar"
    16:40:28,655 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "jfreechart-1.0.13.jar"
    16:40:28,655 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Starting deployment of "richfaces-api-3.3.3.Final.jar"
    16:40:28,656 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) Starting deployment of "jboss-seam-2.2.0.GA.jar"
    16:40:28,656 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "jcommon-1.0.16.jar"
    16:40:28,655 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "xstream-1.1.3.jar"
    16:40:28,656 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "quartz-1.8.4.jar"
    16:40:29,477 WARN  [org.jboss.as.server.deployment.service-loader] (MSC service thread 1-5) Encountered invalid class name "org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer" for service type "org.xmlpull.v1.XmlPullParserFactory"
    16:40:29,478 WARN  [org.jboss.as.server.deployment.module.deployment-structure-descriptor-processor] (MSC service thread 1-1) /D:/liferay-portal-6.1.0-ce-ga1/jboss-7.0.2/bin/content/dts.ear/dts.war/META-INF/jboss-deployment-structure.xml in subdeployment ignored. jboss-deployment-structure.xml is only parsed for top level deployments.
    16:40:29,478 INFO  [org.jboss.jpa] (MSC service thread 1-7) read persistence.xml for dts
    16:40:29,480 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry iText-toolbox.jar in "/D:/liferay-portal-6.1.0-ce-ga1/jboss-7.0.2/bin/content/dts.ear/dts.war/WEB-INF/lib/itext-2.1.2.jar"  does not point to a valid jar for a Class-Path reference.
    16:40:29,481 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry iText-toolbox-2.1.2.jar in "/D:/liferay-portal-6.1.0-ce-ga1/jboss-7.0.2/bin/content/dts.ear/dts.war/WEB-INF/lib/itext-2.1.2.jar"  does not point to a valid jar for a Class-Path reference.
    16:40:29,481 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry bcmail-jdk14-138.jar in "/D:/liferay-portal-6.1.0-ce-ga1/jboss-7.0.2/bin/content/dts.ear/dts.war/WEB-INF/lib/itext-2.1.2.jar"  does not point to a valid jar for a Class-Path reference.
    16:40:29,481 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry bcprov-jdk14-138.jar in "/D:/liferay-portal-6.1.0-ce-ga1/jboss-7.0.2/bin/content/dts.ear/dts.war/WEB-INF/lib/itext-2.1.2.jar"  does not point to a valid jar for a Class-Path reference.
    16:40:29,552 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to dts.ear
    16:40:29,553 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) added (default provider) org.hibernate dependency to application deployment (since 1 PU(s) didn't specify jboss.as.jpa.providerModule)
    16:40:29,553 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) added org.hibernate dependency to application deployment
    16:40:29,554 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to jboss-el-1.0_02.CR3.jar
    16:40:29,554 INFO  [org.jboss.as.jpa] (MSC service thread 1-6) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to jboss-seam-2.2.0.GA.jar
    16:40:29,554 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to xpp3_min-1.1.3.4.O.jar
    16:40:29,554 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to quartz-1.8.4.jar
    16:40:29,555 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to richfaces-api-3.3.3.Final.jar
    16:40:29,555 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to dts.sar
    16:40:29,555 INFO  [org.jboss.as.jpa] (MSC service thread 1-8) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to xstream-1.1.3.jar
    16:40:29,554 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to dts.war
    16:40:29,556 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to jfreechart-1.0.13.jar
    16:40:29,556 INFO  [org.jboss.as.jpa] (MSC service thread 1-8) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to jcommon-1.0.16.jar
    16:40:29,556 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to dts.jar
    16:40:29,555 INFO  [org.jboss.as.jpa] (MSC service thread 1-6) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to loginHook-hook.war
    16:40:29,557 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added (default provider) org.hibernate dependency to application deployment (since 1 PU(s) didn't specify jboss.as.jpa.providerModule)
    16:40:29,557 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added org.hibernate dependency to application deployment
    16:40:29,607 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-7) JNDI bindings for session bean named EjbSynchronizations in deployment unit subdeployment "jboss-seam-2.2.0.GA.jar" of deployment "dts.ear" are as follows:
    
    	java:global/dts/jboss-seam-2.2.0.GA/EjbSynchronizations!org.jboss.seam.transaction.LocalEjbSynchronizations
    	java:app/jboss-seam-2.2.0.GA/EjbSynchronizations!org.jboss.seam.transaction.LocalEjbSynchronizations
    	java:module/EjbSynchronizations!org.jboss.seam.transaction.LocalEjbSynchronizations
    	java:global/dts/jboss-seam-2.2.0.GA/EjbSynchronizations
    	java:app/jboss-seam-2.2.0.GA/EjbSynchronizations
    	java:module/EjbSynchronizations
    
    16:40:29,608 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-7) JNDI bindings for session bean named TimerServiceDispatcher in deployment unit subdeployment "jboss-seam-2.2.0.GA.jar" of deployment "dts.ear" are as follows:
    
    	java:global/dts/jboss-seam-2.2.0.GA/TimerServiceDispatcher!org.jboss.seam.async.LocalTimerServiceDispatcher
    	java:app/jboss-seam-2.2.0.GA/TimerServiceDispatcher!org.jboss.seam.async.LocalTimerServiceDispatcher
    	java:module/TimerServiceDispatcher!org.jboss.seam.async.LocalTimerServiceDispatcher
    	java:global/dts/jboss-seam-2.2.0.GA/TimerServiceDispatcher
    	java:app/jboss-seam-2.2.0.GA/TimerServiceDispatcher
    	java:module/TimerServiceDispatcher
    
    16:40:29,626 WARN  [org.jboss.modules] (MSC service thread 1-1) Failed to define class org.richfaces.skin.SkinBean in Module "deployment.dts.ear.dts.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/richfaces/skin/SkinBean (Module "deployment.dts.ear.dts.war:main" from Service Module Loader)
    	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:104)
    	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
    	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_15]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_15]
    	at java.lang.Thread.run(Thread.java:619) [:1.6.0_15]
    Caused by: java.lang.NoClassDefFoundError: org/richfaces/skin/Skin
    	at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_15]
    	at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [:1.6.0_15]
    	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) [:1.6.0_15]
    	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]
    	... 14 more
    Caused by: java.lang.ClassNotFoundException: org.richfaces.skin.Skin from [Module "deployment.dts.ear.dts.war:main" from Service Module Loader]
    	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]
    	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]
    	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [:1.6.0_15]
    	... 18 more
    
    16:40:29,628 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.subunit."dts.ear"."dts.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."dts.ear"."dts.war".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "dts.war" of deployment "dts.ear"
    	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
    	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_15]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_15]
    	at java.lang.Thread.run(Thread.java:619) [:1.6.0_15]
    Caused by: java.lang.LinkageError: Failed to link org/richfaces/skin/SkinBean (Module "deployment.dts.ear.dts.war:main" from Service Module Loader)
    	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)
    	at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
    	at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
    	at org.jboss.modules.Module.loadModuleClass(Module.java:590)
    	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
    	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
    	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
    	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
    	at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:104)
    	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
    	... 5 more
    Caused by: java.lang.NoClassDefFoundError: org/richfaces/skin/Skin
    	at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_15]
    	at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [:1.6.0_15]
    	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) [:1.6.0_15]
    	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
    	... 14 more
    Caused by: java.lang.ClassNotFoundException: org.richfaces.skin.Skin from [Module "deployment.dts.ear.dts.war:main" from Service Module Loader]
    	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
    	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
    	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
    	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
    	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
    	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [:1.6.0_15]
    	... 18 more
    
    16:40:29,830 INFO  [org.jboss.as.server.controller] (pool-1-thread-31) Deployment of "dts.ear" was rolled back with failure message {"Failed services" => {"jboss.deployment.subunit.\"dts.ear\".\"dts.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"dts.ear\".\"dts.war\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"dts.war\" of deployment \"dts.ear\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.dts.loginHook-hook.Validator missing [ jboss.naming.context.java.module.dts.loginHook-hook ]","jboss.naming.context.java.comp.dts.\"jboss-seam-2.2.0.GA\".EjbSynchronizations.ValidatorFactory missing [ jboss.naming.context.java.comp.dts.\"jboss-seam-2.2.0.GA\".EjbSynchronizations ]","jboss.naming.context.java.comp.dts.\"jboss-seam-2.2.0.GA\".TimerServiceDispatcher.Validator missing [ jboss.naming.context.java.comp.dts.\"jboss-seam-2.2.0.GA\".TimerServiceDispatcher ]","jboss.naming.context.java.comp.dts.\"jboss-seam-2.2.0.GA\".EjbSynchronizations.Validator missing [ jboss.naming.context.java.comp.dts.\"jboss-seam-2.2.0.GA\".EjbSynchronizations ]","jboss.naming.context.java.module.dts.loginHook-hook.ValidatorFactory missing [ jboss.naming.context.java.module.dts.loginHook-hook ]","jboss.naming.context.java.comp.dts.\"jboss-seam-2.2.0.GA\".TimerServiceDispatcher.ValidatorFactory missing [ jboss.naming.context.java.comp.dts.\"jboss-seam-2.2.0.GA\".TimerServiceDispatcher ]"]}
    16:40:29,864 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Stopped deployment jboss-el-1.0_02.CR3.jar in 33ms
    16:40:29,866 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Stopped deployment quartz-1.8.4.jar in 35ms
    16:40:29,867 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment xpp3_min-1.1.3.4.O.jar in 36ms
    16:40:29,867 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Stopped deployment jboss-seam-2.2.0.GA.jar in 35ms
    16:40:29,867 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Stopped deployment dts.jar in 36ms
    16:40:29,866 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) Stopped deployment jfreechart-1.0.13.jar in 36ms
    16:40:29,874 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Stopped deployment dts.sar in 43ms
    16:40:29,873 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Stopped deployment xstream-1.1.3.jar in 42ms
    16:40:29,872 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Stopped deployment richfaces-api-3.3.3.Final.jar in 41ms
    16:40:29,874 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment jcommon-1.0.16.jar in 42ms
    16:40:29,922 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment loginHook-hook.war in 91ms
    16:40:30,288 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment dts.war in 457ms
    16:40:30,301 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment dts.ear in 470ms

I don;t know how to show dts.war where is its richfaces-api-3.3.3.Final.jar. Anyone can tell me what am i doing wrong ?