Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Required clear db string to connect java application

Required clear db string to connect java application

We are not able to connect clear db from java application. It was unable to fetch the database.

Please provide the connection strings for jdbc connection string for clear db.

Regard & Thanks
Bhanu
2 people have
this problem
+1
Reply
  • Hello,

    To view your credentials, please go to the Endpoint Information tab of your ClearDB dashboard. There you will find the username, password, db name, and hostname you need to connect to your db.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Hi Michael,


    Thanks for your response. Actually we are looking for sample code to connect clear db.


    The same code we are using to connect local mysql database its working, but the same when we map to clear db its not working


    Any difference for connecting to local db and clear db service?


    Thanks & Regards

    Bhan
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Hello,

    We use standard mysql, version 5.5. No special syntax or code is required.

    If you're still having difficulty, please open a Support ticket in our system. Our team can look at your account and give you more specific assistance.

    Thanks.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Hi,

    This is error log while connecting cleardb from java application, using jdbc drivers.

    #Database configuration String
    javax.persistence.jdbc.url=jdbc:mysql://xxxxxxxxx.net:3306/databasename
    javax.persistence.jdbc.user=Username
    javax.persistence.jdbc.password=Password
    javax.persistence.jdbc.driver=com.mysql.jdbc.Driver
    hibernate.cache.use_second_level_cache=false

    25-10-2016 16:25:17 DEBUG DaoLibrary:38 - DaoLibrary constructor
    25-10-2016 16:25:17 DEBUG DaoLibrary:47 - password: xxxxxxx
    25-10-2016 16:25:17 ERROR DaoLibrary:63 - createEntity- exception:Exception [EclipseLink-7107] (Eclipse Persistence Services - 2.6.3.v20160428-59c81c5): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Error encountered during string decryption.
    Internal Exception: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher
    25-10-2016 16:25:17 DEBUG DaoLibrary:306 - getAll- cl:class com.company.entities.xxxTemplate
    25-10-2016 16:25:17 ERROR DaoLibrary:316 - getAll- exception:null
    25-10-2016 16:25:17 ERROR EntityService:132 - getEntity- exception:null
    25-10-2016 16:25:17 DEBUG DaoLibrary:38 - DaoLibrary constructor
    25-10-2016 16:25:17 DEBUG DaoLibrary:47 - password: xxxxxx
    25-10-2016 16:25:17 ERROR DaoLibrary:63 - createEntity- exception:Exception [EclipseLink-7107] (Eclipse Persistence Services - 2.6.3.v20160428-59c81c5): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Error encountered during string decryption.
    Internal Exception: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher
    25-10-2016 16:25:17 DEBUG DaoLibrary:306 - getAll- cl:class com.company.entities.xxxTemplate
    25-10-2016 16:25:17 ERROR DaoLibrary:316 - getAll- exception:null
    25-10-2016 16:25:17 ERROR EntityService:132 - getEntity- exception:null

    Thanks & Regards
    Bhanu
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Hello,

    I'm afraid I don't see any mysql-related error there. There's some kind of crypto error but I have no familiarity with the Eclipse library you're using to say further. It seems like you're trying to perform some kind of crypto operation on the password, but I don't understand why you would be doing that.

    I'm sorry I can't be more helpful.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited