Re: [sqlite] SQLite Compilation Problems on FreeBSD

2008-01-28 Thread Frederic de la Goublaye
Hi

I succeed in the compilation of SQLite under FreeBSD 5.4.

This is the French documentation I wrote:
http://fredericdelagoublaye.free.fr/freebsd/install/sqlite.html

I hope you will find some clues to help you

Best Regards
Frédéric de la Goublaye


On Jan 28, 2008 5:25 PM, Rob Sciuk <[EMAIL PROTECTED]> wrote:
>
> On Sun, 27 Jan 2008, L. S. wrote:
> >
> > Why doesn't SQLite 3.5.4 compile under FreeBSD 5.3? Can it be done in a sane
> > manner?
>
> AFAIK, it just works, but you may require the -lc_r  option to include the
> re-entrant (threadsafe) C library with your linked executeable ...
>
> >
> > How can I link against SQLite under FreeBSD 5.3, using gcc?
> > Is there any way that I could just link the source files into my code?
> >
> > * Using "./configure" and "make" with "sqlite-3.5.4.tar.gz", I got tcl and
> > tcsh errors.
> > * Using "sqlite-source-3_5_4.zip", with "tclsqlite.c" removed, I got pthread
> > errors. They went away with "gcc ... -lpthread", but compilation still
> > failed.
> > * I think "sqlite-amalgamation-3_5_4.zip" produced the same errors as
> > sqlite-source-.
> >
> > I have compiled, installed, linked, and used it on other systems, but cannot
> > do the same on my FreeBSD system. (I don't use the FreeBSD ports; I like to
> > just download and build.)
> >
>
> Moi aussi, but I have *NEVER* had a problem with SQLite on FreeBSD,
> including 3.5.4 ... Of course I *ALWAYS* install Tcl/Tk first, and am
> happy to use the tclsqlite bindings which result ...
>
> Again, when you link your C code to the libSqlite.so, just add the -lc_r
> option, and you can delete the -lpthreads unless you are actually using
> pthreads, in which case you will likely need both -lpthreads *AND* -lc_r
> or surprises may result.
>
> Apparently, the -lc_r requirement is new with 3.5.4, and my query on this
> list has been met with silence thus far, so I cannot advise you further.
> Apparently the db engine has been re-worked somewhat (extensively) with
> this release, and I suspect that changes eminate from that code, but I
> haven't had time to investigate ...
>
> HTH,
>
> Rob Sciuk
>
>
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
> -
>
>

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] error 404

2007-07-02 Thread Frederic de la Goublaye

Hi all

I am sorry to disturb you with my questions.

Since the javaslite driver update,
http://www.ch-werner.de/javasqlite/
date:2007-06-26

http://www.ysalaya.org

regullary crashes on HTTP error 404

I need to restart Apache 22.
I need also to restart Tomcat

If not there is no access to the SQLite databases.

That is why I ask this question on the list.
I think there is something wrong with my solution: TomcaT 5.5.20 + Java
1.4.12 + SQlite 3-3-5

Cheers
Frederic


[sqlite] error in step

2007-07-01 Thread Frederic de la Goublaye

Hi all,

Any idear about this error:

2007-07-01 17:01:48,145 (BotTopicData.java:getTopics:342) ERROR -
sSql=SELECT * FROM topic WHERE value LIKE 'O';
2007-07-01 17:01:48,155 (SQLite.java:execQuery:79) ERROR - SQLite.Exception:
error in step

After that (not sure), my tomcat server go to ERROR 404 and it crashes.

Best regards
Frederic


[sqlite] sqlite multi access + java good ?

2007-06-28 Thread Frederic de la Goublaye

Hi all

Is the combination of SQLite and Java/Tomcat is good for an hosting
application ?

My project is http://www.ysalaya.org.
It is a chatbot hosting site.
All the chatbot have their own SQLite database for their knowledge.
That's mean when several users (visitor and botmaster) access
at the same time to the same chatbot, SQLite is dealing with multi acces
(read => the memory is read to find the answer to the visitor question)
(write => the dialog is save in the same database than the memory by in
another table)

So is this choice seems good to you ?

So experts says that SQLite is not scalable for multi access. They say MySQL
is better.
And even SQLite will be worst/bad and more bad when the number of users
increase.
If yes it is exactly the contrary of a bot hosting website.

