Sql logic error or missing database no such table

SQL logic error or missing database no such table: folders #257 Comments I was using cmissync 1.0.7 with alfresco 4.0 over SSL on Windows 7 64bits and everything was ok, but yesterday I try to install it to one workmate on Windows 7 64bits and It crash everytime we open it. I’m gonna try […]

Содержание

  1. SQL logic error or missing database no such table: folders #257
  2. Comments
  3. Sql logic error or missing database no such table
  4. Comments
  5. Failed to connect: SQL logic error or missing database no such table: RemoteOperation #2007
  6. Comments
  7. Version info
  8. Bug description
  9. Screenshots
  10. debug log

SQL logic error or missing database no such table: folders #257

I was using cmissync 1.0.7 with alfresco 4.0 over SSL on Windows 7 64bits and everything was ok, but yesterday I try to install it to one workmate on Windows 7 64bits and It crash everytime we open it. I’m gonna try to install in other Windows 7 64bits laptop and let you know what’s going on 😉

The text was updated successfully, but these errors were encountered:

Thank you for the feedback!
Dies 1.0.0 work better?
Could you please post the log?
Thank you!
Nicolas Raoul
On Nov 21, 2013 4:48 PM, «antton» notifications@github.com wrote:

I was using cmissync 1.0.7 with alfresco 4.0 over SSL on Windows 7 64bits
and everything was ok, but yesterday I try to install it to one workmate on
Windows 7 64bits and It crash everytime we open it. I’m gonna try to
install in other Windows 7 64bits laptop and let you know what’s going on 😉


Reply to this email directly or view it on GitHubhttps://github.com/nicolas-raoul/CmisSync/issues/257
.

I didn’t have enough time to test the version 1.0.0 but talking about 1.0.7, the problem was that the previous instalattion let me the config file on AppData/cmissync folder and when I open on windows 7 64 bits the first time it crash. (so there is no relation with 64bits, sorry!)

But know I’m having a the following problem (I paste the log in spanish)

Let me know if you want to try the version 1.0.0 yet.

Thanks for the feedback! I edited the issue’s title.

Do you know how to reproduce the problem?
It sounds like #84 which I don’t know how to reproduce, so your help would be great!

Could you please check whether your cmissync.sqlite file contains a «folders» table (you can see with SQLite Browser, open the database in C:UsersnicoAppDataRoamingcmissync or similar).

Thanks a lot!
Nicolas

As I couldn’t find the database file, in that folder, I decided to remove cmissync completly and reinstall again. Now It works properly. The only thing I saw strange was that In uninstall window in windows7 the version 1.0.7 appers as 1.0.6.

That’s all. Thanks for everything.

The database is a file called for instance myfolder.cmissync .

I will now close this issue, but could you please write a small summary of how you solved the issue on #84 ? Thanks a lot!

Источник

Sql logic error or missing database no such table

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I’m trying to use this great library and I just cannot get the tables created at startup. The SQLite file is created, but with a 0 size.

This is my DB context code:

().HasKey(p => p.id); > private static void ConfigureServerEntity(DbModelBuilder modelBuilder) < modelBuilder.Entity ().HasKey(p =>p.id); > > «>

The text was updated successfully, but these errors were encountered:

