2 Replies Latest reply on Apr 6, 2011 8:57 PM by rhinmass

    6.0.0.Final collisions running existing code

    rhinmass Newbie

      I am developing an ejb application that needs to include use a lot of existing code developed for jboss 4.0.5 .  The existing code leverages hibernate 3.2.7    If I include hibernate-3.2.7.ga.jar in my ear, I get many errors such as:

       

      java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token

          at antlr.CharScanner.makeToken(Unknown Source) [:6.0.0.Final]

          at org.hibernate.hql.ast.HqlLexer.makeToken(HqlLexer.java:62) [:3.6.0.Final]

      ...

       

      So my more general question is how can I run existing code which uses jars that conflict with container jars?

       

      Thanks for any assistance or pointers.

        • 1. 6.0.0.Final collisions running existing code
          Wolf-Dieter Fink Master

          Problem is that Hibernate jar files does not work if you include it in your ear files.

          I suppose that you have hard code casts in your code? So you might adapt your code.

          • 2. 6.0.0.Final collisions running existing code
            rhinmass Newbie

            I think I am having the problem described here:

             

            http://community.jboss.org/thread/63817?tstart=1

             

            However the given solution did not solve the problem.  I added a jboss-app.xml in ear/META-INF:

            <jboss-app>

              <loader-repository>com.mydomain:loader=archiveName

                 <loader-repository-config>java2ParentDelegation=false</loader-repository-config>

              </loader-repository>

            </jboss-app>

             

            After that, I stopped getting the conflicts, however I now get:

             

            DEPLOYMENTS MISSING DEPENDENCIES:

              Deployment "HornetQCoreDeployment::2" is missing the following dependencies:

                Dependency "HornetQServer" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'HornetQServer' **")

              Deployment "JBossTransactionServices" is missing the following dependencies:

                Dependency "TransactionManager" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'TransactionManager' **")

              Deployment "JMSConnectionFactoryManageMO" is missing the following dependencies:

                Dependency "<UNKNOWN JMSConnectionFactoryManageMO>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'JMSServerManager' **")

              Deployment "JMSQueueManageMO" is missing the following dependencies:

                Dependency "<UNKNOWN JMSQueueManageMO>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'JMSServerManager' **")

              Deployment "JMSServerMO" is missing the following dependencies:

                Dependency "<UNKNOWN JMSServerMO>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'JMSServerManager' **")

              Deployment "JMSTopicManageMO" is missing the following dependencies:

                Dependency "<UNKNOWN JMSTopicManageMO>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'JMSServerManager' **")

              Deployment "JndiBinder" is missing the following dependencies:

                Dependency "jboss:service=Naming" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss:service=Naming' **")

             

            It's as if the container won't provide ANY classes, now.