Trouble connecting to the DB when setting up the EPCIS repository

218 views
Skip to first unread message

erik.su...@gs1nz.org

unread,
Jan 20, 2014, 8:35:53 PM1/20/14
to foss...@googlegroups.com
Hello,

I am trying to set up the EPCIS repository according to the instructions in the user guide.

Most of the steps went fine, but when trying to configure the repository to connect to the DB, I found that the $TOMCAT_HOME/conf/Catalina/localhost/ directory is empty.
I tried creating an epcis-repository-0.5.0.xml file myself (copying the text from the user guide), but I don't think that worked...

From what I can see, the DB connection is not working properly...
  • the Tomcat log contains several warnings; the first one is as follows:
WARN (2014-01-21 14:06:23,118) [org.hibernate.cfg.SettingsFactory:117] - Could not obtain connection metadata
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
  • When trying the capture interface, I get the following error: Capture request failed (HTTP response code 500)
  • When trying the query interface, I get the following error:
Unexpected error while invoking EPCIS Query Interface.
org.fosstrak.epcis.soap.ImplementationExceptionResponse: SQL error during query execution: Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
 
      I'm trying to set this up on a brand new install of XAMPP 1.8.2 on a Windows 7 machine
      I have installed the MySQL connector (mysql-connector-java-gpl-5.1.28.msi) and copied the jar file into the Tomcat lib directory

      Your help would be greatly appreciated.

      Erik
      GS1 New Zealand

      erik.su...@gs1nz.org

      unread,
      Jan 20, 2014, 8:52:50 PM1/20/14
      to foss...@googlegroups.com
      One more thing that might help...

      Further down in the stack trace in the Tomcat log, I noticed this:
      Caused by: java.sql.SQLException: Access denied for user 'epcis'@'localhost' (using password: YES)
      (I have attached the Tomcat log file)

      According to the instructions, I have executed the MySQL command (GRANT SELECT, INSERT, UPDATE, DELETE ON epcis.* TO epcis IDENTIFIED BY 'epcis';)
      I have attached a screenshot of phpMyAdmin, showing the privileges for the epcis DB. Is anything wrong with that?

      Thx for your help,

      Erik
      epcis-repository.log
      phpMyAdmin_screenshot.png

      Anuradha namal

      unread,
      Jan 20, 2014, 10:01:53 PM1/20/14
      to foss...@googlegroups.com
      Hi Erick,

      Perhaps you may try the command as below :

      GRANT SELECT, INSERT, UPDATE, DELETE ON epcis.* TO 'epcis'@'localhost' IDENTIFIED BY  'epcis' ;


       'epics' is the of the user account you are creating. Note: You must have the single quotes in there. 'localhost' tells MySQL what hosts the user can connect from. if you are connecting from any other host/IP, you must provide appropriate permissions as to that host as well.


      Further you may try to connect to the db using the terminal/shell or other tools like mysql workbench to see whether you can connect to the database.

      Thank you,

      Regards,



      Namal




      --
      You received this message because you are subscribed to the Google Groups "fosstrak" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to fosstrak+u...@googlegroups.com.
      For more options, visit https://groups.google.com/groups/opt_out.

      erik.su...@gs1nz.org

      unread,
      Jan 20, 2014, 10:23:25 PM1/20/14
      to foss...@googlegroups.com
      That did the trick; thank you very much

      Erik

      Wafa Lakdhar

      unread,
      Jun 7, 2015, 2:24:46 AM6/7/15
      to foss...@googlegroups.com
      hi Erik,
       
      Me too , I found that the $TOMCAT_HOME/conf/Catalina/localhost/ directory is empty. 

      i tried this command GRANT SELECT, INSERT, UPDATE, DELETE ON epcis.* TO 'epcis'@'localhost' IDENTIFIED BY  'epcis' ;
      but it dosn't work .

      Your help would be greatly appreciated.
      thanks in advance



      djbur...@gmail.com

      unread,
      Jun 8, 2015, 8:41:05 AM6/8/15
      to foss...@googlegroups.com
      Hmm... my catalina/localhost directory is still empty, yet everything seems to be working just fine...!

      There's clearly something else going on for you, Erik.

      Regards,
      Dave
      Reply all
      Reply to author
      Forward
      0 new messages