db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2733) ij rolls through NullPointerException (NPE) with J2ME/JSR169/WEME 6.1.
Date Wed, 13 Jun 2007 21:43:26 GMT

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

Myrna van Lunteren commented on DERBY-2733:

IRC transcript between Kathey & me, ca 1.20 pm PDT

myrna>	hi kathey?
	<kmarsden>	hi myrna
	<myrna>	I saw your reply re DERBY-2733...
	<kmarsden>	So why does startJBMS() get called, when all we are doing is starting ij?
	<myrna>	I could be wrong, but it seems to me a number of defaults are set up in startJBMS(),
defaults that we'd want.
	<myrna>	Such as, we default to use EmbeddedSimpleDataSource.
	<kmarsden>	why does the bug not occur for other jvms?
	<myrna>	because they don't *require* a datasource; they are happy with loading the
default driver.
	<myrna>	With j2ME, there is no default driver, so it rolls on with no info.
	<kmarsden>	do they return null from startJBMS() if ij.database is not set?
	<myrna>	With other jvms it tries to make the connection, (using drivermanager), and
the connection comes out as null, and then yes, startJBMS returns null.
	<kmarsden>	it wouldn't be null. it would throw an exception no?
	<myrna>	no
	<myrna>	there's no need to start ij with a database!
	<myrna>	I'm not at this point interested in fixing the entire logic of ij...
	<myrna>	I just want this little bit to work, and a follow up bit that prevents ij from
attempting to load a driver if we have a datasource & we're using j2me.
	<myrna>	(cause in that case ij never even starts).
	<kmarsden>	hmmm... Well I can't say I understand the fix. At least the javadoc should
be changed to say under what conditions startJBMS() returns null.
	<kmarsden>	Maybe Dan could take another peek.
	<kmarsden>	Sorry I wasn't so helpful on review.
	<myrna>	:-) you need to do what you think is right.
	<myrna>	At the same time, I need to go do other stuff...and an overhaul of ij is not
on my list at this point.
	<myrna>	Even a full analysis of what situations startJBMS returns null wasn't on my
list of things... :-)
	<myrna>	thx kathey
	<kmarsden>	ok myrna. 

> 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:,,
>         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
>             Fix For:
>         Attachments: DERBY-2733-doc.diff, DERBY-2733-src.diff, DERBY-2733.diff2, 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.

View raw message