So starting to walk through all the logs, it looks like username and password are null?? The log is below, saying mysql is not getting a username/password. But I am properly setting the configuration for each slice:

openjpa.slice.Slice1.ConnectionPassword=########
openjpa.slice.Slice1.ConnectionUserName=dbuser_protrade


But combing through the logs, it looks like the properties that it runs with (it gets logged by openjpa for some reason) do not contain proper database information. If you look for "Properties:", you'll see two of them. The first one loads up a normal non-slice database. The second loads up the slices. The Properties for the first one has ConnectionURL, ConnectionUserName, ConnectionPassword, while the one for slices does not.

So I'm close to figuring out what's wrong.




Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Access denied for user ''@'%' to database 'vwill_fandom'
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1026)
        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.ConnectionImpl.getInstance(ConnectionImpl.java:298)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282) at org.apache.openjpa.jdbc.schema.SimpleDriverDataSource.getConnection(SimpleDriverDataSource.java:81) at org.apache.openjpa.jdbc.schema.SimpleDriverDataSource.getConnection(SimpleDriverDataSource.java:60) at org.apache.openjpa.lib.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:112) at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:93) at org.apache.openjpa.slice.jdbc.DistributedDataSource.getConnection(DistributedDataSource.java:81) at org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java:234)




Fernando Padilla wrote:
So, I am now trying to use slices, but it's not working. :(

attached is a log file of my run (it has openjpa at TRACE).

I am experimenting with a very simple configuration (a single slice and
2.0.0-SNAPSHOT), but it ultimately throws an exception:  "A connection
could not be obtained for driver class "com.mysql.jdbc.Driver" and URL
"null".  You may have specified an invalid URL."

But the weird thing, is that just a few lines earlier, it looks like
OpenJPA did have a url:

openjpa.Runtime - Connecting to slice "Slice1" at URL
"jdbc:mysql://stage2/vwill_fandom"




So any ideas on what I'm doing wrong??

This happened with all configurations I tried: one slice, two slices, v
1.2.0, v 1.2.1-SNAPSHOT, v 2.0.0-SNAPSHOT.

Reply via email to