Pinaki Poddar wrote:
>
> Hi,
>> 1) if i don't put this property "openjpa.ConnectionURL" it doesn't work,
>> i think that is not necessary if i > configure slices, am i correct?
> Yes. If each slice connection properties are specified independently then
> you do not need openjpa.Connection* properties. They act as defaults for
> slices that do not have their connection property set. For example, if you
> have 5 slices running with same JDBC driver, you can just specify
> openjpa.ConnectionDriverName instead of specifying it for each slices.
> What error do you see if you do not specify openjpa.ConnectionURL in
> this case?
>
>> 2) I put the property "<property name="openjpa.slice.Names"
>> value="SQLSERVER,MYSQL"/>" but i catch > this error
>
> The error seems to suggest that slice URLs are configured properly, but
> OpenJPA failed to get a connection to the data source -- a possibility is
> wrong user/password credential. Will you please double check those
> details?
>
>
If i don't use "openjpa.ConnectionURL" this error appears for me
--------------------------------------------------------------------------------------------------------------------------------
0 PersistenceUnit INFO [main] openjpa.Runtime - Detected slices
"[SQLSERVER, MYSQL]" in configuration.
94 PersistenceUnit INFO [main] openjpa.Runtime - Starting OpenJPA Slice
1.2.0
Exception in thread "main" <openjpa-1.2.0-r422266:683325 fatal user error>
org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or
DataSource class name must be specified in the ConnectionDriverName
property.
at
org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource (
DataSourceFactory.java:74)
at
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory (
JDBCConfigurationImpl.java:784)
at
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance (
JDBCConfigurationImpl.java:561)
at
org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration (
MappingRepository.java:1265)
at
org.apache.openjpa.lib.conf.Configurations.configureInstance (
Configurations.java:505)
at
org.apache.openjpa.lib.conf.Configurations.configureInstance (
Configurations.java:430)
at
org.apache.openjpa.lib.conf.PluginValue.instantiate (
PluginValue.java:103)
at
org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate (
MetaDataRepositoryValue.java:68)
at
org.apache.openjpa.lib.conf.ObjectValue.instantiate (
ObjectValue.java:83)
at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance (
OpenJPAConfigurationImpl.java:863)
at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance (
OpenJPAConfigurationImpl.java:854)
at
org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly (
AbstractBrokerFactory.java:638)
at
org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker (
AbstractBrokerFactory.java:183)
at
org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker (
DelegatingBrokerFactory.java:142)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager (
EntityManagerFactoryImpl.java:192)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager (
EntityManagerFactoryImpl.java:145)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager (
EntityManagerFactoryImpl.java:56)
Yes, i made a test with the data sources separately, without the Slice, with
only "openjpa.ConnectionURL", both works.
I don't know if this properties are correct, because i follow the example of
"openjpa.ConnectionUserName", in the site
"http://people.apache.org/~ppoddar/slice/site/index.html", these properties
doesn't exists. I put because a think that is correct, but i don't know.
<property name="openjpa.slice.SQLSERVER.ConnectionUserName" value="sa"/>
<property name="openjpa.slice.SQLSERVER.ConnectionPassword"
value="testando123"/>
thanks
--
Sent from the OpenJPA Users mailing list archive at Nabble.com.