Undefined method 'delegate' from ActiveRecord

Hi,

I have a project using jRuby 1.1.6 / Rails 2.2, being built into a war
with
warbler. I have successfully deployed the war into locally running
copies
of both Tomcat and Glassfish without issue. Whenever I deploy the war
to
our production Sun Java System Application Server, however, It fails -
and
after days of trying to track down why, I’m no further with it. I’m
hoping
someone can shed some light on the issue…

Here’s the stack trace I’m seeing in the logs:

application initialization failed javax.servlet.ServletException:
org.jruby.rack.RackInitializationException: undefined method delegate' for ActiveRecord::NamedScope::Scope:Class at WEB-INF/gems/gems/activerecord-2.2.2/lib/active_record/named_scope.rb:105:in each’
at
WEB-INF/gems/gems/activerecord-2.2.2/lib/active_record/named_scope.rb:105
at
WEB-INF/gems/gems/activerecord-2.2.2/lib/active_record/named_scope.rb:31:in
require' at loader/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require’
at WEB-INF/gems/gems/activerecord-2.2.2/lib/active_record.rb:35
at WEB-INF/gems/gems/activerecord-2.2.2/lib/active_record.rb:31:in
require' at loader/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require’
at WEB-INF/gems/gems/rails-2.2.2/lib/initializer.rb:256:in
require_frameworks' ... 10 levels... at loader/rack/builder.rb:22:in instance_eval’
at loader/rack/builder.rb:22:in `initialize’

:3 org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:42) org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:38) org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4523) org.apache.catalina.core.StandardContext.start(StandardContext.java:5184) com.sun.enterprise.web.WebModule.start(WebModule.java:326) org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973) org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957) org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688) com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1584) com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1222) com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182) com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278) com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:974) com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961) com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464) com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176) com.sun.enterprise.ee.admin.mbeans.ServerRuntimeMBean.forwardEvent(ServerRuntimeMBean.java:95) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:378) com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:361) com.sun.enterprise.admin.runtime.BaseRuntimeMBean.invoke(BaseRuntimeMBean.java:465) com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213) com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220) com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815) com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784) sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90) $Proxy1.invoke(Unknown Source) com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304) com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174) javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1410) javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81) javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1247) javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1343) javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:784) sun.reflect.GeneratedMethodAccessor255.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) sun.rmi.transport.Transport$1.run(Transport.java:153) java.security.AccessController.doPrivileged(Native Method) sun.rmi.transport.Transport.serviceCall(Transport.java:149) sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) java.lang.Thread.run(Thread.java:595) -- View this message in context: http://www.nabble.com/undefined-method-%27delegate%27-from-ActiveRecord...-tp21963973p21963973.html Sent from the JRuby - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email