connect diffkit to MS SQL 2005

83 views
Skip to first unread message

sergey

unread,
Nov 30, 2010, 6:56:34 AM11/30/10
to diffkit-user
Dear Team,

Would you please help me.

I want try use diffkit with MSSQL 2005.

1) created test db on my sql server
2) double check TCP/IP is available
3) changed connection document to my local server
4) started test case

DiffKit home->C:\33\diffkit-0.8.3
running TestCases
DEBUG[13:29:36.312]{main}(DKDatabase.canConnect:166)-null
java.lang.RuntimeException: java.lang.ClassNotFoundException: Failure
to load: com.microsoft.sqlserver.jdbc.SQLServerDriver
at org.diffkit.db.DKDatabase.getConnection(DKDatabase.java:68)
[diffkit-app.jar:na]
at org.diffkit.db.DKDatabase.canConnect(DKDatabase.java:155) [diffkit-
app.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:
1.5.0_11]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [na:
1.5.0_11]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[na:1.5.0_11]
at java.lang.reflect.Method.invoke(Unknown Source) [na:1.5.0_11]
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite
$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:
229) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:
52) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
40) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
117) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
121) [diffkit-app.jar:na]
at
org.diffkit.diff.testcase.TestCaseRunner.validateFlavor(TestCaseRunner.groovy:
214) [diffkit-app.jar:na]
at org.diffkit.diff.testcase.TestCaseRunner.this
$2$validateFlavor(TestCaseRunner.groovy) [diffkit-app.jar:na]
at org.diffkit.diff.testcase.TestCaseRunner$this
$2$validateFlavor.callCurrent(Unknown Source) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:
44) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
143) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
151) [diffkit-app.jar:na]
at
org.diffkit.diff.testcase.TestCaseRunner.setupRunnerRun(TestCaseRunner.groovy:
150) [diffkit-app.jar:na]
at org.diffkit.diff.testcase.TestCaseRunner.this
$2$setupRunnerRun(TestCaseRunner.groovy) [diffkit-app.jar:na]
at org.diffkit.diff.testcase.TestCaseRunner$this
$2$setupRunnerRun.callCurrent(Unknown Source) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:
44) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
143) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
151) [diffkit-app.jar:na]
at org.diffkit.diff.testcase.TestCaseRunner.run(TestCaseRunner.groovy:
115) [diffkit-app.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:
1.5.0_11]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [na:
1.5.0_11]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[na:1.5.0_11]
at java.lang.reflect.Method.invoke(Unknown Source) [na:1.5.0_11]
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88) [diffkit-app.jar:na]
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
[diffkit-app.jar:na]
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
[diffkit-app.jar:na]
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
[diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:
66) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:
44) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
143) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
151) [diffkit-app.jar:na]
at org.diffkit.diff.testcase.TestCaseRunner
$_run_closure1.doCall(TestCaseRunner.groovy:101) [diffkit-app.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:
1.5.0_11]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [na:
1.5.0_11]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[na:1.5.0_11]
at java.lang.reflect.Method.invoke(Unknown Source) [na:1.5.0_11]
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88) [diffkit-app.jar:na]
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
[diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:
273) [diffkit-app.jar:na]
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
[diffkit-app.jar:na]
at groovy.lang.Closure.call(Closure.java:276) [diffkit-app.jar:na]
at groovy.lang.Closure.call(Closure.java:289) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:
1184) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:
1160) [diffkit-app.jar:na]
at org.codehaus.groovy.runtime.dgm$111.invoke(Unknown Source)
[diffkit-app.jar:na]
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite
$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:
270) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:
52) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
40) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
117) [diffkit-app.jar:na]
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
125) [diffkit-app.jar:na]
at org.diffkit.diff.testcase.TestCaseRunner.run(TestCaseRunner.groovy:
100) [diffkit-app.jar:na]
at org.diffkit.diff.conf.DKTestBridge.runTestCases(DKTestBridge.java:
45) [diffkit-app.jar:na]
at
org.diffkit.diff.conf.DKApplication.runTestCases(DKApplication.java:
205) [diffkit-app.jar:na]
at org.diffkit.diff.conf.DKApplication.main(DKApplication.java:108)
[diffkit-app.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:
1.5.0_11]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [na:
1.5.0_11]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[na:1.5.0_11]
at java.lang.reflect.Method.invoke(Unknown Source) [na:1.5.0_11]
at
com.jdotsoft.jarloader.JarClassLoader.invokeMain(JarClassLoader.java:
520) [diffkit-app.jar:na]
at org.diffkit.diff.conf.DKLauncher.main(DKLauncher.java:26) [diffkit-
app.jar:na]
Caused by: java.lang.ClassNotFoundException: Failure to load:
com.microsoft.sqlserver.jdbc.SQLServerDriver
at
com.jdotsoft.jarloader.JarClassLoader.loadClass(JarClassLoader.java:
582) [diffkit-app.jar:na]
at java.lang.ClassLoader.loadClass(Unknown Source) [na:1.5.0_11]
at java.lang.ClassLoader.loadClassInternal(Unknown Source) [na:
1.5.0_11]
at java.lang.Class.forName0(Native Method) [na:1.5.0_11]
at java.lang.Class.forName(Unknown Source) [na:1.5.0_11]
at org.diffkit.db.DKDatabase.getConnection(DKDatabase.java:65)
[diffkit-app.jar:na]
... 64 common frames omitted
can't connect to database for connectionInfo-
>DKDBConnectionInfo[sqlserver(flavor=SQLSERVER,database=test,host=localhost,port=1433)],
skipping.
couldn't validate flavor->SQLSERVER, skipping.