Which version do you use? This should be fixed with v1.0.0.0 (see issue #43).
Did you try to delete the empty file and run the application again?
If you are using the newest version and the issue persists, can you please send me the whole project?

Thank you very much for responding. I did try to delete the empty file and I am using v1.0.0.0.

I’ll add you to the Github repo where the project is.

I had a look at your code. I created a Console Project to reproduce the issue.
But I’m not able not find a class «Server». I took the classes From «SqliteStructures» and created a DbContext with the code you posted in the issue description.

May you can help me with creating a project to reproduce this issue?
You can download the Console Project here:
https://onedrive.live.com/redir?resid=C8E1BE3E79378699!523889&authkey=!ABUB4-pZYfcgYhw&ithint=file%2czip

Closed because auf inactivity.
Please reopen it, if additional actions are required.

Источник

Failed to connect: SQL logic error or missing database no such table: RemoteOperation #2007

  • [x ] searched open and closed issues for duplicates

Version info

Duplicati Version: v2.0.1.26-2.0.1.26_canary_2016-09-29
Operating System: Windows 10 Pro
Backend: Local Folder that’s uploaded automatically to the cloud

Bug description

I can’t start the backup.

Screenshots

debug log

I changed the target directory for the backup, now I’m getting this:

System.Data.SQLite.SQLiteException (0x80004005): SQL logic error or missing database no such table: RemoteOperation at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain) at System.Data.SQLite.SQLiteCommand.BuildNextCommand() at System.Data.SQLite.SQLiteDataReader.NextResult() at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave) at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) at Duplicati.Server.WebServer.RESTMethods.LogData.DumpTable(IDbCommand cmd, String tablename, String pagingfield, String offset_str, String pagesize_str) at Duplicati.Server.WebServer.RESTMethods.Backup.FetchRemoteLogData(IBackup backup, RequestInfo info) at Duplicati.Server.WebServer.RESTHandler.DoProcess(RequestInfo info, String method, String module, String key)

The text was updated successfully, but these errors were encountered:

Источник

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account


Closed

phspies opened this issue

Dec 10, 2015

· 5 comments

Assignees

@msallin

Comments

@phspies

I’m trying to use this great library and I just cannot get the tables created at startup. The SQLite file is created, but with a 0 size.

Any ideas why?

This is my DB context code:

        public DB()

        : base("DB")
        {
            //Configuration.ProxyCreationEnabled = true;
            //Configuration.LazyLoadingEnabled = true;
        }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            //modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();

            ConfigureCredentialEntity(modelBuilder);
            ConfigurePlatformEntity(modelBuilder);
            ConfigureServerEntity(modelBuilder);

            var sqliteConnectionInitializer = new SqliteCreateDatabaseIfNotExists<CloudMoveyEntities>(modelBuilder);

            Database.SetInitializer(sqliteConnectionInitializer);
        }

and

    public partial class DB : DbContext
    {
        private static void ConfigureCredentialEntity(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Credential>().HasKey(p => p.id);
        }
        private static void ConfigurePlatformEntity(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Platform>().HasKey(p => p.id);
        }
        private static void ConfigureServerEntity(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Server>().HasKey(p => p.id);
        }
    }

@msallin

