1 2 Previous Next 21 Replies Latest reply on Sep 6, 2011 10:03 AM by hantsy bai

    Logging settings problem in Seam 3 application on JBoss 7

    hantsy bai Master

      I modified the seam3 dependencies version to 3.1.0.Beta2,  and I have added solder-logging to dependencies...



      16:27:29,141 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."siorc.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."siorc.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "siorc.war"
           at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
           at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
           at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]
           at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
      Caused by: java.lang.NoClassDefFoundError: org/jboss/logmanager/Logger$AttachmentKey
           at org.jboss.seam.solder.logging.internal.JBossLogManagerProvider.<clinit>(JBossLogManagerProvider.java:36)
           at org.jboss.seam.solder.logging.internal.LoggerProviders.findProvider(LoggerProviders.java:33)
           at org.jboss.seam.solder.logging.internal.LoggerProviders.<clinit>(LoggerProviders.java:28)
           at org.jboss.seam.solder.logging.internal.Logger.getLogger(Logger.java:2164)
           at org.jboss.seam.logging.Logger.<init>(Logger.java:44)
           at org.jboss.seam.logging.Logger.getLogger(Logger.java:1965)
           at org.jboss.seam.logging.Logger.getLogger(Logger.java:1991)
           at org.jboss.seam.config.xml.bootstrap.XmlConfigExtension.<clinit>(XmlConfigExtension.java:68)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_27]
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_27]
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_27]
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_27]
           at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadExtension(WeldPortableExtensionProcessor.java:117)
           at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadAttachments(WeldPortableExtensionProcessor.java:100)
           at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.deploy(WeldPortableExtensionProcessor.java:86)
           at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
           ... 5 more
      Caused by: java.lang.ClassNotFoundException: org.jboss.logmanager.Logger$AttachmentKey from [Module "deployment.siorc.war:main" from Service Module Loader]
           at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
           at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
           ... 21 more
      
      
      



      I had added jboss logging to dependencies, it is still there.


      <dependency>
                     <groupId>org.jboss.logging</groupId>
                     <artifactId>jboss-logging-spi</artifactId>
                     <version>2.1.2.GA</version>
                </dependency>
                <dependency>
                     <groupId>org.jboss.logging</groupId>
                     <artifactId>jboss-logging-log4j</artifactId>
                     <version>2.1.2.GA</version>
                </dependency>
      



      When I changed jboss-logging-log4j to jboss-logging-logmanager, the exception required set a property to use the java.util.logging...



      Why on Jboss 6 and Jboss 7 there are so much troubles, I have tried on jboss 6(I can not added my sf4l and log4j)...why in my application I can not controlled them directly as other application server???


        • 2. Re: Logging settings problem in Seam 3 application on JBoss 7
          Jason Porter Master

          Add the following to a file called jboss-deployment-structure.xml in WEB-INF for AS7. We messed up a little with the Beta2 solder release. This should have already been taken care of with solder, but it's a bug, sorry we didn't catch it before it went out.


          <jboss-deployment-structure>
              <deployment>
                  <dependencies>
                      <module name=\"org.jboss.logmanager\" />
                  </dependencies>
               </deployment>
          </jboss-deployment-structure>



          If you would like to understand more information about what this does please read https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7

          • 3. Re: Logging settings problem in Seam 3 application on JBoss 7
            hantsy bai Master

            Thanks added this file, the exception is missing.

            • 4. Re: Logging settings problem in Seam 3 application on JBoss 7
              hantsy bai Master

              But there are still two other problem...
              How to added Seam logging in the pom.xml in Seam3(3.1.0.beta2)..




              17:27:31,070 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."siorc.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."siorc.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Logger] with qualifiers [@Default] at injection point [[field] @Inject private com.telopsys.siorc.security.SiorcAuthenticator.log]
                   at org.jboss.as.weld.services.WeldService.start(WeldService.java:96)
                   at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
                   at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
                   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]
                   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]
                   at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
              Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Logger] with qualifiers [@Default] at injection point [[field] @Inject private com.telopsys.siorc.security.SiorcAuthenticator.log]
                   at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:270)
                   at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:106)
                   at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:129)
                   at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:351)
                   at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:336)
                   at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:404)
                   at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
                   at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)
                   ... 5 more
              



              I added the following dependencies in pom.


              <dependency>
                             <groupId>org.jboss.seam.solder</groupId>
                             <artifactId>seam-solder-logging</artifactId>
                             <version>3.1.0.Beta2</version>
                        </dependency>
              
              
                        <dependency>
                             <artifactId>slf4j-api</artifactId>
                             <groupId>org.slf4j</groupId>
                             <version>1.6.2</version>
                        </dependency>
              
                        <dependency>
                             <groupId>org.jboss.logging</groupId>
                             <artifactId>jboss-logging-spi</artifactId>
                             <version>2.1.2.GA</version>
                        </dependency>
                        <dependency>
                             <groupId>org.jboss.logging</groupId>
                             <artifactId>jboss-logging-log4j</artifactId>
                             <version>2.1.2.GA</version>
                        </dependency>
              


              My code


              import org.jboss.logging.Logger;
              import org.jboss.seam.international.status.Messages;
              import org.jboss.seam.security.Authenticator;
              import org.jboss.seam.security.BaseAuthenticator;
              import org.jboss.seam.security.Credentials;
              import org.jboss.seam.security.Identity;
              import org.jboss.seam.security.UserImpl;
              import org.picketlink.idm.impl.api.PasswordCredential;
              
              import com.telopsys.siorc.i18n.DefaultBundleKey;
              import com.telopsys.siorc.model.UserAccount;
              
              @Stateless
              @Named("siorcAuthenticator")
              public class SiorcAuthenticator extends BaseAuthenticator implements
                        Authenticator {
                   @Inject
                   Identity identity;
              
                   @Inject
                   Credentials credentials;
              
                   @Inject
                   private Logger log;
              


              • 5. Re: Logging settings problem in Seam 3 application on JBoss 7
                hantsy bai Master

                Another exception is about the mysql jdbc...




                17:27:30,258 WARN  [org.jboss.modules] (MSC service thread 1-2) Failed to define class com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker in Module "deployment.mysql-connector-java.jar:main" from Service Module Loader: java.lang.LinkageError: Failed to link com/mysql/jdbc/integration/jboss/MysqlValidConnectionChecker (Module "deployment.mysql-connector-java.jar:main" from Service Module Loader)
                     at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)
                     at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
                     at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
                     at org.jboss.modules.Module.loadModuleClass(Module.java:588)
                     at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
                     at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
                     at java.lang.Class.forName0(Native Method) [:1.6.0_27]
                     at java.lang.Class.forName(Class.java:247) [:1.6.0_27]
                     at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.loadPlugin(BaseWrapperManagedConnectionFactory.java:1054)
                     at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:1158)
                     at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:454)
                     at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(LocalManagedConnectionFactory.java:507)
                     at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:260)
                     at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:392)
                     at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:357)
                     at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:351)
                     at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:367)
                     at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:467)
                     at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)
                     at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:67) [hibernate-entitymanager-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:50) [hibernate-core-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:194) [hibernate-core-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:444) [hibernate-core-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1720) [hibernate-core-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76) [hibernate-entitymanager-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:894) [hibernate-entitymanager-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:879) [hibernate-entitymanager-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.jboss.as.jpa.service.PersistenceUnitService.createContainerEntityManagerFactory(PersistenceUnitService.java:143) [jboss-as-jpa-7.0.1.Final.jar:7.0.1.Final]
                     at org.jboss.as.jpa.service.PersistenceUnitService.start(PersistenceUnitService.java:77) [jboss-as-jpa-7.0.1.Final.jar:7.0.1.Final]
                     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
                     at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
                     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]
                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]
                     at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
                Caused by: java.lang.NoClassDefFoundError: org/jboss/resource/adapter/jdbc/ValidConnectionChecker
                     at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_27]
                     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_27]
                     at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_27]
                     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_27]
                     at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
                     ... 38 more
                Caused by: java.lang.ClassNotFoundException: org.jboss.resource.adapter.jdbc.ValidConnectionChecker from [Module "deployment.mysql-connector-java.jar:main" from Service Module Loader]
                     at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
                     at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
                     ... 43 more
                
                17:27:30,273 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (MSC service thread 1-2) IJ000613: Throwable while trying to match managed connection, destroying connection: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@19c1804[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@1f3b730 connection handles=0 lastUse=1314696447229 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@17fe7ae pool internal context=org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool@437842 xaResource=org.jboss.jca.core.tx.jbossts.LocalXAResourceImpl@18c394b txSync=null]: java.lang.LinkageError: Failed to link com/mysql/jdbc/integration/jboss/MysqlValidConnectionChecker (Module "deployment.mysql-connector-java.jar:main" from Service Module Loader)
                     at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)
                     at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
                     at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
                     at org.jboss.modules.Module.loadModuleClass(Module.java:588)
                     at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
                     at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
                     at java.lang.Class.forName0(Native Method) [:1.6.0_27]
                     at java.lang.Class.forName(Class.java:247) [:1.6.0_27]
                     at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.loadPlugin(BaseWrapperManagedConnectionFactory.java:1054)
                     at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:1158)
                     at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:454)
                     at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(LocalManagedConnectionFactory.java:507)
                     at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:260)
                     at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:392)
                     at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:357)
                     at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:351)
                     at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:367)
                     at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:467)
                     at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)
                     at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:67) [hibernate-entitymanager-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:50) [hibernate-core-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:194) [hibernate-core-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:444) [hibernate-core-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1720) [hibernate-core-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76) [hibernate-entitymanager-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:894) [hibernate-entitymanager-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:879) [hibernate-entitymanager-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.0.Beta5.jar:4.0.0.Beta5]
                     at org.jboss.as.jpa.service.PersistenceUnitService.createContainerEntityManagerFactory(PersistenceUnitService.java:143) [jboss-as-jpa-7.0.1.Final.jar:7.0.1.Final]
                     at org.jboss.as.jpa.service.PersistenceUnitService.start(PersistenceUnitService.java:77) [jboss-as-jpa-7.0.1.Final.jar:7.0.1.Final]
                     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
                     at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
                     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]
                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]
                     at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
                Caused by: java.lang.NoClassDefFoundError: org/jboss/resource/adapter/jdbc/ValidConnectionChecker
                     at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_27]
                     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_27]
                     at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_27]
                     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_27]
                     at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
                     ... 38 more
                Caused by: java.lang.ClassNotFoundException: org.jboss.resource.adapter.jdbc.ValidConnectionChecker from [Module "deployment.mysql-connector-java.jar:main" from Service Module Loader]
                     at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
                     at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
                     at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
                     ... 43 more
                
                
                




                • 6. Re: Logging settings problem in Seam 3 application on JBoss 7
                  hantsy bai Master

                  I attached the pom partial code for depeloyment here



                  <profile>
                                 <id>jboss7</id>
                                 <activation>
                                      <activeByDefault>true</activeByDefault>
                                 </activation>
                                 <build>
                                      <plugins>
                                           <plugin>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-war-plugin</artifactId>
                                                <configuration>
                                                     <webResources>
                                                          <resource>
                                                               <directory>src/main/resources-jbossas7</directory>
                                                          </resource>
                                                     </webResources>
                                                </configuration>
                                           </plugin>
                                           <plugin>
                                                <groupId>org.jboss.as.plugins</groupId>
                                                <artifactId>jboss-as-maven-plugin</artifactId>
                                                <executions>
                                                     <execution>
                                                          <id>deploy-driver</id>
                                                          <phase>package</phase>
                                                          <configuration>
                                                               <groupId>mysql</groupId>
                                                               <artifactId>mysql-connector-java</artifactId>
                                                               <name>mysql-connector-java.jar</name>
                                                          </configuration>
                                                          <goals>
                                                               <goal>deploy-artifact</goal>
                                                          </goals>
                                                     </execution>
                                                     <execution>
                                                          <id>add-datasource</id>
                                                          <phase>install</phase>
                                                          <configuration>
                                                               <address>subsystem=datasources,data-source=siorcDS</address>
                                                               <properties>
                                                                    <use-java-context>false</use-java-context>
                                                                    <jndi-name>jdbc/siorcDS</jndi-name>
                                                                    <driver-class>com.mysql.jdbc.Driver</driver-class>
                                                                    <connection-url>jdbc:mysql://localhost:3306/oceanstar</connection-url>
                                                                    <user-name>oceanstar</user-name>
                                                                    <password>eagle</password>
                                                                    <min-pool-size>20</min-pool-size>
                                                                    <max-pool-size>100</max-pool-size>
                                                                    <enabled>true</enabled>
                                                                    <pool-name>siorcPool</pool-name>
                                                                    <driver-name>mysql-connector-java.jar</driver-name>
                                                               </properties>
                                                          </configuration>
                                                          <goals>
                                                               <goal>add-resource</goal>
                                                          </goals>
                                                     </execution>
                                                </executions>
                                           </plugin>
                                      </plugins>
                                 </build>
                                 <!-- <dependencies> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> 
                                      </dependency> </dependencies> -->
                            </profile>
                  
                  


                  • 7. Re: Logging settings problem in Seam 3 application on JBoss 7
                    hantsy bai Master

                    All are fixed now.


                    1. the jdbc problem maybe caused by before datasource configuration(the verification class configuration is copied from before projects)...I am confused why I ran mvn package jboss-as:deploy, it did not update the whole datasource configuration.


                    2. Added seam-solder-logging in dependencies only and remove other logging related dependecies.
                    And change org.jboss.logging.Logger to org.jboss.seam.logging.Logger(from seam-solder-logging) in codes.


                    Personally, I dislike the logging feature in jboss6 and jboss 7, it slows down my development progress.


                    The left question is how to enable my lo4j configuration in my project.


                    Thank u all.

                    • 8. Re: Logging settings problem in Seam 3 application on JBoss 7
                      zeeman Novice

                      I spent hours on this issue. Logging is not well thought in Seam framework. It's quite annoying having to jump from SLF4j to jboss logging, to jboss Seam logging.


                      SLF4j logback is great and stable. What do I need to do to replace jboss seam logging with it on AS7?

                      • 9. Re: Logging settings problem in Seam 3 application on JBoss 7
                        Shane Bryzak Master

                        If you want to use slf4j in your application, then there's nothing stopping you.  The benefit of using Seam logging is that you get some cool features such as typesafe logging, but if you don't care about those things then there's no need to use it.

                        • 10. Re: Logging settings problem in Seam 3 application on JBoss 7
                          hantsy bai Master

                          But how to configure it....I have tried several times...added log4j dependencies and slf4j-log4j12, it did not work, this issue confused me several days...I do not think the new logging feature is good for developer, obviously ,it slowed down the development progress.

                          • 11. Re: Logging settings problem in Seam 3 application on JBoss 7
                            Shane Bryzak Master

                            This is no longer an issue with Seam per se, rather with AS7.  You need to add the following to your MANIFEST.MF:




                            <Dependencies>org.slf4j.impl</Dependencies>




                            The easiest way to do this is via the maven-war-plugin, by adding this to your project's pom.xml:




                            <build>
                              <finalName>seam-university</finalName>
                                <plugins>
                                  <plugin>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-war-plugin</artifactId>
                                    <configuration>
                                      <failOnMissingWebXml>false</failOnMissingWebXml>
                                      <archive>
                                        <manifestEntries>
                                          <Dependencies>org.slf4j.impl</Dependencies>
                                        </manifestEntries>
                                      </archive>
                                    </configuration>
                                  </plugin>
                                </plugins>
                              </finalName>
                            </build>



                            For more info, you can find a great writeup that Stuart Douglas put together here.  If you still have issues after this, can you please post any stacktrace that you're getting.

                            • 13. Re: Logging settings problem in Seam 3 application on JBoss 7
                              Shane Bryzak Master

                              No error message or stacktrace?

                              • 14. Re: Logging settings problem in Seam 3 application on JBoss 7
                                hantsy bai Master

                                No any log info in jboss console...

                                1 2 Previous Next