Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.sql.SQLSyntaxErrorException: Invalid default value for 'creationDate' #91

Open
Vitaliy-1 opened this issue Jun 7, 2017 · 2 comments

Comments

@Vitaliy-1
Copy link

Vitaliy-1 commented Jun 7, 2017

Greetings,
I am trying to deploy wombat, rhino and content-repo on tomcat using Quickstart Guide and get problems with the latter.
Receive the following error:
Error creating bean with name 'sqlService' defined in org.plos.repo.config.SpringConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.plos.repo.service.SqlService]: Factory method 'sqlService' threw exception; nested exception is java.sql.SQLSyntaxErrorException: Invalid default value for 'creationDate'
Using latest mysql connector (maybe problem is in it? if so what version is preferred? )

just in case my context.xml:

<Resource name="jdbc/AmbraDS"
            auth="Container"
            type="javax.sql.DataSource"
            factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
            validationQuery="SELECT 1"
            testOnBorrow="true"
            driverClassName="com.mysql.jdbc.Driver"
            username="root"
            password="*"
            url="jdbc:mysql://localhost:3306/ambra?useLegacyDatetimeCode=false&amp;serverTimezone=UTC&amp;useSSL=false"/>

  <!-- Local Crepo -->
  <Resource name="ambra/FileStore"
            type="org.ambraproject.filestore.FileStoreService"
            factory="org.ambraproject.filestore.impl.ContentRepoFactory"
            repoServer="http://localhost:8081"
            bucketName="corpus"/>

  <Resource name="repo/objectStore"
            type="org.plos.repo.service.ObjectStore"
            factory="org.plos.repo.config.FileSystemStoreFactory"
            dataDirectory="/etc/ambra/crepo_datastore"/> <!--crepo datastore directory. See the Quickstart-Guide - "Compiling Content Repo (crepo)" -->

  <Resource name="jdbc/repoDB"
            auth="Container"
            type="javax.sql.DataSource"
            factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
            validationQuery="SELECT 1"
            testOnBorrow="true"
            driverClassName="com.mysql.jdbc.Driver"
            username="root"
            password="*"
            url="jdbc:mysql://localhost:3306/repo?useLegacyDatetimeCode=false&amp;serverTimezone=UTC&amp;useSSL=false"/>
@sjtower
Copy link
Contributor

sjtower commented Jun 7, 2017

Hi Vitaly,
Have you installed mysql and created the ambra database based on the schema we provide?
We don't have any columns with the name "creationDate" so it seems like something is wrong with the database schema you are using.
edit: sorry, didn't realize this problem is with the repo database, not the ambra database. I will look into this further.

@Lory9098
Copy link

Lory9098 commented Mar 9, 2024

bro is not gonna look into this further 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants