1 2 3 Previous Next 32 Replies Latest reply on Aug 17, 2009 12:02 AM by jaikiran

    make sure my hibernate config in jboss remains the same??

    elhanan

      hi..

      we have an ear which runs on jboss 4.2.3 and on was 6.1

      the ear uses hibernate and beanlib (for cloning) lately i've disocvered that becouse of hte flat classloading jboss, our hibernate configuartion is radically altered then it is in was, for example in jboss hibenrate version is 3.2.4 sp1, while in websphere ,it's hibernate 3.2.3,

      jboss configures hibernate to use javaasist, while in was it's cglib.

      everytime we try to change the classloading in jboss to tree so it would focus on our ear, we crash. so how do i make sure my hibernate config remains the same in both enviorments (same jar versions, same confiugraitons settings).

      for example can i print out the configuation settings Congiuration class and compare them against enviorments? if they are exactly the same, then will i be sure?

        • 1. Re: make sure my hibernate config in jboss remains the same?
          peterj

          "and on was 6.1"?? Huh, what was 6.1?

          You can create a classloader repsitory to isolate classes. See if this helps: http://www.jboss.org/community/wiki/ClassLoadingConfiguration

          • 2. well, i tried that and as i feared this happend:
            elhanan

            after placing jboss-aop.xml in the meta-inf of the ear which contained this:
            <jboss-app>
            <loader-repository>
            com.pnx:archive=underwrite.ear
            <loader-repository-config>
            java2ParentDelegation=false
            </loader-repository-config>
            </loader-repository>
            </jboss-app>

            the deployment failed with mdbeans:

            21:01:59,956 WARN [verifier] EJB spec violation:
            Bean : LCRequestHandlerMDB
            Section: 15.7.4
            Warning: The message driven bean must declare one onMessage() method.

            21:01:59,956 WARN [verifier] EJB spec violation:
            Bean : LCResponseHandlerMDB
            Section: 15.7.4
            Warning: The message driven bean must declare one onMessage() method.

            org.jboss.deployment.DeploymentInfo@74cef1f3 { url=file:/C:/Workdir/jboss/jboss-4.2.3/server/pmp/deploy/underwrite.ear/framework-ejb.jar/ }
            deployer: MBeanProxyExt[jboss.ejb:service=EJBDeployer]
            status: Deployment FAILED reason: Verification of Enterprise Beans failed, see above for error messages.
            state: FAILED
            watch: file:/C:/Workdir/jboss/jboss-4.2.3/server/pmp/deploy/underwrite.ear/framework-ejb.jar/META-INF/ejb-jar.xml
            altDD: null
            lastDeployed: 1250186505465
            lastModified: 1250084967802
            mbeans:

            rg.jboss.deployment.DeploymentInfo@7eaeb79f { url=file:/C:/Workdir/jboss/jboss-4.2.3/server/pmp/deploy/underwrite.ear/ }
            deployer: org.jboss.deployment.EARDeployer@1b8119a
            status: Deployment FAILED reason: Verification of Enterprise Beans failed, see above for error messages.
            state: FAILED
            watch: file:/C:/Workdir/jboss/jboss-4.2.3/server/pmp/deploy/underwrite.ear/META-INF/application.xml
            altDD: null
            lastDeployed: 1250186519613
            lastModified: 1250084971775
            mbeans:

            here the mdb's defintions:


            <message-driven>
            <ejb-name>LCRequestHandlerMDB</ejb-name>
            <ejb-class>com.pnx.pmp.jms.backend.mdb.LCRequestHandlerMDB</ejb-class>
            <transaction-type>Bean</transaction-type>
            <message-driven-destination>
            <destination-type>javax.jms.Queue</destination-type>
            </message-driven-destination>
            </message-driven>

            <message-driven>
            <ejb-name>LCResponseHandlerMDB</ejb-name>
            <ejb-class>com.pnx.pmp.jms.backend.mdb.LCResponseHandlerMDB</ejb-class>
            <transaction-type>Bean</transaction-type>
            <message-driven-destination>
            <destination-type>javax.jms.Queue</destination-type>
            </message-driven-destination>
            </message-driven>

            <message-driven>
            <ejb-name>LCRequestHandlerMDB</ejb-name>
            <destination-jndi-name>queue/underwrite/LegacyCallRequestQueue</destination-jndi-name>
            </message-driven>
            <message-driven>
            <ejb-name>LCResponseHandlerMDB</ejb-name>
            <destination-jndi-name>queue/underwrite/LegacyCallResponseQueue</destination-jndi-name>
            </message-driven>


            underwrite/LCRequestConnectionFactory
            ConnectionFactory



            underwrite/LCResponseConnectionFactory
            ConnectionFactory

            • 3. Re: make sure my hibernate config in jboss remains the same?
              elhanan

              and before i forget, the mdb extends an abstract class which implements MessageListener, MessageDrivenBean

              the abstract class has 2 abstract methods:
              protected abstract Object handleMessage(Message msg) ;
              protected abstract void sendResponse(Object res,Message msg) ;

              • 4. Re: make sure my hibernate config in jboss remains the same?
                peterj

                Here is part of the error message:

                Warning: The message driven bean must declare one onMessage() method.

                And you stated your MDBs implement:

                protected abstract Object handleMessage(Message msg) ;

                (By the way, use the 'code' tags when posting XML text - select the text and click the Code button above the editor window)

                What version of EJB? 2.x or 3.0?

                • 5. Re: make sure my hibernate config in jboss remains the same?
                  elhanan

                  it also has one public onMessage method which delegates to the handleMessage method.

                  it's ejb 2.x

                  • 6. Re: make sure my hibernate config in jboss remains the same?
                    jaikiran

                     

                    "Elhanan" wrote:

                    after placing jboss-app.xml in the meta-inf of the ear...
                    ...
                    the mdb extends an abstract class which implements MessageListener, MessageDrivenBean
                    ...

                    Looks like an old issue:
                    http://www.jboss.org/index.html?module=bb&op=viewtopic&t=58037&postdays=0&postorder=asc&start=10. But i could not locate any open JIRA for this, so not sure whether it's still an issue or has been fixed.

                    Try this, instead of the Abstract class implementing the MessageDrivenBean and MessageListener, let the MDB class implement those 2 interfaces and extend from the abstract bean. See if that helps.
                    And by the way, are you packaging any jar file(s) containing javax.jms.* or javax.ejb.* classes? If yes, remove those jar files from your application packaging and see if that solves the problem.


                    • 7. well there was a jboss-j2ee jar which i removed
                      elhanan

                      11:18:03,480 WARN [ServiceController] Problem creating service jboss.j2ee:jndiName=com.pnx.pmp.configuration.common.ConfigurationServiceSessionHome.underwrite,service=EJB
                      java.lang.NoSuchMethodException: org.jboss.ejb.StatelessSessionContainer.removeHome(javax.ejb.Handle)
                      at java.lang.Class.getMethod(Class.java:1581)
                      at org.jboss.ejb.StatelessSessionContainer.setupHomeMapping(StatelessSessionContainer.java:139)
                      at org.jboss.ejb.SessionContainer.createService(SessionContainer.java:169)
                      at org.jboss.system.ServiceMBeanSupport.jboss

                      • 8. i then removed ejb jar which was on our ear and got:
                        elhanan

                        11:29:19,771 INFO [EjbModule] Deploying LCResponseHandlerMDB
                        11:29:25,999 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=com.pnx.pmp.configuration.common.ConfigurationServiceSessionHome.underwrite,service=EJB
                        java.rmi.ServerException: Could not bind home; nested exception is:
                        javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
                        at org.jboss.proxy.ejb.ProxyFactory.bindProxy(ProxyFactory.java:476)
                        at org.jboss.proxy.ejb.ProxyFactory.start(ProxyFactory.java:243)

                        • 9. Re: make sure my hibernate config in jboss remains the same?
                          jaikiran

                          Hmmm, you started the thread with a subject about hibernate config, then the post contained MDB deployment errors and now it has some other exceptions without any details. So i don't know what help to provide :)

                          While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.

                          • 10. actually hibernate config was hidden motivation and still is
                            elhanan

                            see it all started from the fact that we always had problems working with isolated ears in jboss, even in 3.2.7, i guess it started with wrong jars in our ears, all i wanna do is to able to work as closely as possible to our websphere configuration on aix. we HUGE problems trying to configure jboss jta under spring with both jboss and websphere.

                            all the problems i mentioned here, started when i tried to use jboss with sperated classloading configuration, i understand there is a way to configure it to be j2ee compliant , i tried that according to docs here: http://docs.jboss.org/jbossas/jboss4guide/r3/html/pr05.html

                            so to recap, i wanted our ear in jboss 4.2.3 to work in isolated mode, so i added the jboss-app.xml file to meta-inf dir, call jms excption deployment and removed jboss-j2ee.jar and ejb.jar we had in our ear.

                            i configured the xml files, but i still get this exception i wrote above.

                            • 11. Re: make sure my hibernate config in jboss remains the same?
                              peterj

                              Elhanan, I noticed (via the email sent by watching this forum) that you set the subject line for each of your posts, and that the new subject line contains explanatory information about your post. Don't you realize that the subject line gets set only on the first post to a topic, and that the new subject lines do not get shown here? And that the subject area accepts only a limited number of characters (the subject lines I am getting via email are not complete). Don't you even read what you have posted? Please do not put half of your text in the subject line - it makes your posts difficult to follow and/or confusing.

                              • 12. Re: make sure my hibernate config in jboss remains the same?
                                elhanan

                                off course i read what i post , but BEFORE i post it (otherwise there isn't much point in fixing it, i don't have an edit option)...

                                call me silly, but when one provides a user with a text field to input stuff, well i kinda expect it to stay there. didn't know i should re-check it.

                                so to make things clear. because our ear operates in an isolated classpath on was 6.1, i would like it to be the same in jboss 4.2.3

                                so far no luck, everything following the instructions to make it j2ee complaint didn't work.

                                • 13. Re: make sure my hibernate config in jboss remains the same?
                                  peterj

                                  You really need to read your post after you post it - after all, that is what others will see.

                                  I'm not sure why the subject field is provided when replying to a post. That has always bugged me, especially since it is such a simple thing to change. It's as if the developer who wrote the forum code either didn't care, or was lazy, or never bothered to do user interface testing.

                                  • 14. Re: make sure my hibernate config in jboss remains the same?
                                    elhanan

                                    putting that aside now, what do i do in regards to isolated class loading?:)

                                    1 2 3 Previous Next