You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Robert S. Sfeir" <ro...@codepuccino.com> on 2003/11/18 05:55:48 UTC

Someone PLEASE help with double insert issue

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am still trying to insert 2 beans into 2 separate tables, however bean
2 needs the userID from bean 1's insert.

I can't seem to find examples for this, and everything I try inserts the
first bean, seems to get the id after insert, I do a setUserID on the
second bean, then perform the insert, and I still get an exception that
user_id cannot be null.  It's NOT NULL!  I am pretty frustrated with
this.  It should be simple, it's not.  I've tried it with ODMG and with
PersistenceBroker, both return the same problem.

Further the first insert gets commited even though the transaction
commit is not called, and therefore I can't rollback any changes once
the second insert fails.

I'm using RC4.

Here is what my insert looks like:

	public final void addRegistration( final UserInfoBean user, final
UserLoginBean userLoginBean )
			throws DataAccessException
	{
		final PersistenceBroker broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
		try
		{
			LOGGER.log( Level.FINEST, "Transaction open in " +
RegistrationDAOImpl.class.getName() );

			broker.beginTransaction();
			broker.store( user );
			userLoginBean.setUserID( user.getUserID() );
			broker.store( userLoginBean );
			broker.commitTransaction();
		}
		catch( PersistenceBrokerException tab )
		{
			broker.abortTransaction();
			throw DataAccessException.datastoreError( tab );
		}
	}

XML:

<class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
proxy="dynamic" table="CDPCNO_USER_LOGIN">
		<field-descriptor id="1" name="userID" nullable="false"
column="USER_ID" jdbc-type="INTEGER" primarykey="true"/>
		<field-descriptor name="loginName" nullable="false" column="USERNAME"
jdbc-type="VARCHAR"/>
		<field-descriptor name="password" nullable="false" column="PASSWORD"
jdbc-type="VARCHAR"/>
		<field-descriptor name="passwordReminder" column="REMINDER_CLUE"
jdbc-type="VARCHAR"/>
		<field-descriptor name="statusID" column="STATUS_ID" jdbc-type="INTEGER"/>
		<field-descriptor name="lastLogin" nullable="false"
column="LAST_LOGIN" jdbc-type="TIMESTAMP"/>
		<field-descriptor name="baseRole" column="BASE_ROLE" jdbc-type="VARCHAR"/>
		<reference-descriptor name="userInfoBean"
class-ref="com.codepuccino.security.beans.UserInfoBean"
auto-update="false" auto-delete="false">
			<foreignkey field-ref="userID" field-id-ref="1"/>
		</reference-descriptor>
	</class-descriptor>
	<class-descriptor class="com.codepuccino.security.beans.UserInfoBean"
proxy="dynamic" table="CDPCNO_USER_INFO">
		<field-descriptor id="1" name="userID" nullable="false"
column="USER_ID" jdbc-type="INTEGER" primarykey="true"
autoincrement="true" />
		<field-descriptor name="firstName" nullable="false"
column="FIRST_NAME" jdbc-type="VARCHAR"/>
		<field-descriptor name="lastName" nullable="false" column="LAST_NAME"
jdbc-type="VARCHAR"/>
		<field-descriptor name="midInit" column="MID_INIT" jdbc-type="VARCHAR"/>
		<field-descriptor name="nickname" column="NICKNAME" jdbc-type="VARCHAR"/>
		<collection-descriptor name="userLogins"
element-class-ref="com.codepuccino.security.beans.UserLoginBean"
auto-update="false" auto-delete="false">
			<inverse-foreignkey field-ref="userID"/>
		</collection-descriptor>
	</class-descriptor>

PLEASE what am I missing?  I'm going gaga here because I don't see the
problem.

R
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/uaZF+cV9vuB27SARAujIAJ9m8nJpgW5xVdN3OPb6ef9BlYSeHwCeMDUf
ob+buyLnTASop68nj+D8Tyg=
=mu+W
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue [RESOLVED]

Posted by "Robert S. Sfeir" <ro...@codepuccino.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That catch Exception is wrong, you should be catching
PersistenceBrokerException... catching Exception is not a good thing,
and it was there because I wanted to see everything that would get thrown.

R

Robert S. Sfeir wrote:

| Thanks to everyone who helped.
|
| Some things that others might need to know if they want to do one insert
| for a full transaction...
|
| First, you don't need an auto increment row in the second table, you do
| need a primary key and a foreign key definition.
|
| Second, you can't just set the userID like I did, you have to pass the
| full bean of the first table to the second table.
|
| Third, you DON'T need anonymous access, that's a misnomer, everything
| works fine without it.  So in the end, here is what my code looks like.
| ~ I wonder if I should be on the hook to write a quick tutorial on how to
| do this.  I can do this with both ODMG and PersistenceBroker APIs now.
  :-)
|
| The Insert:
| public final void addRegistration( final UserInfoBean user, final
| UserLoginBean userLoginBean )
|             throws DataAccessException
|     {
|         final PersistenceBroker broker =
| PersistenceBrokerFactory.defaultPersistenceBroker();
|         try
|         {
|             LOGGER.log( Level.FINEST, "Transaction open in " +
| RegistrationDAOImpl.class.getName() );
|
|             broker.beginTransaction();
|             broker.store( user );
|             userLoginBean.setUserInfoBean( user );
|             broker.store( userLoginBean );
|             broker.commitTransaction();
|         }
|         catch( Exception tab )
|         {
|             broker.abortTransaction();
|             tab.printStackTrace();
|             throw DataAccessException.datastoreError( tab );
|         }
|     }
|
| What fixed it: userLoginBean.setUserInfoBean(user);  is what makes it work
| What broke it: userLoginBean.setUserID(user.getUserID()) fails! it wants
| the whole user bean after insert.  (Dunno why, perhaps someone can
explain)
|
| Descriptors:
| <class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
| table="CDPCNO_USER_LOGIN">
|         <field-descriptor name="userID" nullable="false" column="USER_ID"
| jdbc-type="INTEGER" primarykey="true"/>
|         <field-descriptor name="loginName" nullable="false"
| column="USERNAME"
| jdbc-type="VARCHAR"/>
|         <field-descriptor name="password" nullable="false"
| column="PASSWORD"
| jdbc-type="VARCHAR"/>
|         <field-descriptor name="passwordReminder" column="REMINDER_CLUE"
| jdbc-type="VARCHAR"/>
|         <field-descriptor name="statusID" column="STATUS_ID"
| jdbc-type="INTEGER"/>
|         <field-descriptor name="lastLogin" nullable="false"
| column="LAST_LOGIN" jdbc-type="TIMESTAMP"/>
|         <field-descriptor name="baseRole" column="BASE_ROLE"
| jdbc-type="VARCHAR"/>
|         <reference-descriptor name="userInfoBean"
| class-ref="com.codepuccino.security.beans.UserInfoBean"
| auto-retrieve="true" auto-update="true" auto-delete="true">
|             <foreignkey field-ref="userID"/>
|         </reference-descriptor>
|     </class-descriptor>
|     <class-descriptor class="com.codepuccino.security.beans.UserInfoBean"
| table="CDPCNO_USER_INFO">
|         <field-descriptor name="userID" nullable="false" column="USER_ID"
| jdbc-type="INTEGER" primarykey="true" autoincrement="true" />
|         <field-descriptor name="firstName" nullable="false"
| column="FIRST_NAME" jdbc-type="VARCHAR"/>
|         <field-descriptor name="lastName" nullable="false"
| column="LAST_NAME"
| jdbc-type="VARCHAR"/>
|         <field-descriptor name="midInit" column="MID_INIT"
| jdbc-type="VARCHAR"/>
|         <field-descriptor name="nickname" column="NICKNAME"
| jdbc-type="VARCHAR"/>
|         <collection-descriptor name="userLogins"
| element-class-ref="com.codepuccino.security.beans.UserLoginBean"
| auto-update="true" auto-delete="false">
|             <inverse-foreignkey field-ref="userID"/>
|         </collection-descriptor>
|     </class-descriptor>
|
| What was wrong: nothing
| What you don't need to do: access anonymous, or have an auto increment
| key in both tables, not needed.  Only in one to get the id you want to
| insert in the first place.
|
| Struts specific action simply sets the info in both beans and passes
| them down.
|
| I would not mind writing a tutorial on how to do this with both ODMG and
| PersistenceBroker.  They're both almost the same.
|
| Hope this helps someone else some day.
|
| R

