You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Sangeeta Bhatia <sb...@TechMahindra.com> on 2006/06/26 08:53:16 UTC

Problem in importing Seed data

Hi All,
I am using ofbiz build 5924.and database is localderby.While trying to import seed data, I am getting the following exception:

An error occurred saving the data, rolling back transaction (true)
Exception: java.lang.IllegalArgumentException
Message: Type id not found

An error occurred saving the data, rolling back transaction (true)
Exception: java.lang.IllegalArgumentException
Message: Type description not found

Here is the relevant excrept from entitymodel.xml:
    <entity entity-name="Room"
            package-name="org.ofbiz.hotelCalifornia"
            title="Hotel California's Rooms">
      <field name="roomId" type="id"></field>
      <field name="fId" type="id"></field>
      <field name="numberFree" type="numeric"></field>
      <prim-key field="roomId"/>
      <relation type="one" fk-name="room_facility_map"
rel-entity-name="RoomFacility">
        <key-map field-name="fId"/>
      </relation>
    </entity>

and here is what i am trying to import:
<?xml version="1.0" encoding="UTF-8"?>
<entity-engine-xml>
     	<RoomFacility fId="PLAIN" description="A plain room with minimal facilities"/>
	<Room roomId="PLAIN" fId="F100" numberFree=5/> </entity-engine-xml>

Si has suggested that  this is an old problem with localderbyodbc not being set correctly, so it couldn't find the types on some fieldtype_...xml.Does anyone have any clue about this?
Is there something I am missing? I have checked the fieldtypederby.xml and it corrcetly lists :
   <field-type-def type="id" sql-type="VARCHAR(20)" java-type="String"></field-type-def>
I also trying (stupidly) to create this data through a service (as in delegator.create()) but still the same error.
I have also been advised to upgrade the build but my point is that this should work with any build.
Any help would be greatly appreciated:I have been struggling with this issue for the past two weeks!

Thanks in advance!
Sangeeta

============================================================================================================================

Tech Mahindra, formerly Mahindra-British Telecom.


Disclaimer:


The contents of this E-mail (including the contents of the enclosure(s) or attachment(s) if any) are privileged and confidential material of Tech Mahindra and should not be disclosed to, used by or copied in any manner by anyone other than the intended addressee(s). In case you are not the desired addressee, you should delete this message and/or re-direct it to the sender. The views expressed in this E-mail message (including the enclosure(s) or attachment(s) if any) are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Tech Mahindra.


This e-mail message including attachment/(s), if any, is believed to be free of any virus. However, it is the responsibility of the recipient to ensure that it is virus free and Tech Mahindra is not responsible for any loss or damage arising in any way from its use.

============================================================================================================================

Re: Problem in importing Seed data

Posted by Hans Bakker <h....@antwebsystems.com>.
You may want to look at the opentravelsystem, where we use the fixed asset for 
the definition of the rooms. A fixed asset is then connected with a product 
with the type 'fixed asset usage' in order to rent it to a customer. If a 
room is available is also recorded there.

Regards,
Hans

