MappingTool

When using the MappingTool via ant, I often get this error. This can happen whether the file package.mapping exists or not. Any ideas? Note the "premature end of file" ...
I'm on kodo 3.4.1 (applies to my last post as well).
Thanks!
P$
[mappingtool] 109  INFO   [main] kodo.jdbc.JDBC - Using dictionary class "kodo.jdbc.sql.OracleDictionary".
[mappingtool] 125  INFO   [main] kodo.Tool - Mapping tool running on type "class mykodotest.AbstractParent" with action "refresh".
[mappingtool] 281  INFO   [main] kodo.MetaData - Parsing metadata resource "file:/C:/Workspace/MyKodoTest/bin/mykodotest/package.mapping".
[mappingtool] kodo.util.GeneralException: java.io.IOException: org.xml.sax.SAXException: file:/C:/Workspace/MyKodoTest/bin/mykodotest/package.mapping [Location: Unknown]: org.xml.sax.SAXParseException: Premature end of file.
[mappingtool] at kodo.jdbc.meta.FileMappingFactory.readMapping(FileMappingFactory.java:141)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMappingInfo(MappingRepository.java:532)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:389)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177)
[mappingtool] at kodo.jdbc.meta.MappingTool.refresh(MappingTool.java:591)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:941)
[mappingtool] at kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:192)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:341)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[mappingtool] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[mappingtool] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[mappingtool] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[mappingtool] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[mappingtool] NestedThrowablesStackTrace:
[mappingtool] java.io.IOException: org.xml.sax.SAXException: file:/C:/Workspace/MyKodoTest/bin/mykodotest/package.mapping [Location: Unknown]: org.xml.sax.SAXParseException: Premature end of file.
[mappingtool] at com.solarmetric.meta.XMLMetaDataParser.parseNew(XMLMetaDataParser.java:372)
[mappingtool] at com.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:298)
[mappingtool] at com.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:279)
[mappingtool] at kodo.jdbc.meta.FileMappingFactory.readMapping(FileMappingFactory.java:137)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMappingInfo(MappingRepository.java:532)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:389)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177)
[mappingtool] at kodo.jdbc.meta.MappingTool.refresh(MappingTool.java:591)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:941)
[mappingtool] at kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:192)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:341)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[mappingtool] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[mappingtool] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[mappingtool] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[mappingtool] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

My mistake. My ant target was copying the resulting .jdo file into a location where a file with that name already existed, and I had not specified overwrite="true". So I saw the old file contents and not the new contents.
Kind regards, Robin.

