I have created it now with this content:
<fieldtypemodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:noNamespaceSchemaLocation="
http://ofbiz.apache.org/dtds/fieldtypemodel.xsd";>
  <!-- ===================== field-type-def ==================== -->
    <!-- General Types -->
    <field-type-def type="blob" sql-type="C" java-type="java.sql.Blob
"></field-type-def>

    <field-type-def type="date-time" sql-type="T" java-type="
java.sql.Timestamp"></field-type-def>
    <field-type-def type="date" sql-type="D" java-type="java.sql.Date
"></field-type-def>
    <field-type-def type="time" sql-type="T" java-type="java.sql.Time
"></field-type-def>

    <field-type-def type="currency-amount" sql-type="N(18,2)"
java-type="Double"><validate method="isSignedDouble" /></field-type-def>
    <field-type-def type="currency-precise" sql-type="N(18,3)"
java-type="Double"><validate method="isSignedDouble" /></field-type-def>
    <field-type-def type="floating-point" sql-type="F"
java-type="Double"><validate method="isSignedDouble" /></field-type-def>
    <field-type-def type="numeric" sql-type="I" java-type="Long"><validate
method="isSignedLong" /></field-type-def>

    <field-type-def type="id" sql-type="C(20)"
java-type="String"></field-type-def>
    <field-type-def type="id-long" sql-type="C(60)"
java-type="String"></field-type-def>
    <field-type-def type="id-vlong" sql-type="C(250)"
java-type="String"></field-type-def>

    <field-type-def type="indicator" sql-type="C(1)"
java-type="String"></field-type-def>
    <field-type-def type="very-short" sql-type="C(10)"
java-type="String"></field-type-def>
    <field-type-def type="short-varchar" sql-type="C(60)"
java-type="String"></field-type-def>
    <field-type-def type="long-varchar" sql-type="C(255)"
java-type="String"></field-type-def>
    <field-type-def type="very-long" sql-type="TEXT"
java-type="String"></field-type-def>

    <field-type-def type="comment" sql-type="C(255)"
java-type="String"></field-type-def>
    <field-type-def type="description" sql-type="C(255)"
java-type="String"></field-type-def>
    <field-type-def type="name" sql-type="C(100)"
java-type="String"></field-type-def>
    <field-type-def type="value" sql-type="C(255)"
java-type="String"></field-type-def>

    <!-- Specialized Types -->
    <field-type-def type="credit-card-number" sql-type="C(255)"
java-type="String"><validate method="isAnyCard" /></field-type-def>
    <field-type-def type="credit-card-date" sql-type="C(20)"
java-type="String"><validate method="isDateAfterToday" /></field-type-def>
    <field-type-def type="email" sql-type="C(255)"
java-type="String"><validate method="isEmail" /></field-type-def>
    <field-type-def type="url" sql-type="C(255)"
java-type="String"></field-type-def>
    <field-type-def type="id-ne" sql-type="C(20)"
java-type="String"><validate method="isNotEmpty" /></field-type-def>
    <field-type-def type="id-long-ne" sql-type="C(60)"
java-type="String"><validate method="isNotEmpty" /></field-type-def>
    <field-type-def type="id-vlong-ne" sql-type="C(250)"
java-type="String"><validate method="isNotEmpty" /></field-type-def>
    <field-type-def type="tel-number" sql-type="C(60)"
java-type="String"><validate method="isInternationalPhoneNumber"
/></field-type-def>
</fieldtypemodel>