I think problem is here
Caused by: java.lang.ClassNotFoundException: Failure to load:
com.microsoft.sqlserver.jdbc.SQLServerDriver

Help me please, how can I check sql server drive?

Thank you.

Sergey

joe

unread,
Nov 30, 2010, 7:38:04 AM11/30/10
to diffkit-user
Sergey,

Could you please post:

- you operating system
- version of java (java -version)
- since you are on Windows, which launcher are you using? cmd.exe?
- the exact command you use to launch DiffKit

thanks,

Joe
> can't connect to database for connectionInfo->DKDBConnectionInfo[sqlserver(flavor=SQLSERVER,database=test,host=localhost ,port=1433)],

sergey

unread,
Nov 30, 2010, 5:30:39 PM11/30/10
to diffkit-user
Hello Joe,

Thank you for your answer.

> - you operating system
Win 2008 R2

> - version of java (java -version)
1.5.0_11

> - since you are on Windows, which launcher are you using? cmd.exe?
Far Manager but under cmd same thing

> - the exact command you use to launch DiffKit
java -jar diffkit-app.jar -test flavors=SQLSERVER

I have same error when I am using my compare plan of two tables.

Thank you.

Sergey
> > can't connect to database for connectionInfo->DKDBConnectionInfo[sqlserver(flavor=SQLSERVER,database=test-,host=localhost ,port=1433)],
>
> > skipping.
> > couldn't validate flavor->SQLSERVER, skipping.
>
> > I think problem is here
> > Caused by: java.lang.ClassNotFoundException: Failure to load:
> > com.microsoft.sqlserver.jdbc.SQLServerDriver
>
> > Help me please, how can I check sql server drive?
>
> > Thank you.
>
> > Sergey- Скрыть цитируемый текст -
>
> - Показать цитируемый текст -

joe

unread,
Dec 1, 2010, 5:51:17 AM12/1/10
to diffkit-user
Sergey,

I was able to reproduce the error using Java 1.5. I've discovered that
the SQLServer JDBC driver that we embed within DiffKit only works with
Java 1.6. Apparently, MS does not have a single JDBC driver that works
with 1.5 and 1.6. Our regression test suite runs under 1.6 and we
don't continuously back test against Java 1.5.

Are you able to use Java 1.6 instead of 1.5? DiffKit is known to work
on 1.6 against SQLServer.

