Quantcast

Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

classic Classic list List threaded Threaded
5 messages Options
jud
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

jud
init:
Deleting: C:\Users\A\Desktop\JAVA_1\CustomerRecords\build\built-jar.properties
deps-jar:
Updating property file: C:\Users\A\Desktop\JAVA_1\CustomerRecords\build\built-jar.properties
compile:
run:
[TopLink Info]: 2010.12.29 06:32:33.630--ServerSession(24993066)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
Dec 29, 2010 6:32:35 PM org.jdesktop.application.Application$1 run
SEVERE: Application class customerrecords.CustomerRecordsApp failed to launch
Local Exception Stack:
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
Error Code: 1045
        at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:102)
        at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
        at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
        at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
        at customerrecords.CustomerRecordsView.initComponents(CustomerRecordsView.java:380)
        at customerrecords.CustomerRecordsView.<init>(CustomerRecordsView.java:39)
        at customerrecords.CustomerRecordsApp.startup(CustomerRecordsApp.java:19)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
        at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
        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:406)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:100)
        ... 20 more
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class customerrecords.CustomerRecordsApp failed to launch
        at org.jdesktop.application.Application$1.run(Application.java:177)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
Error Code: 1045
        at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:102)
        at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
        at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
        at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
        at customerrecords.CustomerRecordsView.initComponents(CustomerRecordsView.java:380)
        at customerrecords.CustomerRecordsView.<init>(CustomerRecordsView.java:39)
        at customerrecords.CustomerRecordsApp.startup(CustomerRecordsApp.java:19)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        ... 8 more
Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
        at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
        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:406)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:100)
        ... 20 more
BUILD SUCCESSFUL (total time: 18 seconds)

------------------------
JAVA_CLOUD




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

tkellerer

jud wrote:
> Hi, Please can some help me. I downloaded a desktop app project from Netbeans and decided to import it to my application. I moved the database, the drivers and created the user. But the error at the bottom comes up when i run the app.
>
> (stacktrace remove)
>
> Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
>
This is clearly a MySQL problem.
You either provided the wrong username/password or your MySQL server is not setup correctly.

But this is not a NetBeans IDE question, please move this to a MySQL/Java forum




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

Jürgen Link-2
In reply to this post by jud
Most likely, you did not set credentials for your MySQL server. By default, root user does not require a password when connecting from localhost.
You either have to create a New Account with a password or, for a Quick fix, replace localhost by 127.0.0.1

Cheers
Jürgen


 
Am 29.12.2010 um 19:47 schrieb "jud" <[hidden email]>:

> init:
> Deleting: C:\Users\A\Desktop\JAVA_1\CustomerRecords\build\built-jar.properties
> deps-jar:
> Updating property file: C:\Users\A\Desktop\JAVA_1\CustomerRecords\build\built-jar.properties
> compile:
> run:
> [TopLink Info]: 2010.12.29 06:32:33.630--ServerSession(24993066)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
> Dec 29, 2010 6:32:35 PM org.jdesktop.application.Application$1 run
> SEVERE: Application class customerrecords.CustomerRecordsApp failed to launch
> Local Exception Stack:
> Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
> Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
> Error Code: 1045
>        at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
>        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:102)
>        at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
>        at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
>        at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
>        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
>        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
>        at customerrecords.CustomerRecordsView.initComponents(CustomerRecordsView.java:380)
>        at customerrecords.CustomerRecordsView.<init>(CustomerRecordsView.java:39)
>        at customerrecords.CustomerRecordsApp.startup(CustomerRecordsApp.java:19)
>        at org.jdesktop.application.Application$1.run(Application.java:171)
>        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
>        at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
>        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
>        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
>        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
>        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
>        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:406)
>        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
>        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
>        at java.sql.DriverManager.getConnection(DriverManager.java:582)
>        at java.sql.DriverManager.getConnection(DriverManager.java:154)
>        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:100)
>        ... 20 more
> Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class customerrecords.CustomerRecordsApp failed to launch
>        at org.jdesktop.application.Application$1.run(Application.java:177)
>        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> Caused by: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
> Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
> Error Code: 1045
>        at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
>        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:102)
>        at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
>        at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
>        at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
>        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
>        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
>        at customerrecords.CustomerRecordsView.initComponents(CustomerRecordsView.java:380)
>        at customerrecords.CustomerRecordsView.<init>(CustomerRecordsView.java:39)
>        at customerrecords.CustomerRecordsApp.startup(CustomerRecordsApp.java:19)
>        at org.jdesktop.application.Application$1.run(Application.java:171)
>        ... 8 more
> Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
>        at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
>        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
>        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
>        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
>        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
>        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:406)
>        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
>        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
>        at java.sql.DriverManager.getConnection(DriverManager.java:582)
>        at java.sql.DriverManager.getConnection(DriverManager.java:154)
>        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:100)
>        ... 20 more
> BUILD SUCCESSFUL (total time: 18 seconds)
>
> ------------------------
> JAVA_CLOUD
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

