elnicko / diffkit

Automatically exported from code.google.com/p/diffkit
0 stars 0 forks source link

NullPointerException in DBSink when used with Oracle #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I keep getting 
the following error. 
C:\Documents and Settings\Administrator\Desktop\diffkit-0.8.3>java - 
jar diffkit- 
app.jar -planfiles test51.plan.xml,dbConnectionInfo.oracle.xml 
DiffKit home->C:\Documents and Settings\Administrator\Desktop 
\diffkit-0.8.3 
planfile(s)->test51.plan.xml 
lhsSource- 
>DKDBSource@107f45d[FCCHOST.STTM_CUSTOMER,jdbc:oracle:thin:@//gedu:152 

1/orcl] 
rhsSource- 
>DKDBSource@13c0b53[FCCHOST.TEST_STTM_CUSTOMER,jdbc:oracle:thin:@//ged 

u:1521/orcl] 
sink->org.diffkit.diff.sns.DKDBSink@10b9279 
tableComparison->DKStandardTableComparison[DKTableModel[null]<- 
>DKTableModel[nul 

l]] 
ERROR[11:31:55.119]{main}(DKApplication.main:130)-null 
java.lang.NullPointerException: null 
        at 
org.diffkit.db.DKSqlGenerator.generateInsertDML(DKSqlGenerator.java:1 
76) [diffkit-app.jar:na] 
        at 
org.diffkit.db.DKSqlGenerator.generateInsertDML(DKSqlGenerator.java:1 
42) [diffkit-app.jar:na] 
        at org.diffkit.db.DKDatabase.insertRow(DKDatabase.java:276) 
[diffkit-app 
.jar:na] 
        at org.diffkit.diff.sns.DKDBSink.saveContext(DKDBSink.java: 
109) [diffkit 
-app.jar:na] 
        at org.diffkit.diff.sns.DKDBSink.open(DKDBSink.java:74) 
[diffkit-app.jar 
:na] 
        at org.diffkit.diff.engine.DKContext.open(DKContext.java:71) 
[diffkit-ap 
p.jar:na] 
        at org.diffkit.diff.engine.DKDiffEngine.diff(DKDiffEngine.java: 
63) [diff 
kit-app.jar:na] 
        at org.diffkit.diff.engine.DKDiffEngine.diff(DKDiffEngine.java: 
56) [diff 
kit-app.jar:na] 
        at 
org.diffkit.diff.conf.DKApplication.doDiff(DKApplication.java:191) [d 
iffkit-app.jar:na] 
        at 
org.diffkit.diff.conf.DKApplication.runPlan(DKApplication.java:172) [ 
diffkit-app.jar:na] 
        at org.diffkit.diff.conf.DKApplication.main(DKApplication.java: 
110) [dif 
fkit-app.jar:na] 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[na:1.6.0 
_10] 
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. 
java:39) [na:1.6.0_10] 
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces 
sorImpl.java:25) [na:1.6.0_10] 
        at java.lang.reflect.Method.invoke(Method.java:597) [na: 
1.6.0_10] 
        at 
com.jdotsoft.jarloader.JarClassLoader.invokeMain(JarClassLoader.java: 
520) [diffkit-app.jar:na] 
        at org.diffkit.diff.conf.DKLauncher.main(DKLauncher.java:26) 
[diffkit-ap 
p.jar:na] 
I have no idea whare the problem is coming from since my plan file 
looks okay. 
Here's my config file: 
<?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.DKPassthroughPlan"> 
      <property name="lhsSource" ref="lhs.source" /> 
      <property name="rhsSource" ref="rhs.source" /> 
      <property name="sink" ref="sink" /> 
      <property name="tableComparison" ref="table.comparison" /> 
   </bean> 
   <bean id="table.comparison" 
class="org.diffkit.diff.engine.DKStandardTableComparison"> 
      <constructor-arg index="0" ref="lhs.table.model" /> 
      <constructor-arg index="1" ref="rhs.table.model" /> 
      <constructor-arg index="2" value="BOTH" /> 
      <constructor-arg index="3"> 
         <list> 
            <ref bean="column1.comparison" /> 
            <ref bean="column2.comparison" /> 
            <ref bean="column3.comparison" /> 
         </list> 
      </constructor-arg> 
      <constructor-arg index="4"> 
         <list> 
            <value>1</value> 
         </list> 
      </constructor-arg> 
      <constructor-arg index="5"> 
         <list> 
            <list> 
               <value>0</value> 
               <value>2</value> 
            </list> 
            <list> 
               <value>0</value> 
               <value>2</value> 
            </list> 
         </list> 
      </constructor-arg> 
      <constructor-arg index="6" value="1000" /> 
   </bean> 
   <bean id="column1.comparison" 
class="org.diffkit.diff.engine.DKColumnComparison"> 
      <constructor-arg index="0" ref="lhs.column1" /> 
      <constructor-arg index="1" ref="rhs.column1" /> 
      <constructor-arg index="2" ref="equalsDiffor" /> 
   </bean> 
   <bean id="column2.comparison" 
class="org.diffkit.diff.engine.DKColumnComparison"> 
      <constructor-arg index="0" ref="lhs.column2" /> 
      <constructor-arg index="1" ref="rhs.column2" /> 
      <constructor-arg index="2" ref="equalsDiffor" /> 
   </bean> 
   <bean id="column3.comparison" 
