Error importing solution

Hi:

I’m importing a solution from v5.2 to v6, but I receive this error and I can’t import it:

com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: Los nomb
res de columna de cada tabla deben ser únicos. 'Length' de la tabla 'SMART EVENT
S$EP WP Request Tab Field' se especifica más de una vez.
        at com.servoy.j2db.server.Za.Zo.Za(Zo.java:1077)
        at com.servoy.j2db.server.Za.Zo.syncTableObjWithDB(Zo.java:1181)
        at com.servoy.j2db.server.Zc.Zk.importDatabaseInfo(Zk.java:195)
        at com.servoy.eclipse.core.repository.XMLEclipseWorkspaceImportHandlerVe
rsions11AndHigher.importDatabaseInfo(XMLEclipseWorkspaceImportHandlerVersions11A
ndHigher.java:759)
        at com.servoy.j2db.server.Zc.Zeb.Za(Zeb.java:394)
        at com.servoy.j2db.server.Zc.Zeb.importFromJarFile(Zeb.java:537)
        at com.servoy.eclipse.core.repository.XMLEclipseWorkspaceImportHandlerVe
rsions11AndHigher$3.runInWorkspace(XMLEclipseWorkspaceImportHandlerVersions11And
Higher.java:201)
        at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(Internal
WorkspaceJob.java:38)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.sql.SQLException: Los nombres de columna de cada tabla deben ser
 ·nicos. 'Length' de la tabla 'SMART EVENTS$EP WP Request Tab Field' se especifi
ca mßs de una vez.
        at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.j
ava:368)
        at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
        at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
        at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
        at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.
java:584)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java
:546)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.jav
a:723)
        at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:11
60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.servoy.j2db.Za.Zf.invoke(Zf.java:17)
        at $Proxy3.execute(Unknown Source)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStateme
nt.java:264)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStateme
nt.java:264)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStateme
nt.java:264)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStateme
nt.java:264)
        at com.servoy.j2db.server.Za.Zo.Za(Zo.java:223)
        ... 8 more

(The error message is in spanish, it says : Column names in each table must be unique. ‘Length’ in table 'SMART EVENTS $ EP WP Request Field Tab 'is specified more than once)

Of course, column ‘Length’ is only specified once!

When importing, if I deselect the option “Allow data model (database) changes”, I receive this error: “Datamodel change needed: […] but is not allowed from import preferences”.
:?

Hi,

What is it that you are trying to do?

I’m migrating my Servoy 5 solutions to Servoy 6

So your import file thinks it needs to add a new column with the name ‘Length’.
Was the v5 solution connected to the same database when you exported it ?
Are you using the same MSSQL driver in 5 and 6 ? Also is there only 1 MSSQL driver installed under 6? You can’t have multiple versions of the same driver in the drivers directory.

I’m using the same connection with the same driver (jtds 1.2.5)

I’ve changed the driver (MS driver instead of jtds), I’ve tried to import it with “Allow data model (database) changes” option deselected, without success :cry: :cry:

As I said, if I deselect the option “Allow data model (database) changes”, I receive this error: “Datamodel change needed: […] but is not allowed from import preferences”. Can I override this and import the solution anyway?

log-out:
As I said, if I deselect the option “Allow data model (database) changes”, I receive this error: “Datamodel change needed: […] but is not allowed from import preferences”. Can I override this and import the solution anyway?

The data model/database changes have to be done, cannot import without that. So, if Allow data model (database) changes is false and modifications are needed import will fail. Maybe the issue is because of uppercase letter in ‘Length’ ? Do you already the table in database before import? Which is the exact name in database and in solution export?

The solution was made in Servoy 4 and imported in Servoy 5 without problem. I don’t know why I can’t import to 6.

Well, I’ve found a (very strange!) workaround:

  • In 6, I’ve created a new Solution (without any data)
  • I’ve copied all files of solution project directory (in servoy 5 workspace) and I’ve pasted them in the new solution project directory (in servoy 6 workspace).
  • I’ve restarted servoy 6 developer and… voila!! The solutions is “imported”

Thanks