You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by maxf11 <m....@mbm.it> on 2011/09/21 14:14:55 UTC

Re: Derby with creme

I've tried this way but...it doesn't work.
I've modified source code of SimpleApp :

     EmbeddedSimpleDataSource ds = new EmbeddedSimpleDataSource();
     System.out.println("Loaded the appropriate driver.");

     Connection conn = null;
            /*
               The connection specifies create=true to cause
               the database to be created. To remove the database,
               remove the directory derbyDB and its contents.
               The directory derbyDB will be created under
               the directory that the system property
               derby.system.home points to, or the current
               directory if derby.system.home is not set.
             */
       ds.setDatabaseName("derbyDB");
       ds.setCreateDatabase("create");
       conn = ds.getConnection();

and I get this error:

Startup failed due to missing functionality for
org.apache.derby.iapi.services.stream.InfoStreams. Please ensure your
classpath includes the correct Derby software.
ERROR XBM02: Startup failed due to missing functionality for
org.apache.derby.iapi.services.stream.InfoStreams. Please ensure your
classpath includes the correct Derby software.
	at org.apache.derby.iapi.error.StandardException.newException()
	at org.apache.derby.iapi.services.monitor.Monitor.missingImplementation()
	at org.apache.derby.impl.services.monitor.TopService.bootModule()
	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule()
	at org.apache.derby.iapi.services.monitor.Monitor.startSystemModule()
	at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState()
	at org.apache.derby.impl.services.monitor.FileMonitor.<init>()
	at org.apache.derby.iapi.services.monitor.Monitor.startMonitor()
	at org.apache.derby.iapi.jdbc.JDBCBoot.boot()
	at org.apache.derby.jdbc.EmbeddedSimpleDataSource.findDriver()
	at org.apache.derby.jdbc.EmbeddedSimpleDataSource.getConnection()
	at org.apache.derby.jdbc.EmbeddedSimpleDataSource.getConnection()
	at SimpleApp.go()
	at SimpleApp.main()

exception thrown:
java.sql.SQLException: org.apache.derby.jdbc.EmbeddedDriver is not
registered with the JDBC driver manager

Can you help me?

Thanks in advance,
 Max

-- 
View this message in context: http://old.nabble.com/Derby-with-creme-tp32326168p32503741.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Derby with creme

Posted by Paul French <pa...@kirona.com>.
derby 10.5.1 (not tried later) works fine on j9 personal profile 1.1

We use on win mob 6.x with no issues

Paul French
Kirona Solutions Ltd
Tel: 07803 122 058
E-Mail: paul.french@kirona.com
Web: www.kirona.com <http://www.kirona.com>

This email and any attachments are confidential and should only be read 
by those to whom they are addressed. If you are not the intended 
recipient, please contact us on 01625 585511, delete the email 
(including any attachment) from your computer and destroy any copies. 
Any distribution or copying without our prior permission is prohibited. 
Internet communications are not always secure and may be subject to 
delays, non-delivery and unauthorised alterations. Therefore, 
information expressed in this message is not given or endorsed by Kirona 
Solutions Limited ("Kirona") unless otherwise notified by our duly 
authorised representative independent of this message. No warranty is 
given that this email (including any attachment) is virus free. Any 
views or opinions presented are solely those of the author and do not 
necessarily represent those of Kirona.

Registered addresses: Kirona Solutions Limited, Barrington House, Heyes 
Lane, Alderley Edge, Cheshire. SK9 7LA Registered in England and Wales 
No: 04678711


On 03/10/2011 13:17, maxf11 wrote:
> Hi Knut.
> Thank you very much for your help, but it doesn't work at all.
> I read in Derby 10.2.2.0 release note
>
> JDK/JDBC support:
>      JDKs 1.3, 1.4, 1.5, and 1.6 plus J2ME J2ME/CDC/Foundation Profile
>      JSR-169, JDBC 2.1, JDBC 3.0, and JDBC 4.0 support
>
> but....it seems false.
> Do you known some other VM I can try?
> Thanks in advance.
>   Max.

Re: Derby with creme

Posted by maxf11 <m....@mbm.it>.
Hi Knut.
Thank you very much for your help, but it doesn't work at all.
I read in Derby 10.2.2.0 release note

JDK/JDBC support:
    JDKs 1.3, 1.4, 1.5, and 1.6 plus J2ME J2ME/CDC/Foundation Profile
    JSR-169, JDBC 2.1, JDBC 3.0, and JDBC 4.0 support

but....it seems false.
Do you known some other VM I can try? 
Thanks in advance.
 Max.
-- 
View this message in context: http://old.nabble.com/Derby-with-creme-tp32326168p32581992.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Derby with creme

Posted by Knut Anders Hatlen <kn...@oracle.com>.
maxf11 <m....@mbm.it> writes:

> I've tried this way but...it doesn't work.
> I've modified source code of SimpleApp :
>
>      EmbeddedSimpleDataSource ds = new EmbeddedSimpleDataSource();
>      System.out.println("Loaded the appropriate driver.");
>
>      Connection conn = null;
>             /*
>                The connection specifies create=true to cause
>                the database to be created. To remove the database,
>                remove the directory derbyDB and its contents.
>                The directory derbyDB will be created under
>                the directory that the system property
>                derby.system.home points to, or the current
>                directory if derby.system.home is not set.
>              */
>        ds.setDatabaseName("derbyDB");
>        ds.setCreateDatabase("create");
>        conn = ds.getConnection();
>
> and I get this error:
>
> Startup failed due to missing functionality for
> org.apache.derby.iapi.services.stream.InfoStreams. Please ensure your
> classpath includes the correct Derby software.
> ERROR XBM02: Startup failed due to missing functionality for
> org.apache.derby.iapi.services.stream.InfoStreams. Please ensure your
> classpath includes the correct Derby software.
> 	at org.apache.derby.iapi.error.StandardException.newException()
> 	at org.apache.derby.iapi.services.monitor.Monitor.missingImplementation()
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule()
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule()
> 	at org.apache.derby.iapi.services.monitor.Monitor.startSystemModule()
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState()
> 	at org.apache.derby.impl.services.monitor.FileMonitor.<init>()
> 	at org.apache.derby.iapi.services.monitor.Monitor.startMonitor()
> 	at org.apache.derby.iapi.jdbc.JDBCBoot.boot()
> 	at org.apache.derby.jdbc.EmbeddedSimpleDataSource.findDriver()
> 	at org.apache.derby.jdbc.EmbeddedSimpleDataSource.getConnection()
> 	at org.apache.derby.jdbc.EmbeddedSimpleDataSource.getConnection()
> 	at SimpleApp.go()
> 	at SimpleApp.main()
>
> exception thrown:
> java.sql.SQLException: org.apache.derby.jdbc.EmbeddedDriver is not
> registered with the JDBC driver manager

It looks like the Derby engine believes creme is a full Java 1.3
implementation and tries to boot the JDBC 2.0 version of the driver,
instead of the JSR-169 one which is the only one that works on J2ME.

Derby doesn't have a mechanism to override this and tell it to treat
creme as a J2ME implementation (except by adding the necessary logic to
java/engine/org/apache/derby/iapi/services/info/JVMInfo.java and
rebuilding the jar file). However, since it makes the decision based on
the value of the java.specification.name system property, it might work
if you execute

    System.setProperty("java.specification.name", "J2ME");

before you create the EmbeddedSimpleDataSource instance.

-- 
Knut Anders