2 Replies Latest reply on Jun 7, 2004 9:33 PM by yaumeileng

    Configure mysql on Jboss 3.2.3

    yaumeileng Newbie

      Does anyone know how to configure MySQL on JBoss 3.2.3? This is what I have done:

      (i) copy /jboss3.2.3/docs/examples/jca/mysql-ds.xml to jboss3.2.3/server/default/deploy/ where ECPerfDS is the dtabase jndi name:
      ++++++++++++++++++++++++++++++++++++++++++++++

      <local-tx-datasource>
      <jndi-name>ECPerfDS</jndi-name>
      <connection-url>jdbc:mysql://10.100.22.86:3306/ecperf</connection-url>
      <driver-class>org.gjt.mm.mysql.Driver</driver-class>
      <user-name>root</user-name>
      intel1
      </local-tx-datasource>


      ++++++++++++++++++++++++++++++++++++++++++++

      (ii) Add jdbc driver mysql-connector-java-3.0.14-production-bin.jar into /jboss/server/default/lib

      (iii) Modify standardjaws in /jboss3.2.3/server/default/config as follows:

      ++++++++++++++++++++++++++++++++++++++++++++

      java:/MySqlDS
      <type-mapping>mySQL</type-mapping>

      ++++++++++++++++++++++++++++++++++++++++++++

      (iv) Modify standardjbosscmp-jdbc.xml as:

      +++++++++++++++++++++++++++++++++++++++++++++++

      java:/MySqlDS
      <datasource-mapping>mySQL</datasource-mapping>

      +++++++++++++++++++++++++++++++++++++++++++++++

      (v) Add the following into login-config.xml
      ++++++++++++++++++++++++++++++++++++++++
      <application-policy name = "MySqlDSRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
      flag = "required">
      <module-option name = "principal">root</module-option>
      <module-option name = "userName">root</module-option>
      <module-option name = "password">x</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>

      </login-module>

      </application-policy>

      +++++++++++++++++++++++++++++++++++++++++

      (Vi) Copy mysql-jdbc2-service.xml from jboss-3.2.3/docs/examples/jms into jboss-3.2.3/server/default/deploy/jms

      (vii) grant previleges to mysql database:

      Grant all privileges on ecperf.* to 'root'@'10.100.22.86' identified by 'x' with grant option

      ecperf is the database created.

      But unfortunately, with what I have done, the connection seems to have problems with the following errors:
      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      com.sun.ecperf.webbeans.OtherException: Finder Exception occured for the request.
      at com.sun.ecperf.webbeans.ProcessListBean.getItemsList(ProcessListBean.java:157)
      at org.apache.jsp.new_order_jsp._jspService(new_order_jsp.java:263)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
      at java.lang.Thread.run(Thread.java:534)

      Nested Exception:
      javax.ejb.FinderException: Find failed: java.sql.SQLException: General error, message from server: "Table 'ecperf.o_item' doesn't exist"
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCFinderCommand.execute(JDBCFinderCommand.java:118)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand.execute(JDBCFindEntitiesCommand.java:200)
      at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.findEntities(JAWSPersistenceManager.java:292)
      at org.jboss.ejb.plugins.CMPPersistenceManager.findEntities(CMPPersistenceManager.java:311)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntities(CachedConnectionInterceptor.java:322)
      at org.jboss.ejb.EntityContainer.find(EntityContainer.java:672)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1043)
      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

      Am wondering has anyone tried to configure mysql on Jboss before. If so, please help. Seems like the server cannot locate the database table.

      Thank you:meileng