sql server - java.sql.SQLException: Login failed for user -
i'm trying configure hibernate connect ms sql server 2005 management studio express, can't login. have searched everywhere solution, cant find can find helpful.
i know password , username correct, dont seem work. if can help, appreciate it.
this configuration file:
<?xml version="1.0" encoding="utf-8"?> <!doctype hibernate-configuration public "-//hibernate/hibernate configuration dtd 3.0//en" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!-- database connection settings --> <property name="connection.driver_class">net.sourceforge.jtds.jdbc.driver</property> <property name="connection.url">jdbc:jtds:sqlserver://***********/**********; databasename=scores</property> <property name="connection.username">*****</property> <property name="connection.password">******</property> <!-- jdbc connection pool (use built-in) --> <property name="connection.pool_size">1</property> <!-- sql dialect --> <property name="dialect">org.hibernate.dialect.sqlserverdialect</property> <!-- enable hibernate's automatic session context management --> <property name="current_session_context_class">thread</property> <!-- disable second-level cache --> <property name="cache.provider_class">org.hibernate.cache.nocacheprovider</property> <!-- echo executed sql stdout --> <property name="show_sql">true</property> <!-- drop , re-create database schema on startup --> <property name="hbm2ddl.auto">update</property> <!-- mapping files --> <mapping resource="player.hbm.xml"/> </session-factory> </hibernate-configuration> this output (its long, have included small part of it)
50 [http-bio-8080-exec-10] info org.hibernate.cfg.environment - hibernate 3.3.2.ga 54 [http-bio-8080-exec-10] info org.hibernate.cfg.environment - hibernate.properties not found 59 [http-bio-8080-exec-10] info org.hibernate.cfg.environment - bytecode provider name : javassist 83 [http-bio-8080-exec-10] info org.hibernate.cfg.environment - using jdk 1.4 java.sql.timestamp handling 278 [http-bio-8080-exec-10] info org.hibernate.cfg.configuration - configuring resource: /hibernate.cfg.xml 278 [http-bio-8080-exec-10] info org.hibernate.cfg.configuration - configuration resource: /hibernate.cfg.xml 1373 [http-bio-8080-exec-10] info org.hibernate.cfg.configuration - reading mappings resource : player.hbm.xml 1480 [http-bio-8080-exec-10] info org.hibernate.cfg.hbmbinder - mapping class: database.player -> users 1525 [http-bio-8080-exec-10] info org.hibernate.cfg.configuration - configured sessionfactory: null 1697 [http-bio-8080-exec-10] info org.hibernate.connection.drivermanagerconnectionprovider - using hibernate built-in connection pool (not production use!) 1697 [http-bio-8080-exec-10] info org.hibernate.connection.drivermanagerconnectionprovider - hibernate connection pool size: 1 1697 [http-bio-8080-exec-10] info org.hibernate.connection.drivermanagerconnectionprovider - autocommit mode: false 1700 [http-bio-8080-exec-10] info org.hibernate.connection.drivermanagerconnectionprovider - using driver: net.sourceforge.jtds.jdbc.driver @ url: jdbc:jtds:sqlserver:// 50 [http-bio-8080-exec-10] info org.hibernate.cfg.environment - hibernate 3.3.2.ga 54 [http-bio-8080-exec-10] info org.hibernate.cfg.environment - hibernate.properties not found 59 [http-bio-8080-exec-10] info org.hibernate.cfg.environment - bytecode provider name : javassist 83 [http-bio-8080-exec-10] info org.hibernate.cfg.environment - using jdk 1.4 java.sql.timestamp handling 278 [http-bio-8080-exec-10] info org.hibernate.cfg.configuration - configuring resource: /hibernate.cfg.xml 278 [http-bio-8080-exec-10] info org.hibernate.cfg.configuration - configuration resource: /hibernate.cfg.xml 1373 [http-bio-8080-exec-10] info org.hibernate.cfg.configuration - reading mappings resource : player.hbm.xml 1480 [http-bio-8080-exec-10] info org.hibernate.cfg.hbmbinder - mapping class: database.player -> users 1525 [http-bio-8080-exec-10] info org.hibernate.cfg.configuration - configured sessionfactory: null 1697 [http-bio-8080-exec-10] info org.hibernate.connection.drivermanagerconnectionprovider - using hibernate built-in connection pool (not production use!) 1697 [http-bio-8080-exec-10] info org.hibernate.connection.drivermanagerconnectionprovider - hibernate connection pool size: 1 1697 [http-bio-8080-exec-10] info org.hibernate.connection.drivermanagerconnectionprovider - autocommit mode: false 1700 [http-bio-8080-exec-10] info org.hibernate.connection.drivermanagerconnectionprovider - using driver: net.sourceforge.jtds.jdbc.driver @ url: jdbc:jtds:sqlserver://********-pc/*********; databasename=scores 1700 [http-bio-8080-exec-10] info org.hibernate.connection.drivermanagerconnectionprovider - connection properties: {user=****, password=****} 2169 [http-bio-8080-exec-10] warn org.hibernate.cfg.settingsfactory - not obtain connection query metadata java.sql.sqlexception: login failed user '****'. @ net.sourceforge.jtds.jdbc.sqldiagnostic.adddiagnostic(sqldiagnostic.java:372) @ net.sourceforge.jtds.jdbc.tdscore.tdserrortoken(tdscore.java:2893) @ net.sourceforge.jtds.jdbc.tdscore.nexttoken(tdscore.java:2335) @ net.sourceforge.jtds.jdbc.tdscore.login(tdscore.java:609) @ net.sourceforge.jtds.jdbc.jtdsconnection.<init>(jtdsconnection.java:369) @ net.sourceforge.jtds.jdbc.driver.connect(driver.java:183) @ java.sql.drivermanager.getconnection(unknown source) @ java.sql.drivermanager.getconnection(unknown source); databasename=scores 1700 [http-bio-8080-exec-10] info org.hibernate.connection.drivermanagerconnectionprovider - connection properties: {user=****, password=****} 2169 [http-bio-8080-exec-10] warn org.hibernate.cfg.settingsfactory - not obtain connection query metadata java.sql.sqlexception: login failed user '****'. @ net.sourceforge.jtds.jdbc.sqldiagnostic.adddiagnostic(sqldiagnostic.java:372) @ net.sourceforge.jtds.jdbc.tdscore.tdserrortoken(tdscore.java:2893) @ net.sourceforge.jtds.jdbc.tdscore.nexttoken(tdscore.java:2335) @ net.sourceforge.jtds.jdbc.tdscore.login(tdscore.java:609) @ net.sourceforge.jtds.jdbc.jtdsconnection.<init>(jtdsconnection.java:369) @ net.sourceforge.jtds.jdbc.driver.connect(driver.java:183) @ java.sql.drivermanager.getconnection(unknown source) @ java.sql.drivermanager.getconnection(unknown source) 3293 [http-bio-8080-exec-10] error org.hibernate.tool.hbm2ddl.schemaupdate - not complete schema update java.sql.sqlexception: login failed user '*****'. @ net.sourceforge.jtds.jdbc.sqldiagnostic.adddiagnostic(sqldiagnostic.java:372) @ net.sourceforge.jtds.jdbc.tdscore.tdserrortoken(tdscore.java:2893) @ net.sourceforge.jtds.jdbc.tdscore.nexttoken(tdscore.java:2335) @ net.sourceforge.jtds.jdbc.tdscore.login(tdscore.java:609) @ net.sourceforge.jtds.jdbc.jtdsconnection.<init>(jtdsconnection.java:369) @ net.sourceforge.jtds.jdbc.driver.connect(driver.java:183) @ java.sql.drivermanager.getconnection(unknown source) @ java.sql.drivermanager.getconnection(unknown source) 3447 [http-bio-8080-exec-10] warn org.hibernate.util.jdbcexceptionreporter - sql error: 18456, sqlstate: 28000 3447 [http-bio-8080-exec-10] error org.hibernate.util.jdbcexceptionreporter - login failed user '*****'. org.hibernate.exception.genericjdbcexception: cannot open connection @ org.hibernate.exception.sqlstateconverter.handlednonspecificexception(sqlstateconverter.java:126) @ org.hibernate.exception.sqlstateconverter.convert(sqlstateconverter.java:114) @ org.hibernate.exception.jdbcexceptionhelper.convert(jdbcexceptionhelper.java:66) @ org.hibernate.exception.jdbcexceptionhelper.convert(jdbcexceptionhelper.java:52) @ org.hibernate.jdbc.connectionmanager.openconnection(connectionmanager.java:449) @ org.hibernate.jdbc.connectionmanager.getconnection(connectionmanager.java:167) @ org.hibernate.jdbc.jdbccontext.connection(jdbccontext.java:142) @ org.hibernate.transaction.jdbctransaction.begin(jdbctransaction.java:85) @ org.hibernate.impl.sessionimpl.begintransaction(sessionimpl.java:1354) @ database.scoredb.addplayerscore(scoredb.java:17)
try driver , check if works, maybe. use 1 , works:
com.microsoft.sqlserver.jdbc.sqlserverdriver to connect:
jdbc:sqlserver://server[\\instance];databasename=dbname if still not working, check if missed config or it's bad spelled, seems should work.
Comments
Post a Comment