8 Replies Latest reply on May 21, 2005 8:06 PM by justinashworth

    Jboss AP 4.0.0 upgarde to 4.0.2

    beyarecords

      Hi,
      first off I am using Jboss 4.0.0 on OS X 10.4 (Tiger) with no problems at all. I am using hibernate.har which is not featured in 4.0.2. So, do I take it that jboss-hibernate.deployer folder is now the way to go?

      My hibernate.har structure is as follows:

      1. hibernate.cfg.xml
      2. META-INF
      -- hibernate-service.xml
      3. test
      -- *.hbm.xml and *.class files
      4. WEB-INF
      -- lib

      Can I just copy the hibernate.har file over to 4.0.2? Do I copy the .har structure over to the jboss-hibernate.deployer folder? What over changes do I need to make, in regards to using hibernate3, for my current hibernate configuration to work properly?

      regards

        • 1. Re: Jboss AP 4.0.0 upgarde to 4.0.2
          beyarecords

          Ok, where am I going wrong here?:

          hibernate.har/META-INF/hibernate-service.xml

          <server>
           <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
           <depends>jboss.jca:service=RARDeployer</depends>
           <depends>jboss.jca:service=LocalTxCM,name=PostgresDS</depends>
           <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
           <attribute name="DatasourceName">java:/PostgresDS</attribute>
           <attribute name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute>
           <attribute name="CacheProviderClass">org.hibernate.cache.EhCacheProvider</attribute>
           <!-- Turn this on and set the value to update if you want all the tables to be updated by hibernate -->
           <!-- or create-drop if you want the tables to be re-generated -->
           <attribute name="Hbm2ddlAuto"></attribute>
           <attribute name="ShowSqlEnabled">true</attribute>
           <attribute name="JdbcBatchSize">25</attribute>
           </mbean>
          </server>
          


          During startup there is no mention of any hibernate mapping occuring between the *.hbm.xml and *.class files. I have placed my hibernate.har folder, which worked fine in 4.0.0, in the deploy directory of 4.0.2. The only changes I have made, as show above, is to change the package reference from net.sf.hibernate to org.hibernate.

          My postgres-ds.xml is as follows:

          <datasources>
           <local-tx-datasource>
           <jndi-name>PostgresDS</jndi-name>
           <connection-url>jdbc:postgresql://localhost:5432/beyarecords?ssl=true</connection-url>
           <driver-class>org.postgresql.Driver</driver-class>
           <user-name>*</user-name>
           <password>*</password>
           <max-pool-size>10</max-pool-size>
           <metadata>
           <type-mapping>PostgreSQL 7.2</type-mapping>
           </metadata>
           </local-tx-datasource>
          </datasources>
          


          What am I doing wrong here? When my app tries to make a connection to the database nothing happens and no error output is genertated either.

          regards

          • 2. Re: Jboss AP 4.0.0 upgarde to 4.0.2
            beyarecords

            Futher to my previous posts, here is one of my hibernate hbm.xml files:

            <?xml version='1.0' encoding='utf-8'?>
            <!DOCTYPE hibernate-mapping PUBLIC
             "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
             "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
            
            <hibernate-mapping package="test">
             <class name="Artist" table="artisttbl">
             <cache usage="read-write"/>
             <id name="ID" column="artist_id">
             <generator class="assigned"/>
             </id>
             <version name="Version" column="version" type="integer"/>
             <property name="ArtistName" column="artist_name" type="string" not-null="true"/>
             <property name="ArtistInfo" column="artist_info" type="string" not-null="true"/>
             <property name="StockID" column="stock_id" type="string"/>
             <set name="ArtistImages" inverse="true" lazy="true" cascade="all-delete-orphan">
             <cache usage="read-write"/>
             <key column="artist_id"/>
             <one-to-many class="ArtistImages"/>
             </set>
             <one-to-one name="ArtistBiog" class="ArtistBiog"/>
             </class>
            </hibernate-mapping>
            


            Any ideas anyone? What is it blindingly obvious that I am missing here?

            regards

            • 3. Re: Jboss AP 4.0.0 upgarde to 4.0.2
              beyarecords

              Here is the logs I am getting on startup:

              01:03:29,555 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=file:/Library/jboss-4.0.2/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
              01:03:31,215 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=file:/Library/jboss-4.0.2/server/default/deploy/management/console-mgr.sar/web-console.war/
              01:03:32,298 INFO [MailService] Mail Service bound to java:/Mail
              01:03:32,755 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/Library/jboss-4.0.2/server/default/deploy/jboss-ha-local-jdbc.rar
              01:03:32,875 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/Library/jboss-4.0.2/server/default/deploy/jboss-ha-xa-jdbc.rar
              01:03:32,977 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/Library/jboss-4.0.2/server/default/deploy/jboss-local-jdbc.rar
              01:03:33,076 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/Library/jboss-4.0.2/server/default/deploy/jboss-xa-jdbc.rar
              01:03:33,177 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/Library/jboss-4.0.2/server/default/deploy/jms/jms-ra.rar
              01:03:33,261 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/Library/jboss-4.0.2/server/default/deploy/mail-ra.rar
              01:03:34,071 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=DefaultDS,service=DataSourceBinding to JNDI name 'java:DefaultDS'
              01:03:34,432 INFO [A] Bound to JNDI name: queue/A
              01:03:34,434 INFO [B] Bound to JNDI name: queue/B
              01:03:34,438 INFO [C] Bound to JNDI name: queue/C
              01:03:34,441 INFO [D] Bound to JNDI name: queue/D
              01:03:34,443 INFO [ex] Bound to JNDI name: queue/ex
              01:03:34,471 INFO [testTopic] Bound to JNDI name: topic/testTopic
              01:03:34,475 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
              01:03:34,478 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
              01:03:34,481 INFO [testQueue] Bound to JNDI name: queue/testQueue
              01:03:34,546 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
              01:03:34,599 INFO [DLQ] Bound to JNDI name: queue/DLQ
              01:03:34,820 INFO [ConnectionFactoryBindingService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=JmsXA,service=ConnectionFactoryBinding to JNDI name 'java:JmsXA'
              01:03:34,946 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=PostgresDS,service=DataSourceBinding to JNDI name 'java:PostgresDS'
              01:03:35,056 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/Library/jboss-4.0.2/server/default/deploy/jmx-console.war/
              01:03:35,329 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
              01:03:35,419 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
              01:03:35,434 INFO [JkMain] Jk running ID=0 time=0/39 config=null
              01:03:35,441 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 28s:292ms
              


              As can be seen no mappings (*.hbm.xml -> *.class) are taking place. What is going on here, where am I going wrong? Anybody?

              regards

              • 4. Re: Jboss AP 4.0.0 upgarde to 4.0.2
                beyarecords

                Why is the hibernate.har file not deploying? What is the issue with jboss-4.0.2 and har deployment. How do I deploy hibernate files if not via har as in 4.0.0?

                regards

                • 5. Re: Jboss AP 4.0.0 upgarde to 4.0.2
                  beyarecords

                  Does nobody really know the answer to this question in Jboss land?!!

                  Can anyone tell me how to deploy hibernate files in 4.0.2 if not via the hibernate.har structure?

                  Why is there no documentation for this? I have checked the WIKI and read the hibernate2 to hibernate3 process required to make the code work, but there is no mention of how to deply the files!!

                  Thinking that hibernate.har was still the flavour of the month, I simply copied it into my deploy directory, started up Jboss and watched the logs to see that hibernate was not being deployed.... HELP!!!

                  • 6. Re: Jboss AP 4.0.0 upgarde to 4.0.2
                    beyarecords

                    If I rename hibernate.har to hibernate or hibernate.[ear|sar] then an attempt is made to deploy the folder and an error is thrown up because various meta-inf files are missing. If I then rename the folder back to hibernate.har nothing happens at all. What is going on here????

                    • 7. Re: Jboss AP 4.0.0 upgarde to 4.0.2

                      I was having this same problem but I just figured it out. Although a .har directory is supposed to work, I had to jar mine up into a .har file for it to be recognized.

                      Hope that helps...

                      Justin

                      • 8. Re: Jboss AP 4.0.0 upgarde to 4.0.2

                        FYI - there is already a bug report on this:

                        http://jira.jboss.com/jira/browse/JBAS-1801