14 Replies Latest reply on Apr 15, 2009 10:27 PM by patweb99

    Having an issue with Hibernate in JbossAS5

    patweb99

      Hi,

      I am somewhat new to hibernate and JBossAS5.

      I am looking for the ability to not use Hibernate through JBoss. From what I gather hibernate is on out of the box?

      In essence I need it turned off altogether. Can this be done? Can I user ehCache instead?

      Thanks,
      Pat

        • 1. Re: Having an issue with Hibernate in JbossAS5
          peterj

          Hibernate is used in JBoss AS as the JPA provider. If you are not using JPA, Hibernate will not be used.

          ehCache would appear to be a replacement for JBoss Cache, not for Hibernate.

          • 2. Re: Having an issue with Hibernate in JbossAS5
            patweb99

            Thanks for the quick feedback.

            Here's the deal. I am using a 3rd party plugin for my application that has it's own class loader for hibernate. Right now it looks as though Jboss when doing it's war deployments via the default server relies on hibernate. I tested this by removing the hibernate files from the jboss common lib folder then started the server to only find when it tried to deploy the wars it would barf all over itself.

            Maybe this will give some better clarity as on why I need jboss to not do anything with hibernate.

            Sorry for the lack of clarity before.

            • 3. Re: Having an issue with Hibernate in JbossAS5
              peterj

              I think what you are looking for is scoped class loading, see if this helps: http://www.jboss.org/community/docs/DOC-9288

              • 4. Re: Having an issue with Hibernate in JbossAS5
                patweb99

                Thanks for the post. I will have to play around with this.

                This sounds like what I need as I assume the scoped class loading will ensure that my war can only see what my war has available to use and keep jboss's shared scope out of the mix?

                • 5. Re: Having an issue with Hibernate in JbossAS5
                  peterj

                  Yes, that's the idea. You app will use your JARs and ignore the ones provided by JBoss AS.

                  • 6. Re: Having an issue with Hibernate in JbossAS5
                    patweb99

                    Perfect!

                    Thank you!

                    • 7. Re: Having an issue with Hibernate in JbossAS5
                      patweb99

                      Ok so I have done some further testing and am hitting a possible wall.

                      Not sure what's going on. My application tries to start it's own version of hibernate which is causing the conflict/error. Is there another document out there that could assist me additionally?

                      I feel like I am close on this... So close.

                      • 8. Re: Having an issue with Hibernate in JbossAS5
                        jaikiran

                        Which AS version do you use? For JBossAS-4.2.x, maybe this will help http://www.jboss.org/index.html?module=bb&op=viewtopic&t=133202

                        • 9. Re: Having an issue with Hibernate in JbossAS5
                          patweb99

                          I am on JBossAS5 and thanks for the reply btw.

                          I've reviewed your post, but don't think it will do much good. My issue is that on deployment I do not want hibernate to even load. I want my application to load it instead. Does that make sense? Is this possible? Maybe I am not understanding the loading process and it should already do this?

                          Here is my config as I have placed my war into an ear to test things out further.

                          ear:
                          <jboss-app>
                          <loader-repository>
                          com.example:loader=railo.ear
                          </loader-repository>
                          </jboss-app>

                          It just does not seem to pick up, meaning I get a nasty error when attempting to use load hibernate in my app. Sorry if I am repeating myself. I just really want to get this resolved.

                          Here is also the top portion of the error I am getting:
                          org.hibernate.validator.event.ValidateEventListener
                          at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:819):819
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):-2
                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39):39
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25):25
                          at java.lang.reflect.Method.invoke(Method.java:585):585
                          at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86):86


                          And the classes I am attempting to load when hibernate loads:
                          antlr-2.7.6.jar
                          c3p0-0.9.1.2.jar
                          cglib-nodep-2.1_3.jar
                          dom4j-1.6.1.jar
                          ejb3-persistence.jar
                          hibernate-annotations.jar
                          hibernate-commons-annotations.jar
                          hibernate-entitymanager.jar
                          hibernate3.jar
                          jta.jar

                          • 10. Re: Having an issue with Hibernate in JbossAS5
                            peterj

                            When you post exception stack traces, please post the whole thing, including the logging info. The excerpt you posted means nothing and at this point I cannot tell if that is because you didn't include the interesting stuff, or because this is yet another poorly-worded exception. In some cases it helps to include a few log lines before and after the exception. (You could start JBoss AS without your app deployed, and once the "started in xxx seconds" message shows, then deploy your app. Any log entries after the "started in" entry could be of interest.)

                            You could try setting -verbose:class JVM option. This option causes the JVM to print out each class loaded and the JAR from which it was loaded. This might give some clues as to why things are going wrong - look for classes being loaded from unexpected locations.

                            • 11. Re: Having an issue with Hibernate in JbossAS5
                              patweb99

                              Thanks. I will make sure to include everything from now on. Also I will try what you have proposed.

                              Here is the entire stack trace from the web page attempting to make the call:
                              org.hibernate.validator.event.ValidateEventListener
                              at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:819):819
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):-2
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39):39
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25):25
                              at java.lang.reflect.Method.invoke(Method.java:585):585
                              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86):86
                              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230):230
                              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912):912
                              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756):756
                              at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:766):766
                              at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:754):754
                              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170):170
                              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(ScriptBytecodeAdapter.java:198):198
                              at hibernate_bootstrap.run(hibernate_bootstrap.groovy:30):30
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):-2
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39):39
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25):25
                              at java.lang.reflect.Method.invoke(Method.java:585):585
                              at railo.runtime.reflection.pairs.MethodInstance.invoke(Unknown Source):-1
                              at railo.runtime.reflection.Reflector.callMethod(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at cfgroovy$cfc.udfCall2(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/cfgroovy/cfgroovy.cfc:332):332
                              at cfgroovy$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/cfgroovy/cfgroovy.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at hibernateplugin$cfc.udfCall2(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/cfgroovy/HibernatePlugin.cfc:200):200
                              at hibernateplugin$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/cfgroovy/HibernatePlugin.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at cfgroovy$cfc.udfCall1(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/cfgroovy/cfgroovy.cfc:191):191
                              at cfgroovy$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/cfgroovy/cfgroovy.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.callWithNamedValues(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.callWithNamedValues(Unknown Source):-1
                              at railo.runtime.tag.Invoke.int(Unknown Source):-1
                              at railo.runtime.tag.Invoke.doEndTag(Unknown Source):-1
                              at beans.defaultxmlbeanfactory$cfc._0037(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldspring/beans/DefaultXmlBeanFactory.cfc:997):997
                              at beans.defaultxmlbeanfactory$cfc.udfCall2(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldspring/beans/DefaultXmlBeanFactory.cfc:975):975
                              at beans.defaultxmlbeanfactory$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldspring/beans/DefaultXmlBeanFactory.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at beans.defaultxmlbeanfactory$cfc.udfCall2(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldspring/beans/DefaultXmlBeanFactory.cfc:632):632
                              at beans.defaultxmlbeanfactory$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldspring/beans/DefaultXmlBeanFactory.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at system.plugins.ioc$cfc.udfCall1(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/plugins/ioc.cfc:120):120
                              at system.plugins.ioc$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/plugins/ioc.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at system.plugins.beanfactory$cfc.udfCall2(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/plugins/beanFactory.cfc:717):717
                              at system.plugins.beanfactory$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/plugins/beanFactory.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at system.plugins.beanfactory$cfc.udfCall2(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/plugins/beanFactory.cfc:526):526
                              at system.plugins.beanfactory$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/plugins/beanFactory.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.callWithNamedValues(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunctionWithNamedValues(Unknown Source):-1
                              at system.plugins.beanfactory$cfc.udfCall2(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/plugins/beanFactory.cfc:451):451
                              at system.plugins.beanfactory$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/plugins/beanFactory.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.callWithNamedValues(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.callWithNamedValues(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunctionWithNamedValues(Unknown Source):-1
                              at system.interceptors.autowire$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/interceptors/autowire.cfc:139):139
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.callWithNamedValues(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunctionWithNamedValues(Unknown Source):-1
                              at system.interceptors.autowire$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/interceptors/autowire.cfc:89):89
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.callWithNamedValues(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.callWithNamedValues(Unknown Source):-1
                              at railo.runtime.tag.Invoke.int(Unknown Source):-1
                              at railo.runtime.tag.Invoke.doEndTag(Unknown Source):-1
                              at system.beans.interceptorstate$cfc.udfCall2(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/beans/interceptorState.cfc:142):142
                              at system.beans.interceptorstate$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/beans/interceptorState.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at system.beans.interceptorstate$cfc.udfCall1(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/beans/interceptorState.cfc:99):99
                              at system.beans.interceptorstate$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/beans/interceptorState.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at system.services.interceptorservice$cfc.udfCall1(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/services/InterceptorService.cfc:80):80
                              at system.services.interceptorservice$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/services/InterceptorService.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at system.services.handlerservice$cfc.udfCall1(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/services/HandlerService.cfc:48):48
                              at system.services.handlerservice$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/services/HandlerService.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at system.services.handlerservice$cfc.udfCall1(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/services/HandlerService.cfc:96):96
                              at system.services.handlerservice$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/services/HandlerService.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at system.controller$cfc.udfCall4(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/controller.cfc:390):390
                              at system.controller$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/controller.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at system.coldbox$cfc.udfCall1(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/coldbox.cfc:144):144
                              at system.coldbox$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/coldbox.cfc):-1
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source):-1
                              at railo.runtime.PageContextImpl.getFunction(Unknown Source):-1
                              at application$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/Application.cfc:59):59
                              at railo.runtime.type.UDFImpl.implementation(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.a(Unknown Source):-1
                              at railo.runtime.type.UDFImpl.call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.a(Unknown Source):-1
                              at railo.runtime.ComponentImpl._call(Unknown Source):-1
                              at railo.runtime.ComponentImpl.call(Unknown Source):-1
                              at railo.runtime.listener.ModernAppListener.a(Unknown Source):-1
                              at railo.runtime.listener.ModernAppListener._onRequest(Unknown Source):-1
                              at railo.runtime.listener.MixedAppListener.onRequest(Unknown Source):-1
                              at railo.runtime.PageContextImpl.execute(Unknown Source):-1
                              at railo.runtime.engine.CFMLEngineImpl.serviceCFML(Unknown Source):-1
                              at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32
                              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717):717
                              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290):290
                              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206
                              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96):96
                              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235):235
                              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206
                              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235):235
                              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191):191
                              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190):190
                              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92):92
                              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126):126
                              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70):70
                              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127):127
                              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102):102
                              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158):158
                              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109):109
                              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330):330
                              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829):829
                              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601):601
                              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447):447
                              at java.lang.Thread.run(Thread.java:613):613

                              Here is the dump from the jboss console:
                              06:50:00,586 INFO [Environment] Hibernate 3.2.6
                              06:50:00,592 INFO [Environment] loaded properties from resource hibernate.properties: {hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=0, hibernate.c3p0.max_size=10, hibernate.show_sql=false, hibernate.bytecode.use_reflection_optimizer=false, hibernate.c3p0.max_statements=50, hibernate.hbm2ddl.auto=update}
                              06:50:00,595 INFO [Environment] Bytecode provider name : cglib
                              06:50:00,597 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
                              06:50:00,805 ERROR [STDERR] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
                              06:50:00,805 ERROR [STDERR] at java.util.LinkedList.entry(LinkedList.java:368)
                              06:50:00,805 ERROR [STDERR] at java.util.LinkedList.get(LinkedList.java:313)
                              06:50:00,805 ERROR [STDERR] at railo.runtime.exp.PageExceptionImpl.a(Unknown Source)
                              06:50:00,805 ERROR [STDERR] at railo.runtime.exp.PageExceptionImpl.a(Unknown Source)
                              06:50:00,805 ERROR [STDERR] at railo.runtime.exp.PageExceptionImpl.getTagContext(Unknown Source)
                              06:50:00,805 ERROR [STDERR] at railo.runtime.exp.CatchBlock.do(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.exp.CatchBlock.get(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.exp.CatchBlock.void(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.exp.CatchBlock.duplicate(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.op.Duplicator.duplicate(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.functions.struct.Duplicate.call(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at system.beans.exceptionbean$cfc.udfCall1(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/beans/exceptionBean.cfc:43)
                              06:50:00,806 ERROR [STDERR] at system.beans.exceptionbean$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/beans/exceptionBean.cfc)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.type.UDFImpl.implementation(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.type.UDFImpl.a(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.type.UDFImpl.callWithNamedValues(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.ComponentImpl.a(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.ComponentImpl._call(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.ComponentImpl.callWithNamedValues(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.PageContextImpl.getFunctionWithNamedValues(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at system.services.exceptionservice$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/services/ExceptionService.cfc:38)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.type.UDFImpl.implementation(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.type.UDFImpl.a(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.type.UDFImpl.call(Unknown Source)
                              06:50:00,806 ERROR [STDERR] at railo.runtime.ComponentImpl.a(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.ComponentImpl._call(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.ComponentImpl.call(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.PageContextImpl.getFunction(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at system.coldbox$cfc.udfCall1(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/coldbox.cfc:228)
                              06:50:00,807 ERROR [STDERR] at system.coldbox$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/lib/org/coldbox/system/coldbox.cfc)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.type.UDFImpl.implementation(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.type.UDFImpl.a(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.type.UDFImpl.call(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.PageContextImpl.getFunction(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at application$cfc.udfCall(/Users/patricksantora/Desktop/jboss-5.0.1.GA-src/build/output/jboss-5.0.1.GA/server/default/deploy/railo.ear/railo.war/Application.cfc:59)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.type.UDFImpl.implementation(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.type.UDFImpl.a(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.type.UDFImpl.call(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.ComponentImpl.a(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.ComponentImpl._call(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.ComponentImpl.call(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.listener.ModernAppListener.a(Unknown Source)
                              06:50:00,807 ERROR [STDERR] at railo.runtime.listener.ModernAppListener._onRequest(Unknown Source)
                              06:50:00,808 ERROR [STDERR] at railo.runtime.listener.MixedAppListener.onRequest(Unknown Source)
                              06:50:00,808 ERROR [STDERR] at railo.runtime.PageContextImpl.execute(Unknown Source)
                              06:50:00,808 ERROR [STDERR] at railo.runtime.engine.CFMLEngineImpl.serviceCFML(Unknown Source)
                              06:50:00,808 ERROR [STDERR] at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32)
                              06:50:00,808 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                              06:50:00,808 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                              06:50:00,808 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                              06:50:00,808 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                              06:50:00,808 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                              06:50:00,808 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                              06:50:00,808 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                              06:50:00,808 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                              06:50:00,808 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                              06:50:00,808 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                              06:50:00,808 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                              06:50:00,808 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                              06:50:00,808 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                              06:50:00,808 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                              06:50:00,809 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                              06:50:00,809 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                              06:50:00,809 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                              06:50:00,809 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                              06:50:00,809 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
                              06:50:00,809 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                              06:50:00,809 ERROR [STDERR] at java.lang.Thread.run(Thread.java:613)
                              06:50:02,735 INFO [STDOUT] Mon Apr 13 06:50:02 PDT 2009-735 Call:/railo-context/admin/resources/img/debug_minus.gif.cfm (2)

                              • 12. Re: Having an issue with Hibernate in JbossAS5
                                peterj

                                Now I get it - you posted the stack trace shown in the browser. At least that is what I think you posted based on the phrase "from the web page". Such stack traces are usually not that helpful (and this one is not).

                                The console log has the real cause of the problem:

                                06:50:00,805 ERROR [STDERR] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
                                06:50:00,805 ERROR [STDERR] at java.util.LinkedList.entry(LinkedList.java:368)
                                06:50:00,805 ERROR [STDERR] at java.util.LinkedList.get(LinkedList.java:313)
                                06:50:00,805 ERROR [STDERR] at railo.runtime.exp.PageExceptionImpl.a(Unknown Source)
                                06:50:00,805 ERROR [STDERR] at railo.runtime.exp.PageExceptionImpl.a(Unknown Source)
                                06:50:00,805 ERROR [STDERR] at railo.runtime.exp.PageExceptionImpl.getTagContext(Unknown Source)
                                06:50:00,805 ERROR [STDERR] at railo.runtime.exp.CatchBlock.do(Unknown Source)
                                06:50:00,806 ERROR [STDERR] at railo.runtime.exp.CatchBlock.get(Unknown Source)
                                06:50:00,806 ERROR [STDERR] at railo.runtime.exp.CatchBlock.void(Unknown Source)
                                06:50:00,806 ERROR [STDERR] at railo.runtime.exp.CatchBlock.duplicate(Unknown Source)
                                06:50:00,806 ERROR [STDERR] at railo.runtime.op.Duplicator.duplicate(Unknown Source)
                                06:50:00,806 ERROR [STDERR] at railo.runtime.functions.struct.Duplicate.call(Unknown Source)

                                Though I am wondering at this time if the IndexOutOfBounds exception is caused by the PageExceptionImpl.a() method failing to do whatever it needs to do to handle the exception caught by railo.runtime.op.Duplicator.duplicate() [at least that is where I think the original exception occurs based on the name of the called method: CatchBlock.duplicate] or if the out-of-bound excpetion is what initally caused the error in railo.runtime.op.Duplicator.duplicate(). Not having that source code I could not say.

                                Anyway, without know what the exact problem is, it is hard to say what could be done to "fix" it.

                                • 13. Re: Having an issue with Hibernate in JbossAS5
                                  denstar

                                  I'm pretty sure the problem stems from the dynamic nature of CF + Groovy.

                                  CFGroovy is doing quite a bit of shuffling with the current context classloader, and that's what Hibernate uses to keep track of where it's at, sorta, so...

                                  I'm thinking pre-compiled domain objects will work fine, since theoretically they'll be in the same loader, but I haven't tested yet.

                                  To be clear, I don't think the problem lies with JBoss or Hibernate, as Hibernate is doing (as far as I can tell) the only logical deal, from it's perspective, and JBoss is just using Hibernate.

                                  It's a similar problem to commons-logg'n, IMHO... just the nature of the beast.

                                  FWIW, since CF is dynamical, it probably is pretty easy to compile the domain classes (Groovy or Java) and jar them up even, before loading up the groovy stuff.

                                  Actually, I kind of like the idea of jaring up the domain classes, hbm mappings and whatnot, and deploying that instead... but I digress.

                                  I'm pretty sure that if Barney tweaked his code a little, CFGroovy would work with a classloaded hibernate... you just have to be careful not to use stuff from outside the loader (like a 'different' dom4j, loading resources, etc.).
                                  I've sorta done it, but not with Groovy (just a classloaded Hibernate and JBoss), which is why I think it's possible... but I might very well be mistaken. I'm not infallible. More like fallible... =]

                                  • 14. Re: Having an issue with Hibernate in JbossAS5
                                    patweb99

                                    Good to know information!

                                    I am going to just toss this Barney's way to see what he thinks...