2 Replies Latest reply on May 15, 2005 11:36 AM by tommyyan

    starup error: can't find data source

    tommyyan

      Hi,

      I'm trying to deploy Medrec application to jboss4. After copying ear and other requested files to deploy folder. I added a mysql-ds.xml.

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


      <local-tx-datasource>
      <jndi-name>medrec</jndi-name>
      <connection-url>jdbc:mysql://localhost/medrec</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>medrec</user-name>
      medrec
      <min-pool-size>50</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>0</idle-timeout-minutes>
      <track-statements>true</track-statements>
      </local-tx-datasource>


      I also created mysql database 'medrec' and related tables/user .

      But when I startup using run.sh I got below error:

      21:56:42,596 INFO [EARDeployer] Started J2EE application: file:/usr/local/jboss-4.0.0/server/default/deploy/physicianEar.ear
      21:56:42,602 INFO [EARDeployer] Init J2EE application: file:/usr/local/jboss-4.0.0/server/default/deploy/medrecEar.ear
      21:56:43,200 INFO [EjbModule] Deploying VitalSigns
      21:56:43,515 INFO [EjbModule] Deploying Record
      21:56:43,528 INFO [EjbModule] Deploying Patient
      21:56:43,537 INFO [EjbModule] Deploying Physician
      21:56:43,547 INFO [EjbModule] Deploying Group
      21:56:43,556 INFO [EjbModule] Deploying Address
      21:56:43,566 INFO [EjbModule] Deploying Users
      21:56:43,576 INFO [EjbModule] Deploying Prescription
      21:56:43,804 INFO [EjbModule] Deploying MailSession
      21:56:43,815 INFO [EjbModule] Deploying PatientSession
      21:56:43,824 INFO [EjbModule] Deploying RecordSession
      21:56:43,833 INFO [EjbModule] Deploying AdminSession
      21:56:44,202 INFO [EjbModule] Deploying RegistrationEJB
      21:56:44,233 INFO [EjbModule] Deploying MailEJB
      21:56:44,243 INFO [EjbModule] Deploying XMLUploadEJB
      21:56:44,354 INFO [EjbModule] Deploying MedRecWebServices
      21:56:45,015 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=ejb/local/vitalsignslocal,service=EJB
      org.jboss.deployment.DeploymentException: Error: can't find data source: java:/medrec; - nested throwable: (javax.naming.NameNotFoundException: medrec not bound)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.init()V(JDBCEntityBridge.java:139)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager()V(JDBCStoreManager.java:420)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start()V(JDBCStoreManager.java:353)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start()V(CMPPersistenceManager.java:157)
      at org.jboss.ejb.EntityContainer.startService()V(EntityContainer.java:340)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart()V(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(Ljava.lang.String;)V(ServiceMBeanSupport.java:221)
      at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
      at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
      at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)

      Does anybody have idea?

      Thx.

        • 1. Re: starup error: can't find data source
          amit.bhayani

          I see that you have 'medrec ' word specified in between <user-name>medrec</user-name> and <min-pool-size>50</min-pool-size> . Is your *-ds.xml getting deployed properly?

          • 2. Re: starup error: can't find data source
            tommyyan

            sorry, It is a post mistake, in fact my mysql-ds.xml is:

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


            <local-tx-datasource>
            <jndi-name>medrec</jndi-name>
            <connection-url>jdbc:mysql://localhost/medrec</connection-url>
            <driver-class>com.mysql.jdbc.Driver</driver-class>
            <user-name>medrec</user-name>
            medrec
            <min-pool-size>50</min-pool-size>
            <max-pool-size>20</max-pool-size>
            <idle-timeout-minutes>0</idle-timeout-minutes>
            <track-statements>true</track-statements>
            </local-tx-datasource>