cheers,

Joe

On Nov 30, 5:30 pm, sergey <serge...@gmail.com> wrote:
> Hello Joe,
>
> Thank you for your answer.
>
> > - you operating system
>
> Win 2008 R2
>
> > - version of java (java -version)
>
> 1.5.0_11
>
> > - since you are on Windows, which launcher are you using? cmd.exe?
>
> Far Manager but under cmd same thing
>
> > - the exact command you use to launch DiffKit
>
> java -jar diffkit-app.jar -test flavors=SQLSERVER
>
> I have same error when I am using my compare plan of two tables.
>
> Thank you.
>
> Sergey
>
> > > can't connect to database for connectionInfo->DKDBConnectionInfo[sqlserver(flavor=SQLSERVER,database=test -,host=localhost ,port=1433)],
>
> > > skipping.
> > > couldn't validate flavor->SQLSERVER, skipping.
>
> > > I think problem is here
> > > Caused by:
>
> ...
>
> read more »

sergey

unread,
Dec 1, 2010, 7:01:46 AM12/1/10
to diffkit-user
Hello Joe,

Thank you for your help.
I will try DiffKit under Java 1.6 today.

Thank you.

Best regards,
Sergey
> ...
>
> продолжение »- Скрыть цитируемый текст -

sergey

unread,
Dec 1, 2010, 11:58:03 AM12/1/10
to diffkit-user
Hello Joe,

DiffKit is working fine under java 1.6

Help me please, I have other error.
I have two databases on same server and I need find difference in
scheme and data. (this is old and new version of same database)
Some of tables don't have key/unique column
SQL 2005

"C:\Program Files (x86)\Java\jdk1.6.0_22\bin\java" -jar diffkit-
app.jar -planfiles
test18.plan.xml,test18.lhs.dbConnectionInfo.xml,test18.rhs.dbConnectionInfo.xml

test18.plan.xml

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

<bean id="plan" class="org.diffkit.diff.conf.DKMagicPlan">
<property name="lhsDBTableName" value="Servers" />
<property name="rhsDBTableName" value="Servers" />
<property name="lhsDBConnectionInfo" ref="lhsDBConnectionInfo" />
<property name="rhsDBConnectionInfo" ref="rhsDBConnectionInfo" />
<property name="sinkFilePath" value="./test18.sink.diff" />
<property name="keyColumnNames">
<list>
<value>ServerNumber</value>
</list>
</property>
</bean>

</beans>


test18.lhs.dbConnectionInfo.xml
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">


<bean id="lhsDBConnectionInfo"
class="org.diffkit.db.DKDBConnectionInfo">
<constructor-arg index="0" value="sqlserver" />
<constructor-arg index="1" value="SQLSERVER" />
<constructor-arg index="2" value="testdb" />
<constructor-arg index="3" value="localhost" />
<constructor-arg index="4" value="1433" />
<constructor-arg index="5" value="sa" />
<constructor-arg index="6" value="xxx" />
</bean>

</beans>

test18.rhs.dbConnectionInfo.xml

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">


<bean id="rhsDBConnectionInfo"
class="org.diffkit.db.DKDBConnectionInfo">
<constructor-arg index="0" value="sqlserver" />
<constructor-arg index="1" value="SQLSERVER" />
<constructor-arg index="2" value="testdb" />
<constructor-arg index="3" value="localhost" />
<constructor-arg index="4" value="1433" />
<constructor-arg index="5" value="sa" />
<constructor-arg index="6" value="xxx" />
</bean>

</beans>

result is

