You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Prashant Bhat <pr...@gmail.com> on 2007/11/27 08:39:42 UTC
schema property is not used in the latest build?
Hi,
I'm currently using openjpa-1.1.0-SNAPSHOT-r420667:585269, with
'openjpa.jdbc.Schema' property set to our database schema. As I tried
migrating to the latest build, jpa queries don't use this schema info
and the Runtime Trace log also doesn't show this property(It shows
with the older(above) version). So I had to revert back to the earlier
version.
Full configuration properties inside Spring looks like this:
<property name="jpaPropertyMap">
<map>
<entry key="openjpa.MaxFetchDepth" value="1" />
<entry key="openjpa.jdbc.Schema" value="myschema" />
<entry key="openjpa.jdbc.MappingDefaults"
value="jpa(ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict)"
/>
<entry key="openjpa.Log" value="DefaultLevel=WARN,
Runtime=TRACE, SQL=TRACE" />
<entry key="openjpa.jdbc.DBDictionary"
value="org.apache.openjpa.jdbc.sql.H2Dictionary" />
</map>
</property>
Has schema configuration changed recently? Or is this a bug?
Thanks for any pointers.
Prashant
Re: schema property is not used in the latest build?
Posted by pl...@gmail.com.
Hi,
I think that I made that change as part of the changes to handle
serialization of EntityManagers. However, issues with BrokerFactory
caching based on full properties, so I switched to just use the
configuration's id. So, it's probably fine to just revert that one
change.
-Patrick
On 11/27/07, Prashant Bhat <pr...@gmail.com> wrote:
> I've finally found the place where properties passed were getting removed.
> In r597155 this change is made. see
> http://fisheye6.cenqua.com/browse/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java?r1=577164&r2=597155
> That block of code is:
> // now warn if there are any remaining properties that there
> // is an unhandled prop, and remove the unknown properties
> Map.Entry entry;
> for (Iterator itr = remaining.entrySet().iterator(); itr.hasNext();)
> {
> entry = (Map.Entry) itr.next();
> Object key = entry.getKey();
> if (key != null) {
> warnInvalidProperty((String) key);
> map.remove(key);
> }
> }
>
> I've not tried to debug further to identify why those
> properties(mentioned in my previous post) are not
> recognised as standard properties.
>
> I've reverted the above change and my application is working again.
>
> So my question is: are those property names changed or the way I pass
> it is wrong or there is problem in recognising these properties as
> standard properties?
>
> Regards,
> Prashant
>
--
Patrick Linskey
202 669 5907
Re: schema property is not used in the latest build?
Posted by Prashant Bhat <pr...@gmail.com>.
I've finally found the place where properties passed were getting removed.
In r597155 this change is made. see
http://fisheye6.cenqua.com/browse/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java?r1=577164&r2=597155
That block of code is:
// now warn if there are any remaining properties that there
// is an unhandled prop, and remove the unknown properties
Map.Entry entry;
for (Iterator itr = remaining.entrySet().iterator(); itr.hasNext();) {
entry = (Map.Entry) itr.next();
Object key = entry.getKey();
if (key != null) {
warnInvalidProperty((String) key);
map.remove(key);
}
}
I've not tried to debug further to identify why those
properties(mentioned in my previous post) are not
recognised as standard properties.
I've reverted the above change and my application is working again.
So my question is: are those property names changed or the way I pass
it is wrong or there is problem in recognising these properties as
standard properties?
Regards,
Prashant
Re: schema property is not used in the latest build?
Posted by Prashant Bhat <pr...@gmail.com>.
Also I tried with MappingTool and this works properly the same way as
in the older version.
So probably, it is related to the way properties are passed during emf creation.
Prashant
On Nov 28, 2007 1:28 PM, Prashant Bhat <pr...@gmail.com> wrote:
> I further compared the Runtime.Trace outputs of these versions and I
> find the following properties missing in the latest:
> openjpa.jdbc.DBDictionary: org.apache.openjpa.jdbc.sql.H2Dictionary
> openjpa.jdbc.Schema: myschema
> openjpa.jdbc.MappingDefaults:
> jpa(ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict)
>
> I've set these properties explicitly in my configuration(PS my
> previous post), I think, it should have been shown.
>
> As I really need to use the latest version(with fixes like
> OPENJPA-446), I'll be thankfull for any help regarding this.
>
> Thanks,
> Prashant
>
Re: schema property is not used in the latest build?
Posted by Prashant Bhat <pr...@gmail.com>.
I further compared the Runtime.Trace outputs of these versions and I
find the following properties missing in the latest:
openjpa.jdbc.DBDictionary: org.apache.openjpa.jdbc.sql.H2Dictionary
openjpa.jdbc.Schema: myschema
openjpa.jdbc.MappingDefaults:
jpa(ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict)
I've set these properties explicitly in my configuration(PS my
previous post), I think, it should have been shown.
As I really need to use the latest version(with fixes like
OPENJPA-446), I'll be thankfull for any help regarding this.
Thanks,
Prashant