duyvenn1
[nbusers] Re: Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

---------------------------------------------------------------
- open RUN (from start)
- CMD (to get a command window)
get into your MYSQL command path - for exmaple:
cd C:\Program Files\MySQL\MySQL Server 5.1\bin
mysql -u root -p
(mysql asks password: enter the current "root" password)
(then reset all root passwords)
UPDATE mysql.user SET Password = PASSWORD('') WHERE User = 'root';
\q
----------------------------------------------------------------
it problaby helps
Erik


Van: Jürgen Link [mailto:[hidden email]]
Verzonden: do 30-12-2010 11:47
Aan: [hidden email]
Onderwerp: [nbusers] Re: Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

Most likely, you did not set credentials for your MySQL server. By default, root user does not require a password when connecting from localhost.
You either have to create a New Account with a password or, for a Quick fix, replace localhost by 127.0.0.1

Cheers
Jürgen



Am 29.12.2010 um 19:47 schrieb "jud" <[hidden email]>:


> init:
> Deleting: C:\Users\A\Desktop\JAVA_1\CustomerRecords\build\built-jar.properties
> deps-jar:
> Updating property file: C:\Users\A\Desktop\JAVA_1\CustomerRecords\build\built-jar.properties
> compile:
> run:
> [TopLink Info]: 2010.12.29 06:32:33.630--ServerSession(24993066)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
> Dec 29, 2010 6:32:35 PM org.jdesktop.application.Application$1 run
> SEVERE: Application class customerrecords.CustomerRecordsApp failed to launch
> Local Exception Stack:
> Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
> Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
> Error Code: 1045
>        at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
>        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:102)
>        at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
>        at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
>        at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
>        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
>        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
>        at customerrecords.CustomerRecordsView.initComponents(CustomerRecordsView.java:380)
>        at customerrecords.CustomerRecordsView.<init>(CustomerRecordsView.java:39)
>        at customerrecords.CustomerRecordsApp.startup(CustomerRecordsApp.java:19)
>        at org.jdesktop.application.Application$1.run(Application.java:171)
>        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
>        at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
>        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
>        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
>        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
>        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
>        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:406)
>        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
>        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
>        at java.sql.DriverManager.getConnection(DriverManager.java:582)
>        at java.sql.DriverManager.getConnection(DriverManager.java:154)
>        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:100)
>        ... 20 more
> Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class customerrecords.CustomerRecordsApp failed to launch
>        at org.jdesktop.application.Application$1.run(Application.java:177)
>        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> Caused by: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
> Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
> Error Code: 1045
>        at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
>        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:102)
>        at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
>        at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
>        at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
>        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
>        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
>        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
>        at customerrecords.CustomerRecordsView.initComponents(CustomerRecordsView.java:380)
>        at customerrecords.CustomerRecordsView.<init>(CustomerRecordsView.java:39)
>        at customerrecords.CustomerRecordsApp.startup(CustomerRecordsApp.java:19)
>        at org.jdesktop.application.Application$1.run(Application.java:171)
>        ... 8 more
> Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
>        at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
>        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
>        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
>        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
>        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
>        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:406)
>        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
>        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
>        at java.sql.DriverManager.getConnection(DriverManager.java:582)
>        at java.sql.DriverManager.getConnection(DriverManager.java:154)
>        at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:100)
>        ... 20 more
> BUILD SUCCESSFUL (total time: 18 seconds)
>
> ------------------------
> JAVA_CLOUD
>
>
>
>

jud
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

jud
In reply to this post by jud
Hi Every One  Thanks for your reply except for tkellerer that does not know that developers use netbeans and mysql to build desktop application. Tkellerer i dont expect you to reply because you rush into conclusion given a wrong answer.
  Please this is what happens(output) when i do a clean and build before the output i sent on the run. I noticed that the mysql jdbc driver was refered to as a directory or could not be read by the compiler. Check out the clean and build below.

init:
deps-clean:
Updating property file: C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\build\built-clean.properties
Deleting directory C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\build
clean:
init:
deps-jar:
Created dir: C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\build
Updating property file: C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\build\built-jar.properties
Created dir: C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\build\classes
Created dir: C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\build\classes\META-INF
Copying 1 file to C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\build\classes\META-INF
Created dir: C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\build\empty
Compiling 14 source files to C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\build\classes
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying 25 files to C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\build\classes
compile:
Created dir: C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\dist
C:\Program Files\NetBeans 6.5\ide10\modules\ext\mysql-connector-java-5.1.6-bin.jar is a directory or can't be read. Not copying the libraries.
Not copying the libraries.
Building jar: C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\dist\CustomerRecords.jar
To run this application from the command line without Ant, try:
java -jar "C:\Users\A\Desktop\nbeansproj_karrox\NetBeansProjects\CustomerRecords\dist\CustomerRecords.jar"
jar:
BUILD SUCCESSFUL (total time: 4 seconds)

------------------------
JAVA_CLOUD




Loading...