title: Moving Java (Spring, Hibernate, MySql) project from Windows to Debian
body: <p>I am writing project on Windows (IntelliJIdea), and all OK. It compiles, and runs. But when I try to run on Debian(GNU/Linux 5.0), I have <br></p>
  
  <p><code> SEVERE: Access denied for user 'root'@'localhost' (using password: YES)<br>
       [java] 30.11.2010 15:39:04 org.hibernate.cfg.SettingsFactory buildSettings<br>
       [java] WARNING: Could not obtain connection to query metadata<br>
       [java] java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)<br>
       [java]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)<br>
       [java]     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)<br>
       [java]     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)<br>
       [java]     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)<br></code></p>
  
  <p>I use such Spring config:<br></p>
  
  <pre><code>&lt;bean id="mySqlDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver"/&gt;
      &lt;property name="url" value="jdbc:mysql://127.0.0.1:3306/mydb"/&gt;
      &lt;property name="username" value="mydb"/&gt;
      &lt;property name="password" value="Fallout_3"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="mySqlSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
      &lt;property name="dataSource" ref="mySqlDataSource"/&gt;
  
      &lt;property name="mappingResources"&gt;
          &lt;list&gt;
              &lt;value&gt;entities/ClientPrices.hbm.xml&lt;/value&gt;
              &lt;value&gt;entities/User.hbm.xml&lt;/value&gt;
              &lt;value&gt;entities/Provider.hbm.xml&lt;/value&gt;
              &lt;value&gt;entities/MessageQueue.hbm.xml&lt;/value&gt;
              &lt;value&gt; hibernate/SimpleEntity.hbm.xml&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  
      &lt;property name="hibernateProperties"&gt;
          &lt;value&gt;
              hibernate.dialect=org.hibernate.dialect.MySQLDialect
              hibernate.show_sql=true
              hibernate.hbm2ddl.auto=create
              hibernate.current_session_context_class=thread
          &lt;/value&gt;
      &lt;/property&gt;
  
  &lt;/bean&gt;
  </code></pre>