Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Error in eclipse Ant Build using ibator
Error in eclipse Ant Build using ibator [message #601899] Sun, 18 January 2009 22:13
Eclipse User
Originally posted by: fafy_99.yahoo.com

Hi,
I'm a brand new member here, and a brand new eclipse/ant/ibator user. I
tried my first Ant build in eclipse and spent all night to no avail, so I'm
hoping I could get some help here.
I created a Build.xml and a ibatorConfig.xml, and they are located in my
project directory "C:\projects\AFI\InputService". When I tried to build it
in eclipse, I keep getting the NullPointeException.

This is my simple Build.xml file:

<project default="genfiles" basedir="c:\projects\AFI\InputService\">
<property name="generated.source.dir" value="${basedir}" />
<target name="genfiles" description="Generate the files">
<taskdef name="ibator"
classname="org.apache.ibatis.ibator.ant.IbatorAntTask"
classpath="c:\Program
Files\eclipse\plugins\org.apache.ibatis.ibator.core_1.2.1\ib ator.jar " />
<ibator overwrite="true"
configfile="c:\projects\AFI\InputService\ibatorConfig.xml" verbose="true" >
<propertyset>
<propertyref name="generated.source.dir"/>
</propertyset>
</ibator>
</target>
</project>

This is my ibatorConfig.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ibatorConfiguration
PUBLIC "-//Apache Software Foundation//DTD Apache iBATIS Ibator
Configuration 1.0//EN"
"http://ibatis.apache.org/dtd/ibator-config_1_0.dtd">

<ibatorConfiguration>
<classPathEntry location="c:\Program
Files\java\mysql-connector-java-5.1.7\mysql-connector-java-5 .1.7-bin.jar " />

<ibatorContext id="MySQLTables" targetRuntime="Ibatis2Java2">
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/afi"
userId="root"
password="123456">
</jdbcConnection>

<javaModelGenerator targetPackage="InputService"
targetProject="InputService\src">
<property name="enableSubPackages" value="false" />
<property name="trimStrings" value="true" />
</javaModelGenerator>

<sqlMapGenerator targetPackage="InputService"
targetProject="InputService\src">
<property name="enableSubPackages" value="false" />
</sqlMapGenerator>

<table tableName="client_table_properties"
domainObjectName="ClientTableProperties" >
<property name="useActualColumnNames" value="false"/>
<columnOverride column="account_number" javaType="java.lang.Object"
jdbcType="LONG" />
</table>

</ibatorContext>
</ibatorConfiguration>

This is the error I got:

Buildfile: C:\projects\AFI\InputService\build.xml
genfiles:
[ibator] java.lang.NullPointerException
[ibator] at
org.apache.ibatis.ibator.api.IntrospectedTable.calculateDAOI mplementationPackage(IntrospectedTable.java:508)
[ibator] at
org.apache.ibatis.ibator.api.IntrospectedTable.initialize(In trospectedTable.java:479)
[ibator] at
org.apache.ibatis.ibator.config.IbatorContext.generateFiles( IbatorContext.java:493)
[ibator] at
org.apache.ibatis.ibator.api.Ibator.generate(Ibator.java:219 )
[ibator] at
org.apache.ibatis.ibator.ant.IbatorAntTask.execute(IbatorAnt Task.java:145)
[ibator] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
[ibator] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ibator] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[ibator] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
[ibator] at java.lang.reflect.Method.invoke(Unknown Source)
[ibator] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
[ibator] at org.apache.tools.ant.Task.perform(Task.java:348)
[ibator] at org.apache.tools.ant.Target.execute(Target.java:357)
[ibator] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[ibator] at
org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
[ibator] at
org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
[ibator] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
[ibator] at
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecuto r.executeTargets(EclipseDefaultExecutor.java:32)
[ibator] at
org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
[ibator] at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run (InternalAntRunner.java:423)
[ibator] at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.mai n(InternalAntRunner.java:137)

BUILD FAILED
C:\projects\AFI\InputService\build.xml:8: null

Please point out what I'm missing here. Thank you very much for your help!
Shao Chin,
Tempe, AZ
Previous Topic:Modifying soruce code Vs. Using the extension point
Next Topic:Error in eclipse Ant Build using ibator
Goto Forum:
  


Current Time: Wed Jul 23 22:30:16 EDT 2014

Powered by FUDForum. Page generated in 0.01513 seconds