Hi!
I have changed the database dialect from 1 to 3!
Now I correctly create the tables, although, my longs are
converter to VARCHAR(250) - When I consult the database with the
Marathon client.
My long mapping is:
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>NUMERIC(18,0)</sql-type>
</mapping>
Is this the expected behaviour?
Thanks again,
Victor Batista
-----Original Message-----
From: David Jencks [mailto:[EMAIL PROTECTED]]
Sent: sexta-feira, 27 de Setembro de 2002 21:12
To: Victor Batista
Subject: Re: [JBoss-user] Firebird - Long mapping error
I don't remember if you can change the dialect of an existing db. Using
the FirebirdManager mbean you can create a new dialect 3 db. You can
also
do this with isql, but I don't remember the syntax. Ask on the firebird
lists or look at the docs.
david jencks
On 2002.09.27 06:11:39 -0400 Victor Batista wrote:
> Hello!
> Thanks for your reply!
> I am a newbie with Firebird. How can I change the dialect from
> "1! To "3".
> Thanks and regards,
> Victor Batista
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of David
> Jencks
> Sent: quinta-feira, 26 de Setembro de 2002 16:51
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Firebird - Long mapping error
>
> The best way is to use a dialect 3 database and the supplied mapping.
> Double precision is a really unsatisfactory way to represent a large
> integer, I suggest if you need to use a dialect 1 db you not use Long.
>
> david jencks
>
> On 2002.09.26 11:07:14 -0400 Victor Batista wrote:
> > Hello!
> > I am using tomcat 3.0.0 with bundled tomcat 4.0.3. I am
> > using the database Firebird (Firebird-1.0.0.796) with the driver
> > FirebirdSQL-1.0_RC1. I am using the InterBase mapping
> which
> > is defined "standardjbosscmp-jdbc.xml" file. I am having problems
> > when I use "long" fields within my CMP entity beans.
> > According to "standardjbosscmp-jdbc.xml", the long mapping is:
> > <mapping>
> > <java-type>java.lang.Long</java-type>
> > <jdbc-type>BIGINT</jdbc-type>
> > <sql-type>NUMERIC(18,0)</sql-type>
> > </mapping>
> >
> > The exception is:
> > org.jboss.deployment.DeploymentException: Error while
> > creating table; - nested throwable:
> > (org.firebirdsql.jdbc.FBSQLException: GDS Exception:
> > org.firebirdsql.gds.GDSException:
> > Dynamic SQL ErrorSQL error code = -817
> > Metadata update statement is not allowed by the current
> > database SQL dialect 1 null ....
> >
> > I have changed "NUMERIC(18,0)" by "DOUBLE PRECISION". I
> have
> > done this, because I tried to create one table from the
> > "Marathon" client with one column "NUMERIC(18,0" and on
> the
> > DB I had the type "Double Precision" for that column.
> >
> > My new mapping:
> > <mapping>
> > <java-type>java.lang.Long</java-type>
> > <jdbc-type>BIGINT</jdbc-type>
> > <sql-type>DOUBLE PRECISION</sql-type>
> > </mapping>
> >
> >
> > Can anyone tell me which is the best way to map Longs
with
> > Firebird?
> >
> >
> > Thanks in advance,
> > Victor Batista
> >
> > <html xmlns:o="urn:schemas-microsoft-com:office:office"
> > xmlns:w="urn:schemas-microsoft-com:office:word"
> > xmlns="http://www.w3.org/TR/REC-html40">
> >
> > <head>
> > <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=us-ascii">
> >
> >
> > <meta name=ProgId content=Word.Document>
> > <meta name=Generator content="Microsoft Word 10">
> > <meta name=Originator content="Microsoft Word 10">
> > <link rel=File-List href="cid:[EMAIL PROTECTED]">
> > <!--[if gte mso 9]><xml>
> > <o:OfficeDocumentSettings>
> > <o:DoNotRelyOnCSS/>
> > </o:OfficeDocumentSettings>
> > </xml><![endif]--><!--[if gte mso 9]><xml>
> > <w:WordDocument>
> > <w:SpellingState>Clean</w:SpellingState>
> > <w:GrammarState>Clean</w:GrammarState>
> > <w:DocumentKind>DocumentEmail</w:DocumentKind>
> > <w:EnvelopeVis/>
> > <w:Compatibility>
> > <w:BreakWrappedTables/>
> > <w:SnapToGridInCell/>
> > <w:WrapTextWithPunct/>
> > <w:UseAsianBreakRules/>
> > </w:Compatibility>
> > <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
> > </w:WordDocument>
> > </xml><![endif]-->
> > <style>
> > <!--
> > /* Style Definitions */
> > p.MsoNormal, li.MsoNormal, div.MsoNormal
> > {mso-style-parent:"";
> > margin:0in;
> > margin-bottom:.0001pt;
> > mso-pagination:widow-orphan;
> > font-size:12.0pt;
> > font-family:"Times New Roman";
> > mso-fareast-font-family:"Times New Roman";
> > mso-ansi-language:PT;}
> > a:link, span.MsoHyperlink
> > {color:blue;
> > text-decoration:underline;
> > text-underline:single;}
> > a:visited, span.MsoHyperlinkFollowed
> > {color:purple;
> > text-decoration:underline;
> > text-underline:single;}
> > span.EmailStyle17
> > {mso-style-type:personal-compose;
> > mso-style-noshow:yes;
> > mso-ansi-font-size:10.0pt;
> > mso-bidi-font-size:10.0pt;
> > font-family:Arial;
> > mso-ascii-font-family:Arial;
> > mso-hansi-font-family:Arial;
> > mso-bidi-font-family:Arial;
> > color:windowtext;}
> > span.SpellE
> > {mso-style-name:"";
> > mso-spl-e:yes;}
> > @page Section1
> > {size:8.5in 11.0in;
> > margin:1.0in 1.25in 1.0in 1.25in;
> > mso-header-margin:.5in;
> > mso-footer-margin:.5in;
> > mso-paper-source:0;}
> > div.Section1
> > {page:Section1;}
> > -->
> > </style>
> > <!--[if gte mso 10]>
> > <style>
> > /* Style Definitions */
> > table.MsoNormalTable
> > {mso-style-name:"Table Normal";
> > mso-tstyle-rowband-size:0;
> > mso-tstyle-colband-size:0;
> > mso-style-noshow:yes;
> > mso-style-parent:"";
> > mso-padding-alt:0in 5.4pt 0in 5.4pt;
> > mso-para-margin:0in;
> > mso-para-margin-bottom:.0001pt;
> > mso-pagination:widow-orphan;
> > font-size:10.0pt;
> > font-family:"Times New Roman";}
> > </style>
> > <![endif]-->
> > </head>
> >
> > <body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
> >
> > <div class=Section1>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> >
>
font-family:Arial;mso-ansi-language:EN-US'>Hello!<o:p></o:p></span></fon
> t></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>I
> > am using tomcat 3.0.0 with bundled tomcat 4.0.3. I am using the
> database
> > Firebird (Firebird-1.0.0.796) with the
> > driver<o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>FirebirdSQL-1.0_RC1.
> > I am using the InterBase mapping which is defined
> > "standardjbosscmp-jdbc.xml" file. I am having problems
> > <o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>when
> > I use "long" fields within my CMP entity beans. According
to
> > "standardjbosscmp-jdbc.xml", the long mapping
> > is:<o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:2'>
>
>
> > </span><span
> >
>
style='mso-spacerun:yes'> </span><mapping><o:p></o:p></span><
> /font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:2'>
>
>
> > </span><span
> > style='mso-spacerun:yes'>
> >
>
</span><java-type>java.lang.Long</java-type><o:p></o:p></spa
> n></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span><span
> >
>
style='mso-spacerun:yes'>  
> ;
> >
>
</span><jdbc-type>BIGINT</jdbc-type><o:p></o:p></span></font
> ></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:2'>
>
>
> > </span><span
> > style='mso-spacerun:yes'>
> >
>
</span><sql-type>NUMERIC(18,0)</sql-type><o:p></o:p></span><
> /font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span><span
> >
>
style='mso-spacerun:yes'>  
> ;
> > </span></mapping><o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> >
>
font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span></fon
> t></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>The
> > exception is:<span
>
style='mso-tab-count:1'>
>
> > </span><o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>org.jboss.deployment.DeploymentException:
> > Error while creating table; - nested throwable:
> > <o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>(org.firebirdsql.jdbc.FBSQLException:
> > GDS Exception: org.firebirdsql.gds.GDSException:
> > <o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>Dynamic
> > SQL ErrorSQL error code = -817<o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>Metadata
> > update statement is not allowed by the current database SQL dialect
1
> > null ....<o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> >
>
font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span></fon
> t></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>I
> > have changed "NUMERIC(18,0)" by "DOUBLE
> PRECISION". I
> > have
> > done this, because I tried to create one table from
> > the<o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>"Marathon"
> > client with one column "NUMERIC(18,0" and on the DB I had
> the
> > type
> > "Double Precision" for that
> > column.<o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> >
>
font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span></fon
> t></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>My
> > new mapping:<o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:2'>
>
>
> > </span><span
> >
>
style='mso-spacerun:yes'> </span><mapping><o:p></o:p></span><
> /font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:2'>
>
>
> > </span><span
> > style='mso-spacerun:yes'>
> >
>
</span><java-type>java.lang.Long</java-type><o:p></o:p></spa
> n></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:2'>
>
>
> > </span><span
> > style='mso-spacerun:yes'>
> >
>
</span><jdbc-type>BIGINT</jdbc-type><o:p></o:p></span></font
> ></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span><span
> >
>
style='mso-spacerun:yes'>  
> ;
> > </span><sql-type>DOUBLE
> > PRECISION</sql-type><o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:2'>
>
>
> > </span><span
> >
>
style='mso-spacerun:yes'> </span></mapping><o:p></o:p></span>
> </font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> >
>
font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span></fon
> t></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span><o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span>Can
> > anyone tell me which is the best way to map Longs with
> > Firebird?<o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> >
>
font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span></fon
> t></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> >
>
font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span></fon
> t></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> > font-family:Arial;mso-ansi-language:EN-US'><span
> >
>
style='mso-tab-count:1'>
>
> > </span></span></font><span
> > class=SpellE><font size=2 face=Arial><span lang=PT
> > style='font-size:10.0pt;
> > font-family:Arial'>Thanks</span></font></span><font size=2
> > face=Arial><span
> > lang=PT style='font-size:10.0pt;font-family:Arial'> <span
> > class=SpellE>in</span>
> > <span class=SpellE>advance</span>,<o:p></o:p></span></font></p>
> >
> > <p class=MsoNormal><font size=2 face=Arial><span lang=PT
> > style='font-size:10.0pt;
> > font-family:Arial'><span
>
style='mso-tab-count:2'>
>
>
> > </span><span
> > class=SpellE>Victor</span> <span
> class=SpellE>Batista</span><o:p></o:p></span></font></p>
> >
> > </div>
> >
> > </body>
> >
> > </html>
> >
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>
-------------------------------------------------------
This sf.net email is sponsored by: DEDICATED SERVERS only $89!
Linux or FreeBSD, FREE setup, FAST network. Get your own server
today at http://www.ServePath.com/indexfm.htm
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user