7 Replies Latest reply on Oct 23, 2008 4:21 PM by Brian Stansberry

    JBossAS Failed to load profile

    Erik . Newbie

      I created a small web application with one Servlet and several JSP's. Deploying the web app causes a problem. JBoss throws some error about missing dependencies and something about jboss.cache. I'm not using any cache manager. How do I get my web app working?


      13:49:26,671 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war
      13:49:26,796 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-c
      onsole.war
      13:49:27,046 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of
      incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual Stat
      e}
      
      jboss.web.deployment:war=/
       -> jboss.cache:service=CacheManager{Create:** NOT FOUND Depends on 'jboss.cache
      :service=CacheManager' **}
      
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      jboss.cache:service=CacheManager -> ** NOT FOUND Depends on 'jboss.cache:service
      =CacheManager' **
      
      
      13:49:27,062 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8
      080
      13:49:27,093 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
      13:49:27,109 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.CR2 (build: SVNTag
      =JBoss_5_0_0_CR2 date=200809171139)] Started in 1m:11s:297ms
      


      I am using JBossAS 5 RC2 and Java 1.6.0_10.

        • 1. Re: JBossAS Failed to load profile
          jaikiran pai Master

          Did you do any changes to the clean JBoss that you downloaded? And how do you deploy the application? Where do you place it?

          • 2. Re: JBossAS Failed to load profile
            jaikiran pai Master

            And can you post the web.xml file in your WAR? I would be mainly interested in seeing whether you have the < distributable/> element in that file.

            • 3. Re: JBossAS Failed to load profile
              Erik . Newbie

              It's a clean JBoss AS download. I placed my web app in the default deploy area. (G:\jboss-5.0.0.CR2\server\default\deploy)

              web.xml:

              <?xml version="1.0" encoding="UTF-8"?>
              <web-app version="2.5"
               xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
               <distributable />
              
               <!-- Servlets -->
               <servlet>
               <servlet-name>HomeServlet</servlet-name>
               <servlet-class>com.meuwese.HomeServlet</servlet-class>
              
               <init-param>
               <param-name>none</param-name>
               <param-value>none</param-value>
               </init-param>
               </servlet>
              
               <!-- Servlet mapping -->
               <servlet-mapping>
               <servlet-name>HomeServlet</servlet-name>
               <url-pattern>/Home</url-pattern>
               </servlet-mapping>
              
               <servlet-mapping>
               <servlet-name>HomeServlet</servlet-name>
               <url-pattern>/</url-pattern>
               </servlet-mapping>
              
               <!-- Filters -->
              
               <!-- Filter maping -->
              
              </web-app>


              • 4. Re: JBossAS Failed to load profile
                Ales Justin Master

                As jaikiran pointed out, it's that distributable element that's the problem.

                In JBossAS JBossCache is used to make war distributable/clustered.
                But since you're running default AS config, JBC is not enabled, hence it fails to find it.
                Either you run all AS config or delete that distributable element. ;-)

                • 5. Re: JBossAS Failed to load profile
                  Erik . Newbie

                  Thanks for the fast reply. It runs fine without tag.

                  • 6. Re: JBossAS Failed to load profile
                    jaikiran pai Master

                    Just a note - I think there has been a change in behaviour for handling the < distributable/> web applications on "default" (non-clustered) config, between JBoss-4.x and JBoss-5 CR2. In JBoss-4.x, if i have a web application with

                    <distributable/>


                    in the default config, then the server used to handle this gracefully by logging the following DEBUG and WARN messages:


                    2008-10-23 18:28:32,811 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] Classes needed for clustered webapp unavailable
                    java.lang.NoClassDefFoundError: org/jboss/cache/aop/PojoCacheMBean
                     at java.lang.Class.getDeclaredConstructors0(Native Method)
                     at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
                     at java.lang.Class.getConstructor0(Class.java:2699)
                     at java.lang.Class.newInstance0(Class.java:326)
                     at java.lang.Class.newInstance(Class.java:308)
                     at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:322)
                     at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                     at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                     at org.jboss.web.WebModule.startModule(WebModule.java:83)
                     at org.jboss.web.WebModule.startService(WebModule.java:61)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                     at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                     at $Proxy0.start(Unknown Source)
                     at org.jboss.system.ServiceController.start(ServiceController.java:417)
                     at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy44.start(Unknown Source)
                     at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                     at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                     at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                     at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                     at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                     at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy45.start(Unknown Source)
                     at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                     at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy9.deploy(Unknown Source)
                     at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                     at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                     at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                     at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                     at $Proxy0.start(Unknown Source)
                     at org.jboss.system.ServiceController.start(ServiceController.java:417)
                     at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy4.start(Unknown Source)
                     at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
                     at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy5.deploy(Unknown Source)
                     at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                     at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                     at org.jboss.Main.boot(Main.java:200)
                     at org.jboss.Main$1.run(Main.java:508)
                     at java.lang.Thread.run(Thread.java:619)
                    Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.cache.aop.PojoCacheMBean
                     at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
                     at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
                     at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
                     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
                     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
                     ... 120 more
                    
                    2008-10-23 18:28:32,811 WARN [org.jboss.web.tomcat.service.TomcatDeployer] Failed to setup clustering, clustering disabled. NoClassDefFoundError: org/jboss/cache/aop/PojoCacheMBean
                    


                    So the application used to deploy, but with clustering disabled. But in JBoss-5 CR2, the application seems to fail. Not sure whether this was an intentional change.


                    • 7. Re: JBossAS Failed to load profile
                      Brian Stansberry Master

                      It was intentional, but I'm going to change it. Thanks for the reminder, this was something Adrian Brock and I had talked about on the way to dinner one night and I decided to reverse it. But then good dinner, nice wine, and I forgot about it.

                      https://jira.jboss.org/jira/browse/JBAS-6132

                      To get the AS 4.x behavior in 5.0.0.CR2, edit the default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml file, commenting out the following bean:

                       <!--
                       Adds to distributable webapps a dependency on needed clustering services.
                      
                       With this deployer in place, webapps marked <distributable/> will not
                       deploy completely in the absence of needed clustering support services.
                      
                       If desired, this deployer can be commented out in a non-clustered AS
                       configuration (e.g. 'default') in which case a <distributable/> webapp
                       will still deploy after logging a WARN about the missing clustering
                       services. The webapp's sessions will not be clustered. This was the
                       behavior of distributable webapps in the 'default' config in AS 4.x.
                       -->
                       <bean name="WebAppClusteringDependencyDeployer"
                       class="org.jboss.web.tomcat.service.deployers.ClusteringDependencyDeployer">
                      
                       <!-- Clustered webapps get their cache from this service -->
                       <property name="clusterCacheDependency">jboss.cache:service=CacheManager</property>
                      
                       </bean>