Thanks for your attention

Frederic


Re: [sqlite] Tomcat crashes with SQLite

2007-06-26 Thread Frederic de la Goublaye

I am just trying the last version of
http://www.ch-werner.de/javasqlite/
date: June 26th 2007

Lucy will see if she is ok now...
http://lucy.ysalaya.org

Cheers
Frederic de la Goublaye



On 6/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


"Frederic de la Goublaye" <[EMAIL PROTECTED]> wrote:
> My server is under FreeBSD 5.4
> It is ok ?
>

I am not aware of any problems with FreeBSD 5.4.
--
D. Richard Hipp <[EMAIL PROTECTED]>



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




Re: [sqlite] Tomcat crashes with SQLite

2007-06-25 Thread Frederic de la Goublaye

My server is under FreeBSD 5.4
It is ok ?

Cheers
Frederic


On 6/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


"Frederic de la Goublaye" <[EMAIL PROTECTED]> wrote:
> My server crashed again.
>
> I recompiled sqlite3-3-5 with this configure option
> --enable-threadsafe =yes
>
> But I read that sqlite has somebug under Unix with the management of the
> THREADS.
>

Some version so of Linux have a bug.  Upgrade to linux
kernel series 2.6 and you should be OK.
--
D. Richard Hipp <[EMAIL PROTECTED]>



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




Re: [sqlite] Tomcat crashes with SQLite

2007-06-24 Thread Frederic de la Goublaye

My server crashed again.

I recompiled sqlite3-3-5 with this configure option
--enable-threadsafe =yes

But I read that sqlite has somebug under Unix with the management of the
THREADS.

Can it work with my Java code ?

Thanks for attention.
Frederic


An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 10 occurred at PC=0x712C5D06
Function=sqlite3VdbeExec+0x24D2
Library=/usr/local/lib/libsqlite3.so.8

On 6/24/07, Frederic de la Goublaye <[EMAIL PROTECTED]> wrote:


Thanks for your answer.

I just recompiled sqlite with *DTHREADSAFE=1*
http://www.sqlite.org/cvstrac/wiki?p=MultiThreading

I will publish the results.

Cheers
Frédéric

On 6/22/07, Russell Leighton <[EMAIL PROTECTED]> wrote:
>
>
> If you did not compile sqlite as multi-threaded this is exactly what
> would happen.
>
> On Jun 22, 2007, at 9:06 PM, Frederic de la Goublaye wrote:
>
> > Hi I just tried this driver:
> > http://www.zentus.com/sqlitejdbc/
> >
> > The result is ten times slower or even more.
> > Maybe I am wrong using this new driver.
> >
> > So for the moment I am still using this one:
> > http://www.ch-werner.de/javasqlite/
> >
> > BUT I HAVE STILL THE CRASH TROUBLES:
> >
> > An unexpected exception has been detected in native code outside the
> > VM.
> > Unexpected Signal : 11 occurred at PC=0x34D8493F
> > Function=sqlite3VdbeExec+0x10B
> > Library=/usr/local/lib/libsqlite3.so.8
> >
> > ANY IDEAR ???
> >
> > Thanks for your attention.
> >
> > Cheers
> > Frederic
> >
> >
> >
> >
> >
> > On 6/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > wrote:
> >>
> >>
> >> > My project is working with Tomcat, SQLite and javasqlite.
> >> > http://www.ch-werner.de/javasqlite/
> >> >
> >> > http://www.ysalaya.org
> >> >
> >> > Since a few weeks Tomcat server crashes very often: error 505
> >> > and I need to restart it manually. It is installed on FreeBSD 5.4.
> >> >
> >> > Please see the Tomcat log file bellow.
> >> > It seems to be an error in SQLite outsite the Java Virtual Machine.
> >> >
> >> > ANY IDEAR ?
> >>
> >> I see 2 possible explanations:
> >> 1. You use the same connection in different threads at the same time.
> >> 2. There are bugs in JDBC driver. If this is the case, try driver
> from
> >> http://www.zentus.com/sqlitejdbc. It for sure has bugs, but may be
> >> different and you won't even notice them. You may use pure java
> >> version -
> >> it will be probably slower than JNI based, but should never crash VM.
>
> >>
> >>
> >>
> >>
> --
> >> Wicie, rozumicie
> >> Zobacz >>> http://link.interia.pl/f1a74
> >>
> >>
> >>
> >>
> --
> >> ---
> >> To unsubscribe, send email to [EMAIL PROTECTED]
> >>
> >>
> --
> >> ---
> >>
> >>
>
>
> -
>
> To unsubscribe, send email to [EMAIL PROTECTED]
>
> -
>
>



