7 Replies Latest reply on Apr 9, 2009 8:49 AM by bernie_h

    Problems using

    bernie_h

      Hello!

      I'm using the latest version of JBoss Tools (3.0.0GA) together with a fresh installation of EclipseEE 3.4.2 and JBoss AS 4.2.3 for Seam development.
      I switched from an alpha version of JBoss Tools and ran into a weird problem when using the full-publish and auto-publish function.

      Here's the scenario:
      I deploy a new seam app and modify some java-code.
      The class-file is then automatically published to the server and I want to restart the application in order to reload the changed class.

      What makes me wonder is that even a full-publish from the server-view in eclipse does not restart the application - it only makes the hibernate entitymanager-factory close and re-open again - at least that's what I see in the logs.
      I always have to touch the application.xml or web.xml to force my application to restart and re-load the class-files.
      Is there any way to do this in eclipse, since the alpha-version of Jboss Tools did exactly what I need? When I changed some xhtml-file only those were published to the server (without any persistence-unit to re-initialize) and when I changed some java-code I had to do a "full publish" which triggered the application-reload in Jboss AS.
      It's also weird that a simple xhtml change/save-action results in a re-initialization of the persitence-unit, is there a good reason for this?

      Maybe I'm doing something wrong or did not find those features.
      I hope somebody can help me.

      Best regards,

      Bernie

        • 1. Re: Problems using
          bernie_h

          Sorry, the topic should be "Problems using the Full-Publish feature in JBoss Tools 3.0.0GA"

          Everything inside the quotes have been elimiated...

          • 2. Re: Problems using
            rob.stryker

            I've just tested this on 3.0.0.GA in a new workspace (with JBoss 4.2.2.GA) and am unable to replicate. After doing a full publish, the entire app is redeployed and the console spits out its usual 211 lines of output.

            I can verify this with timestamps. After one full publish, I get the following:

            [rob@localhost 1]$ du -a | grep "xml" | cut -f 2 | awk '{print "ls -l " $0;}' | head -n 2 | tail -n 1 | sh
            -rw-rw-r-- 1 rob rob 541 2009-04-09 11:07 ./seam21-ear.ear/META-INF/application.xml


            After a while, I do another full publish and get:

            [rob@localhost 1]$ du -a | grep "xml" | cut -f 2 | awk '{print "ls -l " $0;}' | head -n 2 | tail -n 1 | sh
            -rw-rw-r-- 1 rob rob 541 2009-04-09 11:10 ./seam21-ear.ear/META-INF/application.xml

            Note the timestamp went from 11:07 to 11:10. It seems to be working fine for me?

            • 3. Re: Problems using
              bernie_h

              Still no luck...

              I've just setup a new workspace and a new Seam Web Project.
              After doing a full publish I'm always getting this output:

              10:06:24,196 INFO [PersistenceUnitDeployment] Stopping persistence unit persistence.units:ear=Test-App-ear.ear,unitName=Test-App
              10:06:24,196 INFO [SessionFactoryImpl] closing
              10:06:24,196 INFO [SessionFactoryObjectFactory] Unbinding factory from JNDI name: persistence.units:ear=Test-App-ear.ear,unitName=Test-App
              10:06:24,196 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
              10:06:24,196 INFO [SessionFactoryObjectFactory] Unbound factory from JNDI name: persistence.units:ear=Test-App-ear.ear,unitName=Test-App
              10:06:24,197 INFO [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=Test-AppDatasource' from JNDI name 'java:Test-AppDatasource'
              10:06:24,256 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=Test-AppDatasource' to JNDI name 'java:Test-AppDatasource'
              10:06:24,256 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.units:ear=Test-App-ear.ear,unitName=Test-App
              10:06:24,274 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
              10:06:24,274 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
              10:06:24,369 INFO [SettingsFactory] RDBMS: MySQL, version: 5.1.22-rc-community
              10:06:24,369 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} )
              10:06:24,369 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
              10:06:24,369 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
              10:06:24,370 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
              10:06:24,370 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
              10:06:24,370 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
              10:06:24,370 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
              10:06:24,370 INFO [SettingsFactory] JDBC batch size: 15
              10:06:24,370 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
              10:06:24,370 INFO [SettingsFactory] Scrollable result sets: enabled
              10:06:24,370 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
              10:06:24,370 INFO [SettingsFactory] Connection release mode: auto
              10:06:24,370 INFO [SettingsFactory] Default schema: test
              10:06:24,370 INFO [SettingsFactory] Maximum outer join fetch depth: 2
              10:06:24,370 INFO [SettingsFactory] Default batch fetch size: 1
              10:06:24,370 INFO [SettingsFactory] Generate SQL with comments: disabled
              10:06:24,370 INFO [SettingsFactory] Order SQL updates by primary key: disabled
              10:06:24,370 INFO [SettingsFactory] Order SQL inserts for batching: disabled
              10:06:24,370 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
              10:06:24,370 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
              10:06:24,370 INFO [SettingsFactory] Query language substitutions: {}
              10:06:24,370 INFO [SettingsFactory] JPA-QL strict compliance: enabled
              10:06:24,370 INFO [SettingsFactory] Second-level cache: enabled
              10:06:24,370 INFO [SettingsFactory] Query cache: disabled
              10:06:24,370 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
              10:06:24,370 INFO [RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider
              10:06:24,370 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
              10:06:24,370 INFO [SettingsFactory] Cache region prefix: Test-App-ear_ear,Test-App
              10:06:24,370 INFO [SettingsFactory] Structured second-level cache entries: disabled
              10:06:24,370 INFO [SettingsFactory] Echoing all SQL to stdout
              10:06:24,371 INFO [SettingsFactory] Statistics: disabled
              10:06:24,371 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
              10:06:24,371 INFO [SettingsFactory] Default entity-mode: pojo
              10:06:24,371 INFO [SettingsFactory] Named query checking : enabled
              10:06:24,373 INFO [SessionFactoryImpl] building session factory
              10:06:24,373 INFO [SessionFactoryObjectFactory] Factory name: persistence.units:ear=Test-App-ear.ear,unitName=Test-App
              10:06:24,373 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
              10:06:24,373 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.units:ear=Test-App-ear.ear,unitName=Test-App
              10:06:24,373 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
              10:06:24,373 INFO [SchemaUpdate] Running hbm2ddl schema update
              10:06:24,374 INFO [SchemaUpdate] fetching database metadata
              10:06:24,376 INFO [SchemaUpdate] updating schema
              10:06:24,379 INFO [SchemaUpdate] schema update complete
              10:06:24,380 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}


              Maybe the problem is because of the JBoss Version - I'm using 4.2.3 which solves some problems for me (JBossWS and some other things) but seems to make troubles together with JBoss Tools (e.g. the problem with jboss-seam.jar in the manifest and the seam phase-listener, etc...).

              Are there any known issues with JBoss 4.2.3 regarding full-publishing?

              I'll next test this on a fresh AS, maybe this helps...

              Btw, I'm getting the above output (EntityManagerFactory reloading) after a simple facelets-publish - is this intended?

              Best regards,

              Bernie

              • 4. Re: Problems using
                maxandersen

                No, we should not be touching any descriptors if you are just doing a normal incremental publish

                • 5. Re: Problems using
                  bernie_h

                  Ok, I've just retested everything with a fresh installation of eclipse 3.4.2 and JBoss Tools 3.0.0GA and both JBoss AS 4.2.2 and 4.2.3.

                  I can always replicate the problem - the application.xml is never touched and a simple facelets-saving (with auto-publishing feature turned on) causes the perstistence unit to restart...

                  Maybe it's an OS-Problem (?), I'm working on Windows Vista...

                  • 6. Re: Problems using
                    maxandersen

                    I'm running vista too and I should have spotted this if it happened to me.

                    Could you do me a favor - create a jira and describe a *minimal* test/usecase that reproduces this for you ?

                    And what server type are you using ?

                    i.e. what wizards you use or simply attach a zipped up project with all the .-files and folders intact ?

                    • 7. Re: Problems using
                      bernie_h