Similar Messages

  • Import  com.sap.aii.mappingtool.* show error in PI 7.1 adapter module

    Hi
    Experts,
    i have an adapter module for 7.0 and i am trying to replicate the same for PI  7.1  in 7.1 NWDS.
    i have made the required changes as mentioned in stefan's blog :/people/stefan.grube/blog/2008/12/11/adjust-your-pi-70-adapter-modules-for-pi-71-in-15-minutes
    but  import com.sap.aii.mappingtool.tf7.rt.Container; shows error , do we need to  inlcude any jar file for this :
    i am using this module to rename file name (in case of pick and place scenario forwithot IR configuration)
    getMessageProperty and setmessageProperty is getting deprecated.(striked off)
    strFileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File","FileName");
    Regards,
    Srinivas

    > strFileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File","FileName");
    in PI 7.1 you can use:
    strFileName = msg.getMessageProperty(new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File"));
    Note that property name and namspace come in different order. I almost got mad until I noticed
    http://help.sap.com/javadocs/pi/SP3/xpi/index.html

  • Mappingtool fails with unknown error

    Hello,
         I keep trying to learn JDO with KODO, but I've hit another roadblock.
    I've created a basic metadata file, then ran jdoc on it which was fine.
    However, when trying to run mappingtool, I get the following error:
    0 INFO [main] kodo.Tool - Mapping tool running on type "class
    edu.uiuc.cs427.domain.Market" with action "refresh".
    297 INFO [main] kodo.Tool - Mapping tool running on type "class
    edu.uiuc.cs427.domain.MarketContainer" with action "refresh".
    297 INFO [main] kodo.Tool - Mapping tool running on type "class
    edu.uiuc.cs427.domain.TradingSettings" with action "refresh".
    297 INFO [main] kodo.Tool - Recording mapping and schema changes.
    Exception in thread "main" kodo.util.FatalInternalException: The
    metadata for type "class edu.uiuc.cs427.domain.Market" did not come from
    a file, and
    therefore we cannot determine where to place the corresponding mapping
    information. If you are using metadata from a jar or other resource,
    you shoul
    d use one of the other available mapping factories.
    at
    kodo.jdbc.meta.FileMappingFactory.getMappingFile(FileMappingFactory.java:203)
    at
    kodo.jdbc.meta.FileMappingFactory.storeMappings(FileMappingFactory.java:139)
    at kodo.jdbc.meta.MappingTool.record(MappingTool.java:454)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:870)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:801)
    The metadata is surely from the file package.jdo, so I don't know why
    it's saying it did not come from a file.
    Here's my package.jdo:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects
    Metadata 1.0//EN" "http://java.sun.com/dtd/jdo_1_0.dtd">
    <jdo>
    <package name="edu.uiuc.cs427.domain">
    <class name="Market"
    identity-type="datastore"
    persistence-capable-superclass="edu.uiuc.cs427.domain.MarketContainer"
    > <!-- end class tag -->
    </class>
    <class name="MarketContainer"
    identity-type="datastore"
    > <!-- end class tag -->
    <field name="tradingSettings"
    > <!-- end field tag -->
    </field>
    <field name="children"
    > <!-- end field tag -->
    <collection
    element-type="edu.uiuc.cs427.domain.MarketContainer"
    embedded-element="false"
    > <!-- end collection tag -->
    </collection>
    </field>
    <field name="parent"
    > <!-- end field tag -->
    </field>
    <field name="name"
    > <!-- end field tag -->
    </field>
    </class>
    <class name="TradingSettings"
    identity-type="datastore"
    > <!-- end class tag -->
    </class>
    </package>
    <!--
    To use additional vendor extensions, create a vendor-extensions.xml
    file that
    contains the additional extensions (in extension tags) and place it
    in your
    projects merge dir.
    -->
    </jdo>

    I have some more information on this:
    I tried changing the MappingFactory to metadata instead of the default
    file. When I do this, I do not get an error, but nothing gets added to
    my package.jdo file either.
    It seems like the file I/O is simply not working here for some reason.
    When I choose the db MappingFactory, the mapping information gets put in
    the database correctly. When I give mappingtool the -f option it will
    output the file correctly. However, the default file or metadata are
    simply not doing proper I/O. I'd like to stick with the default file
    MappingFactory.
    I'm using Windows XP, I start up a command prompt using the jdoCmd.bat
    file, I go to my build's classes directory which has the proper
    package.jdo file at the base, and then I run:
    jdoc package.jdo (works fine)
    mappingtool -a refresh package.jdo
    Any help on this problem?
    Thanks
    Don Diego wrote:
    Hello,
    I keep trying to learn JDO with KODO, but I've hit another
    roadblock. I've created a basic metadata file, then ran jdoc on it which
    was fine. However, when trying to run mappingtool, I get the following
    error:
    0 INFO [main] kodo.Tool - Mapping tool running on type "class
    edu.uiuc.cs427.domain.Market" with action "refresh".
    297 INFO [main] kodo.Tool - Mapping tool running on type "class
    edu.uiuc.cs427.domain.MarketContainer" with action "refresh".
    297 INFO [main] kodo.Tool - Mapping tool running on type "class
    edu.uiuc.cs427.domain.TradingSettings" with action "refresh".
    297 INFO [main] kodo.Tool - Recording mapping and schema changes.
    Exception in thread "main" kodo.util.FatalInternalException: The
    metadata for type "class edu.uiuc.cs427.domain.Market" did not come from
    a file, and
    therefore we cannot determine where to place the corresponding mapping
    information. If you are using metadata from a jar or other resource,
    you shoul
    d use one of the other available mapping factories.
    at
    kodo.jdbc.meta.FileMappingFactory.getMappingFile(FileMappingFactory.java:203)
    at
    kodo.jdbc.meta.FileMappingFactory.storeMappings(FileMappingFactory.java:139)
    at kodo.jdbc.meta.MappingTool.record(MappingTool.java:454)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:870)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:801)
    The metadata is surely from the file package.jdo, so I don't know why
    it's saying it did not come from a file.
    Here's my package.jdo:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects
    Metadata 1.0//EN" "http://java.sun.com/dtd/jdo_1_0.dtd">
    <jdo>
    <package name="edu.uiuc.cs427.domain">
    <class name="Market"
    identity-type="datastore"
    persistence-capable-superclass="edu.uiuc.cs427.domain.MarketContainer"
    <!-- end class tag --></class>
    <class name="MarketContainer"
    identity-type="datastore"
    <!-- end class tag --><field name="tradingSettings"
    <!-- end field tag --></field>
    <field name="children"
    <!-- end field tag --><collection
    element-type="edu.uiuc.cs427.domain.MarketContainer"
    embedded-element="false"
    <!-- end collection tag --></collection>
    </field>
    <field name="parent"
    <!-- end field tag --></field>
    <field name="name"
    <!-- end field tag --></field>
    </class>
    <class name="TradingSettings"
    identity-type="datastore"
    <!-- end class tag --></class>
    </package>
    <!--
    To use additional vendor extensions, create a vendor-extensions.xml
    file that
    contains the additional extensions (in extension tags) and place it
    in your
    projects merge dir.
    -->
    </jdo>

  • MappingTool Warnings

    Hi,
    I'm getting the following warnings from the MappingTool when I run it
    against a existing database, that is created with out warning.
    For all tables
    Existing column "<Tables Primary Key Here>" on table "<Table Name Here>" is
    incompatible with the same column in the given schema definition.
    What is this warning me about?
    mapping tool run from java program via
    kodo.jdbc.meta.MappingTool.main("-a","buildSchema","<classes
    name1>","<classes name2>","<classes name3>" etc ......);
    I run this once at the start of my application to build the database schema.
    Kind Regards
    Graham Cruichsanks

    This probably means the JDBC driver isn't giving back good metadata.
    Please run:
    schemagen -f schema.xml
    Does anything look suspicious about the reported column types in the
    schema.xml file?

  • Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Cannot cast '' to

    Hi Experts,
    i need to map sourse type as decimal with target type also decimal. in the mapping logic i need perform arthemetic logic like exchange rate=exchangerate*sourceunit/targetunit
    i mapped as per the logic but i tested in display queue i am getting this below error
    Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Cannot cast '' to decimal number] in class com.sap.aii.mappingtool.flib7.Arithm method mul[, , com.sap.aii.mappingtool.tf7.rt.Context@13133cec] See error logs for details
    is this required to  use UDF to perform my logic. if it required please suggest me the UDF.
    thanks,
    pavan
    Edited by: Pavan Kumar Thiruveedula on Dec 19, 2011 7:12 AM

    Enter the value in test tab for the field and then check Display queue.
    i Guess you are testing with blank value

  • Mappingtool generates bad DDL for sybase (J2ee tutorial)

    Running the mappingtool on the J2EE tutorial app (3.0.0RC1) generates bad
    DDL for sybase. It's trying to create a table with a column of type
    "IndexName":
    C:\devtools\kodo\samples\j2ee>mappingtool -a refresh package.jdo
    0 INFO [main] kodo.Tool - Mapping tool running on type "class
    samples.j2ee.Car" with action "refresh".
    0 INFO [main] kodo.Tool - The tool is now reading existing schema
    information; this process may take some time. En
    able the kodo.jdbc.Schema logging category to see messages about schema
    data. Also see the -readSchema tool flag.
    3716 INFO [main] kodo.Tool - Recording mapping and schema changes.
    Exception in thread "main" kodo.util.FatalException:
    com.solarmetric.jdbc.ReportingSQLException: Can't specify a length
    or scale on type 'IndexName'.
    {stmnt 7576378: CREATE TABLE CAR (COLOR IndexName(255) NULL, JDOCLASS
    IndexName(255) NULL, JDOID NUMERIC(38) NOT NULL,
    JDOVERSION INT NULL, MAKE IndexName(255) NULL, MODEL IndexName(255) NULL,
    YEAR0 IndexName(255) NULL, UNQ_INDEX NUMERIC I
    DENTITY UNIQUE, CONSTRAINT P_CAR PRIMARY KEY (JDOID))} [code=2716,
    state=ZZZZZ]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: Can't specify a length or
    scale on type 'IndexName'.
    {stmnt 7576378: CREATE TABLE CAR (COLOR IndexName(255) NULL, JDOCLASS
    IndexName(255) NULL, JDOID NUMERIC(38) NOT NULL,
    JDOVERSION INT NULL, MAKE IndexName(255) NULL, MODEL IndexName(255) NULL,
    YEAR0 IndexName(255) NULL, UNQ_INDEX NUMERIC I
    DENTITY UNIQUE, CONSTRAINT P_CAR PRIMARY KEY (JDOID))} [code=2716,
    state=ZZZZZ]
    at kodo.jdbc.meta.MappingTool.record(MappingTool.java:431)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:790)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:729)
    NestedThrowablesStackTrace:
    com.solarmetric.jdbc.ReportingSQLException: Can't specify a length or
    scale on type 'IndexName'.
    {stmnt 7576378: CREATE TABLE CAR (COLOR IndexName(255) NULL, JDOCLASS
    IndexName(255) NULL, JDOID NUMERIC(38) NOT NULL,
    JDOVERSION INT NULL, MAKE IndexName(255) NULL, MODEL IndexName(255) NULL,
    YEAR0 IndexName(255) NULL, UNQ_INDEX NUMERIC I
    DENTITY UNIQUE, CONSTRAINT P_CAR PRIMARY KEY (JDOID))} [code=2716,
    state=ZZZZZ]
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:67)
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator.access$400(LoggingConnectionDecorator.java:19)
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingStatement.executeUpdate(LoggingConne
    ctionDecorator.java:506)
    at
    com.solarmetric.jdbc.DelegatingStatement.executeUpdate(DelegatingStatement.java:125)
    at kodo.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1042)
    at kodo.jdbc.schema.SchemaTool.createTable(SchemaTool.java:803)
    at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:334)
    at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:186)
    at kodo.jdbc.meta.MappingTool.record(MappingTool.java:364)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:790)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:729)
    Anyone else seen this? It works ok with Hypersonic (though i can't get the
    tutorial app to run with hypersonic - see my earlier post).
    Alex.

    Some bugs in RCs sometimes don't make it into Bugzilla as it is a
    release candidate and not production quality.
    I would reocmmend upgrading as it fixes a number of major bug fixes and
    you should be able to use the same eval key.
    Alex Robbins wrote:
    Abe White wrote:
    I should also have asked: what JDBC driver are you using?Hi Abe,
    I haven't tried with RC2 - has this been fixed in RC2? I didn't find this
    bug on bugzilla.
    I'm using Sybase JConnect JDBC driver (com.sybase.jdbc2.jdbc.SybDriver in
    jconn2.jar) - looks like this is the version:
    jConnect (TM) for JDBC(TM)/5.5(Build 25008)/P/JDK12/Tue May 29 14:37:46
    2001
    Should I upgrade from RC1 to RC2, and if so, can I continue to use the
    same eval license key or can i download a new one?
    thanks,
    alex
    Stephen Kim
    [email protected]
    SolarMetric, Inc.
    http://www.solarmetric.com

  • 3.0.0RC2 MappingTool producing bad SQL

    It looks like <jdbc-field-map type="many-many" table="TestServiceKeyArray"
    element-column
    ..pk="keyArray" ref-column.pk="parent" order-column="seqno"/> is producing
    bad SQL through MappingTool. It gives the following exception when run as
    "kodo.jdbc.meta.MappingTool -action buildSchema ..."
    It looks like the "seqno" order-column is of type "OTHER", which is not
    correct.
    Exception in thread "main" kodo.util.FatalException:
    com.solarmetric.jdbc.ReportingSQLException: Syntax error or access
    violation, message from server: "You have an error in your SQL syntax.
    Check the manual that corresponds to your MySQL server version for the right
    syntax to use near 'OTHER)' at line 1" {stmnt 30301818: CREATE TABLE
    TestServiceKeyArray (keyArray BIGINT, parent VARCHAR(255), seqno OTHER)}
    [code=1064, state=42000]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: Syntax error or access
    violation, message from server: "You have an error in your SQL syntax.
    Check the manual that corresponds to your MySQL server version for the right
    syntax to use near 'OTHER)' at line 1" {stmnt 30301818: CREATE TABLE
    TestServiceKeyArray (keyArray BIGINT, parent VARCHAR(255), seqno OTHER)}
    [code=1064, state=42000]
    at kodo.jdbc.meta.MappingTool.record(MappingTool.java:431)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:832)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:729)
    Caused by: com.solarmetric.jdbc.ReportingSQLException: Syntax error or
    access violation, message from server: "You have an error in your SQL
    syntax. Check the manual that corresponds to your MySQL server version for
    the right syntax to use near 'OTHER)' at line 1" {stmnt 30301818: CREATE
    TABLE TestServiceKeyArray (keyArray BIGINT, parent VARCHAR(255), seqno
    OTHER)} [code=1064, state=42000]
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecora
    tor.java:67)
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator.access$400(LoggingConnection
    Decorator.java:19)
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingSta
    tement.executeUpdate(LoggingConnectionDecorator.java:506)
    at kodo.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1042)
    at kodo.jdbc.schema.SchemaTool.createTable(SchemaTool.java:803)
    at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:334)
    at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:186)
    at kodo.jdbc.meta.MappingTool.record(MappingTool.java:364)
    ... 2 more

    I'm using mysql 4.0.15 and mysql connector (jdbc driver) 3.0.9.
    Ben
    "Stephen Kim" <[email protected]> wrote in message
    news:[email protected]...
    What version of MySQL and driver are you using?
    Ben Eng wrote:
    It looks like <jdbc-field-map type="many-many"
    table="TestServiceKeyArray"
    element-column
    .pk="keyArray" ref-column.pk="parent" order-column="seqno"/> isproducing
    bad SQL through MappingTool. It gives the following exception when runas
    "kodo.jdbc.meta.MappingTool -action buildSchema ..."
    It looks like the "seqno" order-column is of type "OTHER", which is not
    correct.
    Exception in thread "main" kodo.util.FatalException:
    com.solarmetric.jdbc.ReportingSQLException: Syntax error or access
    violation, message from server: "You have an error in your SQL syntax.
    Check the manual that corresponds to your MySQL server version for theright
    syntax to use near 'OTHER)' at line 1" {stmnt 30301818: CREATE TABLE
    TestServiceKeyArray (keyArray BIGINT, parent VARCHAR(255), seqno OTHER)}
    [code=1064, state=42000]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: Syntax error or access
    violation, message from server: "You have an error in your SQL syntax.
    Check the manual that corresponds to your MySQL server version for theright
    syntax to use near 'OTHER)' at line 1" {stmnt 30301818: CREATE TABLE
    TestServiceKeyArray (keyArray BIGINT, parent VARCHAR(255), seqno OTHER)}
    [code=1064, state=42000]
    at kodo.jdbc.meta.MappingTool.record(MappingTool.java:431)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:832)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:729)
    Caused by: com.solarmetric.jdbc.ReportingSQLException: Syntax error or
    access violation, message from server: "You have an error in your SQL
    syntax. Check the manual that corresponds to your MySQL server versionfor
    the right syntax to use near 'OTHER)' at line 1" {stmnt 30301818: CREATE
    TABLE TestServiceKeyArray (keyArray BIGINT, parent VARCHAR(255), seqno
    OTHER)} [code=1064, state=42000]
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecora
    tor.java:67)
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator.access$400(LoggingConnection
    Decorator.java:19)
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingSta
    tement.executeUpdate(LoggingConnectionDecorator.java:506)
    at kodo.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1042)
    at kodo.jdbc.schema.SchemaTool.createTable(SchemaTool.java:803)
    at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:334)
    at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:186)
    at kodo.jdbc.meta.MappingTool.record(MappingTool.java:364)
    ... 2 more
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Trouble running mappingtool on Kodo-jdo 3.0.2

    Hi
    I was trying to run the Kodo tutorial. I was able to run jdoc
    properties.jdo, but I am having trouble running mappingtool. I am having
    trouble getting Oracle to work properly. Here is the output:
    C:\kodoanimals\test\tutorial>mappingtool -action refresh package.jdo
    Exception in thread "main" kodo.util.FatalDataStoreException:
    oracle.jdbc.driver.OracleDriver
    NestedThrowables:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
    at
    kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:97)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:880)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:798)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:886)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:895)
    at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:67)
    at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:243)
    at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:233)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:864)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:816)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:749)
    Caused by: java.lang.ClassNotFoundException:
    oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at
    kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:55)
    ... 10 more
    NestedThrowablesStackTrace:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at
    kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:55)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:880)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:798)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:886)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:895)
    at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:67)
    at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:243)
    at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:233)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:864)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:816)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:749)
    Here is what my kodo.properties file looks like (located at
    c:\kodo-jdo-3.0.2 directory)
    kodo.LicenseKey: xxxx
    javax.jdo.PersistenceManagerFactoryClass:com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
    #javax.jdo.PersistenceManagerFactoryClass:kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    javax.jdo.option.ConnectionDriverName:oracle.jdbc.driver.OracleDriver
    javax.jdo.option.ConnectionUserName:teckusr04
    javax.jdo.option.ConnectionPassword:teckusr04
    javax.jdo.option.ConnectionURL:jdbc:oracle:thin:casrvta6861dt11:1521:casrvta6
    javax.jdo.option.Optimistic:true
    javax.jdo.option.RetainValues:true
    javax.jdo.option.NontransactionalRead:true
    I have set my path to include both jre1.4, as well as the kodo\bin
    directory. My classpath is shown here
    C:\j2sdk1.4.2_03\bin;C:\j2sdk1.4.2_03\lib;C:\j2sdk1.4.2_03\jre\lib;C:\kodo-jdo-3.0.2;C:\kodo-jdo-3.0.2\lib;C:\oracle\ora92\jdbc\lib;.;
    I suspect my error is either from my classpath or my kodo.properties file.
    Is there any other reason that I am getting this error?
    Thanks
    Joe

    You should add your classes12.jar to your classpath. If you are using
    Kodo's scripts, you should edit bin/jdocmd.bat to include your library.
    Joe DeVilla wrote:
    >
    Hi
    I was trying to run the Kodo tutorial. I was able to run jdoc
    properties.jdo, but I am having trouble running mappingtool. I am having
    trouble getting Oracle to work properly. Here is the output:
    C:\kodoanimals\test\tutorial>mappingtool -action refresh package.jdo
    Exception in thread "main" kodo.util.FatalDataStoreException:
    oracle.jdbc.driver.OracleDriver
    NestedThrowables:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
    at
    kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:97)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:880)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:798)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:886)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:895)
    at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:67)
    at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:243)
    at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:233)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:864)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:816)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:749)
    Caused by: java.lang.ClassNotFoundException:
    oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at
    kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:55)
    ... 10 more
    NestedThrowablesStackTrace:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at
    kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:55)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:880)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:798)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:886)
    at
    kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:895)
    at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:67)
    at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:243)
    at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:233)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:864)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:816)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:749)
    Here is what my kodo.properties file looks like (located at
    c:\kodo-jdo-3.0.2 directory)
    kodo.LicenseKey: xxxx
    javax.jdo.PersistenceManagerFactoryClass:com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
    #javax.jdo.PersistenceManagerFactoryClass:kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    javax.jdo.option.ConnectionDriverName:oracle.jdbc.driver.OracleDriver
    javax.jdo.option.ConnectionUserName:teckusr04
    javax.jdo.option.ConnectionPassword:teckusr04
    javax.jdo.option.ConnectionURL:jdbc:oracle:thin:casrvta6861dt11:1521:casrvta6
    javax.jdo.option.Optimistic:true
    javax.jdo.option.RetainValues:true
    javax.jdo.option.NontransactionalRead:true
    I have set my path to include both jre1.4, as well as the kodo\bin
    directory. My classpath is shown here
    C:\j2sdk1.4.2_03\bin;C:\j2sdk1.4.2_03\lib;C:\j2sdk1.4.2_03\jre\lib;C:\kodo-jdo-3.0.2;C:\kodo-jdo-3.0.2\lib;C:\oracle\ora92\jdbc\lib;.;
    I suspect my error is either from my classpath or my kodo.properties file.
    Is there any other reason that I am getting this error?
    Thanks
    Joe
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Set database dictionary in Mappingtool Ant Task

    Hi,
    I'm sure I'm not the only person that uses the MappingTool Ant task to
    create SQL DDL, so why isn't there a way to tell it to use the correct
    database
    dictionary? When I run the ant task, the SQL producted is incorrect for my
    database type.
    I've checked the MappingTookTask.java file and I can that
    JDBCConfiguration has a setter method to set the dictionary, but I can't
    see how I would add this as a parameter to my Ant Task.
    I've added
    kodo.jdbc.DBDictionary=postgres
    to my kodo.properties file but this doesn't seem to be used by the ant
    task.
    So for the momement I'm falling back on a sed script to correct the SQL
    (i.e. int8(8) to int8, etc), but this is hardly ideal.
    Thanks,
    Andy.

    Abe White wrote:
    Could it be that Kodo is in fact using the right dictionary, but is just
    issuing bad SQL? What version of Kodo are you using? And what exactly
    are the symptoms of the problem? The use of type names like int8(8)?
    Is that generated for an existing database column, or a new one Kodo is
    creating?Something strange is happening because my other Ant tasks, including a
    mapping tool task that creates the database tables works fine.
    Here is how I call the task that creates the schema file -
    <pre>
    <mappingToolTask action="refresh" sqlfile="${sql.schema.file}"
    schemaaction="build">
    <fileset dir="${project.src.dir}">
    <include name="**/*.jdo" />
    </fileset>
    </mappingToolTask>
    </pre>
    Here is how I call the task that creates the database tables -
    <pre>
    <mappingToolTask action="${param.action}">
    <fileset dir="${project.src.dir}">
    <include name="**/*.jdo" />
    </fileset>
    </mappingToolTask>
    </pre>
    As you can see only only differnce between the two tasks is the sqlfile
    and schemaaction properties - it is as if the code that writes the schema
    file does use the same dictionary logic as when the database tables are
    created.
    Th error manifests itself as incorrect data types (for PostgreSQL). I get
    int(8) instead of int8, etc. Currently I correct this as follows -
    line = line.replaceAll("int8\\(8\\)","int8");
    line = line.replaceAll("int4\\(4\\)","int4");
    line = line.replaceAll("timestamp\\(8\\)","timestamp");
    line = line.replaceAll("bigserial\\(8\\)","bigserial");
    line = line.replaceAll("bool\\(1\\)","boolean");
    line = line.replaceAll("text\\(-1\\)","text");
    line = line.replaceAll("float8\\(8\\)","float8");
    I'm using 3.3.4.
    Andy.

  • Java docs for com.sap.aii.mappingtool.*

    Hi ,
    I was looking for the javadocs for com.sap.aii.mappingtool.* .
    Can anyonle let me knwo where can i find the docs for this .
    Thanks
    Nikhil

    did u try for <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/javadocs">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/javadocs</a>

  • Where can I find com.aii.mappingtool.tf3.rt.Container

    I want to develop a user-defined function in Eclipse and use BIT41 as a reference how to use the container parameter.
    According to the BIT41 documentation (section User Defined Functions, page 8), I should :
    import com.sap.aii.mappingtool.tf3.rt.Container;
    in my code.
    The problem is, that I can  not find the jar file on my workstation to be used.
    So I can not compile and test on my workstation, before loading it to my mapping on XI.
    XI used is 3.0.
    Any help please.

    sorry for wrong inputs.
    Message was edited by: siva  maranani

  • Ant mappingtool problem

    Greetings
    I have a problem using the mappingtool from ant
    with kodo 3.0.0b1.
    I realize that some ant integration problems are
    being fixed in beta2 but I hadn't seen this
    problem mentioned so I thought I'd let you know...
    Please let me know if I'm doing something wrong.
    Note that it seems to work fine when I use the
    commandline mappingtool utility.
    The ant tasks are set up as follows:
    <taskdef name="mappingtool"
    classname="kodo.jdbc.ant.MappingToolTask"
    classpathref="kodo-tool-classpath" />
    <target name="killdb" depends="deploy-runtime" description="Drop JDO specific tables" >
    <mappingtool action="drop" ignoreErrors="true">
    <fileset refid="all-jdo-files" />
    <classpath refid="runtime-path" />
    </mappingtool>
    </target>
    When I execute this target, I see the following exception:
    killdb:
    [mappingtool] java.lang.IllegalAccessError: tried to access method serp.util.ReferenceMap.removeExpired()V from class com.solarmetric.jdbc.ConnectionPoolImpl
    [mappingtool] at com.solarmetric.jdbc.ConnectionPoolImpl.getConnection(ConnectionPoolImpl.java:120)
    [mappingtool] at com.solarmetric.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:230)
    [mappingtool] at com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:128)
    [mappingtool] at kodo.jdbc.schema.DataSourceFactory$DefaultsDataSource.getConnection(DataSourceFactory.java:235)
    [mappingtool] at kodo.jdbc.sql.DBDictionaryFactory.getDBDictionary(DBDictionaryFactory.java:169)
    [mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getDBDictionary(JDBCConfigurationImpl.java:489)
    [mappingtool] at kodo.jdbc.schema.DataSourceFactory.configureDataSource(DataSourceFactory.java:136)
    [mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:759)
    [mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:842)
    [mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:851)
    [mappingtool] at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:64)
    [mappingtool] at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:186)
    [mappingtool] at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:176)
    [mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:774)
    [mappingtool] at kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:136)
    [mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
    [mappingtool] at org.apache.tools.ant.Task.perform(Task.java:319)
    [mappingtool] at org.apache.tools.ant.Target.execute(Target.java:309)
    [mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [mappingtool] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    [mappingtool] at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
    [mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:610)
    [mappingtool] at org.apache.tools.ant.Main.start(Main.java:196)
    [mappingtool] at org.apache.tools.ant.Main.main(Main.java:235)

    Thanks for your response, but this wasn't the problem.
    I don't have (never had) serp.jar lying around.
    serp appears to be in both kodo-jdo.jar and
    kodo-jdo-runtime.jar but no other jar files...
    Before running ant, my CLASSPATH is set to
    "nf.jar:ojdbc14.jar"
    (nf.jar contains the kodo.properties file -
    required here to pick up license key, etc)
    I printed out the CLASSPATH being used inside my
    ant target and it is as follows:
    antExtensions.jar:
    common.jar: (one of mine)
    gnu-getopt.jar:
    j2ee.jar:
    jakarta-commons-collections-2.1.jar:
    jakarta-commons-lang-1.0.1.jar:
    jakarta-commons-logging-1.0.2.jar:
    jakarta-commons-pool-1.0.1.jar:
    jakarta-oro-2.0.7.jar:
    jakarta-regexp-1.1.jar:
    jca1.0.jar:
    jdbc-hsql-1_7_0.jar:
    jdbc2_0-stdext.jar:
    jdo1_0.jar:
    jndi.jar:
    jta-spec1_0_1.jar:
    junit-3.8.1.jar:
    kodo-jdo-runtime.jar:
    kodo-jdo.jar:
    log4j-1.2.8.jar:
    nf.jar: (one of mine)
    ojdbc14.jar:
    sax.jar:
    wl-startup.jar:
    xalan.jar:
    xercesImpl.jar:
    xml-apis.jar
    Abe White wrote:
    If you still have the serp.jar that shipped with previous versions of
    Kodo in your classpath, make sure you remove it. Kodo 3 bundles the
    serp classes within the kodo jar.
    Was that the problem?

  • Mappingtool - sybase don't know about CMD_LINE

    Hi
    I'm trying to get kodo 3.0.2 to work with sybase 12.5.1.
    However, when running the mapping tool, it creates an invalid sql create
    table statement. A field JDOCLASS with type CMD_LINE is created, but sybase
    don't know about CMD_LINE!
    Any ideas what is going on here?
    Where does this CMD_LINE come from?
    Regards
    Jesper
    [mappingtool] kodo.util.FatalException:
    com.solarmetric.jdbc.ReportingSQLExcepti
    on: Can't specify a length or scale on type 'CMD_LINE'.
    [mappingtool] {stmnt 26357574: CREATE TABLE ORDER0 (JDOCLASS CMD_LINE(255)
    NULL
    , JDOID NUMERIC(38) NOT NULL, JDOVERSION INT NULL, ORDERDATE DATETIME NULL,
    ORDE
    RNO CMD_LINE(255) NULL, STATE INT NULL, SUBTOTAL FLOAT(32) NULL, UNQ_INDEX
    NUMER
    IC IDENTITY UNIQUE, CONSTRAINT P_ORDER PRIMARY KEY (JDOID))} [code=2716,
    state=Z
    ZZZZ]
    [mappingtool] NestedThrowables:
    [mappingtool] com.solarmetric.jdbc.ReportingSQLException: Can't specify a
    length
    or scale on type 'CMD_LINE'.
    [mappingtool] {stmnt 26357574: CREATE TABLE ORDER0 (JDOCLASS CMD_LINE(255)
    NULL
    , JDOID NUMERIC(38) NOT NULL, JDOVERSION INT NULL, ORDERDATE DATETIME NULL,
    ORDE
    RNO CMD_LINE(255) NULL, STATE INT NULL, SUBTOTAL FLOAT(32) NULL, UNQ_INDEX
    NUMER
    IC IDENTITY UNIQUE, CONSTRAINT P_ORDER PRIMARY KEY (JDOID))} [code=2716,
    state=Z
    ZZZZ]
    [mappingtool] at kodo.jdbc.meta.MappingTool.record(MappingTool.java:491)
    [mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:878)
    [mappingtool] at
    kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:
    175)
    [mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
    [mappingtool] at
    org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
    va:193)
    [mappingtool] at org.apache.tools.ant.Task.perform(Task.java:341)
    [mappingtool] at org.apache.tools.ant.Target.execute(Target.java:309)
    [mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [mappingtool] at
    org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [mappingtool] at
    org.apache.tools.ant.Project.executeTargets(Project.java:1255
    [mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:609)
    [mappingtool] at org.apache.tools.ant.Main.start(Main.java:196)
    [mappingtool] at org.apache.tools.ant.Main.main(Main.java:235)
    [mappingtool] Caused by: com.solarmetric.jdbc.ReportingSQLException: Can't
    speci
    fy a length or scale on type 'CMD_LINE'.

    Hmm. It looks like your JDBC driver is returning faulty information as
    for default JDBC types (we ask the driver what is the best datatype for
    say Types.VARCHAR). Is your database up to date with patches/metadata?
    A work around for now would be to use a subclass of
    kodo.jdbc.sql.SybaseDictionary which calls setVarcharTypeName in the
    constructor with the proper datatype.
    Jesper Ladegaard wrote:
    Hi
    I'm trying to get kodo 3.0.2 to work with sybase 12.5.1.
    However, when running the mapping tool, it creates an invalid sql create
    table statement. A field JDOCLASS with type CMD_LINE is created, but sybase
    don't know about CMD_LINE!
    Any ideas what is going on here?
    Where does this CMD_LINE come from?
    Regards
    Jesper
    [mappingtool] kodo.util.FatalException:
    com.solarmetric.jdbc.ReportingSQLExcepti
    on: Can't specify a length or scale on type 'CMD_LINE'.
    [mappingtool] {stmnt 26357574: CREATE TABLE ORDER0 (JDOCLASS CMD_LINE(255)
    NULL
    , JDOID NUMERIC(38) NOT NULL, JDOVERSION INT NULL, ORDERDATE DATETIME NULL,
    ORDE
    RNO CMD_LINE(255) NULL, STATE INT NULL, SUBTOTAL FLOAT(32) NULL, UNQ_INDEX
    NUMER
    IC IDENTITY UNIQUE, CONSTRAINT P_ORDER PRIMARY KEY (JDOID))} [code=2716,
    state=Z
    ZZZZ]
    [mappingtool] NestedThrowables:
    [mappingtool] com.solarmetric.jdbc.ReportingSQLException: Can't specify a
    length
    or scale on type 'CMD_LINE'.
    [mappingtool] {stmnt 26357574: CREATE TABLE ORDER0 (JDOCLASS CMD_LINE(255)
    NULL
    , JDOID NUMERIC(38) NOT NULL, JDOVERSION INT NULL, ORDERDATE DATETIME NULL,
    ORDE
    RNO CMD_LINE(255) NULL, STATE INT NULL, SUBTOTAL FLOAT(32) NULL, UNQ_INDEX
    NUMER
    IC IDENTITY UNIQUE, CONSTRAINT P_ORDER PRIMARY KEY (JDOID))} [code=2716,
    state=Z
    ZZZZ]
    [mappingtool] at kodo.jdbc.meta.MappingTool.record(MappingTool.java:491)
    [mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:878)
    [mappingtool] at
    kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:
    175)
    [mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
    [mappingtool] at
    org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
    va:193)
    [mappingtool] at org.apache.tools.ant.Task.perform(Task.java:341)
    [mappingtool] at org.apache.tools.ant.Target.execute(Target.java:309)
    [mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [mappingtool] at
    org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [mappingtool] at
    org.apache.tools.ant.Project.executeTargets(Project.java:1255
    [mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:609)
    [mappingtool] at org.apache.tools.ant.Main.start(Main.java:196)
    [mappingtool] at org.apache.tools.ant.Main.main(Main.java:235)
    [mappingtool] Caused by: com.solarmetric.jdbc.ReportingSQLException: Can't
    speci
    fy a length or scale on type 'CMD_LINE'.
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Mappingtool Ant task classpath errors

    Hello,
         I'm trying to use the mappingtool in my build file, but I'm getting a
    ClassNotFoundException:
    [mappingtool] java.lang.ClassNotFoundException:
    edu.uiuc.cs427.domain.BreakState
    [mappingtool] at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    [mappingtool] at java.security.AccessController.doPrivileged(Native
    Method)
    [mappingtool] at
    java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    [mappingtool] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    [mappingtool] at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    [mappingtool] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    [mappingtool] at
    org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1104)
    [mappingtool] at
    org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:938)
    [mappingtool] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    [mappingtool] at
    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    [mappingtool] at java.lang.Class.forName0(Native Method)
    [mappingtool] at java.lang.Class.forName(Class.java:219)
    [mappingtool] at serp.util.Strings.toClass(Strings.java:149)
    [mappingtool] at
    com.solarmetric.meta.ClassArgParser.parseClasses(ClassArgParser.java:77)
    [mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:837)
    [mappingtool] at
    kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:169)
    [mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
    [mappingtool] at
    org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
    When I set kodo.properties to db MappingFactory, I do not get this
    error. However, when I set kodo.properties to file MappingFactory, I get
    this error. Nothing else is different.
    I've checked several times to make sure the class path setting is correct:
    <!-- run mappingtool -->
    <mappingtool action="refresh">
         <classpath>
              <path refid="jdo.classpath"/>
              <pathelement location="${build.classes.dir}"/>
         </classpath>
         <fileset dir="${build.classes.dir}" includes="package.jdo"/>
         <config propertiesFile="${kodo.home}/kodo.properties"/>
    </mappingtool>
    and my file is in ${build.classes.dir}
    Also note that the jdoc task works fine with this same classpath, so
    this seems like an issue with mappingtool.
    See my other mappingtool post for similar errors, maybe related.

    Abe White wrote:
    Could it be that Kodo is in fact using the right dictionary, but is just
    issuing bad SQL? What version of Kodo are you using? And what exactly
    are the symptoms of the problem? The use of type names like int8(8)?
    Is that generated for an existing database column, or a new one Kodo is
    creating?Something strange is happening because my other Ant tasks, including a
    mapping tool task that creates the database tables works fine.
    Here is how I call the task that creates the schema file -
    <pre>
    <mappingToolTask action="refresh" sqlfile="${sql.schema.file}"
    schemaaction="build">
    <fileset dir="${project.src.dir}">
    <include name="**/*.jdo" />
    </fileset>
    </mappingToolTask>
    </pre>
    Here is how I call the task that creates the database tables -
    <pre>
    <mappingToolTask action="${param.action}">
    <fileset dir="${project.src.dir}">
    <include name="**/*.jdo" />
    </fileset>
    </mappingToolTask>
    </pre>
    As you can see only only differnce between the two tasks is the sqlfile
    and schemaaction properties - it is as if the code that writes the schema
    file does use the same dictionary logic as when the database tables are
    created.
    Th error manifests itself as incorrect data types (for PostgreSQL). I get
    int(8) instead of int8, etc. Currently I correct this as follows -
    line = line.replaceAll("int8\\(8\\)","int8");
    line = line.replaceAll("int4\\(4\\)","int4");
    line = line.replaceAll("timestamp\\(8\\)","timestamp");
    line = line.replaceAll("bigserial\\(8\\)","bigserial");
    line = line.replaceAll("bool\\(1\\)","boolean");
    line = line.replaceAll("text\\(-1\\)","text");
    line = line.replaceAll("float8\\(8\\)","float8");
    I'm using 3.3.4.
    Andy.

  • Generate sql from mappingtool java class

    I have been trying without any luck to get the MappingTool.run(...) method
    to generate an SQL update script. To do this I figure that I need to
    specify the "sqlWriter" parameter as a valid FileWriter. But the file
    mappingtool generates is always empty. Any hints/clues?
    Note that I have no problem generating the sql files from ant or commandline
    by specifying -sql xxx.sql
    Here is my calling code...
    Writer dest = new FileWriter(...);
    boolean ok =
    MappingTool.run(
    this.getJDBCConfiguration(), // JDBCConfiguration
    MappingTool.ACTION_BUILD_SCHEMA, // action
    this.getResourceKeys().getJDOResourceFileNames(), // jdo file names
    null, // mappingWriter
    SchemaTool.ACTION_ADD,// schemaAction
    false,// dropTables
    false,// ignoreErrors
    true, // readSchema
    true, // include pks
    true, // include fks
    true, // include indexes
    null, // schemaWriter
    dest, // sqlWriter
    this.getClass().getClassLoader() // class loader
    Cheers and thanks.
    ..droo.

    Does the schema already exist? If so, SchemaTool.ACTION_ADD won't do
    anything (nothing to add). Try SchemaTool.ACTION_BUILD

Maybe you are looking for

  • Regd Wagetype and basic pay from 0008 thru internal table in smartform..

    Hi, I have a requirement where i have to display in my smartform the values for basic pay and different wagetypes from infotype 0008. In my smartform for 1 employee, only those values of wagetype and basic pay should print which are maintained in 000

  • Call BI Publisher report from PL/SQL

    Hi, I was looking for a solution to "download" a PDF report from BI Publisher in a PL/SQL procedure. After the download, I need to insert it into a table. I can't believe noone ever done this, but I can't find a good solution. Thanks, Jan

  • How to avoid the Commit/Rollback dialog box

    I've a JClient app with two frames wich relate to the same appllication module with the same connection (I need it because I want a single commit). I start the first frame,then I click a button to start the second frame, I insert data in the second o

  • WARNING - QUANTUM TV - VERIZON SCAM

    So I upgrade my service to Quantum TV - based on the offer details Package for 4 TV's was $34.99  with $22.00 for enhanced services....... I had prior 1 HD DVR ($19.99)  and 4 normal set-top boxes ($6.99ea)...... so was paying $$47.95 and now only ne

  • Programs will not open up

    I installed a new hard drive a Hitachi T1. i installed the OS Tiger to this hard drive then copied over the data from the 160gb hard drive during installation. I cannot get applications to open up. The one I can get is Opera. Safari or Firefox and It