db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John H. Embretsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2815) ij doesn't start with J2ME / JSR169 / weme6.1 because attempting to find java.sql.Driver if ij.protocol property is specified
Date Wed, 14 Nov 2007 12:20:43 GMT

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

John H. Embretsen commented on DERBY-2815:
------------------------------------------

Patch 2 looks good to me, although it's slightly confusing to me that the variable which is
false if we're in a Java ME environment is called IS_AT_LEAST_JDBC2, when JSR-169 is based
upon JDBC 3.0.

I tried the patch against trunk on linux (FC5) with phoneME Advanced (CDC/FP 1.1), and it
worked fine. Without the patch, I got the same error as reported in the description.

+1 to commit

> ij doesn't start with J2ME / JSR169 / weme6.1 because attempting to find java.sql.Driver
if ij.protocol property is specified
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2815
>                 URL: https://issues.apache.org/jira/browse/DERBY-2815
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.3.1.4
>         Environment: windows XP, weme6.1 jvm (J2ME 1.1)
>            Reporter: Myrna van Lunteren
>            Assignee: Myrna van Lunteren
>            Priority: Minor
>         Attachments: DERBY-2815.diff1, DERBY-2815.diff2
>
>
> When starting ij with the following command:
> ij -jcl:foun11 -Xbootclasspath/a:<path_to_jdbc.jar> org.apache.derby.tools.ij -p
derby.properties
> and derby.properties contains the following:
> -----------------
> ij.database=jdbc:derby:bladb;create=true
> ij.protocol=jdbc:derby:
> ij.showNoConnectionsAtStart=true
> ij.showNoCountForSelect=true
> # DataSource properties, only used if ij.dataSource is set
> ij.dataSource.databaseName=bladb
> ij.dataSource.createDatabase=create
> ij.dataSource=org.apache.derby.jdbc.EmbeddedSimpleDataSource
> ------------------
> ij does not start and instead gives the following stack trace:
> Exception in thread "main" java.lang.NoClassDefFoundError: java.sql.Driver
>         at java.lang.ClassLoader.defineClassImpl(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:226)
>         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:10
> 9)
>         at java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1029)
>         at java.net.URLClassLoader$4.run(URLClassLoader.java:549)
>         at java.security.AccessController.doPrivileged(AccessController.java:213
> )
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:547)
>         at com.ibm.oti.vm.URLSystemClassLoader.findClass(URLSystemClassLoader.ja
> va:27)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:606)
>         at com.ibm.oti.vm.URLSystemClassLoader.loadClass(URLSystemClassLoader.ja
> va:60)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:563)
>         at java.lang.Class.forNameImpl(Native Method)
>         at java.lang.Class.forName(Class.java:114)
>         at org.apache.derby.impl.tools.ij.util.loadDriver(util.java:849)
>         at org.apache.derby.impl.tools.ij.util.loadDriverIfKnown(util.java:833)
>         at org.apache.derby.impl.tools.ij.util.startJBMS(util.java:476)
>         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)
> The properties file is an example of the 'old test harness' properties files. The test
harness would get sql scripts tested with J2ME by stripping away the ij.protocol and ij.database
specifications.
> In another bug - DERBY-1218 - it was suggested ij.protocol be blanked out (in tools/ij/util.java?)
with J2ME.
> Another approach would be to check for ij.protocol or ij.database setting when we have
a datasource and we're using J2ME.

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


Mime
View raw message