but now ofbiz aborts completely. The last messages i can see is:
2008-03-15 17:54:50,265 (main) [    ModelViewEntity.java:468:WARN ]
Conversion for complex-alias needs to be implemented for cache and in-memory
eval stuff to work correctly, will not work for alias: statusDelay of
view-entity ExampleStatusDetail
2008-03-15 17:54:50,390 (main) [    ModelViewEntity.java:626:INFO ] Throwing
out field alias in view entity InventoryItemAndDetail because one already
exists with the alias name [unitCost] and field name
[IID(InventoryItemDetail).unitCost], existing field name is [II.unitCost]
2008-03-15 17:54:50,406 (main) [    ModelViewEntity.java:468:WARN ]
Conversion for complex-alias needs to be implemented for cache and in-memory
eval stuff to work correctly, will not work for alias: quantityOrdered of
view-entity OrderItemQuantityReportGroupByItem
2008-03-15 17:54:50,406 (main) [    ModelViewEntity.java:468:WARN ]
Conversion for complex-alias needs to be implemented for cache and in-memory
eval stuff to work correctly, will not work for alias: quantityOpen of
view-entity OrderItemQuantityReportGroupByItem
2008-03-15 17:54:50,406 (main) [    ModelViewEntity.java:468:WARN ]
Conversion for complex-alias needs to be implemented for cache and in-memory
eval stuff to work correctly, will not work for alias: quantityOrdered of
view-entity OrderItemQuantityReportGroupByProduct
2008-03-15 17:54:50,406 (main) [    ModelViewEntity.java:468:WARN ]
Conversion for complex-alias needs to be implemented for cache and in-memory
eval stuff to work correctly, will not work for alias: quantityOpen of
view-entity OrderItemQuantityReportGroupByProduct
2008-03-15 17:54:50,421 (main) [    ModelViewEntity.java:468:WARN ]
Conversion for complex-alias needs to be implemented for cache and in-memory
eval stuff to work correctly, will not work for alias: quantityOrdered of
view-entity OrderItemAndShipGrpInvResAndItemSum
2008-03-15 17:54:50,421 (main) [    ModelViewEntity.java:468:WARN ]
Conversion for complex-alias needs to be implemented for cache and in-memory
eval stuff to work correctly, will not work for alias: totQuantityAvailable
of view-entity OrderItemAndShipGrpInvResAndItemSum
2008-03-15 17:54:50,546 (main) [        ModelReader.java:385:INFO ] FINISHED
LOADING ENTITIES - ALL FILES; #Entities=766 #ViewEntities=192 #Fields=7915
#Relationships=2640 #AutoRelationships=1947
2008-03-15 17:54:50,734 (main) [   GenericDelegator.java:148:INFO ] Doing
entity definition check...
2008-03-15 17:54:50,734 (main) [ ModelEntityChecker.java:500:INFO ]
[initReservedWords] array length=1023






2008/3/15, Jacques Le Roux <[EMAIL PROTECTED]>:
>
> Did you try to create a fieldtypevisualfoxpro.xml file and put
> "visualfoxpro" in field-type-name ?
>
> Jacques
>
> From: "Bruno Busco" <[EMAIL PROTECTED]>
>
> >I am working on Win XP, i have the FoxPro database and have installed the
> > Visual FoxPro odbc driver.
> > I can access the FoxPro database from Access so i know that the odbc
> driver
> > works well.
> >
> > Now i am trying to configure ofbiz to access the FoxPro database with
> the
> > following:
> >
> >    <datasource name="odbcfoxpro"
> >            helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
> >            field-type-name="mysql"
> >            check-on-start="true"
> >            add-missing-on-start="true"
> >            check-indices-on-start="true"
> >            use-foreign-keys="false"
> >            use-foreign-key-indices="true"
> >            join-style="ansi-no-parenthesis"
> >            alias-view-columns="false"
> >            always-use-constraint-keyword="true">
> >        <inline-jdbc
> >                jdbc-driver="sun.jdbc.odbc.JdbcOdbcDriver"
> >                jdbc-uri="jdbc:odbc:Arca2000Pro"
> >                jdbc-username=""
> >                jdbc-password=""
> >                isolation-level="ReadCommitted"
> >                pool-minsize="2"
> >                pool-maxsize="250"/>
> >        <!-- <jndi-jdbc jndi-server-name="localjndi"
> > jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
> >    </datasource>
> >
> > but I get a lot of
> > 2008-03-15 15:27:57,625 (main) [       DatabaseUtil.java:1288:ERROR]
> Error
> > getting column info for column. Error was:java.sql.SQLException: Column
> not
> > found
> >
> > Can anybody please suggest a solution?
> > Could it be becouse of the field-type-name="mysql" (but in this case how
> can
> > i get a Visual FoxPro fieldtype file?)
> >
> > Thank you
> > - Bruno
> >
> >
> >
> > 2008/3/15, Bruno Busco <[EMAIL PROTECTED]>:
> >>
> >> Hi,
> >> i need to make my ofbiz box retrieve products information from a legacy
> >> FoxPro database.
> >> The data should be done on a regular basis (lets say every night of
> once a
> >> week) so it is not just a one time data import.
> >>
> >> Googling around i have found this
> >> http://lists.ofbiz.org/pipermail/users/2005-May/007836.html
> >>
> >> Is out there any more updated how-to or documentation i could start
> from?
> >>
> >> Many thanks for you suggestions!
> >>
> >> Bruno
> >>
> >
>

Reply via email to