- ---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/urDN+cV9vuB27SARAs/jAKDzh0Y2S1vHymCtCAtXy+iJKdMm8ACggAMe
3sovd/au0Two/kaXQ42KU3Y=
=7SYs
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue [RESOLVED]

Posted by "Robert S. Sfeir" <ro...@codepuccino.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian the only place I set it, as you can see from my code, *IS* within
the transaction.  Other wise I would have set it in the action which
calls this method.  I could not find another way to get the insert to
work.  As you could see from my explanation, setting the user_id in the
UserInfoBean would still make UserInfoBean think the ID was empty, hence
I figured something about the transaction was breaking the state
somehow.  I don't know what's going on under the hood, I honestly
haven't looked.

But I understand your point and I agree, there is no need to do this
outside the transaction boundary.

Thanks for your suggestion though, it's what triggered the solution.
R

Brian McCallister wrote:

| On Tuesday, November 18, 2003, at 06:35 PM, Robert S. Sfeir wrote:
|
|> Second, you can't just set the userID like I did, you have to pass the
|> full bean of the first table to the second table.
|
|
| Be careful, you don't *need* to set it to maintain integrity outside of
| the transaction boundary, but if both of them are in fact state on the
| object I *would* be sure to set them at the same time so that the object
| state is consistent within the transaction boundaries. Particularly in
| the case of container managed transactions (this isn't necessarily EJb
| containers, I do it in web containers) where something else may be using
| the same object within the same transaction.
|
| I am glad it was solved!
|
| -Brian
|
|
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
| For additional commands, e-mail: ojb-user-help@db.apache.org
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/uruS+cV9vuB27SARAuWeAJ0eGiHLkX9awZBwGE4j5+TCsbphdgCgqzPg
4DawPQFEeV3+9Lbh2c5UeE8=
=B/r4
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue [RESOLVED]

Posted by Brian McCallister <mc...@forthillcompany.com>.
On Tuesday, November 18, 2003, at 06:35 PM, Robert S. Sfeir wrote:
> Second, you can't just set the userID like I did, you have to pass the
> full bean of the first table to the second table.

Be careful, you don't *need* to set it to maintain integrity outside of 
the transaction boundary, but if both of them are in fact state on the 
object I *would* be sure to set them at the same time so that the 
object state is consistent within the transaction boundaries. 
Particularly in the case of container managed transactions (this isn't 
necessarily EJb containers, I do it in web containers) where something 
else may be using the same object within the same transaction.

I am glad it was solved!

-Brian



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue [RESOLVED]

Posted by "Robert S. Sfeir" <ro...@codepuccino.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks to everyone who helped.

Some things that others might need to know if they want to do one insert
for a full transaction...

First, you don't need an auto increment row in the second table, you do
need a primary key and a foreign key definition.

Second, you can't just set the userID like I did, you have to pass the
full bean of the first table to the second table.

Third, you DON'T need anonymous access, that's a misnomer, everything
works fine without it.  So in the end, here is what my code looks like.
~ I wonder if I should be on the hook to write a quick tutorial on how to
do this.  I can do this with both ODMG and PersistenceBroker APIs now.  :-)

The Insert:
public final void addRegistration( final UserInfoBean user, final
UserLoginBean userLoginBean )
			throws DataAccessException
	{
		final PersistenceBroker broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
		try
		{
			LOGGER.log( Level.FINEST, "Transaction open in " +
RegistrationDAOImpl.class.getName() );

			broker.beginTransaction();
			broker.store( user );
			userLoginBean.setUserInfoBean( user );
			broker.store( userLoginBean );
			broker.commitTransaction();
		}
		catch( Exception tab )
		{
			broker.abortTransaction();
			tab.printStackTrace();
			throw DataAccessException.datastoreError( tab );
		}
	}

What fixed it: userLoginBean.setUserInfoBean(user);  is what makes it work
What broke it: userLoginBean.setUserID(user.getUserID()) fails! it wants
the whole user bean after insert.  (Dunno why, perhaps someone can explain)

Descriptors:
<class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
table="CDPCNO_USER_LOGIN">
		<field-descriptor name="userID" nullable="false" column="USER_ID"
jdbc-type="INTEGER" primarykey="true"/>
		<field-descriptor name="loginName" nullable="false" column="USERNAME"
jdbc-type="VARCHAR"/>
		<field-descriptor name="password" nullable="false" column="PASSWORD"
jdbc-type="VARCHAR"/>
		<field-descriptor name="passwordReminder" column="REMINDER_CLUE"
jdbc-type="VARCHAR"/>
		<field-descriptor name="statusID" column="STATUS_ID" jdbc-type="INTEGER"/>
		<field-descriptor name="lastLogin" nullable="false"
column="LAST_LOGIN" jdbc-type="TIMESTAMP"/>
		<field-descriptor name="baseRole" column="BASE_ROLE" jdbc-type="VARCHAR"/>
		<reference-descriptor name="userInfoBean"
class-ref="com.codepuccino.security.beans.UserInfoBean"
auto-retrieve="true" auto-update="true" auto-delete="true">
			<foreignkey field-ref="userID"/>
		</reference-descriptor>
	</class-descriptor>
	<class-descriptor class="com.codepuccino.security.beans.UserInfoBean"
table="CDPCNO_USER_INFO">
		<field-descriptor name="userID" nullable="false" column="USER_ID"
jdbc-type="INTEGER" primarykey="true" autoincrement="true" />
		<field-descriptor name="firstName" nullable="false"