DiffKit home->C:\33\diffkit-0.8.3
planfile(s)->test18.plan.xml
ERROR[18:48:18.093]{main}(DKApplication.main:130)-null
java.lang.RuntimeException: java.lang.RuntimeException: Could not
resolve automatically; need rule for dependency-
>Dependency[(DKPassthroughPlan,null)]
at org.diffkit.diff.conf.DKMagicPlan.getBuiltPlan(DKMagicPlan.java:
290) [diffkit-app.jar:na]
at org.diffkit.diff.conf.DKMagicPlan.getLhsSource(DKMagicPlan.java:
267) [diffkit-app.jar:na]
at org.diffkit.diff.conf.DKApplication.runPlan(DKApplication.java:
162) [diffkit-app.jar:na]
at org.diffkit.diff.conf.DKApplication.main(DKApplication.java:110)
[diffkit-app.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:
1.6.0_22]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39) [na:1.6.0_22]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25) [na:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22]
at
com.jdotsoft.jarloader.JarClassLoader.invokeMain(JarClassLoader.java:
520) [diffkit-app.jar:na]
at org.diffkit.diff.conf.DKLauncher.main(DKLauncher.java:26) [diffkit-
app.jar:na]
Caused by: java.lang.RuntimeException: Could not resolve
automatically; need rule for dependency-
>Dependency[(DKPassthroughPlan,null)]
at
org.diffkit.diff.conf.DKMagicPlanBuilder.resolve(DKMagicPlanBuilder.java:
110) [diffkit-app.jar:na]
at
org.diffkit.diff.conf.DKMagicPlanBuilder.build(DKMagicPlanBuilder.java:
56) [diffkit-app.jar:na]
at org.diffkit.diff.conf.DKMagicPlan.getBuiltPlan(DKMagicPlan.java:
287) [diffkit-app.jar:na]
... 9 common frames omitted
Caused by: java.lang.RuntimeException: Could not resolve
automatically; need rule for dependency-
>Dependency[DKPassthroughPlan(DKDBSource,lhsSource_)]
at
org.diffkit.diff.conf.DKMagicPlanBuilder.resolve(DKMagicPlanBuilder.java:
102) [diffkit-app.jar:na]
... 11 common frames omitted
Caused by: java.lang.RuntimeException: Could not resolve
automatically; need rule for dependency-
>Dependency[DKPassthroughPlan(DKDBSource,lhsSource_)]
at
org.diffkit.diff.conf.DKMagicPlanBuilder.resolve(DKMagicPlanBuilder.java:
110) [diffkit-app.jar:na]
at
org.diffkit.diff.conf.DKMagicPlanBuilder.resolve(DKMagicPlanBuilder.java:
82) [diffkit-app.jar:na]
at
org.diffkit.diff.conf.DKMagicPlanBuilder.resolve(DKMagicPlanBuilder.java:
99) [diffkit-app.jar:na]
... 11 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) [na:1.6.0_22]
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39) [na:1.6.0_22]
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27) [na:1.6.0_22]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[na:1.6.0_22]
at
org.diffkit.diff.conf.DKMagicDependency.resolve(DKMagicDependency.java:
165) [diffkit-app.jar:na]
at
org.diffkit.diff.conf.DKMagicPlanBuilder.resolve(DKMagicPlanBuilder.java:
107) [diffkit-app.jar:na]
... 13 common frames omitted
Caused by: java.lang.NullPointerException: null
at
org.diffkit.db.DKDBTableDataAccess.constructColumn(DKDBTableDataAccess.java:
154) [diffkit-app.jar:na]
at
org.diffkit.db.DKDBTableDataAccess.constructTable(DKDBTableDataAccess.java:
138) [diffkit-app.jar:na]
at
org.diffkit.db.DKDBTableDataAccess.getTables(DKDBTableDataAccess.java:
114) [diffkit-app.jar:na]
at
org.diffkit.db.DKDBTableDataAccess.getTable(DKDBTableDataAccess.java:
88) [diffkit-app.jar:na]
at
org.diffkit.db.DKDBTableDataAccess.getTable(DKDBTableDataAccess.java:
76) [diffkit-app.jar:na]
at org.diffkit.diff.sns.DKDBSource.getTable(DKDBSource.java:239)
[diffkit-app.jar:na]
at org.diffkit.diff.sns.DKDBSource.<init>(DKDBSource.java:98)
[diffkit-app.jar:na]
... 19 common frames omitted

Help me please understend, what am I doing not right.