class="org.diffkit.diff.engine.DKColumnComparison"> 
      <constructor-arg index="0" ref="lhs.column3" /> 
      <constructor-arg index="1" ref="rhs.column3" /> 
      <constructor-arg index="2" ref="equalsDiffor" /> 
   </bean> 
   <bean id="equalsDiffor" 
class="org.diffkit.diff.diffor.DKEqualsDiffor" 
      factory-method="getInstance" /> 
   <bean id="sink" class="org.diffkit.diff.sns.DKDBSink"> 
     <constructor-arg index="0" ref="dkdatabase" /> 
   </bean> 
 <bean id="rhs.source" class="org.diffkit.diff.sns.DKDBSource"> 
      <constructor-arg index="0" value="TEST_STTM_CUSTOMER" /> 
      <constructor-arg index="1" value="CUSTOMER_NO" /> 
      <constructor-arg index="2" ref="dkdatabase" /> 
      <constructor-arg index="3" ref="rhs.table.model" /> 
      <constructor-arg index="4"> 
            <null /> 
       </constructor-arg> 
       <constructor-arg index="5"> 
            <null /> 
       </constructor-arg> 
   </bean> 
   <bean id="lhs.source" class="org.diffkit.diff.sns.DKDBSource"> 
      <constructor-arg index="0" value="STTM_CUSTOMER" /> 
      <constructor-arg index="1" value="CUSTOMER_NO" /> 
      <constructor-arg index="2" ref="dkdatabase" /> 
      <constructor-arg index="3" ref="lhs.table.model" /> 
      <constructor-arg index="4"> 
            <null /> 
       </constructor-arg> 
       <constructor-arg index="5"> 
            <null /> 
       </constructor-arg> 
   </bean> 
   <bean id="dkdatabase" class = "org.diffkit.db.DKDatabase"> 
   <constructor-arg index="0" ref="connectionInfo" /> 
   </bean> 
   <bean id="rhs.table.model" 
class="org.diffkit.diff.engine.DKTableModel"> 
      <constructor-arg index="0"> 
         <list> 
            <ref bean="rhs.column1" /> 
            <ref bean="rhs.column2" /> 
            <ref bean="rhs.column3" /> 
         </list> 
      </constructor-arg> 
      <constructor-arg index="1"> 
         <list> 
            <value>0</value> 
         </list> 
      </constructor-arg> 
   </bean> 
   <bean id="lhs.table.model" 
class="org.diffkit.diff.engine.DKTableModel"> 
      <constructor-arg index="0"> 
         <list> 
            <ref bean="lhs.column1" /> 
            <ref bean="lhs.column2" /> 
            <ref bean="lhs.column3" /> 
         </list> 
      </constructor-arg> 
      <constructor-arg index="1"> 
         <list> 
            <value>0</value> 
         </list> 
      </constructor-arg> 
   </bean> 
   <bean id="rhs.column1" 
class="org.diffkit.diff.engine.DKColumnModel"> 
      <constructor-arg index="0" value="0" /> 
      <constructor-arg index="1" value="CUSTOMER_NO" /> 
      <constructor-arg index="2" value="STRING" /> 
   </bean> 
   <bean id="rhs.column2" 
class="org.diffkit.diff.engine.DKColumnModel"> 
      <constructor-arg index="0" value="1" /> 
      <constructor-arg index="1" value="CUSTOMER_TYPE" /> 
      <constructor-arg index="2" value="STRING" /> 
   </bean> 
   <bean id="rhs.column3" 
class="org.diffkit.diff.engine.DKColumnModel"> 
      <constructor-arg index="0" value="2" /> 
      <constructor-arg index="1" value="CUSTOMER_NAME1" /> 
      <constructor-arg index="2" value="STRING" /> 
   </bean> 
   <bean id="lhs.column1" 
class="org.diffkit.diff.engine.DKColumnModel"> 
      <constructor-arg index="0" value="0" /> 
      <constructor-arg index="1" value="CUSTOMER_NO" /> 
      <constructor-arg index="2" value="STRING" /> 
   </bean> 
   <bean id="lhs.column2" 
class="org.diffkit.diff.engine.DKColumnModel"> 
      <constructor-arg index="0" value="1" /> 
      <constructor-arg index="1" value="CUSTOMER_TYPE" /> 
      <constructor-arg index="2" value="STRING" /> 
   </bean> 
   <bean id="lhs.column3" 
class="org.diffkit.diff.engine.DKColumnModel"> 
      <constructor-arg index="0" value="2" /> 
      <constructor-arg index="1" value="CUSTOMER_NAME1" /> 
      <constructor-arg index="2" value="STRING" /> 
   </bean> 
</beans> 
I would really appreciate it if i can get fast help on this cause i am 
clueless about what the problem is. My DKTableModel is obviously not 
null from my plan.xml. 
Cheers. 
Roman. 

Original issue reported on code.google.com by trur...@gmail.com on 17 Dec 2010 at 12:20

GoogleCodeExporter commented 9 years ago

Original comment by trur...@gmail.com on 17 Dec 2010 at 12:34

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r286.

Original comment by trur...@gmail.com on 21 Dec 2010 at 6:47

GoogleCodeExporter commented 9 years ago

Original comment by trur...@gmail.com on 24 Dec 2010 at 1:47