column="FIRST_NAME" jdbc-type="VARCHAR"/>
		<field-descriptor name="lastName" nullable="false" column="LAST_NAME"
jdbc-type="VARCHAR"/>
		<field-descriptor name="midInit" column="MID_INIT" jdbc-type="VARCHAR"/>
		<field-descriptor name="nickname" column="NICKNAME" jdbc-type="VARCHAR"/>
		<collection-descriptor name="userLogins"
element-class-ref="com.codepuccino.security.beans.UserLoginBean"
auto-update="true" auto-delete="false">
			<inverse-foreignkey field-ref="userID"/>
		</collection-descriptor>
	</class-descriptor>

What was wrong: nothing
What you don't need to do: access anonymous, or have an auto increment
key in both tables, not needed.  Only in one to get the id you want to
insert in the first place.

Struts specific action simply sets the info in both beans and passes
them down.

I would not mind writing a tutorial on how to do this with both ODMG and
PersistenceBroker.  They're both almost the same.

Hope this helps someone else some day.

R
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/uqzZ+cV9vuB27SARAgnTAJ9BlPPfCJNW6CFXjhHrIUGnik4+DgCdHGNk
ra2qpV5HzwZ5iHqsg13cCXg=
=FO/M
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue

Posted by Armin Waibel <ar...@code-au-lait.de>.
doh!
Your field descriptor for pk-field in UserLoginBean
looks like

<class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
proxy="dynamic" table="CDPCNO_USER_LOGIN">

         <field-descriptor id="1" name="userID" nullable="false"
column="USER_ID" jdbc-type="INTEGER" primarykey="true"/>

...

You don't enable autoincrement, thus you have to set
a valid userId, or add the autoincrement attribute
to the field-descriptor.

Armin


Armin Waibel wrote:

> Hi,
> 
> did you tried
> 
> broker.beginTransaction();
> broker.store( user );
> 
> // userLoginBean.setUserID( user.getUserID() );
> userLoginBean.setInfoID(user.getUserID());
> set the FK-field of LoginBean not the PK-field.
> 
> or if you use an anomymous field-descriptor for
> the fk field-descriptor
> 
> userLoginBean.setUserInfoBean(UserInfoBean info);
> (maybe you have to set the UserInfoBean in any
> case)
> 
> broker.store( userLoginBean );
> broker.commitTransaction();
> 
> By the way, why don't you let OJB do the job
> and set 'auto-update' true in reference-descriptor?
> 
> info = *get UserInfoBean instance*
> userLoginBean.setUserInfoBean(info);
> broker.beginTransaction();
> broker.store( userLoginBean );
> broker.commitTransaction();
> 
> Think 1:1 and 1:n references definitely work, because
> in OJB test suite you can find test cases using this
> features and all tests pass.
> 
> regards,
> Armin
> 
> Robert S. Sfeir wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>>
>>
>> Armin Waibel wrote:
>>
>> | Hi again,
>> |
>> | Robert S. Sfeir wrote:
>> |
>> | Thanks for the notes, I am not entirely sure what the info_id is.  Can
>> | you explain?  How is that any different from the userID I use as a
>> | foreign key?
>> |
>> |> you define a 1:1 reference from UserLoginBean to UserInfoBean, thus
>> |> you need a FK to UserInfoBean. If you only set 'userId' then the
>> |> reference-descriptor assume userId field-descriptor of UserLoginBean
>> |> is the FK to UserInfoBean !?
>> |> Thus you need an additional FLD.
>>
>> In my table user_info.user_id is a foreign key reference to
>> user_login.user_id.
>>
>> Anyway, I took your suggestion, read the page, and implemented the
>> changes and the error is the same in the end.
>>
>> This is the exception, however when I print userID from the
>> UserInfoBean.getUserID() I get "User ID IS: 10345".  The user id is in
>> fact NOT null, but the insert says it is.
>>
>> [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException
>> during the execution of the insert (for a
>> com.codepuccino.security.beans.UserLoginBean): General error,  message
>> from server: "Column 'user_id' cannot be null"
>> General error,  message from server: "Column 'user_id' cannot be null"
>> java.sql.SQLException: General error,  message from server: "Column
>> 'user_id' cannot be null"
>>     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1825)
>>     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1020)
>>     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1109)
>>     at com.mysql.jdbc.Connection.execSQL(Connection.java:2030)
>>     at
>> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1750) 
>>
>>     at
>> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1596) 
>>
>>     at
>> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(Unknown
>> Source)
>>     at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Unknown
>> Source)
>>     at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown 
>> Source)
>>     at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown 
>> Source)
>>     at 
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
>> Source)
>>     at 
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
>> Source)
>>     at
>> com.codepuccino.security.sql.ojb.RegistrationDAOImpl.addRegistration(RegistrationDAOImpl.java:158) 
>>
>>     at
>> com.codepuccino.security.actions.RegistrationAction.execute(RegistrationAction.java:109) 
>>
>>     at
>> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 
>>
>>     at
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 
>>
>>     at 
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>>     at 
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>     at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) 
>>
>>     at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) 
>>
>>     at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) 
>>
>>     at
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
>>
>>     at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563) 
>>
>>     at
>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245) 
>>
>>     at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) 
>>
>>     at
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
>>
>>     at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563) 
>>
>>     at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195) 
>>
>>     at
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
>>
>>     at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) 
>>
>>     at
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) 
>>
>>     at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563) 
>>
>>     at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156) 
>>
>>     at
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
>>
>>     at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563) 
>>
>>     at 
>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
>>     at 
>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
>>     at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781) 
>>
>>     at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549) 
>>
>>     at
>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589) 
>>
>>     at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) 
>>
>>     at java.lang.Thread.run(Thread.java:534)
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.2.3 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQE/uinl+cV9vuB27SARAvuZAKCcX4sCK3UMJAm+oM1Z7xdhwzLrUgCg0NOl
>> m1QrQAHUREIIpoLN2PjNkhI=
>> =YkRs
>> -----END PGP SIGNATURE-----
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi,

did you tried

broker.beginTransaction();
broker.store( user );

// userLoginBean.setUserID( user.getUserID() );
userLoginBean.setInfoID(user.getUserID());
set the FK-field of LoginBean not the PK-field.

or if you use an anomymous field-descriptor for
the fk field-descriptor

userLoginBean.setUserInfoBean(UserInfoBean info);
(maybe you have to set the UserInfoBean in any
case)

broker.store( userLoginBean );
broker.commitTransaction();

By the way, why don't you let OJB do the job
and set 'auto-update' true in reference-descriptor?

info = *get UserInfoBean instance*
userLoginBean.setUserInfoBean(info);
broker.beginTransaction();
broker.store( userLoginBean );
broker.commitTransaction();

Think 1:1 and 1:n references definitely work, because
in OJB test suite you can find test cases using this
features and all tests pass.

regards,
Armin