Thank you

Sergey

joe

unread,
Dec 1, 2010, 9:06:21 PM12/1/10
to diffkit-user
Sergey,

Looks like you've found a bug in DiffKit. It might be related to the
fact that you're using SQL 2005, but we only verified SQL 2008. I'd
like to fix the problem and verify 2005. It would be very helpful if
you can rerun the same command above, but with debugging/tracing
turned on, and then post or upload the entire log output (from the
very start).

In the conf/ directory under the distribution, there is a file named
"logback.xml". In that file, add a new entry just above the existing
entry. It currently looks like this:

<logger name="org.diffkit">
<level value="warn" />
</logger>

After you're done, it should look like this:

<logger name="org.diffkit.db">
<level value="debug" />
</logger>
<logger name="org.diffkit">
<level value="warn" />
</logger>

Then save the logback.xml file and rerun DiffKit.

thanks,

Joe

On Dec 1, 11:58 am, sergey <serge...@gmail.com> wrote:
> Hello Joe,
>
> DiffKit is working fine under java 1.6
>
> Help me please, I have other error.
> I have two databases on same server and I need find difference in
> scheme and data. (this is old and new version of same database)
> Some of tables don't have key/unique column
> SQL 2005
>
> "C:\Program Files (x86)\Java\jdk1.6.0_22\bin\java" -jar diffkit-
> app.jar -planfiles
> test18.plan.xml,test18.lhs.dbConnectionInfo.xml,test18.rhs.dbConnectionInfo .xml
>
> test18.plan.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
>
>         <bean id="plan" class="org.diffkit.diff.conf.DKMagicPlan">
>                 <property name="lhsDBTableName" value="Servers" />
>                 <property name="rhsDBTableName" value="Servers" />
>                 <property name="lhsDBConnectionInfo" ref="lhsDBConnectionInfo" />
>                 <property name="rhsDBConnectionInfo" ref="rhsDBConnectionInfo" />
>                 <property name="sinkFilePath" value="./test18.sink.diff" />
>                 <property name="keyColumnNames">
>                         <list>
>                                 <value>ServerNumber</value>
>                         </list>
>                 </property>
>         </bean>
>
> </beans>
>
> test18.lhs.dbConnectionInfo.xml
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
>
>         <bean id="lhsDBConnectionInfo"
> class="org.diffkit.db.DKDBConnectionInfo">
>                 <constructor-arg index="0" value="sqlserver" />
>                 <constructor-arg index="1" value="SQLSERVER" />
>                 <constructor-arg index="2" value="testdb" />
>       <constructor-arg index="3" value="localhost" />
>       <constructor-arg index="4" value="1433" />
>                 <constructor-arg index="5" value="sa" />
>                 <constructor-arg index="6" value="xxx" />
>         </bean>
>
> </beans>
>
> test18.rhs.dbConnectionInfo.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

joe

unread,
Dec 1, 2010, 9:13:24 PM12/1/10
to diffkit-user
Sergey,

I think I've spotted the bug. Looks like the column naming
conventions, for the meta-information, are a little different in 2005
than for 2008, and my code doesn't guard against that. I'm planning to
push out a fix release in the morning.

cheers,

Joe

