Search the FirstSpirit Knowledge Base
Hallo,
ich bekomme beim Anlegen von einem neuen Datenbankschema die folgende Fehlermeldung.
Das Schema wird bereits in einem anderen Projekt genutzt, liegt es evtl. dadran?
Die Datenbank ist auf jedenfall richtig (über die Administrationsoberfläche) konfiguriert.
Admin (Admin), session: 5634446451352562353, project: 4439, ip: 172.17.13.22
Fehler (de.espirit.firstspirit.client.action.SaveAction): SaveAction.actionPerformed() - de.espirit.or.SchemaException: com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named 'FIRSTSPIRITCMS' in the database.
FSVersion=4.2.432.43881#2575;JDK=1.6.0_03 32bit Sun Microsystems Inc.;OS=Windows XP 5.1 x86;Date=03.08.2011 11:29:24
de.espirit.or.SchemaException: com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named 'FIRSTSPIRITCMS' in the database.
at de.espirit.or.impl.generic.GenericSchemaSynchronizer.createSchema(GenericSchemaSynchronizer.java:237)
at de.espirit.or.impl.generic.GenericSchemaSynchronizer.updateDB(GenericSchemaSynchronizer.java:130)
at de.espirit.or.impl.schema.SchemaImpl.updateDBTables(SchemaImpl.java:390)
at de.espirit.or.impl.AbstractSessionHandler.syncSchemaWithDB(AbstractSessionHandler.java:889)
at de.espirit.or.impl.AbstractSessionHandler.syncSchemaWithDB(AbstractSessionHandler.java:75)
at de.espirit.firstspirit.content.ContentManagerImpl$TemporalSessionHandler.syncSchemaWithDB(ContentManagerImpl.java:1260)
at de.espirit.firstspirit.content.ContentManagerImpl.syncSchema(ContentManagerImpl.java:663)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at de.espirit.firstspirit.io.DefaultServerHandler.callManager(DefaultServerHandler.java:62)
at de.espirit.firstspirit.server.io.handler.ManagerCall.doCall(ManagerCall.java:91)
at de.espirit.firstspirit.server.io.handler.ManagerCall.handle(ManagerCall.java:67)
at de.espirit.firstspirit.server.io.ManagerCallWorker.run(ManagerCallWorker.java:108)
at de.espirit.firstspirit.server.ExecutionManagerImpl$RunnableWrapper.call(ExecutionManagerImpl.java:553)
at de.espirit.firstspirit.server.ExecutionManagerImpl$ExtendedCallable.call(ExecutionManagerImpl.java:520)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at de.espirit.common.util.BoundedExecutorService$RunnableWrapper.run(BoundedExecutorService.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at de.espirit.common.util.SuspendableThread.run(SuspendableThread.java:36)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named 'FIRSTSPIRITCMS' in the database.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:775)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:676)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:649)
at de.espirit.or.impl.generic.GenericSchemaSynchronizer.createSchema(GenericSchemaSynchronizer.java:234)
at de.espirit.or.impl.generic.GenericSchemaSynchronizer.updateDB(GenericSchemaSynchronizer.java:130)
at de.espirit.or.impl.schema.SchemaImpl.updateDBTables(SchemaImpl.java:390)
at de.espirit.or.impl.AbstractSessionHandler.syncSchemaWithDB(AbstractSessionHandler.java:889)
at de.espirit.or.impl.AbstractSessionHandler.syncSchemaWithDB(AbstractSessionHandler.java:75)
at de.espirit.firstspirit.content.ContentManagerImpl$TemporalSessionHandler.syncSchemaWithDB(ContentManagerImpl.java:1260)
at de.espirit.firstspirit.content.ContentManagerImpl.syncSchema(ContentManagerImpl.java:663)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at de.espirit.firstspirit.io.DefaultServerHandler.callManager(DefaultServerHandler.java:62)
at de.espirit.firstspirit.server.io.handler.ManagerCall.doCall(ManagerCall.java:91)
at de.espirit.firstspirit.server.io.handler.ManagerCall.handle(ManagerCall.java:67)
at de.espirit.firstspirit.server.io.ManagerCallWorker.run(ManagerCallWorker.java:108)
at de.espirit.firstspirit.server.ExecutionManagerImpl$RunnableWrapper.call(ExecutionManagerImpl.java:553)
at de.espirit.firstspirit.server.ExecutionManagerImpl$ExtendedCallable.call(ExecutionManagerImpl.java:520)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at de.espirit.common.util.BoundedExecutorService$RunnableWrapper.run(BoundedExecutorService.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at de.espirit.firstspirit.client.io.ServerCaller.callManager(ServerCaller.java:372)
at de.espirit.firstspirit.io.DefaultClientHandler.callManager(DefaultClientHandler.java:49)
at de.espirit.firstspirit.client.io.RemoteManagerCaller.invoke(RemoteManagerCaller.java:52)
at de.espirit.firstspirit.server.$Proxy98.syncSchema(Unknown Source)
at de.espirit.firstspirit.store.access.templatestore.SessionHandlerImpl.syncSchemaWithDB(SessionHandlerImpl.java:123)
at de.espirit.or.impl.AbstractSession.syncSchemaWithDB(AbstractSession.java:441)
at de.espirit.firstspirit.store.access.templatestore.SchemaImpl.saveExternalAttributes(SchemaImpl.java:312)
at de.espirit.firstspirit.store.access.DefaultStoreElement.save(DefaultStoreElement.java:707)
at de.espirit.firstspirit.store.access.DefaultStoreElement.save(DefaultStoreElement.java:687)
at de.espirit.firstspirit.client.gui.tree.store.AbstractGuiStoreElement.writeToServer(AbstractGuiStoreElement.java:629)
at de.espirit.firstspirit.client.gui.tree.store.AbstractGuiStoreElement.save(AbstractGuiStoreElement.java:581)
at de.espirit.firstspirit.client.gui.tree.store.AbstractGuiStoreElement.save(AbstractGuiStoreElement.java:565)
at de.espirit.firstspirit.client.gui.tree.store.AbstractGuiStoreElement.save(AbstractGuiStoreElement.java:552)
at de.espirit.firstspirit.client.action.SaveAction.actionPerformed(SaveAction.java:78)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at de.espirit.firstspirit.client.AWTDispatchingEventQueue.defaultDispatchEvent(AWTDispatchingEventQueue.java:130)
at de.espirit.firstspirit.client.AWTDispatchingEventQueue._dispatchEvent(AWTDispatchingEventQueue.java:115)
at de.espirit.firstspirit.client.AWTDispatchingEventQueue.dispatchEvent(AWTDispatchingEventQueue.java:108)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
Wenn der Datenbanklayer in mehreren Projekten genutzt wird, sollte es in der Regel ein DBA-Layer sein. Das ist hier wohl nicht der Fall, so dass es zu Konflikten kommt.
Das war wohl nicht das Problem. Ich habe ein neues Schema angelegt und hatte mit diesem ebenfalls ein Problem. FirstSpirit hat versucht beim Anlegen einer neuen Tabelle das Schema mit anzulegen (kann das sein?).
Ich habe das Schema per Hand auf der Datenbank gelöscht. Nachdem ich dann in FirstSpirit nochmal eine neue Tabelle angelegt habe, hat FirstSpirit das Schmea mit angelegt. Jetzt funktioniert es also.