Robert S. Sfeir wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> 
> Armin Waibel wrote:
> 
> | Hi again,
> |
> | Robert S. Sfeir wrote:
> |
> | Thanks for the notes, I am not entirely sure what the info_id is.  Can
> | you explain?  How is that any different from the userID I use as a
> | foreign key?
> |
> |> you define a 1:1 reference from UserLoginBean to UserInfoBean, thus
> |> you need a FK to UserInfoBean. If you only set 'userId' then the
> |> reference-descriptor assume userId field-descriptor of UserLoginBean
> |> is the FK to UserInfoBean !?
> |> Thus you need an additional FLD.
> 
> In my table user_info.user_id is a foreign key reference to
> user_login.user_id.
> 
> Anyway, I took your suggestion, read the page, and implemented the
> changes and the error is the same in the end.
> 
> This is the exception, however when I print userID from the
> UserInfoBean.getUserID() I get "User ID IS: 10345".  The user id is in
> fact NOT null, but the insert says it is.
> 
> [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException
> during the execution of the insert (for a
> com.codepuccino.security.beans.UserLoginBean): General error,  message
> from server: "Column 'user_id' cannot be null"
> General error,  message from server: "Column 'user_id' cannot be null"
> java.sql.SQLException: General error,  message from server: "Column
> 'user_id' cannot be null"
>     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1825)
>     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1020)
>     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1109)
>     at com.mysql.jdbc.Connection.execSQL(Connection.java:2030)
>     at
> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1750)
>     at
> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1596)
>     at
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(Unknown
> Source)
>     at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Unknown
> Source)
>     at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown 
> Source)
>     at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown 
> Source)
>     at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> Source)
>     at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
> Source)
>     at
> com.codepuccino.security.sql.ojb.RegistrationDAOImpl.addRegistration(RegistrationDAOImpl.java:158) 
> 
>     at
> com.codepuccino.security.actions.RegistrationAction.execute(RegistrationAction.java:109) 
> 
>     at
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 
> 
>     at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 
> 
>     at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>     at 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) 
> 
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) 
> 
>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) 
> 
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
> 
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
>     at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245) 
> 
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) 
> 
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
> 
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195) 
> 
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
> 
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) 
> 
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) 
> 
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156) 
> 
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
> 
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
>     at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
>     at 
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
>     at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
>     at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549) 
> 
>     at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
>     at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) 
> 
>     at java.lang.Thread.run(Thread.java:534)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQE/uinl+cV9vuB27SARAvuZAKCcX4sCK3UMJAm+oM1Z7xdhwzLrUgCg0NOl
> m1QrQAHUREIIpoLN2PjNkhI=
> =YkRs
> -----END PGP SIGNATURE-----
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue

Posted by "Robert S. Sfeir" <ro...@codepuccino.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Armin Waibel wrote:

| Hi again,
|
| Robert S. Sfeir wrote:
|
| Thanks for the notes, I am not entirely sure what the info_id is.  Can
| you explain?  How is that any different from the userID I use as a
| foreign key?
|
|> you define a 1:1 reference from UserLoginBean to UserInfoBean, thus
|> you need a FK to UserInfoBean. If you only set 'userId' then the
|> reference-descriptor assume userId field-descriptor of UserLoginBean
|> is the FK to UserInfoBean !?
|> Thus you need an additional FLD.

In my table user_info.user_id is a foreign key reference to
user_login.user_id.

Anyway, I took your suggestion, read the page, and implemented the
changes and the error is the same in the end.

This is the exception, however when I print userID from the
UserInfoBean.getUserID() I get "User ID IS: 10345".  The user id is in
fact NOT null, but the insert says it is.

[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException
during the execution of the insert (for a
com.codepuccino.security.beans.UserLoginBean): General error,  message
from server: "Column 'user_id' cannot be null"
General error,  message from server: "Column 'user_id' cannot be null"
java.sql.SQLException: General error,  message from server: "Column
'user_id' cannot be null"
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1825)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1020)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1109)
	at com.mysql.jdbc.Connection.execSQL(Connection.java:2030)
	at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1750)
	at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1596)
	at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(Unknown
Source)
	at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Unknown
Source)
	at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)
	at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)
	at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
Source)
	at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
Source)
	at
com.codepuccino.security.sql.ojb.RegistrationDAOImpl.addRegistration(RegistrationDAOImpl.java:158)
	at
com.codepuccino.security.actions.RegistrationAction.execute(RegistrationAction.java:109)
	at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
	at java.lang.Thread.run(Thread.java:534)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/uinl+cV9vuB27SARAvuZAKCcX4sCK3UMJAm+oM1Z7xdhwzLrUgCg0NOl
m1QrQAHUREIIpoLN2PjNkhI=
=YkRs
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi again,

Robert S. Sfeir wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Thanks for the notes, I am not entirely sure what the info_id is.  Can
> you explain?  How is that any different from the userID I use as a
> foreign key?
> 
you define a 1:1 reference from UserLoginBean to UserInfoBean, thus
you need a FK to UserInfoBean. If you only set 'userId' then the
reference-descriptor assume userId field-descriptor of UserLoginBean
is the FK to UserInfoBean !?
Thus you need an additional FLD.

> Also the extra field ids, and proxy stuff came from the Druid app, and I
> didn't get a chance to clean that up.
> 
hmm, I recommend first get something to work before use
additional features like 'dynamic proxies'

> Is the info_id going to solve my multiple insert issue?
> 
I have not the faintest idea ;-)

 > | Further the first insert gets commited even though the transaction
 > | commit is not called, and therefore I can't rollback any changes once
 > | the second insert fails.
Did you set 'eager-release' true in jdbc-connection-descriptor?

regards,
Armin


