This problem still exists with v042 of the pure Java driver so this
appears to be a limitation/bug of the pure java releases.

It would be great to see a fix for this in the next release David or
an explanation as to why it doesn't work.

Cheers


On Mar 1, 12:20 pm, Buff <[EMAIL PROTECTED]> wrote:
> hmmm I'd like to test a v040 build of the pure java driver. Does
> anyone have one they can share?
>
> I'd do it myself but I'm not familiar with C and all this make file
> business and I haven't got time right now to figure it out.
>
> On Feb 29, 7:58 pm, gobansaor <[EMAIL PROTECTED]> wrote:
>
> > I'm having a similar problem using the V37 Pure Java driver from
> > within Talend ETL Studio.  When I change to using Windows V040 JNI
> > version, works OK.  Talend generates Java code and makes extensive use
> > of threads.
>
> > Tom
>
> > On Feb 27, 7:02 pm, Buff <[EMAIL PROTECTED]> wrote:
>
> > > I just tested v040 of the Windows driver and it does not have this
> > > problem. So either it was fixed between v037 and v040 or it is a
> > > limitation in the pure Java driver.
>
> > > I downloaded the source and noticed the comment "we don't use threads
> > > in NestedVM" in the Makefile.nested file. Does anyone know what that
> > > means exactly? If it's a limitation, I'm surprised that it isn't
> > > mentioned as a difference between the native and nested versions on
> > > the SQLiteJDBC website. Does anyone know if this is the case? Can the
> > > nested driver be used in a threaded app or servlet?
>
> > > The example I provided in the original post is not threaded though so
> > > even if the nested driver doesn't support threaded apps, I still don't
> > > understand why that code is failing...
>
> > > btw I need to use the nested driver because I don't own the webserver
> > > and can't add the native dll to the JVM lib path.
>
> > > On Feb 27, 12:01 pm, Buff <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > I am trying to use SQLite in a servlet in Tomcat but am getting a
> > > > "database is locked" error if two JDBC Connections try to read (sql
> > > > select only) from the database at the same time. Obviously servlets
> > > > are inherently multi threaded but as I understand it, SQLite does
> > > > support multi threaded reads.
>
> > > > I have recreated the error without multiple servlet requests with the
> > > > following pseudo code:
>
> > > > Create statement1 from Connection1
> > > > Execute select query with statement1
>
> > > > Loop through RresultSet {
> > > >     Create statement2 from Connection2
> > > >     Execute select query with statement2 // Database is locked error
> > > > occurs here
>
> > > > }
>
> > > > Interestingly this problem only occurs when running the code in a
> > > > servlet (i.e. it works in a normal Java app with a main method) and it
> > > > does not occur if I use the first connection for the inner query
> > > > (which is not a "solution" to this problem because in an actual
> > > > servlet environment concurrent requests requires seperate JDBC
> > > > Conenctions).
>
> > > > Has anyone seen this before or can explain the cause? Does Tomcat
> > > > somehow lock the database file when it is read by a connection?
>
> > > > Thanks in advance
> > > > Sam
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to