1 Reply Latest reply on Jun 27, 2005 3:17 PM by pchandra

    "Missing/invalid instance-cache" error with Stateless Sessio

    pchandra

      Hello!
      I have the following -jboss.xml for all of my stateless session EJBs.
      Trying to deploy on JBoss 4.0.1SP1 gives
      "org.jboss.deployment.DeploymentException:
      Missing or invalid Instance Cache (in jboss.xml or standardjboss.xml); - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: )"
      ...
      error message.

      But I find in the standardjboss.xml that the element has empty value:
      <instance-cache></instance-cache>

      What gives?
      Thanks.

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">


      <enterprise-beans>

      <ejb-name>AccountInquiryHome</ejb-name>
      <jndi-name>AccountInquiryHome</jndi-name>
      <configuration-name>AccountInquiryHomeConfig</configuration-name>

      </enterprise-beans>
      <container-configurations>
      <container-configuration extends="Standard Stateless SessionBean">
      <container-name>AccountInquiryHomeConfig</container-name>
      <container-pool-conf>
      100
      true
      60000
      </container-pool-conf>
      <container-cache-conf>
      <cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
      <cache-policy-conf>
      <min-capacity>1</min-capacity>
      <max-capacity>100</max-capacity>
      <max-bean-age>10</max-bean-age>
      </cache-policy-conf>
      </container-cache-conf>
      </container-configuration>
      </container-configurations>




      standardjboss.xml excerpt:

      <container-configuration>
      <container-name>Standard Stateless SessionBean</container-name>
      <call-logging>false</call-logging>
      <invoker-proxy-binding-name>stateless-rmi-invoker</invoker-proxy-binding-name>
      <container-interceptors>
      org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
      org.jboss.ejb.plugins.LogInterceptor
      org.jboss.ejb.plugins.SecurityInterceptor
      <!-- CMT -->
      org.jboss.ejb.plugins.TxInterceptorCMT
      org.jboss.ejb.plugins.CallValidationInterceptor
      org.jboss.ejb.plugins.MetricsInterceptor
      org.jboss.webservice.server.ServiceEndpointInterceptor
      org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor
      <!-- BMT -->
      org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor
      org.jboss.ejb.plugins.TxInterceptorBMT
      org.jboss.ejb.plugins.CallValidationInterceptor
      org.jboss.ejb.plugins.MetricsInterceptor
      org.jboss.webservice.server.ServiceEndpointInterceptor
      org.jboss.resource.connectionmanager.CachedConnectionInterceptor
      </container-interceptors>
      <instance-pool>org.jboss.ejb.plugins.StatelessSessionInstancePool</instance-pool>
      <instance-cache></instance-cache>
      <persistence-manager></persistence-manager>
      <container-pool-conf>
      100
      </container-pool-conf>
      </container-configuration>

        • 1. Re:
          pchandra

          No all session beans but only some.

          And I found that in the -ejb-jar.xml files these are specified as stateful whereas I had been given to understand that there were no stateful EJBs.
          When I checked the stacktrace I repeatedly saw a method call
          "CreateStatefulSessionContainer()". That's what prompted me to check if some were stateful.
          And I did indeed find some to be stateful.
          So the problem is solved.