> R
> 
> Armin Waibel wrote:
> 
> | Hi Robert,
> |
> | I'm not an expert on this subject,
> | anyhow some notes to your posted repository
> | (maybe someone can correct me):
> |
> | - attribute 'id' not necessary in class-descriptor
> | - attribute 'id' not necessary in field-descriptor
> | - attribute 'field-id-ref' is not necessary when attribute
> | 'field-ref' is set too.
> |
> | <class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
> | proxy="dynamic" table="CDPCNO_USER_LOGIN">
> |
> |         <field-descriptor name="userID" nullable="false"
> | column="USER_ID" jdbc-type="INTEGER" primarykey="true"/>
> |
> |         <field-descriptor name="loginName" nullable="false"
> | column="USERNAME"
> | jdbc-type="VARCHAR"/>
> |
> |         <field-descriptor name="password" nullable="false"
> | column="PASSWORD"
> | jdbc-type="VARCHAR"/>
> |
> |         <field-descriptor name="passwordReminder" column="REMINDER_CLUE"
> | jdbc-type="VARCHAR"/>
> |
> |         <field-descriptor name="statusID" column="STATUS_ID"
> | jdbc-type="INTEGER"/>
> |
> |         <field-descriptor name="lastLogin" nullable="false"
> | column="LAST_LOGIN" jdbc-type="TIMESTAMP"/>
> |
> |         <field-descriptor name="baseRole" column="BASE_ROLE"
> | jdbc-type="VARCHAR"/>
> |
> | <field-descriptor name="infoID" column="INFO_ID" jdbc-type="INTEGER"/>
> |
> |         <reference-descriptor name="userInfoBean"
> |         class-ref="com.codepuccino.security.beans.UserInfoBean"
> |         auto-update="false" auto-delete="false">
> |              <foreignkey field-ref="infoID"/>
> |         </reference-descriptor>
> |     </class-descriptor>
> |
> |
> | #######
> | I replaced
> | <foreignkey field-ref="userID" field-id-ref="1"/>
> | by
> | <foreignkey field-ref="infoID"/>
> |
> | and add a new field-descriptor 'infoId', because you need a
> | field-descriptor with a fk to UserInfoBean
> |
> | If you don't want to declare a infoId field in your UserLoginBean
> | class, declare field to be 'anonymous':
> |
> | <field-descriptor name="infoID" column="INFO_ID" jdbc-type="INTEGER"
> | access="anonymous"/>
> |
> | More info see
> | http://db.apache.org/ojb/howto-use-anonymous-keys.html
> |
> |
> |
> |     <class-descriptor class="com.codepuccino.security.beans.UserInfoBean"
> | proxy="dynamic" table="CDPCNO_USER_INFO">
> |
> |         <field-descriptor name="userID" nullable="false"
> | column="USER_ID" jdbc-type="INTEGER" primarykey="true"
> | autoincrement="true" />
> |
> |         <field-descriptor name="firstName" nullable="false"
> | column="FIRST_NAME" jdbc-type="VARCHAR"/>
> |
> |         <field-descriptor name="lastName" nullable="false"
> | column="LAST_NAME"
> | jdbc-type="VARCHAR"/>
> |
> |         <field-descriptor name="midInit" column="MID_INIT"
> | jdbc-type="VARCHAR"/>
> |
> |         <field-descriptor name="nickname" column="NICKNAME"
> | jdbc-type="VARCHAR"/>
> |
> |         <collection-descriptor name="userLogins"
> | element-class-ref="com.codepuccino.security.beans.UserLoginBean"
> | auto-update="false" auto-delete="false">
> |             <inverse-foreignkey field-ref="userID"/>
> |         </collection-descriptor>
> |
> |     </class-descriptor>
> |
> | You declare both classes as dynamic proxy, but in your
> | code you still use real class arguments
> |
> | public final void addRegistration( final UserInfoBean user, final
> | UserLoginBean userLoginBean )
> |
> | it's ok in that case, but don't forget to operate on
> | the interfaces when use dynamic proxies.
> |
> | regards,
> | Armin
> |
> |
> | Robert S. Sfeir wrote:
> |
> | I am still trying to insert 2 beans into 2 separate tables, however bean
> | 2 needs the userID from bean 1's insert.
> |
> | I can't seem to find examples for this, and everything I try inserts the
> | first bean, seems to get the id after insert, I do a setUserID on the
> | second bean, then perform the insert, and I still get an exception that
> | user_id cannot be null.  It's NOT NULL!  I am pretty frustrated with
> | this.  It should be simple, it's not.  I've tried it with ODMG and with
> | PersistenceBroker, both return the same problem.
> |
> | Further the first insert gets commited even though the transaction
> | commit is not called, and therefore I can't rollback any changes once
> | the second insert fails.
> |
> | I'm using RC4.
> |
> | Here is what my insert looks like:
> |
> |     public final void addRegistration( final UserInfoBean user, final
> | UserLoginBean userLoginBean )
> |             throws DataAccessException
> |     {
> |         final PersistenceBroker broker =
> | PersistenceBrokerFactory.defaultPersistenceBroker();
> |         try
> |         {
> |             LOGGER.log( Level.FINEST, "Transaction open in " +
> | RegistrationDAOImpl.class.getName() );
> |
> |             broker.beginTransaction();
> |             broker.store( user );
> |             userLoginBean.setUserID( user.getUserID() );
> |             broker.store( userLoginBean );
> |             broker.commitTransaction();
> |         }
> |         catch( PersistenceBrokerException tab )
> |         {
> |             broker.abortTransaction();
> |             throw DataAccessException.datastoreError( tab );
> |         }
> |     }
> |
> | XML:
> |
> | <class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
> | proxy="dynamic" table="CDPCNO_USER_LOGIN">
> |         <field-descriptor id="1" name="userID" nullable="false"
> | column="USER_ID" jdbc-type="INTEGER" primarykey="true"/>
> |         <field-descriptor name="loginName" nullable="false"
> | column="USERNAME"
> | jdbc-type="VARCHAR"/>
> |         <field-descriptor name="password" nullable="false"
> | column="PASSWORD"
> | jdbc-type="VARCHAR"/>
> |         <field-descriptor name="passwordReminder" column="REMINDER_CLUE"
> | jdbc-type="VARCHAR"/>
> |         <field-descriptor name="statusID" column="STATUS_ID"
> | jdbc-type="INTEGER"/>
> |         <field-descriptor name="lastLogin" nullable="false"
> | column="LAST_LOGIN" jdbc-type="TIMESTAMP"/>
> |         <field-descriptor name="baseRole" column="BASE_ROLE"
> | jdbc-type="VARCHAR"/>
> |         <reference-descriptor name="userInfoBean"
> | class-ref="com.codepuccino.security.beans.UserInfoBean"
> | auto-update="false" auto-delete="false">
> |             <foreignkey field-ref="userID" field-id-ref="1"/>
> |         </reference-descriptor>
> |     </class-descriptor>
> |     <class-descriptor class="com.codepuccino.security.beans.UserInfoBean"
> | proxy="dynamic" table="CDPCNO_USER_INFO">
> |         <field-descriptor id="1" name="userID" nullable="false"
> | column="USER_ID" jdbc-type="INTEGER" primarykey="true"
> | autoincrement="true" />
> |         <field-descriptor name="firstName" nullable="false"
> | column="FIRST_NAME" jdbc-type="VARCHAR"/>
> |         <field-descriptor name="lastName" nullable="false"
> | column="LAST_NAME"
> | jdbc-type="VARCHAR"/>
> |         <field-descriptor name="midInit" column="MID_INIT"
> | jdbc-type="VARCHAR"/>
> |         <field-descriptor name="nickname" column="NICKNAME"
> | jdbc-type="VARCHAR"/>
> |         <collection-descriptor name="userLogins"
> | element-class-ref="com.codepuccino.security.beans.UserLoginBean"
> | auto-update="false" auto-delete="false">
> |             <inverse-foreignkey field-ref="userID"/>
> |         </collection-descriptor>
> |     </class-descriptor>
> |
> | PLEASE what am I missing?  I'm going gaga here because I don't see the
> | problem.
> |
> | R
> |>
> |>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> |>
> |>
> |>
> 
> | ---------------------------------------------------------------------
> | To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> | For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQE/uiLP+cV9vuB27SARAnTtAJwOWq6uMxSYHT/mCMA1WLC6OI7cWgCgq71y
> F18DWvmn4KXdkApzWe2ZVgA=
> =QFlq
> -----END PGP SIGNATURE-----
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue

