There are two issues
the bug in the line
dbpath = os.path.join(self._folder, uri[14:])
instread of
dbpath = os.path.join(self._folder, uri[9:])
is cutting "sqlite://storage.sqlite" short into "ge.sqlite" instead of
"storage.sqlite". This can be fixed by replacing 14 with 9.
Yet, the file "ge.sqlite" or "storage.sqlite" is not supposed to be
there but created by the line:
zxJDBC.connect(java.sql.DriverManager.getConnection('jdbc:sqlite:'+dbpath))
you are getting an error at this line:
SQLException: java.sql.SQLException: No suitable driver found for
jdbc:sqlite:/media/pierreth-backup/work/web2py/applications/welcome/
databases/ge.sqlite
That means that your sqlite driver is not in the java classpath.
On Nov 28, 1:06 am, pierreth <[email protected]> wrote:
> On Nov 28, 1:49 am, mdipierro <[email protected]> wrote:
>
>
>
> > I found a bug. In gluon/sql.py
>
> > replace
>
> > elif is_jdbc and self._uri.startswith('sqlite://'):
> > self._dbname='sqlite'
> > if uri[9] != '/':
> > dbpath = os.path.join(self._folder, uri[14:])
> > else:
> > dbpath = uri[14:]
>
> > with
>
> > elif is_jdbc and self._uri.startswith('sqlite://'):
> > self._dbname='sqlite'
> > if uri[9] != '/':
> > dbpath = os.path.join(self._folder, uri[9:])
> > else:
> > dbpath = uri[9:]
>
> > Does this fix anything?
>
> Sorry, I have the same error with this new code. And the file
> 'ge.slite' is still not there.