[
https://issues.apache.org/jira/browse/OPENJPA-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved OPENJPA-786.
-------------------------------------
Resolution: Fixed
Already fixed on master: DistributedJDBCConfigurationImpl.createSliceProperties
(580-600) maps openjpa.slice.<name>.* keys into each slice's config, and
verifyDataSource (431-432, reworked in 2009 after the report) connects with
that slice's ConnectionUserName/Password. Closing; please reopen if this still
happens with OpenJPA 4.x.
> slices documentation needs to mention requirement for global username/password
> ------------------------------------------------------------------------------
>
> Key: OPENJPA-786
> URL: https://issues.apache.org/jira/browse/OPENJPA-786
> Project: OpenJPA
> Issue Type: Bug
> Components: slice
> Affects Versions: 2.0.0-M2
> Reporter: Fernando Padilla
> Assignee: Pinaki Poddar
> Priority: Major
>
> Reading the Slices documentation, it looks like you should be able to
> configure a UserName/Password for each slice, but in reality it doesn't
> support that. It only supports one UserName/Password globally:
> So you can't do:
> > openjpa.slice.Slice1.ConnectionPassword=########
> > openjpa.slice.Slice1.ConnectionUserName=dbuser_protrade
> > openjpa.slice.Slice2.ConnectionPassword=########
> > openjpa.slice.Slice2.ConnectionUserName=dbuser_protrade
> You can only do:
> > openjpa.slice.ConnectionPassword=########
> > openjpa.slice.ConnectionUserName=dbuser_protrade
> So.. it looks like slices does not support a username/password per slice. It
> requires a global username/password. And the documentation doesn't make it
> clear at all. You might want to review that section again. And make it
> really clear that you HAVE to define global username/password.
> Fernando Padilla wrote:
> > 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.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)