Posted by "Robert S. Sfeir" <ro...@codepuccino.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the notes, I am not entirely sure what the info_id is.  Can
you explain?  How is that any different from the userID I use as a
foreign key?

Also the extra field ids, and proxy stuff came from the Druid app, and I
didn't get a chance to clean that up.

Is the info_id going to solve my multiple insert issue?

R

Armin Waibel wrote:

| Hi Robert,
|
| I'm not an expert on this subject,
| anyhow some notes to your posted repository
| (maybe someone can correct me):
|
| - attribute 'id' not necessary in class-descriptor
| - attribute 'id' not necessary in field-descriptor
| - attribute 'field-id-ref' is not necessary when attribute
| 'field-ref' is set too.
|
| <class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
| proxy="dynamic" table="CDPCNO_USER_LOGIN">
|
|         <field-descriptor name="userID" nullable="false"
| column="USER_ID" jdbc-type="INTEGER" primarykey="true"/>
|
|         <field-descriptor name="loginName" nullable="false"
| column="USERNAME"
| jdbc-type="VARCHAR"/>
|
|         <field-descriptor name="password" nullable="false"
| column="PASSWORD"
| jdbc-type="VARCHAR"/>
|
|         <field-descriptor name="passwordReminder" column="REMINDER_CLUE"
| jdbc-type="VARCHAR"/>
|
|         <field-descriptor name="statusID" column="STATUS_ID"
| jdbc-type="INTEGER"/>
|
|         <field-descriptor name="lastLogin" nullable="false"
| column="LAST_LOGIN" jdbc-type="TIMESTAMP"/>
|
|         <field-descriptor name="baseRole" column="BASE_ROLE"
| jdbc-type="VARCHAR"/>
|
| <field-descriptor name="infoID" column="INFO_ID" jdbc-type="INTEGER"/>
|
|         <reference-descriptor name="userInfoBean"
|         class-ref="com.codepuccino.security.beans.UserInfoBean"
|         auto-update="false" auto-delete="false">
|              <foreignkey field-ref="infoID"/>
|         </reference-descriptor>
|     </class-descriptor>
|
|
| #######
| I replaced
| <foreignkey field-ref="userID" field-id-ref="1"/>
| by
| <foreignkey field-ref="infoID"/>
|
| and add a new field-descriptor 'infoId', because you need a
| field-descriptor with a fk to UserInfoBean
|
| If you don't want to declare a infoId field in your UserLoginBean
| class, declare field to be 'anonymous':
|
| <field-descriptor name="infoID" column="INFO_ID" jdbc-type="INTEGER"
| access="anonymous"/>
|
| More info see
| http://db.apache.org/ojb/howto-use-anonymous-keys.html
|
|
|
|     <class-descriptor class="com.codepuccino.security.beans.UserInfoBean"
| proxy="dynamic" table="CDPCNO_USER_INFO">
|
|         <field-descriptor name="userID" nullable="false"
| column="USER_ID" jdbc-type="INTEGER" primarykey="true"
| autoincrement="true" />
|
|         <field-descriptor name="firstName" nullable="false"
| column="FIRST_NAME" jdbc-type="VARCHAR"/>
|
|         <field-descriptor name="lastName" nullable="false"
| column="LAST_NAME"
| jdbc-type="VARCHAR"/>
|
|         <field-descriptor name="midInit" column="MID_INIT"
| jdbc-type="VARCHAR"/>
|
|         <field-descriptor name="nickname" column="NICKNAME"
| jdbc-type="VARCHAR"/>
|
|         <collection-descriptor name="userLogins"
| element-class-ref="com.codepuccino.security.beans.UserLoginBean"
| auto-update="false" auto-delete="false">
|             <inverse-foreignkey field-ref="userID"/>
|         </collection-descriptor>
|
|     </class-descriptor>
|
| You declare both classes as dynamic proxy, but in your
| code you still use real class arguments
|
| public final void addRegistration( final UserInfoBean user, final
| UserLoginBean userLoginBean )
|
| it's ok in that case, but don't forget to operate on
| the interfaces when use dynamic proxies.
|
| regards,
| Armin
|
|
| Robert S. Sfeir wrote:
|
| I am still trying to insert 2 beans into 2 separate tables, however bean
| 2 needs the userID from bean 1's insert.
|
| I can't seem to find examples for this, and everything I try inserts the
| first bean, seems to get the id after insert, I do a setUserID on the
| second bean, then perform the insert, and I still get an exception that
| user_id cannot be null.  It's NOT NULL!  I am pretty frustrated with
| this.  It should be simple, it's not.  I've tried it with ODMG and with
| PersistenceBroker, both return the same problem.
|
| Further the first insert gets commited even though the transaction
| commit is not called, and therefore I can't rollback any changes once
| the second insert fails.
|
| I'm using RC4.
|
| Here is what my insert looks like:
|
|     public final void addRegistration( final UserInfoBean user, final
| UserLoginBean userLoginBean )
|             throws DataAccessException
|     {
|         final PersistenceBroker broker =
| PersistenceBrokerFactory.defaultPersistenceBroker();
|         try
|         {
|             LOGGER.log( Level.FINEST, "Transaction open in " +
| RegistrationDAOImpl.class.getName() );
|
|             broker.beginTransaction();
|             broker.store( user );
|             userLoginBean.setUserID( user.getUserID() );
|             broker.store( userLoginBean );
|             broker.commitTransaction();
|         }
|         catch( PersistenceBrokerException tab )
|         {
|             broker.abortTransaction();
|             throw DataAccessException.datastoreError( tab );
|         }
|     }
|
| XML:
|
| <class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
| proxy="dynamic" table="CDPCNO_USER_LOGIN">
|         <field-descriptor id="1" name="userID" nullable="false"
| column="USER_ID" jdbc-type="INTEGER" primarykey="true"/>
|         <field-descriptor name="loginName" nullable="false"
| column="USERNAME"
| jdbc-type="VARCHAR"/>
|         <field-descriptor name="password" nullable="false"
| column="PASSWORD"
| jdbc-type="VARCHAR"/>
|         <field-descriptor name="passwordReminder" column="REMINDER_CLUE"
| jdbc-type="VARCHAR"/>
|         <field-descriptor name="statusID" column="STATUS_ID"
| jdbc-type="INTEGER"/>
|         <field-descriptor name="lastLogin" nullable="false"
| column="LAST_LOGIN" jdbc-type="TIMESTAMP"/>
|         <field-descriptor name="baseRole" column="BASE_ROLE"
| jdbc-type="VARCHAR"/>
|         <reference-descriptor name="userInfoBean"
| class-ref="com.codepuccino.security.beans.UserInfoBean"
| auto-update="false" auto-delete="false">
|             <foreignkey field-ref="userID" field-id-ref="1"/>
|         </reference-descriptor>
|     </class-descriptor>
|     <class-descriptor class="com.codepuccino.security.beans.UserInfoBean"
| proxy="dynamic" table="CDPCNO_USER_INFO">
|         <field-descriptor id="1" name="userID" nullable="false"
| column="USER_ID" jdbc-type="INTEGER" primarykey="true"
| autoincrement="true" />
|         <field-descriptor name="firstName" nullable="false"
| column="FIRST_NAME" jdbc-type="VARCHAR"/>
|         <field-descriptor name="lastName" nullable="false"
| column="LAST_NAME"
| jdbc-type="VARCHAR"/>
|         <field-descriptor name="midInit" column="MID_INIT"
| jdbc-type="VARCHAR"/>
|         <field-descriptor name="nickname" column="NICKNAME"
| jdbc-type="VARCHAR"/>
|         <collection-descriptor name="userLogins"
| element-class-ref="com.codepuccino.security.beans.UserLoginBean"
| auto-update="false" auto-delete="false">
|             <inverse-foreignkey field-ref="userID"/>
|         </collection-descriptor>
|     </class-descriptor>
|
| PLEASE what am I missing?  I'm going gaga here because I don't see the
| problem.
|
| R
|>
|>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
|>
|>
|>