On Monday 26 June 2006 13:53, Sangeeta Bhatia wrote:
> Hi All,
> I am using ofbiz build 5924.and database is localderby.While trying to
> import seed data, I am getting the following exception:
>
> An error occurred saving the data, rolling back transaction (true)
> Exception: java.lang.IllegalArgumentException
> Message: Type id not found
>
> An error occurred saving the data, rolling back transaction (true)
> Exception: java.lang.IllegalArgumentException
> Message: Type description not found
>
> Here is the relevant excrept from entitymodel.xml:
>     <entity entity-name="Room"
>             package-name="org.ofbiz.hotelCalifornia"
>             title="Hotel California's Rooms">
>       <field name="roomId" type="id"></field>
>       <field name="fId" type="id"></field>
>       <field name="numberFree" type="numeric"></field>
>       <prim-key field="roomId"/>
>       <relation type="one" fk-name="room_facility_map"
> rel-entity-name="RoomFacility">
>         <key-map field-name="fId"/>
>       </relation>
>     </entity>
>
> and here is what i am trying to import:
> <?xml version="1.0" encoding="UTF-8"?>
> <entity-engine-xml>
>      	<RoomFacility fId="PLAIN" description="A plain room with minimal
> facilities"/> <Room roomId="PLAIN" fId="F100" numberFree=5/>
> </entity-engine-xml>
>
> Si has suggested that  this is an old problem with localderbyodbc not being
> set correctly, so it couldn't find the types on some fieldtype_...xml.Does
> anyone have any clue about this? Is there something I am missing? I have
> checked the fieldtypederby.xml and it corrcetly lists : <field-type-def
> type="id" sql-type="VARCHAR(20)" java-type="String"></field-type-def> I
> also trying (stupidly) to create this data through a service (as in
> delegator.create()) but still the same error. I have also been advised to
> upgrade the build but my point is that this should work with any build. Any
> help would be greatly appreciated:I have been struggling with this issue
> for the past two weeks!
>
> Thanks in advance!
> Sangeeta
>
> ===========================================================================
>=================================================
>
> Tech Mahindra, formerly Mahindra-British Telecom.
>
>
> Disclaimer:
>
>
> The contents of this E-mail (including the contents of the enclosure(s) or
> attachment(s) if any) are privileged and confidential material of Tech
> Mahindra and should not be disclosed to, used by or copied in any manner by
> anyone other than the intended addressee(s). In case you are not the
> desired addressee, you should delete this message and/or re-direct it to
> the sender. The views expressed in this E-mail message (including the
> enclosure(s) or attachment(s) if any) are those of the individual sender,
> except where the sender expressly, and with authority, states them to be
> the views of Tech Mahindra.
>
>
> This e-mail message including attachment/(s), if any, is believed to be
> free of any virus. However, it is the responsibility of the recipient to
> ensure that it is virus free and Tech Mahindra is not responsible for any
> loss or damage arising in any way from its use.
>
> ===========================================================================
>=================================================