Re: [sqlite] Tomcat crashes with SQLite

2007-06-24 Thread Frederic de la Goublaye

Thanks for your answer.

I just recompiled sqlite with *DTHREADSAFE=1*
http://www.sqlite.org/cvstrac/wiki?p=MultiThreading

I will publish the results.

Cheers
Frédéric

On 6/22/07, Russell Leighton <[EMAIL PROTECTED]> wrote:



If you did not compile sqlite as multi-threaded this is exactly what
would happen.

On Jun 22, 2007, at 9:06 PM, Frederic de la Goublaye wrote:

> Hi I just tried this driver:
> http://www.zentus.com/sqlitejdbc/
>
> The result is ten times slower or even more.
> Maybe I am wrong using this new driver.
>
> So for the moment I am still using this one:
> http://www.ch-werner.de/javasqlite/
>
> BUT I HAVE STILL THE CRASH TROUBLES:
>
> An unexpected exception has been detected in native code outside the
> VM.
> Unexpected Signal : 11 occurred at PC=0x34D8493F
> Function=sqlite3VdbeExec+0x10B
> Library=/usr/local/lib/libsqlite3.so.8
>
> ANY IDEAR ???
>
> Thanks for your attention.
>
> Cheers
> Frederic
>
>
>
>
>
> On 6/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> wrote:
>>
>>
>> > My project is working with Tomcat, SQLite and javasqlite.
>> > http://www.ch-werner.de/javasqlite/
>> >
>> > http://www.ysalaya.org
>> >
>> > Since a few weeks Tomcat server crashes very often: error 505
>> > and I need to restart it manually. It is installed on FreeBSD 5.4.
>> >
>> > Please see the Tomcat log file bellow.
>> > It seems to be an error in SQLite outsite the Java Virtual Machine.
>> >
>> > ANY IDEAR ?
>>
>> I see 2 possible explanations:
>> 1. You use the same connection in different threads at the same time.
>> 2. There are bugs in JDBC driver. If this is the case, try driver from
>> http://www.zentus.com/sqlitejdbc. It for sure has bugs, but may be
>> different and you won't even notice them. You may use pure java
>> version -
>> it will be probably slower than JNI based, but should never crash VM.
>>
>>
>>
>> --
>> Wicie, rozumicie
>> Zobacz >>> http://link.interia.pl/f1a74
>>
>>
>>
>> --
>> ---
>> To unsubscribe, send email to [EMAIL PROTECTED]
>>
>> --
>> ---
>>
>>



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




Re: [sqlite] Tomcat crashes with SQLite

2007-06-22 Thread Frederic de la Goublaye

Hi I just tried this driver:
http://www.zentus.com/sqlitejdbc/

The result is ten times slower or even more.
Maybe I am wrong using this new driver.

So for the moment I am still using this one:
http://www.ch-werner.de/javasqlite/

BUT I HAVE STILL THE CRASH TROUBLES:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x34D8493F
Function=sqlite3VdbeExec+0x10B
Library=/usr/local/lib/libsqlite3.so.8

ANY IDEAR ???

Thanks for your attention.

Cheers
Frederic





On 6/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:



> My project is working with Tomcat, SQLite and javasqlite.
> http://www.ch-werner.de/javasqlite/
>
> http://www.ysalaya.org
>
> Since a few weeks Tomcat server crashes very often: error 505
> and I need to restart it manually. It is installed on FreeBSD 5.4.
>
> Please see the Tomcat log file bellow.
> It seems to be an error in SQLite outsite the Java Virtual Machine.
>
> ANY IDEAR ?

I see 2 possible explanations:
1. You use the same connection in different threads at the same time.
2. There are bugs in JDBC driver. If this is the case, try driver from
http://www.zentus.com/sqlitejdbc. It for sure has bugs, but may be
different and you won't even notice them. You may use pure java version -
it will be probably slower than JNI based, but should never crash VM.



