• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"Missing/invalid instance-cache" error with Stateless Session ejb deployment

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

<?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">

<jboss>
<enterprise-beans>
<session>
<ejb-name>AccountInquiryHome</ejb-name>
<jndi-name>AccountInquiryHome</jndi-name>
<configuration-name>AccountInquiryHomeConfig</configuration-name>
</session>
</enterprise-beans>
<container-configurations>
<container-configuration extends="Standard Stateless SessionBean">
<container-name>AccountInquiryHomeConfig</container-name>
<container-pool-conf>
<MaximumSize>100</MaximumSize>
<strictMaximumSize>true</strictMaximumSize>
<strictTimeout>60000</strictTimeout>
</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>
</jboss>



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>
<interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
<!-- CMT -->
<interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
<interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
<interceptor transaction="Container" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
<interceptor transaction="Container">org.jboss.webservice.server.ServiceEndpointInterceptor</interceptor>
<interceptor transaction="Container">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
<!-- BMT -->
<interceptor transaction="Bean">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
<interceptor transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor>
<interceptor transaction="Bean">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
<interceptor transaction="Bean" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
<interceptor transaction="Bean">org.jboss.webservice.server.ServiceEndpointInterceptor</interceptor>
<interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor>
</container-interceptors>
<instance-pool>org.jboss.ejb.plugins.StatelessSessionInstancePool</instance-pool>
<instance-cache></instance-cache>
<persistence-manager></persistence-manager>
<container-pool-conf>
<MaximumSize>100</MaximumSize>
</container-pool-conf>
</container-configuration>
 
P Chandrasekaran
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic