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 "Myrna van Lunteren (JIRA)" <ji...@apache.org> on 2008/01/09 02:42:33 UTC

[jira] Updated: (DERBY-2733) ij rolls through NullPointerException (NPE) with J2ME/JSR169/WEME 6.1.

     [ https://issues.apache.org/jira/browse/DERBY-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-2733:
--------------------------------------

    Attachment: DERBY-2733_3.diff

I think the trouble is with the no-args constructor.
The newest patch (DERBY-2733_3.diff) calls update() in the no-args constructor which then sets the jdbcurl to jdbc:derby and then there is no NPE anymore.

This mimics what happens in ReferenceableDataSource. 

I did wonder about the meaning of the comment in EmbeddedDataSource (which extends ReferenceableDataSource) :
....
// needed by Object Factory
// don't put anything in here or in any of the set method because this
// object may be materialized in a remote machine and then sent thru
// the net to the machine where it will be used.
...

I think this comment is not (no longer?) applicable, possibly not even to EmbeddedDataSource, because stuff is put in various set methods...So I think it's OK to add the call as in the _3 patch.

Starting ij without any properties now works exactly the same with my j2ME as with jdk15; both cases just give an XJ004 error and start ij without any connection. 
suites.All ran fine with j9 and jdk15, and derbyall ran fine with j9. (I'm still running derbyall with jdk15 for good measure, but I doubt that gives any trouble, I don't think any of the tests exercise EmbeddedSimpleDataSource.)

I intend to commit this change tomorrow If there are no more comments.
Then I'll take another look at the docs.

> ij rolls through NullPointerException (NPE) with J2ME/JSR169/WEME 6.1.
> ----------------------------------------------------------------------
>
>                 Key: DERBY-2733
>                 URL: https://issues.apache.org/jira/browse/DERBY-2733
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.1.2.1, 10.2.2.0, 10.3.1.4
>         Environment: windows xp; j9 -jcl:foun11 -version:
> java version "J2ME Foundation Specification v1.1"
> IBM J9 2.3 Windows XP x86-32  (JIT enabled)
> J9VM - 20061023_08962_lHdSMR
> JIT  - 20060629_1804ifx1_r8
> GC   - 200609_15
> JCL  - 20061020_1321,foun11
> Licensed Materials - Property of IBM
> J9 - VM for the Java(TM) platform, Version 2.3
> (c) Copyright IBM Corp. 1991, 2006  All Rights Reserved
> Target: 20061023_08962_lHdSMR (Windows XP 5.1 build 2600 Service Pack 2 x86)
> JIT  - 20060629_1804ifx1_r8
>            Reporter: Myrna van Lunteren
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY-2733-doc.diff, DERBY-2733-src.diff, DERBY-2733.diff2, DERBY-2733_3.diff, rtoolsijproprefdatasource.html
>
>
> When starting ij - with, or without any derby.properties, ij first shows this:
> -------------------------------------------------------
> java.lang.reflect.InvocationTargetException
>         at java.lang.reflect.AccessibleObject.invokeL(AccessibleObject.java:215)
>         at java.lang.reflect.Method.invoke(Method.java:272)
>         at org.apache.derby.impl.tools.ij.util.getDataSourceConnection(util.java:426)
>         at org.apache.derby.impl.tools.ij.util.startJBMS(util.java:516)
>         at org.apache.derby.impl.tools.ij.util.startJBMS(util.java:585)
>         at org.apache.derby.impl.tools.ij.ConnectionEnv.init(ConnectionEnv.java:64)
>         at org.apache.derby.impl.tools.ij.utilMain.initFromEnvironment(utilMain.java:179)
>         at org.apache.derby.impl.tools.ij.Main.<init>(Main.java:230)
>         at org.apache.derby.impl.tools.ij.Main.getMain(Main.java:193)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:178)
>         at org.apache.derby.impl.tools.ij.Main.main(Main.java:73)
>         at org.apache.derby.tools.ij.main(ij.java:67)
> Caused by: java.lang.NullPointerException
>         at org.apache.derby.jdbc.InternalDriver.embeddedDriverAcceptsURL(InternalDriver.java:116)
>         at org.apache.derby.jdbc.InternalDriver.acceptsURL(InternalDriver.java:107)
>         at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:126)
>         at org.apache.derby.jdbc.EmbeddedSimpleDataSource.getConnection(EmbeddedSimpleDataSource.java:406)
>         at org.apache.derby.jdbc.EmbeddedSimpleDataSource.getConnection(EmbeddedSimpleDataSource.java:373)
>         at java.lang.reflect.AccessibleObject.invokeL(AccessibleObject.java:213)
>         ... 11 more
> ij version 10.3
> ij>
> After that, ij does appear to start normal operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.