I am getting the following error when doing a solution import.
We have an app server running on sybase with the relevant server and db’s in place ready for the import.
We are exporting from a developer instance running on mysql.
Sample data import failed com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: No active transaction found for id=0 No active transaction found for id=0
I have performed a clean install of developer using sybase, added the correct databases in sybase and developer.
Upon import, the tables get built fine, but the sample data import still fails with the same error.
I noticed that there are some posts relating to mysql regarding this, but none for sybase
full error code from servoy log is
2010-04-08 12:40:19,204 ERROR [Worker-10] com.servoy.j2db.persistence.XMLInMemoryImportHandlerVersions11AndHigher - com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: No active transaction found for id=0 No active transaction found for id=0
I looked at McCourt’s log files and it looks like that Servoy expects a column in a table but doesn’t create it (as it should be).
This morning I tried to import the sample table bean solution from Dr Maison and I had a similar issue. Again expecting a column but didn’t create it. I deleted the table, restarted Servoy and tried again. Now it cried about the missing table, again not creating it.
The connection has full rights on the (PostgreSQL) database so it should have no problems with permissions.
McCourt and I both use Servoy 5.1.1.
So the issue is seen with 2 different backends (PostgreSQL and Sybase).
ROCLASI:
Here is the Dr. Maison sample file I used.
I can import the sample without any error in clean 5.1.1 . Don’t you have the full stack trace of the error ? Maybe the column exists in memory but doesn’t exist in database ?
Yeah something is going on. The .dbi file is still there, no errors/warnings (at all, it’s empty !?) in the problems view.
Reload table/tables structure from DB doesn’t seem to have any effect. Clean project, ditto.
Tried to remove the table via Servoy, of course it errors but the .dbi is still there. Removed the .dbi via the project explorer, servoy explorer still thinks it’s there.
Anything else I can do ?
Ok, you have startRepositoryAsTeamProvider to false, I guess ? What about Synchronize with DB Server Information ? After deletion you should refresh or restart developer.
Yes, startRepositoryAsTeamProvider is set to false.
I did refresh and even restarted Developer but get the same result.
When using Synchronize with DB Server Information you do need to have an active solution…the failed import gave me no active solution.
Anyway, with an active solution it only allows me to create a .dbi or delete the table. Of course the .dbi is already there and the table is already removed.
Any other way to remove the .dbi reference ?
Edit: finally it shows the missing table error in the problems view but the synchronize windows doesn’t show the correct database.
The first page in Synchronize with DB Server Information wizard is about missing tables. You can create the table or delete dbi. This page is not displayed if there are no missing tables. So, I guess you don’t get this page ? Also, the table should not exist in tables list (if it’s missing). Are you sure the table doesn’t exist on server ?
Okay, I think I found it.
I have 2 connections that point to the same database. 1 points to a schema in that database and the other doesn’t and thus uses the public schema.
Both use the same db username.
The table I deleted was in the public schema. In the other schema there was another table with the same name. When dropping that table and reloading the table structure in Servoy the table disappeared correctly from both connections.
Now I imported the sample solution and it creates the table in the public schema.
Is this correct behavior that when you don’t assign a schema in your connection settings that it also reads the other schemas that this user has access to ?
McCourt, you don’t happen to use schema’s don’t you.