| ---------------------------------------------------------------------
| To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
| For additional commands, e-mail: ojb-user-help@db.apache.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/uiLP+cV9vuB27SARAnTtAJwOWq6uMxSYHT/mCMA1WLC6OI7cWgCgq71y
F18DWvmn4KXdkApzWe2ZVgA=
=QFlq
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Robert,

I'm not an expert on this subject,
anyhow some notes to your posted repository
(maybe someone can correct me):

- attribute 'id' not necessary in class-descriptor
- attribute 'id' not necessary in field-descriptor
- attribute 'field-id-ref' is not necessary when attribute
'field-ref' is set too.

<class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
proxy="dynamic" table="CDPCNO_USER_LOGIN">

         <field-descriptor name="userID" nullable="false"
column="USER_ID" jdbc-type="INTEGER" primarykey="true"/>

         <field-descriptor name="loginName" nullable="false" 
column="USERNAME"
jdbc-type="VARCHAR"/>

         <field-descriptor name="password" nullable="false" 
column="PASSWORD"
jdbc-type="VARCHAR"/>

         <field-descriptor name="passwordReminder" column="REMINDER_CLUE"
jdbc-type="VARCHAR"/>

         <field-descriptor name="statusID" column="STATUS_ID" 
jdbc-type="INTEGER"/>

         <field-descriptor name="lastLogin" nullable="false"
column="LAST_LOGIN" jdbc-type="TIMESTAMP"/>

         <field-descriptor name="baseRole" column="BASE_ROLE" 
jdbc-type="VARCHAR"/>

<field-descriptor name="infoID" column="INFO_ID" jdbc-type="INTEGER"/>

         <reference-descriptor name="userInfoBean"
         class-ref="com.codepuccino.security.beans.UserInfoBean"
         auto-update="false" auto-delete="false">
              <foreignkey field-ref="infoID"/>
         </reference-descriptor>
     </class-descriptor>


#######
I replaced
<foreignkey field-ref="userID" field-id-ref="1"/>
by
<foreignkey field-ref="infoID"/>

and add a new field-descriptor 'infoId', because you need a 
field-descriptor with a fk to UserInfoBean

If you don't want to declare a infoId field in your UserLoginBean
class, declare field to be 'anonymous':

<field-descriptor name="infoID" column="INFO_ID" jdbc-type="INTEGER" 
access="anonymous"/>

More info see
http://db.apache.org/ojb/howto-use-anonymous-keys.html



     <class-descriptor class="com.codepuccino.security.beans.UserInfoBean"
proxy="dynamic" table="CDPCNO_USER_INFO">

         <field-descriptor name="userID" nullable="false"
column="USER_ID" jdbc-type="INTEGER" primarykey="true"
autoincrement="true" />

         <field-descriptor name="firstName" nullable="false"
column="FIRST_NAME" jdbc-type="VARCHAR"/>

         <field-descriptor name="lastName" nullable="false" 
column="LAST_NAME"
jdbc-type="VARCHAR"/>

         <field-descriptor name="midInit" column="MID_INIT" 
jdbc-type="VARCHAR"/>

         <field-descriptor name="nickname" column="NICKNAME" 
jdbc-type="VARCHAR"/>

         <collection-descriptor name="userLogins"
element-class-ref="com.codepuccino.security.beans.UserLoginBean"
auto-update="false" auto-delete="false">
             <inverse-foreignkey field-ref="userID"/>
         </collection-descriptor>

     </class-descriptor>

You declare both classes as dynamic proxy, but in your
code you still use real class arguments

public final void addRegistration( final UserInfoBean user, final
UserLoginBean userLoginBean )

it's ok in that case, but don't forget to operate on
the interfaces when use dynamic proxies.

regards,
Armin