--
Wicie, rozumicie
Zobacz >>> http://link.interia.pl/f1a74



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




Re: [sqlite] Tomcat crashes with SQLite

2007-06-18 Thread Frederic de la Goublaye

Hi all.

Lucy thanks for your answer :+)
http://lucy.ysalaya.org

My issue is not closed because the site crashes these days.

I do not think I use the same connection in different threads at the same
time.

I am still using the javasqlite ODBC driver.
But I did not but the jdbc into the Tomcat server.xml file.
As I did for MySQL because as far as know, the jdbc needs the path to the
database file
and under my project, all the chatbot databases are different
/user_idr/bot_base_type.db

Here is my source code for the Java class connection.
Maybe you can have a look (it is simple, maybe too much)

_
Copyright 2006-2007 Frederic de la Goublaye
_
public class SQLite {
   private static Logger logger = Logger.getLogger(SQLite.class.getName());
   private final static String pilote = " SQLite.JDBCDriver";
   private Connection con = null;
   private PreparedStatement s;
   private  static SQLite instance = new SQLite();
   public static SQLite getInstance() {return instance;}
   private static String sDBPath;
private SQLite() {
   try {
   Class.forName(pilote);
   con = null;
   s = null;
   } catch (Exception e) {
   logger.error(e.getMessage());
   }
}
public String getDBPath() {return sDBPath;}
public void setDBPath(String pDBPath) {sDBPath= pDBPath;}
public void connection(String pDBPath) {
   try {
sDBPath = pDBPath;
con = DriverManager.getConnection(sDBPath);
con.setAutoCommit ( true );
   }
   catch (SQLException e) {
   logger.error(e.getMessage());
   logger.error("sDBPath="+sDBPath);
   if (con != null) {
   try {
   con.close();
   } catch (Exception ex) {
   logger.error(ex.getMessage());
   }
   finally {
   con = null;
   }
   }
   }
}
public void deconnection() {
   if (s != null) {
   try {
   s.close();
   } catch (Exception e) {
   logger.error(e.getMessage());
   }
   finally {
   s = null;
   }
   }
   if (con != null) {
   try {
   con.close();
   } catch (Exception e) {
   logger.error(e.getMessage());
   }
   finally {
   con = null;
   }
   }
}
public ResultSet execQuery(String pRequest) {
   try
   {
   s = con.prepareStatement(pRequest);
   ResultSet rset = s.executeQuery();
   return rset;
   }
  catch(SQLException e) {
  logger.error(e.getMessage());
  logger.error("sSql="+pRequest);
  if (s != null) {
  try {
  s.close();
  } catch (Exception ex) {
  logger.error(ex.getMessage());
  }
  finally {
  s = null;
  }
  }
  return null;
   }
}
public void finalize() {
   try {
 deconnection();
   }
   catch (Exception e) {
   logger.error(e.getMessage());
   }
}
public String getStringForSQL(String str) {
   StringBuffer sb = new StringBuffer(255);
   if (str == null) return str;
   char[] cc = str.toCharArray();
   for (char i = 0; i < cc.length; i++) {
   if (cc[i] == '\'') {
   sb.append('\\');
   } else if (cc[i] == '\\') {
   sb.append('\\');
   }
   sb.append(cc[i]);
   }
   return sb.toString();
}
}
_

Thanks again for your attention.

Frederic de la Goublaye


On 6/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:



> My project is working with Tomcat, SQLite and javasqlite.
> http://www.ch-werner.de/javasqlite/
>
> http://www.ysalaya.org
>
> Since a few weeks Tomcat server crashes very often: error 505
> and I need to restart it manually. It is installed on FreeBSD 5.4.
>
> Please see the Tomcat log file bellow.
> It seems to be an error in SQLite outsite the Java Virtual Machine.
>
> ANY IDEAR ?

I see 2 possible explanations:
1. You use the same connection in different threads at the same time.
2. There are bugs in JDBC driver. If this is the case, try driver from
http://www.zentus.com/sqlitejdbc. It for sure has bugs, but may be
different and you won't even notice them. You may use pure java version -
it will be probably slower than JNI based, but should never crash VM.



--
Wicie, rozumicie
Zobacz >>> http://link.interia.pl/f1a74



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