Which version do you use? This should be fixed with v1.0.0.0 (see issue #43).
Did you try to delete the empty file and run the application again?
If you are using the newest version and the issue persists, can you please send me the whole project?

@phspies

Marc,

Thank you very much for responding…I did try to delete the empty file and I am using v1.0.0.0.

I’ll add you to the Github repo where the project is.

Regards

@msallin

@msallin

Closed because auf inactivity.
Please reopen it, if additional actions are required.

@Clockwork-Muse

Given my current experience, one reason this can happen is if there’s an explicit call to context.Database.Connection.Open() preceding EF initalization, that is, before the initializer is run. (Why? I dunno — this is maybe something to bring up with the SQLite people). I can’t dodge the explicit call in my case (I have multiple concurrent transactions), so getting the context and just asking for Any on one of the relationships during process setup is what I have to do. Commands to CREATE TABLE run just fine (no exception is thrown), but seem to have no effect in the db

Сначала я пытаюсь реализовать этот вопрос с помощью кода SQLite и EntityFramework 6. Я могу создать базу данных, и есть файл (хотя и пустой), но когда я пытаюсь добавить запись в базу данных, он говорит, что такой таблицы нет. Тем не менее, когда я пытаюсь создать таблицу вручную (db.Database.ExecuteSqlCommand("CREATE TABLE etc.)), Он сообщает мне, что таблица уже существует.

Я уже нашел некоторые вопросы об этом, но все они касаются того, что путь не является абсолютным, что здесь просто не так.

контекст

//Context:
class MediaContext : DbContext
{
    public DbSet<MediaModel> Media { get; set; }

    public MediaContext(string filename): base(new SQLiteConnection() {
        ConnectionString =
            new SQLiteConnectionStringBuilder()
            { DataSource = filename, ForeignKeys = false }
            .ConnectionString
    }, true)
    {

    }        
}

DAL

//In the DAL:
public DataAccessLayer(string path)
{
   _path = Path.GetFullPath(path); //<--The path already comes full in, I'm just paranoid at this point.
   _connectionPath = _path + @"MyDatabase.sqlite";

   using (var db = new MediaContext(_connectionPath))
   {
      db.Database.CreateIfNotExists();
      db.Database.Initialize(false);                

       db.SaveChanges();
   }

   public void Generate()
   {
       using (var db = new MediaContext(_connectionPath))
       {
          db.Media.Add(new MediaModel("test"));
          db.SaveChanges(); //<--SQLiteException: SQL logic error or missing database: no such table: MediaModels

        }
    }

App.Config

//App.config:
<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
  </startup>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v13.0" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite.EF6" />
      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
      <remove invariant="System.Data.SQLite.EF6" />
      <add name="SQLite Data Provider" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
    </DbProviderFactories>
  </system.data>
</configuration>

KolesnikovIgor

1 / 1 / 1

Регистрация: 05.12.2016

Сообщений: 26

1

29.03.2017, 23:01. Показов 7095. Ответов 4

Метки нет (Все метки)


Здравствуйте! Вот часть моего кода:

Java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import java.sql.*;
 
class SQLClient {
    private static Connection connection;
    private static Statement statement;
 
    synchronized static void connect() {
        try {
            Class.forName("org.sqlite.JDBC");
            connection = DriverManager.getConnection("jdbc:sqlite:chat_db.sqlite");
            statement = connection.createStatement();
        } catch (ClassNotFoundException | SQLException e) {
            e.printStackTrace();
        }
    }
 
    synchronized static void disconnect() {
        try {
            connection.close();
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }
 
    synchronized static String getNick(String login, String pass) {
        String request = "SELECT nickname FROM users WHERE login='" + login + "' AND password='" + pass + "'";
        try(ResultSet resultSet = statement.executeQuery(request);) {
            if(resultSet.next()) {
                return resultSet.getString(1);
            } else {
                return null;
            }
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }
}

Смысл в том, что это часть кода чата. В чат нужно запихнуть базу данных, но не удаётся. Вылазит следующая ошибка:

[SQLITE_ERROR] SQL error or missing database (no such table: users)

Испробовал различные методы, в том числе подробное указание расположения самой базы данных, но ничего не помогает.
Может вы сможете мне что-нибудь подсказать.
Если нужно, скину весь код.
Заранее спасибо!

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Эксперт Java

3636 / 2968 / 918

Регистрация: 05.07.2013

Сообщений: 14,220

29.03.2017, 23:38

2

Полный путь к файлу укажи, сделай селект в sqlite_master кажется, посмотри что пишет.



0



1 / 1 / 1

Регистрация: 05.12.2016

Сообщений: 26

29.03.2017, 23:51

 [ТС]

3

Пробовал написать полный путь к файлу, но это всё равно не помогло. Делал проверку существования таблицы с помощью селекта. Мне отобразило 1, значит таблица существует, но в джаве почему-то всё равно вылазит ошибка, что таблицы нет



0



183 / 110 / 44

Регистрация: 03.07.2016

Сообщений: 496

30.03.2017, 00:03

4

А класс у тебя тоже users называеться или Users, User. По после FROM с именем поиграться. Блин хотя может этот прикол только в JPA



0



1 / 1 / 1

Регистрация: 05.12.2016

Сообщений: 26

30.03.2017, 11:47

 [ТС]

5

У меня нет класса Users. Так только таблица называется

Добавлено через 11 часов 27 минут
Спасибо всем огромное за помощь! У меня всё работает, но я удалил старую базу данных и создал новую. Кардинально решил проблему



1



Понравилась статья? Поделить с друзьями:
  • Sql logic error or missing database no such column
  • Sql logic error near where syntax error
  • Sql logic error incomplete input
  • Sql loader 704 internal error ulconnect ociserverattach 0
  • Sql insert into select error