Robert S. Sfeir wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I am still trying to insert 2 beans into 2 separate tables, however bean
> 2 needs the userID from bean 1's insert.
> 
> I can't seem to find examples for this, and everything I try inserts the
> first bean, seems to get the id after insert, I do a setUserID on the
> second bean, then perform the insert, and I still get an exception that
> user_id cannot be null.  It's NOT NULL!  I am pretty frustrated with
> this.  It should be simple, it's not.  I've tried it with ODMG and with
> PersistenceBroker, both return the same problem.
> 
> Further the first insert gets commited even though the transaction
> commit is not called, and therefore I can't rollback any changes once
> the second insert fails.
> 
> I'm using RC4.
> 
> Here is what my insert looks like:
> 
>     public final void addRegistration( final UserInfoBean user, final
> UserLoginBean userLoginBean )
>             throws DataAccessException
>     {
>         final PersistenceBroker broker =
> PersistenceBrokerFactory.defaultPersistenceBroker();
>         try
>         {
>             LOGGER.log( Level.FINEST, "Transaction open in " +
> RegistrationDAOImpl.class.getName() );
> 
>             broker.beginTransaction();
>             broker.store( user );
>             userLoginBean.setUserID( user.getUserID() );
>             broker.store( userLoginBean );
>             broker.commitTransaction();
>         }
>         catch( PersistenceBrokerException tab )
>         {
>             broker.abortTransaction();
>             throw DataAccessException.datastoreError( tab );
>         }
>     }
> 
> XML:
> 
> <class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
> proxy="dynamic" table="CDPCNO_USER_LOGIN">
>         <field-descriptor id="1" name="userID" nullable="false"
> column="USER_ID" jdbc-type="INTEGER" primarykey="true"/>
>         <field-descriptor name="loginName" nullable="false" 
> column="USERNAME"
> jdbc-type="VARCHAR"/>
>         <field-descriptor name="password" nullable="false" 
> column="PASSWORD"
> jdbc-type="VARCHAR"/>
>         <field-descriptor name="passwordReminder" column="REMINDER_CLUE"
> jdbc-type="VARCHAR"/>
>         <field-descriptor name="statusID" column="STATUS_ID" 
> jdbc-type="INTEGER"/>
>         <field-descriptor name="lastLogin" nullable="false"
> column="LAST_LOGIN" jdbc-type="TIMESTAMP"/>
>         <field-descriptor name="baseRole" column="BASE_ROLE" 
> jdbc-type="VARCHAR"/>
>         <reference-descriptor name="userInfoBean"
> class-ref="com.codepuccino.security.beans.UserInfoBean"
> auto-update="false" auto-delete="false">
>             <foreignkey field-ref="userID" field-id-ref="1"/>
>         </reference-descriptor>
>     </class-descriptor>
>     <class-descriptor class="com.codepuccino.security.beans.UserInfoBean"
> proxy="dynamic" table="CDPCNO_USER_INFO">
>         <field-descriptor id="1" name="userID" nullable="false"
> column="USER_ID" jdbc-type="INTEGER" primarykey="true"
> autoincrement="true" />
>         <field-descriptor name="firstName" nullable="false"
> column="FIRST_NAME" jdbc-type="VARCHAR"/>
>         <field-descriptor name="lastName" nullable="false" 
> column="LAST_NAME"
> jdbc-type="VARCHAR"/>
>         <field-descriptor name="midInit" column="MID_INIT" 
> jdbc-type="VARCHAR"/>
>         <field-descriptor name="nickname" column="NICKNAME" 
> jdbc-type="VARCHAR"/>
>         <collection-descriptor name="userLogins"
> element-class-ref="com.codepuccino.security.beans.UserLoginBean"
> auto-update="false" auto-delete="false">
>             <inverse-foreignkey field-ref="userID"/>
>         </collection-descriptor>
>     </class-descriptor>
> 
> PLEASE what am I missing?  I'm going gaga here because I don't see the
> problem.
> 
> R
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQE/uaZF+cV9vuB27SARAujIAJ9m8nJpgW5xVdN3OPb6ef9BlYSeHwCeMDUf
> ob+buyLnTASop68nj+D8Tyg=
> =mu+W
> -----END PGP SIGNATURE-----
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Someone PLEASE help with double insert issue

Posted by Brian McCallister <mc...@forthillcompany.com>.
Try setting the UserInfo as well as the userId. I suspect OJB is 
nulling out the key when it sees that the UserInfo is still null. OJB 
will null out the id if the referenced object is null when ti goes to 
insert as it knows about the object relationships.

I almost always used the anonymous key feature for foreign keys just 
because of this. The id is really a property of the referenced object, 
not the parent, so I prefer to get it directly from the referenced 
object, and just allow the parent to have a reference to the child.

-Brian

On Monday, November 17, 2003, at 11:55 PM, Robert S. Sfeir wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I am still trying to insert 2 beans into 2 separate tables, however 
> bean
> 2 needs the userID from bean 1's insert.
>
> I can't seem to find examples for this, and everything I try inserts 
> the
> first bean, seems to get the id after insert, I do a setUserID on the
> second bean, then perform the insert, and I still get an exception that
> user_id cannot be null.  It's NOT NULL!  I am pretty frustrated with
> this.  It should be simple, it's not.  I've tried it with ODMG and with
> PersistenceBroker, both return the same problem.
>
> Further the first insert gets commited even though the transaction
> commit is not called, and therefore I can't rollback any changes once
> the second insert fails.
>
> I'm using RC4.
>
> Here is what my insert looks like:
>
> 	public final void addRegistration( final UserInfoBean user, final
> UserLoginBean userLoginBean )
> 			throws DataAccessException
> 	{
> 		final PersistenceBroker broker =
> PersistenceBrokerFactory.defaultPersistenceBroker();
> 		try
> 		{
> 			LOGGER.log( Level.FINEST, "Transaction open in " +
> RegistrationDAOImpl.class.getName() );
>
> 			broker.beginTransaction();
> 			broker.store( user );
> 			userLoginBean.setUserID( user.getUserID() );
> 			broker.store( userLoginBean );
> 			broker.commitTransaction();
> 		}
> 		catch( PersistenceBrokerException tab )
> 		{
> 			broker.abortTransaction();
> 			throw DataAccessException.datastoreError( tab );
> 		}
> 	}
>
> XML:
>
> <class-descriptor class="com.codepuccino.security.beans.UserLoginBean"
> proxy="dynamic" table="CDPCNO_USER_LOGIN">
> 		<field-descriptor id="1" name="userID" nullable="false"
> column="USER_ID" jdbc-type="INTEGER" primarykey="true"/>
> 		<field-descriptor name="loginName" nullable="false" column="USERNAME"
> jdbc-type="VARCHAR"/>
> 		<field-descriptor name="password" nullable="false" column="PASSWORD"
> jdbc-type="VARCHAR"/>
> 		<field-descriptor name="passwordReminder" column="REMINDER_CLUE"
> jdbc-type="VARCHAR"/>
> 		<field-descriptor name="statusID" column="STATUS_ID" 
> jdbc-type="INTEGER"/>
> 		<field-descriptor name="lastLogin" nullable="false"
> column="LAST_LOGIN" jdbc-type="TIMESTAMP"/>
> 		<field-descriptor name="baseRole" column="BASE_ROLE" 
> jdbc-type="VARCHAR"/>
> 		<reference-descriptor name="userInfoBean"
> class-ref="com.codepuccino.security.beans.UserInfoBean"
> auto-update="false" auto-delete="false">
> 			<foreignkey field-ref="userID" field-id-ref="1"/>
> 		</reference-descriptor>
> 	</class-descriptor>
> 	<class-descriptor class="com.codepuccino.security.beans.UserInfoBean"
> proxy="dynamic" table="CDPCNO_USER_INFO">
> 		<field-descriptor id="1" name="userID" nullable="false"
> column="USER_ID" jdbc-type="INTEGER" primarykey="true"
> autoincrement="true" />
> 		<field-descriptor name="firstName" nullable="false"
> column="FIRST_NAME" jdbc-type="VARCHAR"/>
> 		<field-descriptor name="lastName" nullable="false" column="LAST_NAME"
> jdbc-type="VARCHAR"/>
> 		<field-descriptor name="midInit" column="MID_INIT" 
> jdbc-type="VARCHAR"/>
> 		<field-descriptor name="nickname" column="NICKNAME" 
> jdbc-type="VARCHAR"/>
> 		<collection-descriptor name="userLogins"
> element-class-ref="com.codepuccino.security.beans.UserLoginBean"
> auto-update="false" auto-delete="false">
> 			<inverse-foreignkey field-ref="userID"/>
> 		</collection-descriptor>
> 	</class-descriptor>
>
> PLEASE what am I missing?  I'm going gaga here because I don't see the
> problem.
>
> R
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQE/uaZF+cV9vuB27SARAujIAJ9m8nJpgW5xVdN3OPb6ef9BlYSeHwCeMDUf
> ob+buyLnTASop68nj+D8Tyg=
> =mu+W
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org