[sqlite] Tomcat crashes with SQLite

2007-06-03 Thread Frederic de la Goublaye

Hi All

My project is working with Tomcat, SQLite and javasqlite.
http://www.ch-werner.de/javasqlite/

http://www.ysalaya.org

Since a few weeks Tomcat server crashes very often: error 505
and I need to restart it manually. It is installed on FreeBSD 5.4.

Please see the Tomcat log file bellow.
It seems to be an error in SQLite outsite the Java Virtual Machine.

ANY IDEAR ?

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x34D8493F
Function=sqlite3VdbeExec+0x10B
Library=/usr/local/lib/libsqlite3.so.8

Current Java thread:
   at SQLite.Vm.step(Native Method)
   at SQLite.Database.get_table(Database.java:175)
   at SQLite.JDBC2x.DatabaseX.get_table(JDBCConnection.java:437)
   at SQLite.JDBC2x.JDBCStatement.executeQuery(JDBCStatement.java:94)
   at SQLite.JDBC2x.JDBCPreparedStatement.executeQuery(
JDBCPreparedStatement.java:71)
   at com.ysalaya.db.SQLite.execQuery(SQLite.java:73)
   at com.ysalaya.data.BotAnswerData.getAnswers(BotAnswerData.java:473)
   at com.ysalaya.dialog.Dialog.getBotMemDirectAnswer(Dialog.java:521)
   at com.ysalaya.dialog.Dialog.setAnswer(Dialog.java:331)
   at com.ysalaya.dialog.Dialog.(Dialog.java:102)
   at com.ysalaya.control.DialogControl.say(DialogControl.java:299)
   at com.ysalaya.control.DialogControl.doGet(DialogControl.java:51)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:672)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(
ApplicationDispatcher.java:463)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(
ApplicationDispatcher.java:398)
   at org.apache.catalina.core.ApplicationDispatcher.forward(
ApplicationDispatcher.java:301)
   at com.ysalaya.control.Control.dialog(Control.java:67)
   at com.ysalaya.control.Control.doGet(Control.java:30)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
   at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
   at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
   at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
   at org.apache.jk.common.ChannelSocket.processConnection(
ChannelSocket.java:697)
   at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(
ChannelSocket.java:889)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:534)

Dynamic libraries:
0x8048000 /usr/local/jdk1.4.2/bin/java
0x2807b000 /usr/lib/libpthread.so.1
0x2809f000 /lib/libc.so.5
0x2817a000 /usr/local/jdk1.4.2/jre/lib/i386/client/libjvm.so
0x285ad000 /usr/lib/libstdc++.so.4
0x2867f000 /lib/libm.so.3
0x2869a000 /usr/local/jdk1.4.2/jre/lib/i386/native_threads/libhpi.so
0x286a8000 /usr/local/jdk1.4.2/jre/lib/i386/libverify.so
0x286bd000 /usr/local/jdk1.4.2/jre/lib/i386/libjava.so
0x286db000 /usr/local/jdk1.4.2/jre/lib/i386/libzip.so
0x286e7000 /lib/libz.so.2
0x3475f000 /usr/local/jdk1.4.2/jre/lib/i386/libnet.so
0x34d49000 /usr/local/lib/libsqlite_jni.so.0
0x34d4f000 /usr/local/lib/libsqlite3.so.8
0x2804e000 /libexec/ld-elf.so.1

Heap at VM Abort:
Heap
def new generation   total 1792K, used 413K [0x2c5d, 0x2c7c,
0x2cab)
 eden space 1600K,  13% used [0x2c5d, 0x2c607418, 0x2c76)
 from space 192K,  99% used [0x2c79, 0x2c7bfff8, 0x2c7c)
 to   space 192K,   0% used [0x2c76, 0x2c76, 0x2c79)
tenured generation   total 23484K, used 19025K [0x2cab, 0x2e19f000,
0x305d)
  the space 23484K,  81% used [0x2cab, 0x2dd44798, 0x2dd44800,
0x2e19f000)
compacting perm gen  total 9216K, used 9002K [0x305d, 0x30ed,
0x345d)
  the space 9216K,  97% used [0x305d, 0x30e9a908, 0x30e9aa00,
0x30ed)

Local Time = Sat Jun  2 07:13:46 2007
Elapsed Time = 30289
#
# The