On Dec 1, 11:58 am, sergey <serge...@gmail.com> wrote:
> Hello Joe,
>
> DiffKit is working fine under java 1.6
>
> Help me please, I have other error.
> I have two databases on same server and I need find difference in
> scheme and data. (this is old and new version of same database)
> Some of tables don't have key/unique column
> SQL 2005
>
> "C:\Program Files (x86)\Java\jdk1.6.0_22\bin\java" -jar diffkit-
> app.jar -planfiles
> test18.plan.xml,test18.lhs.dbConnectionInfo.xml,test18.rhs.dbConnectionInfo .xml
>
> test18.plan.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
>
>         <bean id="plan" class="org.diffkit.diff.conf.DKMagicPlan">
>                 <property name="lhsDBTableName" value="Servers" />
>                 <property name="rhsDBTableName" value="Servers" />
>                 <property name="lhsDBConnectionInfo" ref="lhsDBConnectionInfo" />
>                 <property name="rhsDBConnectionInfo" ref="rhsDBConnectionInfo" />
>                 <property name="sinkFilePath" value="./test18.sink.diff" />
>                 <property name="keyColumnNames">
>                         <list>
>                                 <value>ServerNumber</value>
>                         </list>
>                 </property>
>         </bean>
>
> </beans>
>
> test18.lhs.dbConnectionInfo.xml
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
>
>         <bean id="lhsDBConnectionInfo"
> class="org.diffkit.db.DKDBConnectionInfo">
>                 <constructor-arg index="0" value="sqlserver" />
>                 <constructor-arg index="1" value="SQLSERVER" />
>                 <constructor-arg index="2" value="testdb" />
>       <constructor-arg index="3" value="localhost" />
>       <constructor-arg index="4" value="1433" />
>                 <constructor-arg index="5" value="sa" />
>                 <constructor-arg index="6" value="xxx" />
>         </bean>
>
> </beans>
>
> test18.rhs.dbConnectionInfo.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce ssorImpl.java:
> 39) [na:1.6.0_22]
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru ctorAccessorImpl.java:

sergey

unread,
Dec 2, 2010, 1:53:49 AM12/2/10
to diffkit-user
Hello Joe,

Thank you fro help

