You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Okundaye, Derrick" <De...@logicacmg.com> on 2005/04/23 18:19:41 UTC

Derby Client - Problem is using the driver

Hi,

I built derby version 10.0.2.1 with the derby client successfully.  I
have successfully created databases using the ij tool.  However, l
cannot access the database in code because the acceptable db url syntax
'jdbc:derby:<database_name>' is not acceptable in code.  It must be
'jdbc:derby://<database_name>/<attributes>;'.  

The problem although a connection is made to the server, it fails
because of a java.langExceptionInInitializerError.  I cant trace it's
cause yet.  

Has anyone implemented the derby client yet and if so, have they come
across the same thing?

Regards,

Derrick Okundaye
Consultant 
____________________

LogicaCMG

Stephenson House
75 Hampstead Road
London NW1 2PL
United Kingdom

M: +44 (0) 7854 876119
E: derrick.okundaye@logicacmg.com
http://www.logicacmg.com
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be
copied, disclosed to, retained or used by, any other party. If you are
not an intended recipient then please promptly delete this e-mail and
any attachment and all copies and inform the sender. Thank you.


-----Original Message-----
From: David Van Couvering [mailto:David.Vancouvering@Sun.COM] 
Sent: 22 April 2005 20:44
To: Derby Development
Subject: Re: Sun, Java and BigDecimal incompatible changes in J2SE 5.0

Hi, Dan, still tracking this down, but I had to smile -- the first level
answer I got back from the J2SE folks was that these changes were made
as part of JSR13, which was driven by IBM.  Maybe you should find the
guys behind JSR13 and give them an earful :)

David

Daniel John Debrunner wrote:
> I'm wonder if any of the Sun folks on the list can help out, J2SE 5.0 
> has changed the behaviour of java.math.BigDecimal in incompatible ways

> from JDK 1.4.x, but these are not mentioned in
> 
> http://java.sun.com/j2se/1.5.0/compatibility.html
> 
> Is there any document that details all the ways J2SE 5.0's BigDecimal 
> is incompatible with all earlier Java releases?
> 
> While we changed Derby to address the change in behaviour of
> BigDecimal.toString() a while ago, I just discovered another change 
> that breaks Derby and potentially other applications. The method
> BigDecimal.scale() used to be
> 
> (JDK 1.4.1 javadoc)
> Returns the scale of this BigDecimal. (The scale is the number of 
> digits to the right of the decimal point.)
> 
> but now it can return negative numbers
> 
> (J2SE 5.0 docs)
> Returns the scale of this BigDecimal. If zero or positive, the scale 
> is the number of digits to the right of the decimal point. If 
> negative, the unscaled value of the number is multiplied by ten to the

> power of the negation of the scale. For example, a scale of -3 means 
> the unscaled value is multiplied by 1000.
> 
> 
> I discovered this when looking at Derby-225 and simple cleanup changes

> that should have not fixed the issue suddenly fixed it. Further 
> investigation showed a scale of -302 which of course confused the 
> existing code.
> 
> I wonder if there are any more incompatibilities in this class that 
> could break Derby code?
> 
> Thanks,
> Dan.
> 


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

Re: Derby Client - Problem is using the driver

Posted by Sunitha Kambhampati <ks...@gmail.com>.
Sunitha Kambhampati wrote:

> Okundaye, Derrick wrote:
>
>> Hi,
>>
>> I built derby version 10.0.2.1 with the derby client successfully.
>
>
I think you should build it on the trunk version..   (which is  10.1.0.0 
alpha )  and use it with those classes. 

Also the functional spec says this  in the packaging& versioning section 
-- ." The Derby network client will assume the version of the Derby 
release in which it is offered (currently thought to be 10.1). "

Could you try to build on the trunk version and see if that solves your 
problem.

Thanks,
Sunitha.



Re: Derby Client - Problem is using the driver

Posted by Sunitha Kambhampati <ks...@gmail.com>.
Okundaye, Derrick wrote:

>Hi,
>
>I built derby version 10.0.2.1 with the derby client successfully.  I
>have successfully created databases using the ij tool.  However, l
>cannot access the database in code because the acceptable db url syntax
>'jdbc:derby:<database_name>' is not acceptable in code. 
>

> It must be
>'jdbc:derby://<database_name>/<attributes>;'.  
>  
>
Actually there is no need for the extra semicolon in the end

Per the functional spec attached in Satheesh's email  
http://article.gmane.org/gmane.comp.apache.db.derby.devel/2960)'  -
 Here is an example of using the URL to connect to the derby network 
server running on localhost at port 1527 in ij

ij> connect 
`jdbc:derby://localhost:1527/sample;create=true;user=user1;password=secret4me';

Could you post more details on the url you are using, when you are 
getting the exception, on how you are trying to connect (does it work in 
ij) and also how you built the client etc, that might help us locate 
where the problem is. 

Thanks,
Sunitha.

>because of a java.langExceptionInInitializerError.  I cant trace it's
>cause yet.  
>
>Has anyone implemented the derby client yet and if so, have they come
>across the same thing?
>
>Regards,
>
>Derrick Okundaye
>Consultant 
>___
>