facebook

Hibernate project – works on desktop not laptop

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #317115 Reply

    Nigel Schoon
    Participant

    Both machines are windows 7 ultimate 32x. The project was created in ME8.6 when machines ran XP SP3, this week both are now ME9. It runs fine on the desktop but gives all these errors on the laptop. The programs on each machine are the same, MySQL etc.

    Could the cause be that I synch the data from desktop to laptop, including the eclipse workspace folder – are there machine specific entries in the config there?
    I have corrected the pw in the hibernate.cfg.xml for the connection.

    My logon has full permissions on the workspace folder.

    errors are:

    Exception in thread “main” org.hibernate.exception.GenericJDBCException: Cannot open connection
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
    at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
    at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
    at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
    at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354)
    at imports.TransImport.addTranslations(TransImport.java:88)
    at imports.TransImport.main(TransImport.java:19)
    Caused by: java.sql.SQLException: Access denied for user ‘root’@’localhost’ (using password: YES)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:935)
    at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4101)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1300)
    at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2337)
    at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2370)
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2154)
    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:154)
    at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
    … 6 more

    thank you

    #317134 Reply

    support-swapna
    Moderator

    Nigel_VS,

    Your application uses the connection settings that are specified in the configuration file to connect to the MySQL database.

    1) Can you check if you are able to connect to the database on the laptop from the MyEclipse DB Browser view ?

    2) Attached is the screenshot for the MySQL connector for your reference.

    Let me know how this works for you.

    Attachments:
    You must be logged in to view attached files.
    #317140 Reply

    Nigel Schoon
    Participant

    there was a problem with a path relevant to the other machine in “driver jars”, this has been corrected. I can attach to the mysql db thru’ DB browser in ME, drill into the tables and create a new table ok. The list of error codes appears the same. How do i check the hibernate jars are all ok?
    thanks

    #317156 Reply

    support-swapna
    Moderator

    Nigel_VS,

    I am afraid this is an issue with the application code.

    1) Can you recheck your connection string , user and password for any extra spaces/characters in the hibernate.cfg.xml?

    2) Is it the same project which is running fine on the desktop ? Are both the machines running on Windows ?

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Hibernate project – works on desktop not laptop

You must be logged in to post in the forum log in