db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jun Li <allanju...@gmail.com>
Subject Problem with reading XML.
Date Wed, 08 Feb 2006 04:57:29 GMT
Hi all,

Just tried ddlutils today. The XML it generates from database looks greate.
But I have problem with reading XML.
When I was trying to read the XML file generated back to an empty
database(SQL Server), there are exceptions which say: The column nr 5 in
table XXX has no type. However, the XML file really had type attribute and
value for all the columns.
What's the problem there? How could I fix it?

Another problem, I also tied to read a database into model and then write to
an empty database. The exceptions are as follow.

Exception in thread "main" *org.apache.ddlutils.DynaSqlException*: Error
while executing SQL CREATE TABLE "EventSource"

(

"EventSourceID" NUMERIC(9,0) NOT NULL,

"EventSourceTypeFK" NUMERIC(9,0) NOT NULL,

"Name" VARCHAR(100) NOT NULL,

"LoggedBy" VARCHAR(50) DEFAULT 'N'iCMS'' NOT NULL,

"LicenseeFK" NUMERIC(8,0) NOT NULL,

PRIMARY KEY ("EventSourceID")

)

at org.apache.ddlutils.platform.PlatformImplBase.evaluateBatch(*
PlatformImplBase.java:218*)

at org.apache.ddlutils.platform.PlatformImplBase.createTables(*
PlatformImplBase.java:311*)

at org.apache.ddlutils.platform.PlatformImplBase.createTables(*
PlatformImplBase.java:296*)

at Engine.db2xmlEngine.writeXMLToDatabase(*db2xmlEngine.java:71*)

at Engine.db2xmlEngine.main(*db2xmlEngine.java:42*)

Caused by: *java.sql.SQLException*: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Line 6: Incorrect syntax near 'iCMS'.

at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown
Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown
Source)

at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(Unknown
Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)

at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown
Source)

at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown
Source)

at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)

at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)

at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown
Source)

at com.microsoft.jdbc.base.BaseStatement.executeUpdate(Unknown Source)

at org.apache.ddlutils.platform.PlatformImplBase.evaluateBatch(*
PlatformImplBase.java:202*)

... 4 more



Can anyone give me some confidence that ddlutils really works on SQL Server.
I mean can create tables, insert records from reading XML file which
generated from other databases.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message