6 Replies Latest reply on Jun 13, 2005 9:40 AM by Rick Price

    Initial Portal config problems with MySQL

    Rick Price Newbie

      I am having a problem getting the Portals setup on my Windows box. Jboss is running well on this and my Linux machines.

      Jboss is 4.0.2
      Portal is RC2
      mysql-connector-java-3.1.8-bin.jar located in the server\default\lib directory
      Windows XP
      MySQL 4.1.12a

      I copied the sar and ear to the server\default\deploy folder along with the XML files for mysql:

      <?xml version="1.0" encoding="UTF-8"?>

      <local-tx-datasource>
      <jndi-name>PortalDS</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/jbossportal?useServerPrepStmts=false</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>portal</user-name>
      password
      </local-tx-datasource>


      The driver jar is in the classpath as are the com and org directories.

      The stack trace for the error is:

      13:49:36,968 INFO [HbmBinder] Mapping collection: org.jboss.portlet.forums.impl
      .ForumImpl.watches -> jbp_forums_forumswatch
      13:49:36,968 INFO [HbmBinder] Mapping collection: org.jboss.portlet.forums.impl
      .TopicImpl.watches -> jbp_forums_topicswatch
      13:49:36,968 INFO [Configuration] processing association property references
      13:49:36,968 INFO [Configuration] processing foreign key constraints
      13:49:37,390 INFO [NamingHelper] JNDI InitialContext properties:{}
      13:49:37,405 INFO [DatasourceConnectionProvider] Using datasource: java:PortalDS
      13:49:37,405 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:242)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.g
      etDriver(LocalManagedConnectionFactory.java:266)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.c
      reateManagedConnection(LocalManagedConnectionFactory.java:150)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.cr
      eateConnectionEventListener(InternalManagedConnectionPool.java:508)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.ge
      tConnection(InternalManagedConnectionPool.java:207)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BaseP
      ool.getConnection(JBossManagedConnectionPool.java:534)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManage
      dConnection(BaseConnectionManager2.java:395)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedCo
      nnection(TxConnectionManager.java:297)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
      onnection(BaseConnectionManager2.java:447)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
      nManagerProxy.allocateConnection(BaseConnectionManager2.java:874)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp
      erDataSource.java:103)
      at org.hibernate.connection.DatasourceConnectionProvider.getConnection(D
      atasourceConnectionProvider.java:59)
      at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
      67)
      at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1509
      )
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
      a:1054)
      at org.jboss.portal.core.hibernate.SessionFactoryBinder.createSessionFac
      tory(SessionFactoryBinder.java:261)
      at org.jboss.portal.core.hibernate.SessionFactoryBinder.startService(Ses
      sionFactoryBinder.java:127)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:272)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      73)

      Again, JBoss is workinig just fine as is MySQL (from the MySQL Clients - not JDBC). Can anyone see what I've overlooked??

        • 1. Re: Initial Portal config problems with MySQL
          Martin Giljohann Newbie

          Maybe it's just that your portal-ds.xml is not valid. Try putting the password into the corresponding element:

          ...
          <user-name>portal</user-name>
          <password>password</password>
          ...


          • 2. Re: Initial Portal config problems with MySQL
            Rick Price Newbie

            The password was set to 'password' so this should work.

            • 3. Re: Initial Portal config problems with MySQL
              Rick Price Newbie

              I checked the file and the XML tags are there. I'm not sure what happened when I pasted it up there.

              • 4. Re: Initial Portal config problems with MySQL
                Roy Russo Master

                Remove the sar and styart jboss with only the datasource in /deploy. See if you still get the exception.

                • 5. Re: Initial Portal config problems with MySQL
                  Rick Price Newbie

                  Removed the sar and the forums ear and now get this exception:

                  08:21:05,061 INFO [ex] Bound to JNDI name: queue/ex
                  08:21:05,108 INFO [testTopic] Bound to JNDI name: topic/testTopic
                  08:21:05,124 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
                  08:21:05,124 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic

                  08:21:05,124 INFO [testQueue] Bound to JNDI name: queue/testQueue
                  08:21:05,265 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.
                  0.0:8093
                  08:21:05,390 INFO [DLQ] Bound to JNDI name: queue/DLQ
                  08:21:06,046 INFO [ConnectionFactoryBindingService] Bound connection factory fo
                  r resource adapter for ConnectionManager 'jboss.jca:service=ConnectionFactoryBin
                  ding,name=JmsXA to JNDI name 'java:JmsXA'
                  08:21:06,390 INFO [WrapperDataSourceService] Bound connection factory for resou
                  rce adapter for ConnectionManager 'jboss.jca:service=DataSourceBinding,name=Port
                  alDS to JNDI name 'java:PortalDS'
                  08:21:06,452 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-4.
                  0.2/server/default/deploy/portal-mysql-ds.xml
                  org.jboss.deployment.DeploymentException: Trying to install an already registere
                  d mbean: jboss.jca:service=LocalTxCM,name=PortalDS
                  at org.jboss.system.ServiceCreator.install(ServiceCreator.java:70)
                  at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
                  tor.java:153)
                  at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
                  :118)
                  at org.jboss.system.ServiceController.install(ServiceController.java:202
                  )
                  at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                  er.java:141)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                  java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy4.install(Unknown Source)
                  at org.jboss.deployment.SARDeployer.create(SARDeployer.java:220)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                  er.java:141)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                  or.java:121)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                  BeanOperationInterceptor.java:127)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                  java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.ja
                  va:273)
                  at $Proxy35.create(Unknown Source)
                  at org.jboss.deployment.XSLSubDeployer.create(XSLSubDeployer.java:224)
                  at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
                  at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                  er.java:141)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                  or.java:121)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                  BeanOperationInterceptor.java:127)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                  java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy8.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
                  tScanner.java:325)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
                  canner.java:501)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
                  doScan(AbstractDeploymentScanner.java:204)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
                  bstractDeploymentScanner.java:277)
                  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
                  upport.java:272)
                  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
                  eanSupport.java:222)
                  at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                  er.java:141)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                  java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:897)
                  at $Proxy0.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:418)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                  er.java:141)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                  java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy4.start(Unknown Source)
                  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                  er.java:141)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                  or.java:121)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                  BeanOperationInterceptor.java:127)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                  java:249)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy5.deploy(Unknown Source)
                  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
                  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
                  at org.jboss.Main.boot(Main.java:195)
                  at org.jboss.Main$1.run(Main.java:463)
                  at java.lang.Thread.run(Thread.java:595)
                  08:21:06,593 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/C
                  :/jboss-4.0.2/server/default/deploy/jmx-console.war/
                  08:21:06,936 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

                  --- Incompletely deployed packages ---
                  org.jboss.deployment.DeploymentInfo@6f14569d { url=file:/C:/jboss-4.0.2/server/d
                  efault/deploy/portal-mysql-ds.xml }
                  deployer: org.jboss.deployment.XSLSubDeployer@1a2f5b1
                  status: Deployment FAILED reason: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=PortalDS
                  state: FAILED
                  watch: file:/C:/jboss-4.0.2/server/default/deploy/portal-mysql-ds.xml
                  altDD: null
                  lastDeployed: 1118578866436
                  lastModified: 1118578866421
                  mbeans:

                  • 6. Re: Initial Portal config problems with MySQL
                    Rick Price Newbie

                    This problem is solved. Seems that the com folder in the Connector J release (3.8.1) is incomplete. You need to extract the one from the jar file and put it in the classpath. You also need to add aspectjrt.jar to the folder where you put the driver.

                    Now have a hibernate issue ... but that is another post entirely.