Q:

Jboss 7.1.1: NamingException class can't be found

This RESTservice project is deployed on a Jboss 7.1.1 with Liferay SDK 6.2.  
'javax.api' has already been added as dependency to the jboss-deployment-structure.xml, but this error appears anyway:
    09:11:28,741 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit. "RESTtest.war". POST_MODULE: org.jboss.msc.service. StartException in service jboss.deployment.unit. "RESTtest.war". POST_MODULE: Failed to process phase POST_MODULE of deployment "RESTtest.war"
    at org.jboss.as.server.deployment. DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service. ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service. ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent. ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_51]
    at java.util.concurrent. ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_51]
    at java.lang. Thread.run(Unknown Source) [rt.jar:1.7.0_51]
Caused by: java.lang. RuntimeException: Error getting reflective information for class de.foo.soa.myfoo.sales. MyfooSalesSF with ClassLoader ModuleClassLoader for Module "de.foo.soa.myfoo.modules:main" from local module loader @41c61c91 (roots: C:\fooTest\liferay-portal-JBOSS6.2-ce-ga2\jboss-7.1.1\modules)
    at org.jboss.as.server.deployment.reflect. DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.ee.metadata. MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
    at org.jboss.as.ee.component.deployers. InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
    at org.jboss.as.ee.component.deployers. InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
    at org.jboss.as.ee.component.deployers. InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
    at org.jboss.as.server.deployment. DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    ... 5 more
Caused by: java.lang. NoClassDefFoundError: javax/naming/NamingException
    at java.lang. Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_51]
    at java.lang. Class.privateGetDeclaredFields(Unknown Source) [rt.jar:1.7.0_51]
    at java.lang. Class.getDeclaredFields(Unknown Source) [rt.jar:1.7.0_51]
    at org.jboss.as.server.deployment.reflect. ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.server.deployment.reflect. DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    ... 10 more
Caused by: java.lang. ClassNotFoundException: javax.naming. NamingException from [Module "de.foo.soa.myfoo.modules:main" from local module loader @41c61c91 (roots: C:\fooTest\liferay-portal-JBOSS6.2-ce-ga2\jboss-7.1.1\modules)]
    at org.jboss.modules. ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules. ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules. ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules. ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules. ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
    ... 15 more

09:11:28,748 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "RESTtest.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"RESTtest.war\". POST_MODULE" => "org.jboss.msc.service. StartException in service jboss.deployment.unit.\"RESTtest.war\". POST_MODULE: Failed to process phase POST_MODULE of deployment \"RESTtest.war\""}}
09:11:28,757 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment RESTtest.war in 9ms
09:11:28,758 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit. "RESTtest.war". POST_MODULE: org.jboss.msc.service. StartException in service jboss.deployment.unit. "RESTtest.war". POST_MODULE: Failed to process phase POST_MODULE of deployment "RESTtest.war"

A look in the module.xml of javax/api shows that javax/naming/NamingException is added as dependency, so everything should be fine:
        <dependencies>
        <system export="true">
            <paths>
                ...
                <path name="javax/naming"/>
                <path name="javax/naming/directory"/>
                <path name="javax/naming/event"/>
                <path name="javax/naming/ldap"/>
                <path name="javax/naming/spi"/>
                ...
            </paths>
        </system>
    </dependencies>

I look forward to any constructive suggestion. 

A:

It seems you have added the javax api dependency to the jboss-deployment-structure.xml of your deployment, but if you look at your exception message:
ClassNotFoundException: javax.naming. NamingException from
    [Module "de.foo.soa.myfoo.modules:main"

it is missing from "de.foo.soa.myfoo.modules" module, not from your deployment.  The modules module.xml file is where you need to add the dependency.