DiffKit home->C:\33\diffkit-0.8.3
planfile(s)->test18.plan.xml
DEBUG[08:47:27.170]{main}(DKDatabase.getConnection:71)-jdbcUrl-
>jdbc:sqlserver://localhost:1433;databaseName=xxx
DEBUG[08:47:27.701]{main}(DKDBTableDataAccess.getTableMaps:206)-
catalog_->null
DEBUG[08:47:27.701]{main}(DKDBTableDataAccess.getTableMaps:207)-
schema_->null
DEBUG[08:47:27.701]{main}(DKDBTableDataAccess.getTableMaps:208)-
tableName_->Servers
DEBUG[08:47:27.873]{main}(DKDBTableDataAccess.getTableMaps:210)-
tablesRS->SQLServerResultSet:1
DEBUG[08:47:27.888]{main}(DKDBTableDataAccess.getTableMaps:216)-
tableMaps->[{TABLE_NAME=Servers, REMARKS=null, TABLE_TYPE=TABLE,
TABLE_SCHEM=dbo, TABLE_CAT=MyCIAnalysisDB}]
DEBUG[08:47:27.888]{main}(DKDBTableDataAccess.getTables:109)-tableMap-
>{TABLE_NAME=Servers, REMARKS=null, TABLE_TYPE=TABLE, TABLE_SCHEM=dbo,
TABLE_CAT=MyCIAnalysisDB}
DEBUG[08:47:27.888]{main}(DKDBTableDataAccess.getColumnMaps:192)-
catalogName->MyCIAnalysisDB
DEBUG[08:47:27.888]{main}(DKDBTableDataAccess.getColumnMaps:193)-
schemaName->dbo
DEBUG[08:47:27.888]{main}(DKDBTableDataAccess.getColumnMaps:194)-
tableName->Servers
DEBUG[08:47:28.029]{main}(DKDBTableDataAccess.getColumnMaps:198)-
columnMaps->[{SS_DATA_TYPE=56, TABLE_NAME=Servers, COLUMN_DEF=null,
CHAR_OCTET_LENGTH=null, SQL_DATETIME_SUB=null, REMARKS=null,
TABLE_SCHEM=dbo, BUFFER_LENGTH=4, NULLABLE=0, IS_NULLABLE=NO ,
SQL_DATA_TYPE=4, TABLE_CAT=MyCIAnalysisDB, NUM_PREC_RADIX=10,
COLUMN_SIZE=10, TYPE_NAME=int identity, COLUMN_NAME=ServerNumber,
ORDINAL_POSITION=1, DECIMAL_DIGITS=0, DATA_TYPE=4}, {SS_DATA_TYPE=39,
TABLE_NAME=Servers, COLUMN_DEF=null, CHAR_OCTET_LENGTH=255,
SQL_DATETIME_SUB=null, REMARKS=null, TABLE_SCHEM=dbo,
BUFFER_LENGTH=255, NULLABLE=1, IS_NULLABLE=YES, SQL_DATA_TYPE=12,
TABLE_CAT=MyCIAnalysisDB, NUM_PREC_RADIX=null, COLUMN_SIZE=255,
TYPE_NAME=varchar, COLUMN_NAME=Server, ORDINAL_POSITION=2,
DECIMAL_DIGITS=null, DATA_TYPE=12}, {SS_DATA_TYPE=39,
TABLE_NAME=Servers, COLUMN_DEF=null, CHAR_OCTET_LENGTH=255,
SQL_DATETIME_SUB=null, REMARKS=null, TABLE_SCHEM=dbo,
BUFFER_LENGTH=255, NULLABLE=1, IS_NULLABLE=YES, SQL_DATA_TYPE=12,
TABLE_CAT=MyCIAnalysisDB, NUM_PREC_RADIX=null, COLUMN_SIZE=255,
TYPE_NAME=varchar, COLUMN_NAME=Location, ORDINAL_POSITION=3,
DECIMAL_DIGITS=null, DATA_TYPE=12}]
DEBUG[08:47:28.029]{main}(DKDBTableDataAccess.getTables:111)-columMaps-
>[{SS_DATA_TYPE=56, TABLE_NAME=Servers, COLUMN_DEF=null,
CHAR_OCTET_LENGTH=null, SQL_DATETIME_SUB=null, REMARKS=null,
TABLE_SCHEM=dbo, BUFFER_LENGTH=4, NULLABLE=0, IS_NULLABLE=NO ,
SQL_DATA_TYPE=4, TABLE_CAT=MyCIAnalysisDB, NUM_PREC_RADIX=10,
COLUMN_SIZE=10, TYPE_NAME=int identity, COLUMN_NAME=ServerNumber,
ORDINAL_POSITION=1, DECIMAL_DIGITS=0, DATA_TYPE=4}, {SS_DATA_TYPE=39,
TABLE_NAME=Servers, COLUMN_DEF=null, CHAR_OCTET_LENGTH=255,
SQL_DATETIME_SUB=null, REMARKS=null, TABLE_SCHEM=dbo,
BUFFER_LENGTH=255, NULLABLE=1, IS_NULLABLE=YES, SQL_DATA_TYPE=12,
TABLE_CAT=MyCIAnalysisDB, NUM_PREC_RADIX=null, COLUMN_SIZE=255,
TYPE_NAME=varchar, COLUMN_NAME=Server, ORDINAL_POSITION=2,
DECIMAL_DIGITS=null, DATA_TYPE=12}, {SS_DATA_TYPE=39,
TABLE_NAME=Servers, COLUMN_DEF=null, CHAR_OCTET_LENGTH=255,
SQL_DATETIME_SUB=null, REMARKS=null, TABLE_SCHEM=dbo,
BUFFER_LENGTH=255, NULLABLE=1, IS_NULLABLE=YES, SQL_DATA_TYPE=12,
TABLE_CAT=MyCIAnalysisDB, NUM_PREC_RADIX=null, COLUMN_SIZE=255,
TYPE_NAME=varchar, COLUMN_NAME=Location, ORDINAL_POSITION=3,
DECIMAL_DIGITS=null, DATA_TYPE=12}]
DEBUG[08:47:28.029]{main}(DKDBTableDataAccess.getPKMaps:228)-
catalogName->MyCIAnalysisDB
DEBUG[08:47:28.029]{main}(DKDBTableDataAccess.getPKMaps:229)-
schemaName->dbo
DEBUG[08:47:28.029]{main}(DKDBTableDataAccess.getPKMaps:230)-tableName-
>Servers
DEBUG[08:47:28.060]{main}(DKDBTableDataAccess.getPKMaps:232)-
primaryKeyRS->SQLServerResultSet:3
DEBUG[08:47:28.060]{main}(DKDBTableDataAccess.getPKMaps:238)-pkMaps-
>null
DEBUG[08:47:28.060]{main}(DKDBTableDataAccess.getTables:113)-pkMaps-
>null
DEBUG[08:47:28.060]{main}(DKDBTableDataAccess.constructTable:130)-
catalogName->MyCIAnalysisDB
DEBUG[08:47:28.060]{main}(DKDBTableDataAccess.constructTable:131)-
schemaName->dbo
DEBUG[08:47:28.060]{main}(DKDBTableDataAccess.constructTable:132)-
tableName->Servers
DEBUG[08:47:28.060]{main}(DKDBTableDataAccess.constructTable:133)-
columnMaps_->[{SS_DATA_TYPE=56, TABLE_NAME=Servers, COLUMN_DEF=null,
CHAR_OCTET_LENGTH=null, SQL_DATETIME_SUB=null, REMARKS=null,
TABLE_SCHEM=dbo, BUFFER_LENGTH=4, NULLABLE=0, IS_NULLABLE=NO ,
SQL_DATA_TYPE=4, TABLE_CAT=MyCIAnalysisDB, NUM_PREC_RADIX=10,
COLUMN_SIZE=10, TYPE_NAME=int identity, COLUMN_NAME=ServerNumber,
ORDINAL_POSITION=1, DECIMAL_DIGITS=0, DATA_TYPE=4}, {SS_DATA_TYPE=39,
TABLE_NAME=Servers, COLUMN_DEF=null, CHAR_OCTET_LENGTH=255,
SQL_DATETIME_SUB=null, REMARKS=null, TABLE_SCHEM=dbo,
BUFFER_LENGTH=255, NULLABLE=1, IS_NULLABLE=YES, SQL_DATA_TYPE=12,
TABLE_CAT=MyCIAnalysisDB, NUM_PREC_RADIX=null, COLUMN_SIZE=255,
TYPE_NAME=varchar, COLUMN_NAME=Server, ORDINAL_POSITION=2,
DECIMAL_DIGITS=null, DATA_TYPE=12}, {SS_DATA_TYPE=39,
TABLE_NAME=Servers, COLUMN_DEF=null, CHAR_OCTET_LENGTH=255,
SQL_DATETIME_SUB=null, REMARKS=null, TABLE_SCHEM=dbo,
BUFFER_LENGTH=255, NULLABLE=1, IS_NULLABLE=YES, SQL_DATA_TYPE=12,
TABLE_CAT=MyCIAnalysisDB, NUM_PREC_RADIX=null, COLUMN_SIZE=255,
TYPE_NAME=varchar, COLUMN_NAME=Location, ORDINAL_POSITION=3,
DECIMAL_DIGITS=null, DATA_TYPE=12}]
DEBUG[08:47:28.060]{main}(DKDBTableDataAccess.constructTable:134)-
pkMaps_->null
DEBUG[08:47:28.060]{main}(DKDBTableDataAccess.constructColumn:147)-
columnMap_->{SS_DATA_TYPE=56, TABLE_NAME=Servers, COLUMN_DEF=null,
CHAR_OCTET_LENGTH=null, SQL_DATETIME_SUB=null, REMARKS=null,
TABLE_SCHEM=dbo, BUFFER_LENGTH=4, NULLABLE=0, IS_NULLABLE=NO ,
SQL_DATA_TYPE=4, TABLE_CAT=MyCIAnalysisDB, NUM_PREC_RADIX=10,
COLUMN_SIZE=10, TYPE_NAME=int identity, COLUMN_NAME=ServerNumber,
ORDINAL_POSITION=1, DECIMAL_DIGITS=0, DATA_TYPE=4}
ERROR[08:47:28.076]{main}(DKApplication.main:130)-null
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39) [na:1.6.0_22]
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
Thank you.

Sergey
Reply all
Reply to author
Forward
0 new messages