You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Tuna Ozkasap <tu...@gmail.com> on 2005/11/14 12:08:00 UTC

type mismatch

Hi Everyone,

Here is my problem; when I create the PersistenceBroker instance by
----------------------------------------------------------------------------------------------------
PBKey pbKey = new PBKey("default");
broker = PersistenceBrokerFactory.createPersistenceBroker(pbKey);
----------------------------------------------------------------------------------------------------
I get error of mismatching type;

[org.apache.ojb.broker.metadata.RepositoryXmlHandler] ERROR: Exception while
read metadata
Can't assign the specified jdbc field-type 'BIGINT' for field:
<field-descriptor
name="maxKey"
column="MAX_KEY"
jdbc-type="BIGINT"
access="readwrite"
/>

this mapping is in the repository_internal.xml, it is not my mapping, it is
a default mapping by OJB.
Though it gives an error, what can be the problem? Thank you for your help.
--
Tuna Ozkasap
Yazılım Mühendisi
Trend-Tech Cyberpark

Re: type mismatch

Posted by Tuna Ozkasap <tu...@gmail.com>.
I found the problem and I think everyone would be interested in this one,
theproblem was caused from Locale setting.
a Locale related method String.toLowerCase() caused the problem for example

BIGINT should be "bigint" when its case is lowered, but in Turkish it is
retruned to "bıgınt" so the mappings are read
falsely if you happen to encounter this kind of a problem consider Locale
setting first.

Best Regards,



On 11/14/05, Armin Waibel <ar...@apache.org> wrote:
>
> Hi Tuna,
>
> please could you post the whole stack trace, then we can find the root
> exception.
>
> regards,
> Armin
>
> Tuna Ozkasap wrote:
> > Hi Everyone,
> >
> > Here is my problem; when I create the PersistenceBroker instance by
> >
> ----------------------------------------------------------------------------------------------------
> > PBKey pbKey = new PBKey("default");
> > broker = PersistenceBrokerFactory.createPersistenceBroker(pbKey);
> >
> ----------------------------------------------------------------------------------------------------
> > I get error of mismatching type;
> >
> > [org.apache.ojb.broker.metadata.RepositoryXmlHandler] ERROR: Exception
> while
> > read metadata
> > Can't assign the specified jdbc field-type 'BIGINT' for field:
> > <field-descriptor
> > name="maxKey"
> > column="MAX_KEY"
> > jdbc-type="BIGINT"
> > access="readwrite"
> > />
> >
> > this mapping is in the repository_internal.xml, it is not my mapping, it
> is
> > a default mapping by OJB.
> > Though it gives an error, what can be the problem? Thank you for your
> help.
> > --
> > Tuna Ozkasap
> > Yazılım Mühendisi
> > Trend-Tech Cyberpark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


--
Tuna Ozkasap
Yazılım Mühendisi
Trend-Tech Cyberpark

Re: type mismatch

Posted by Armin Waibel <ar...@apache.org>.
Hi Tuna,

please could you post the whole stack trace, then we can find the root 
exception.

regards,
Armin

Tuna Ozkasap wrote:
> Hi Everyone,
> 
> Here is my problem; when I create the PersistenceBroker instance by
> ----------------------------------------------------------------------------------------------------
> PBKey pbKey = new PBKey("default");
> broker = PersistenceBrokerFactory.createPersistenceBroker(pbKey);
> ----------------------------------------------------------------------------------------------------
> I get error of mismatching type;
> 
> [org.apache.ojb.broker.metadata.RepositoryXmlHandler] ERROR: Exception while
> read metadata
> Can't assign the specified jdbc field-type 'BIGINT' for field:
> <field-descriptor
> name="maxKey"
> column="MAX_KEY"
> jdbc-type="BIGINT"
> access="readwrite"
> />
> 
> this mapping is in the repository_internal.xml, it is not my mapping, it is
> a default mapping by OJB.
> Though it gives an error, what can be the problem? Thank you for your help.
> --
> Tuna Ozkasap
> Yazılım Mühendisi
> Trend-Tech Cyberpark

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org