-- 
Regards,
Hans Bakker
ANT Websystems Co.,Ltd (http://www.antwebsystems.com)

If you want to verify that this message really originates from
from the above person, download the public key from:
http://www.antwebsystems.com/hbakkerAntwebsystems.asc

Re: Problem in importing Seed data

Posted by Souvik Saha Bhowmik <so...@gmail.com>.
Hi,
I am not sure whats happenning. Just make sure in the entityEngine.xml that
your default database connection is localDerby. Also make sure in the
web.xml the default delegator name. This is just to check. because normally
they are all set to point the derby database.


On 6/26/06, Sangeeta Bhatia <sb...@techmahindra.com> wrote:
>
>
> Hi All,
> I am using ofbiz build 5924.and database is localderby.While trying to
> import seed data, I am getting the following exception:
>
> An error occurred saving the data, rolling back transaction (true)
> Exception: java.lang.IllegalArgumentException
> Message: Type id not found
>
> An error occurred saving the data, rolling back transaction (true)
> Exception: java.lang.IllegalArgumentException
> Message: Type description not found
>
> Here is the relevant excrept from entitymodel.xml:
>    <entity entity-name="Room"
>            package-name="org.ofbiz.hotelCalifornia"
>            title="Hotel California's Rooms">
>      <field name="roomId" type="id"></field>
>      <field name="fId" type="id"></field>
>      <field name="numberFree" type="numeric"></field>
>      <prim-key field="roomId"/>
>      <relation type="one" fk-name="room_facility_map"
> rel-entity-name="RoomFacility">
>        <key-map field-name="fId"/>
>      </relation>
>    </entity>
>
> and here is what i am trying to import:
> <?xml version="1.0" encoding="UTF-8"?>
> <entity-engine-xml>
>        <RoomFacility fId="PLAIN" description="A plain room with minimal
> facilities"/>
>        <Room roomId="PLAIN" fId="F100" numberFree=5/> </entity-engine-xml>
>
> Si has suggested that  this is an old problem with localderbyodbc not
> being set correctly, so it couldn't find the types on some
> fieldtype_...xml.Does anyone have any clue about this?
> Is there something I am missing? I have checked the fieldtypederby.xml and
> it corrcetly lists :
>   <field-type-def type="id" sql-type="VARCHAR(20)"
> java-type="String"></field-type-def>
> I also trying (stupidly) to create this data through a service (as in
> delegator.create()) but still the same error.
> I have also been advised to upgrade the build but my point is that this
> should work with any build.
> Any help would be greatly appreciated:I have been struggling with this
> issue for the past two weeks!
>
> Thanks in advance!
> Sangeeta
>
>
> ============================================================================================================================
>
> Tech Mahindra, formerly Mahindra-British Telecom.
>
>
> Disclaimer:
>
>
> The contents of this E-mail (including the contents of the enclosure(s) or
> attachment(s) if any) are privileged and confidential material of Tech
> Mahindra and should not be disclosed to, used by or copied in any manner by
> anyone other than the intended addressee(s). In case you are not the desired
> addressee, you should delete this message and/or re-direct it to the sender.
> The views expressed in this E-mail message (including the enclosure(s) or
> attachment(s) if any) are those of the individual sender, except where the
> sender expressly, and with authority, states them to be the views of Tech
> Mahindra.
>
>
> This e-mail message including attachment/(s), if any, is believed to be
> free of any virus. However, it is the responsibility of the recipient to
> ensure that it is virus free and Tech Mahindra is not responsible for any
> loss or damage arising in any way from its use.
>
>
> ============================================================================================================================
>

Re: Problem in importing Seed data

Posted by Dimitri Unruh <di...@lynx.de>.
and also add these line

<entity-group group="org.ofbiz" entity="Room" />

to you entitygroup.xml (if you still not have it done)


Kind regards

Dimitri Unruh

Lynx Consulting Group
Johanniskirchplatz 6
D-33615 Bielefeld
T: +49 (0) 521 / 52 47 - 408
dimitri.unruh@lynx.de
http://www.lynx.de

Re: Problem in importing Seed data

Posted by Chris Howe <cj...@yahoo.com>.
Just a quick glance...

<Room roomId="PLAIN" fId="F100" numberFree=5/> 

you're missing quotes numberFree="5".  If that's not
it, what does your RoomFacility entity look like?

--- Sangeeta Bhatia <sb...@TechMahindra.com> wrote:

> 
> Hi All,
> I am using ofbiz build 5924.and database is
> localderby.While trying to import seed data, I am
> getting the following exception:
> 
> An error occurred saving the data, rolling back
> transaction (true)
> Exception: java.lang.IllegalArgumentException
> Message: Type id not found
> 
> An error occurred saving the data, rolling back
> transaction (true)
> Exception: java.lang.IllegalArgumentException
> Message: Type description not found
> 
> Here is the relevant excrept from entitymodel.xml:
>     <entity entity-name="Room"
>             package-name="org.ofbiz.hotelCalifornia"
>             title="Hotel California's Rooms">
>       <field name="roomId" type="id"></field>
>       <field name="fId" type="id"></field>
>       <field name="numberFree"
> type="numeric"></field>
>       <prim-key field="roomId"/>
>       <relation type="one"
> fk-name="room_facility_map"
> rel-entity-name="RoomFacility">
>         <key-map field-name="fId"/>
>       </relation>
>     </entity>
> 
> and here is what i am trying to import:
> <?xml version="1.0" encoding="UTF-8"?>
> <entity-engine-xml>
>      	<RoomFacility fId="PLAIN" description="A plain
> room with minimal facilities"/>
> 	<Room roomId="PLAIN" fId="F100" numberFree=5/>
> </entity-engine-xml>
> 
> Si has suggested that  this is an old problem with
> localderbyodbc not being set correctly, so it
> couldn't find the types on some
> fieldtype_...xml.Does anyone have any clue about
> this?
> Is there something I am missing? I have checked the
> fieldtypederby.xml and it corrcetly lists :
>    <field-type-def type="id" sql-type="VARCHAR(20)"
> java-type="String"></field-type-def>
> I also trying (stupidly) to create this data through
> a service (as in delegator.create()) but still the
> same error.
> I have also been advised to upgrade the build but my
> point is that this should work with any build.
> Any help would be greatly appreciated:I have been
> struggling with this issue for the past two weeks!
> 
> Thanks in advance!
> Sangeeta
> 
>
============================================================================================================================
> 
> Tech Mahindra, formerly Mahindra-British Telecom.
> 
> 
> Disclaimer:
> 
> 
> The contents of this E-mail (including the contents
> of the enclosure(s) or attachment(s) if any) are
> privileged and confidential material of Tech
> Mahindra and should not be disclosed to, used by or
> copied in any manner by anyone other than the
> intended addressee(s). In case you are not the
> desired addressee, you should delete this message
> and/or re-direct it to the sender. The views
> expressed in this E-mail message (including the
> enclosure(s) or attachment(s) if any) are those of
> the individual sender, except where the sender
> expressly, and with authority, states them to be the
> views of Tech Mahindra.
> 
> 
> This e-mail message including attachment/(s), if
> any, is believed to be free of any virus. However,
> it is the responsibility of the recipient to ensure
> that it is virus free and Tech Mahindra is not
> responsible for any loss or damage arising in any
> way from its use.
> 
>
============================================================================================================================
>