How to use OJB to implement TableModel interface for JTable purpose?

2004-11-19 Thread Gene
Hi,

Any one can tell me if i can use OJB to implement TableModel interface for the 
purpose of using JTable as view layer? If so, can anyone give some hints or 
example?

Thanks a lot!

Gene


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Java class for ordering SQL statements in ODMG to avoid FK violations

2004-11-19 Thread Armin Waibel
Hi Jakob,
Jakob Braeuchi wrote:
hi armin,
in the testcase i mentioned the auto-update is set to LINK. 
does the scenario you describe also work for odmg ?
suggestion only made for odmg
i was thinking of
something similar in PB: the PB keeps track of the mn-implementors to be
inserted and inserts them when the main objects are in the tables.
With PB-api this isn't possible I think, because with PB#store one 
object of the n-side is specified, you will never get all n-side objects 
at once. Current behavior is store n side object + all m-side objects 
and then insert indirection table entries - or I'm wrong?


gerhards new class correctly orders the objects to be inserted, but cannot
control the settings of auto-update. so the first obj inserted tries to
update the indirection-table.
That's why I suggest to set auto-update NONE for m:n relations in odmg. 
The main problem is to populate the m:n indirection table, currently we 
don't have the possibility to do this in a high-performance manner.
For insert only we can use PB#addMtoNImplementor to populate indirection 
table, but this will fire many single sql-statements and will only work 
if we know which indirection entry we have to insert.

An alternative way could be to use the link/unlink methods in 
BrokerHelper. An example using PB-api see
...broker.M2NTest#doTestStoreFFFX(Movie movie, String postfix)

if we do something similar in an odmg-postprocess it should be possible 
to make m:n work.

regards,
Armin

jakob

Jakob Braeuchi wrote:

hi gerhard,
the failing testcases in org.apache.ojb.odmg.M2NTest can not at all be 
fixed by reordering.

the problem is the bidirectional m:n relationship with auto-update = 
LINK on both sides. no matter what side is inserted first pb tries to 
insert into the indirection-table as well. this will always fail.
setting auto-update to OBJECT does also not help in this case because 
objects are inserted more than once which leads to a unique key
violation.
the only solution i see is to _defer_ the insertion of the 
indirection-table until all main objects are saved. unfortunately i have
no idea how to do this :(

hmm, if we change auto-update to NONE (instead false) for m:n relations, 
insert/update both sides, "mark" these objects with m:n relation for 
postprocessing and then populate the Indirection Table by using 
PBImpl#linkMtoN(Object obj, CollectionDescriptor cod, boolean insert).
Note: I never tried this ;-)

regards,
Armin

jakob
Jakob Braeuchi schrieb:

hi gerhard,
thanks for your contribution. it looks really impressive !
i integrated your class into to current 1.0.x branch an ran all odmg 
testcases without skipping known issues.
with the old reorder i get:

Tests run: 207,  Failures: 2,  Errors: 8
with your ordering i still have 6 errors:
Tests run: 207,  Failures: 2,  Errors: 6
ie this one:
3) 


testStoreComplex(org.apache.ojb.odmg.M2NTest)org.apache.ojb.odmg.TransactionAbortedExceptionOJB

   at 


org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:174)

   at 


org.apache.ojb.odmg.TransactionImpl.doWriteObjects(TransactionImpl.java:324)

   at 
org.apache.ojb.odmg.TransactionImpl.prepare(TransactionImpl.java:624)
   at 
org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:581)
   at org.apache.ojb.odmg.M2NTest.doTestStoreComplex(M2NTest.java:157)
   at org.apache.ojb.odmg.M2NTest.testStoreComplex(M2NTest.java:137)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 


sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

   at 


sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at org.apache.ojb.odmg.AllTests.main(AllTests.java:18)
Caused by: org.apache.ojb.broker.OJBRuntimeException: Given object 
collection of type class 
org.apache.ojb.odmg.M2NTest$MovieManageableCollection can not be 
managed by OJB. Use Array, Collection or ManageableCollection instead!
   at 


org.apache.ojb.odmg.ObjectEnvelopeOrdering.addCollectionEdges(ObjectEnvelopeOrdering.java:312)

   at 


org.apache.ojb.odmg.ObjectEnvelopeOrdering.addEdgesForVertex(ObjectEnvelopeOrdering.java:241)

   at 


org.apache.ojb.odmg.ObjectEnvelopeOrdering.reorder(ObjectEnvelopeOrdering.java:133)

   at 


org.apache.ojb.odmg.ObjectEnvelopeTable.reorder(ObjectEnvelopeTable.java:588)

   at 


org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:148)

jakob
Gerhard Grosse schrieb:

Hi,
for quite some time we were experiencing problems with FK constraint 
violations
when committing ODMG transactions. We resolved these problems by 
inserting
TransactionExt.flush() calls wherever necessary. However, this in 
turn produced
deadlock problems under high server load. Therefore we decided to try 
and
improve the ordering of the SQL sent to the database. These efforts 
resulted in
a class org.ojb.odmg.ObjectEnvelopeOrdering which we hereby 
contribute to the
OJB community, because other users seem to have similar problems

Re: [INTRO01] - I01 - Simple Java Class - Need the quickstart application !

2004-11-19 Thread Jakob Braeuchi
hi ilias,
let's wait for the solution tom is working on.
jakob
Ilias Lazaridis schrieb:
Ilias Lazaridis wrote:
The series of simplified OJB Introduction applications that I like to 
contribute to the project, rely initially on the ojb-blank.

but: ojb-blank does not provide the basic functionality needed:
  - ant-target "run"
  - ant-target "deploy" [or similar], resulting in an ready to start 
jar within an directory.

Can I expect such an ojb-blank project from the team/community?

I am wondering about one thing:
I get no answers about my ant / ojb-blank related questions, which I 
would need to correct the ojb-blank myself.

Why does the community answer to an quick-start incident immediately:
http://www.mail-archive.com/ojb-user%40db.apache.org/msg12053.html
but does not provide me with the relevant answers / support to provide 
an professional grade solution which avoids exactly those incidents?

Please provide me with the targets "run" and "deploy" [or similar] 
(which would be basicly the ojb-quickstart target, moved to the 
ojb-blank build.xml), thus I can help the current newcomer (and the 
future ones) in a professional manner.

It's for the benefit of all.
I depend on you.
Please review the thread:
[QUICKSTART] - A OJB quickstart similar to hibernate
http://www.mail-archive.com/ojb-user%40db.apache.org/msg11900.html

.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: FW: Newbie Question : There was no default-PBKey specified

2004-11-19 Thread lasse . lambrecht

Return Receipt
 
Your RE: FW: Newbie Question : There was no default-PBKey
documen  specified   
t:   
 
was  Lasse Lambrecht/IS-LF1/Allianz-Leben
receive  
d by:
 
at:  19.11.2004 19:37:55 
 




Re: [INTRO01] - I01 - Simple Java Class - Need the quickstart application !

2004-11-19 Thread Ilias Lazaridis
Ilias Lazaridis wrote:
The series of simplified OJB Introduction applications that I like to 
contribute to the project, rely initially on the ojb-blank.

but: ojb-blank does not provide the basic functionality needed:
  - ant-target "run"
  - ant-target "deploy" [or similar], resulting in an ready to start jar 
within an directory.

Can I expect such an ojb-blank project from the team/community?
I am wondering about one thing:
I get no answers about my ant / ojb-blank related questions, which I 
would need to correct the ojb-blank myself.

Why does the community answer to an quick-start incident immediately:
http://www.mail-archive.com/ojb-user%40db.apache.org/msg12053.html
but does not provide me with the relevant answers / support to provide 
an professional grade solution which avoids exactly those incidents?

Please provide me with the targets "run" and "deploy" [or similar] 
(which would be basicly the ojb-quickstart target, moved to the 
ojb-blank build.xml), thus I can help the current newcomer (and the 
future ones) in a professional manner.

It's for the benefit of all.
I depend on you.
Please review the thread:
[QUICKSTART] - A OJB quickstart similar to hibernate
http://www.mail-archive.com/ojb-user%40db.apache.org/msg11900.html
.
--
http://lazaridis.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problem retrieving proxied collections

2004-11-19 Thread Ashish Rangole
Hi!
I have m:n mappings and have collection proxies for the
collection of referenced objects. I am using v1.0.1 and
PB API within ODMG to query.
When I query a object having a collection with a certain
field of main object as criteria, then I get the collections
as well. However, when I use more than a plain criteria which
mentions more than one fields of main object (I do that by compounding
criteria together), I get the main object with empty collection.
Is this expected or what I am doing wrong? How do I get the collections
as well.
Any response shall be highly appreciated.
Thanks for your help.
Ashish
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ObjectCacheEmptyImpl that handles recursive references

2004-11-19 Thread Ashish Rangole
Armin,
The basic reason why I had to resort to empty implementation
in the first place is that with default cache implementation
in rc6, the mapping between m:n relations was automatically getting
deleted from the mapping tables. I assumed that it was because the
default object cache was letting garbage collector clean up objects
and when collections of a main object was garbage collected and main
object commited, because of missing collection the ODMG layer was
removing mapping table (indirection-table) entries.
Or could it be because I wasn't using any collection proxies then?
Any response will be immensely helpful and highly appreciated.
Reagrds
Ashish
Armin Waibel wrote:
Ashish Rangole wrote:
It seems like it is not there yet in v1.0.1. Can
it be expected in v1.0.2 and when it is coming out?
It's funny, some month ago I changed ObjectCacheEmptyImpl no longer 
support circular references (version 1.8 to 1.9), because user point 
out that "empty" indicate a plain noop-ObjectCache implementation.

I recommend to use ObjectCachePerBrokerImpl which supports circular 
references and clear it's pool on rollback or PB.close().
So, if you handle the PB instances in recommended way (lookup from 
PBF, make your action, close after use), this implementation should 
fit your requirements.

Hi Armin,
Just to double check, is this true even if I use ODMG, but get the PB
broker to query the object to be read/write with in the ODMG
transaction which is closed after the operation (and I understand this
closes the broker by itself).
Assume you get the PB instance with
((TransactionExt) tx).getBroker()
yep, on ODMG level a Transaction.commit/rollback close the internal used 
PB instance of Transaction implementation class.

regards,
Armin

Thanks for your response.
Ashish
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
--
Ashish Rangole
Vexcel Corporation - Image Information Engineering
1690 38th Street, Boulder CO 80301, USA
phone: 303-583-0286 fax: 303-583-0246
Vexcel's home page: http://www.vexcel.com
--
"What hobbyist can put 3-man years into programming, finding all bugs,
 documenting his product and distribute for free?"
-- Bill Gates, An Open Letter to Hobbyists, 1976
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: FW: Newbie Question : There was no default-PBKey specified

2004-11-19 Thread Thomas Dudziak
Stark, Roman wrote:
I think the problem is how I run the application.  Thomas Dudziak's post
I think made that clear.  I just assumed I can use eclps to run it, but
this may not be true.  I need to figure out how to get this to execute
from the corect location.  I am not sure if that can be done in eclips
or if I have to run from the comand line.
 

In Eclipse you can specify where Eclipse starts the application: Run or 
Debug dialog ("Create, manage and run configurations"), Arguments tab, 
Working directory.

Tom
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: FW: Newbie Question : There was no default-PBKey specified

2004-11-19 Thread Pulat Yunusov
Can you please modify your mailer so it doesn't request return receipts?
Thank you,
Pulat
Stark, Roman wrote:
For the past tow days I tried to set up the ojb-blank project.
Everything I try ends up with the following message: "There was no
default-PBKey specified"
I am using eclips 3 for the project following the instructions from
the web site.  All I have tried so far is just get a connection and
run a very simple QueryByCriteria.  I did set up the repository.xml
files, of which there are 3 plus repository.xml.  

The database xml has a simple 
I really am at a loss, any suggestions would be great on this.  I
don't even know where to look anymore for what set up could cause this
problem.
Thanks
Roman


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: FW: Newbie Question : There was no default-PBKey specified

2004-11-19 Thread Stark, Roman
Yep. I didn't touch the repository.xml.  



]>





&database;


&internal; 


&user;


I think the problem is how I run the application.  Thomas Dudziak's post
I think made that clear.  I just assumed I can use eclps to run it, but
this may not be true.  I need to figure out how to get this to execute
from the corect location.  I am not sure if that can be done in eclips
or if I have to run from the comand line.

Roman


Post by Thomas:
"The usual reason for this is that the repository.xml was not found and
OJB started in the "un-configured" mode (which btw is intended for when
you want to setup OJB programmatically). You should get a warning about
this in the log file (if you configured e.g. logging to use Log4j) or
console.
Also be aware that with standard ojb-blank, you've got to start the
application in the build/resources directory, not in the project's root
folder (see the Getting Started doc at
http://db.apache.org/ojb/docu/getting-started.html for details)."

-Original Message-
From: Armin Waibel [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 19, 2004 11:19
To: OJB Users List
Subject: Re: FW: Newbie Question : There was no default-PBKey specified

Did you modify the repository.xml file? Are all sub-files included?
The xml ENTITY reference + &xyz declaration.

regards,
Armin

Stark, Roman wrote:
> I am assuming so.  All the xml files are in src/resources and if I 
> move repository.xml to the root I get an error that it can't find the 
> repository file.  So I think it can find it.
> 
> Stack trace:
> There was no default-PBKey specified
> org.apache.ojb.broker.PBFactoryException: There was no default-PBKey 
> specified
>   at
> org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPer
> si
> stenceBroker(Unknown Source)
>   at
> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroke
> r(
> Unknown Source)
>   at TestDriver.run(TestDriver.java:61)
>   at TestDriver.main(TestDriver.java:35)
> 
> Connection declaration from repository_datbase.xml (both versions, 
> same
> result)
>  jcd-alias="HREDB"
>   default-connection="true" 
>   platform="Oracle" 
>   jdbc-level="3.0" 
>   batch-mode="true" 
>   useAutoCommit="0" 
>   ignoreAutoCommitExceptions="false" 
>   driver="oracle.jdbc.driver.OracleDriver" protocol="jdbc"
> subprotocol="oracle" 
>   
> dbalias="thin:@(description=(address=(host=es15.uits.indiana.edu)(prot
> oc ol=tcp)(port=1521))(connect_data=(sid=PS2DEV)(SERVER=dedicated)))"
>   username="hre" 
>   password="1234"
>   >
> 
>  testOnBorrow="true" 
>   testWhileIdle="true" 
>   testOnReturn="true" 
>   validationQuery="select 1 from dual"
>   />
>   
>className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValI
> mp
> l" />
>   
>   
> 
> 
>   
>  
> 
> I hope this is the info you asked for.
> Roman
> 
> -Original Message-
> From: Armin Waibel [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 19, 2004 10:48
> To: OJB Users List
> Subject: Re: FW: Newbie Question : There was no default-PBKey 
> specified
> 
> Hi Roman,
> 
> does OJB find your repository.xml file?
> Think we need more detailed info to help, so could you please post the

> whole stack trace and the connection declaration.
> 
> regards,
> Armin
> 
> Stark, Roman wrote:
> 
>>>For the past tow days I tried to set up the ojb-blank project.
>>>Everything I try ends up with the following message: "There was no 
>>>default-PBKey specified"
>>>
>>>I am using eclips 3 for the project following the instructions from 
>>>the web site.  All I have tried so far is just get a connection and 
>>>run a very simple QueryByCriteria.  I did set up the repository.xml 
>>>files, of which there are 3 plus repository.xml.
>>>
>>>The database xml has a simple >>that's all, and the default-connection="true";
>>>
>>>I really am at a loss, any suggestions would be great on this.  I 
>>>don't even know where to look anymore for what set up could cause 
>>>this
> 
> 
>>>problem.
>>>
>>>Thanks
>>>Roman
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FW: Newbie Question : There was no default-PBKey specified

2004-11-19 Thread Armin Waibel
Did you modify the repository.xml file? Are all sub-files included?
The xml ENTITY reference + &xyz declaration.
regards,
Armin
Stark, Roman wrote:
I am assuming so.  All the xml files are in src/resources and if I move
repository.xml to the root I get an error that it can't find the
repository file.  So I think it can find it.
Stack trace:
There was no default-PBKey specified
org.apache.ojb.broker.PBFactoryException: There was no default-PBKey
specified
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersi
stenceBroker(Unknown Source)
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(
Unknown Source)
at TestDriver.run(TestDriver.java:61)
at TestDriver.main(TestDriver.java:35)
Connection declaration from repository_datbase.xml (both versions, same
result)
	
		jcd-alias="HREDB"
		default-connection="true" 
		platform="Oracle" 
		jdbc-level="3.0" 
		batch-mode="true" 
		useAutoCommit="0" 
		ignoreAutoCommitExceptions="false" 
		driver="oracle.jdbc.driver.OracleDriver" protocol="jdbc"
subprotocol="oracle" 
	
dbalias="thin:@(description=(address=(host=es15.uits.indiana.edu)(protoc
ol=tcp)(port=1521))(connect_data=(sid=PS2DEV)(SERVER=dedicated)))" 
		username="hre" 
		password="1234"
	>

	
	/>
		
	
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImp
l" />
  
  

	
 

I hope this is the info you asked for.
Roman
-Original Message-
From: Armin Waibel [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 19, 2004 10:48
To: OJB Users List
Subject: Re: FW: Newbie Question : There was no default-PBKey specified

Hi Roman,
does OJB find your repository.xml file?
Think we need more detailed info to help, so could you please post the
whole stack trace and the connection declaration.
regards,
Armin
Stark, Roman wrote:
For the past tow days I tried to set up the ojb-blank project.
Everything I try ends up with the following message: "There was no 
default-PBKey specified"

I am using eclips 3 for the project following the instructions from 
the web site.  All I have tried so far is just get a connection and 
run a very simple QueryByCriteria.  I did set up the repository.xml 
files, of which there are 3 plus repository.xml.

The database xml has a simple 

I really am at a loss, any suggestions would be great on this.  I 
don't even know where to look anymore for what set up could cause this

problem.
Thanks
Roman

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: FW: Newbie Question : There was no default-PBKey specified

2004-11-19 Thread Stark, Roman
I am assuming so.  All the xml files are in src/resources and if I move
repository.xml to the root I get an error that it can't find the
repository file.  So I think it can find it.

Stack trace:
There was no default-PBKey specified
org.apache.ojb.broker.PBFactoryException: There was no default-PBKey
specified
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersi
stenceBroker(Unknown Source)
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(
Unknown Source)
at TestDriver.run(TestDriver.java:61)
at TestDriver.main(TestDriver.java:35)

Connection declaration from repository_datbase.xml (both versions, same
result)





  
  



 

I hope this is the info you asked for.
Roman

-Original Message-
From: Armin Waibel [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 19, 2004 10:48
To: OJB Users List
Subject: Re: FW: Newbie Question : There was no default-PBKey specified

Hi Roman,

does OJB find your repository.xml file?
Think we need more detailed info to help, so could you please post the
whole stack trace and the connection declaration.

regards,
Armin

Stark, Roman wrote:
>>For the past tow days I tried to set up the ojb-blank project.
>>Everything I try ends up with the following message: "There was no 
>>default-PBKey specified"
>>
>>I am using eclips 3 for the project following the instructions from 
>>the web site.  All I have tried so far is just get a connection and 
>>run a very simple QueryByCriteria.  I did set up the repository.xml 
>>files, of which there are 3 plus repository.xml.
>>
>>The database xml has a simple >that's all, and the default-connection="true";
>>
>>I really am at a loss, any suggestions would be great on this.  I 
>>don't even know where to look anymore for what set up could cause this

>>problem.
>>
>>Thanks
>>Roman
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Transaction timed out error

2004-11-19 Thread Vesely, Max [IT]
Mattias,

I didn't find a solution for OJB version 1.0 rc6 and WAS 5.0.2. I just got some 
free time to test with version 1.0.1. and WAS 5.1. I'll post new message if it 
still happens.

Could you, please, let me know what APAR # is for this problem on IBM site? I 
looked at the link you provided and it looks like PQ72572 is the one.

Thank you,
Max.



 -Original Message-
From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent:   Friday, November 19, 2004 10:42 AM
To: Vesely, Max [IT]
Cc: [EMAIL PROTECTED]
Subject:RE: Transaction timed out error

Hi,

I'm running into the same problems, although it's only happening when 
concurrent threads are trying to retrieve a broker from the pool (after the 
timeout). I've set my poolsize to max 1 (with no growing), and still, after a 
timeout, I can get two
threads to actually receive a broker from the pool. It seems like they're 
getting the exact same broker instance, which explains why it will be in a 
transaction by the time the second thread is trying to begin its transaction.

Before the timeout, a NoSuchElementException would have been thrown if I was 
trying to do the same thing, so something must have gone terrebly wrong during 
the timeout. In fact, IBM has posted some information about this issue at:

http://www-1.ibm.com/support/docview.wss?rs=180&context=SSEQTP&uid=swg1PQ72575 
(describing the problem(
http://www-1.ibm.com/support/docview.wss?uid=swg27005042 (stating that it's 
been fixed)

Still, the "transaction has timed out"-message is written to the log without an 
exception being thrown. This meens OJB goes on happily, unknowing that anything 
went wrong, until it tries to do anything with the timed out connection. Along 
the way, my
guess is that the broker's state becomes invalid, the pool gets corrupted etc.

Anyway, did you ever find a solution to this problem?

Regards,

Mattias




I don't know if I was clear describing the problem. Here's the summary of what 
happened:

After a container managed transaction timed out in WAS 5.0.2 server it's 
impossible to get any broker using
createPersistenceBroker method of PersistenceBrokerFactory class.

Could anyone, please, confirm that this is either a new issue or a known 
problem? Also if this is a known
problem would anyone tell me if there is a solution for it?

Thank you,
Max.

 -Original Message-
From:   Vesely, Max [IT]
Sent: Friday, October 29, 2004 8:07 AM
To:   ojb-user  db.apache.org
Subject:Transaction timed out error

Hello,

I'm using OJB version 1.0 rc6 in managed environment with WebSphere 5.0.2 
application server. I only
utilize Persistence Broker API.

Under some circumstances the transaction, I begin using declarative transaction 
support of EJB
container, times out due to unavailability of some database resource. When this 
happens I get the
following error message in WAS system out log:

[10/28/04 16:52:12:192 EDT]   226649 CoordinatorIm I WTRN0066W: Transaction 
(164)
0001bba9:000180a414ca601162f4df806ca3b99ae6ca3a93fb6cb472f1[] has timed out 
after 120 seconds.

After this "time out" error I'm unable to get any Persistence broker from the 
pool. Here's an error I keep getting:

Caused by: org.apache.ojb.broker.PBFactoryException: Borrow broker from pool 
failed, using PBKey
org.apache.ojb.broker.PBKey: jcdAlias=DS, user=null, password=null

Here's some of the exception stack I get:

Caused by: org.apache.ojb.broker.PBFactoryException: Error while try to 
participate in JTA transaction
  at 
org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl.wrapRequestedBrokerInstance(PersistenceBrokerFactorySyncImpl.java:112)
  at 
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(PersistenceBrokerFactoryDefaultImpl.java:104)
  ... 39 more
Caused by: org.apache.ojb.broker.PBFactoryException: Unexpected exception when 
start intern pb-tx
  at 
org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl.wrapRequestedBrokerInstance(PersistenceBrokerFactorySyncImpl.java:106)
  ... 40 more
Caused by: org.apache.ojb.broker.TransactionInProgressException: 
ConnectionManager is already in transaction
  at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.beginTransaction(PersistenceBrokerImpl.java:386)
  at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.beginTransaction(DelegatingPersistenceBroker.java:138)
  at 
org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl$PersistenceBrokerSyncImpl.internBegin(PersistenceBrokerFactorySyncImpl.java:208)
  at 
org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl$PersistenceBrokerSyncImpl.access$000(PersistenceBrokerFactorySyncImpl.java:162)
  at 
org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl.wrapRequestedBrokerInstance(PersistenceBrokerFactorySyncImpl.java:90)

Is there something I failed to do when I first got an error?
And if not:
Is this a known issue in my version? Are there a fix availabl

Re: FW: Newbie Question : There was no default-PBKey specified

2004-11-19 Thread Thomas Dudziak
Stark, Roman wrote:
For the past tow days I tried to set up the ojb-blank project.
Everything I try ends up with the following message: "There was no
default-PBKey specified"
I am using eclips 3 for the project following the instructions from
the web site.  All I have tried so far is just get a connection and
run a very simple QueryByCriteria.  I did set up the repository.xml
files, of which there are 3 plus repository.xml.  

The database xml has a simple 
I really am at a loss, any suggestions would be great on this.  I
don't even know where to look anymore for what set up could cause this
problem.
   

The usual reason for this is that the repository.xml was not found and 
OJB started in the "un-configured" mode (which btw is intended for when 
you want to setup OJB programmatically). You should get a warning about 
this in the log file (if you configured e.g. logging to use Log4j) or 
console.
Also be aware that with standard ojb-blank, you've got to start the 
application in the build/resources directory, not in the project's root 
folder (see the Getting Started doc at 
http://db.apache.org/ojb/docu/getting-started.html for details).

Tom
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: FW: Newbie Question : There was no default-PBKey specified

2004-11-19 Thread Armin Waibel
Hi Roman,
does OJB find your repository.xml file?
Think we need more detailed info to help, so could you please post the 
whole stack trace and the connection declaration.

regards,
Armin
Stark, Roman wrote:
For the past tow days I tried to set up the ojb-blank project.
Everything I try ends up with the following message: "There was no
default-PBKey specified"
I am using eclips 3 for the project following the instructions from
the web site.  All I have tried so far is just get a connection and
run a very simple QueryByCriteria.  I did set up the repository.xml
files, of which there are 3 plus repository.xml.  

The database xml has a simple 
I really am at a loss, any suggestions would be great on this.  I
don't even know where to look anymore for what set up could cause this
problem.
Thanks
Roman

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


FW: Newbie Question : There was no default-PBKey specified

2004-11-19 Thread Stark, Roman

> For the past tow days I tried to set up the ojb-blank project.
> Everything I try ends up with the following message: "There was no
> default-PBKey specified"
> 
> I am using eclips 3 for the project following the instructions from
> the web site.  All I have tried so far is just get a connection and
> run a very simple QueryByCriteria.  I did set up the repository.xml
> files, of which there are 3 plus repository.xml.  
> 
> The database xml has a simple  that's all, and the default-connection="true";
> 
> I really am at a loss, any suggestions would be great on this.  I
> don't even know where to look anymore for what set up could cause this
> problem.
> 
> Thanks
> Roman


Re: [SUGGESTION] - S02 - Answering behaviour on this forum

2004-11-19 Thread Ilias Lazaridis
Tino Schöllhorn wrote:
[moved down]
Ilias Lazaridis wrote:
Daniel Perry wrote:
[moved down]
From: news [mailto:[EMAIL PROTECTED] Behalf Of Ilias Lazaridis
Edson Carlos Ericksson Richter wrote:
[moved down]
Ilias Lazaridis escreveu:
I've noticed several threads, which remained unanswered.
This could imply to visitors that the product OJB is death (or not 
yet alive)
!!!
!!!
!!!
To distinguish a project:
  - care about newcomers
  - accept their laziness/confusion, point them to the relevant 
resource
- hopefully they remember this in future.
  - and act the same against new newcomers.

A few answers can keep a newcomer within the project.
Increased userbase.
[...]
 > I think these comments would be fair for a commercial product,
[...] - (comments)
My suggestions are very fair, even within the context of open source, 
which has become high competitive.

Every involved parties (Team, Contributors, Users) should be 
interested to increase the user-base of OJB.

Questions like "Recommended ObjectCache for ODMG" should be served 
immediately with a link, even if this question was raised several times.

So, creating an FAQ, where every (even non experienced) community 
member can point the 'lazy' newcomers to the relevant subsection, 
should be a major goal.
>
> well I not for starting any flame wars. But if you think there should
> be a common, better FAQ list and the existing documentation is not
> enough - why don't you just start a FAQ-List and try to improve this
> project.
I've started another task within this project: creating a quick-start 
and a new main-page (which will most possibly increase the 
newcomer-adoption rate).

It's up to the existing community, to treat newcomers in a way that they 
stay with OJB.

Newcomers, which have invested time to come in contact with the product 
(and the community).

It is not very gentle, to let requests unanswered [at least the simple 
ones].

> As you already stated: this is open source and anyone who is
> interested can try to contribute ;-)
Of course.
As stated before, I'm contributing already my part.
> Tino
.
--
http://lazaridis.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ConcurrentModificationException while Deleting Objects

2004-11-19 Thread Gerhard Grosse
Hi Tinoe

On Fri, 19 Nov 2004 13:49:59 +0100, Tino Schöllhorn
<[EMAIL PROTECTED]> wrote:

>Hi Gerhard,
>
>our application is single-threaded. With the concurrent-package we are 
>ensuring that requests are delivered in a defined time-frame, or else 
>they are dismissed. So I do not know which other Thread should modify 
>the Person object. But do you know how I could get the name of the 
>collection which cannot be iterated?

Other than using a debugger (and the source distribution of OJB) not easily, I'm
afraid. Maybe by putting log statements in the getter methods of the various
collecions in the person object. The last logged collection would be the one
that causes the error. This works only if you are not using DirectFieldAccess,
of course.

If this really happens in a single thread, I could only imagine some kind of
recursion causing this. Maybe your object model has some hidden cycles?

Gerhard

>
>Tino
>
>Gerhard Grosse wrote:
>
>> Hi Tino
>> 
>> this looks like a multi-threading problem. java.util.ConcurrentModification
>> exception is thrown by the Java runtime when a List is being modified while 
>> an
>> iterator is iterating over it. The list in this case is one of the 
>> collections
>> in your Person object. Is it possible that a second thread is working on the
>> same Person? Also the bottom of your stack trace 
>> 
>> 
>>>EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(null: no source 
>>>available)   
>>>java.lang.Thread.run(Thread.java: 534)
>> 
>> 
>> points into this direction.
>> 
>> Gerhard
>> 
>> On Fri, 19 Nov 2004 11:51:02 +0100, Tino Schöllhorn
>> <[EMAIL PROTECTED]> wrote:
>> 
>> 
>>>Hi,
>>>
>>>I have a weird problem. We are using OJB 1.0 and are greatly satisfied. 
>>>Now we stumbled across a strange problem. When deleting a Person-Object 
>>>with:
>>>
>>>Person p = ...;
>>>pb.beginTransaction();
>>>pb.delete(p);
>>>pb.commitTransaction();
>>>
>>>we get (sometimes) the following Exception:
>>>
>>>java.util.ConcurrentModificationException
>>>java.util.AbstractList$Itr.checkForComodification(AbstractList.java: 
>>>448) 
>>>java.util.AbstractList$Itr.next(AbstractList.java: 419)  
>>>org.apache.ojb.broker.core.PersistenceBrokerImpl.deleteCollections(null: 
>>>no source available) 
>>>org.apache.ojb.broker.core.PersistenceBrokerImpl.doDelete(null: no 
>>>source available)
>>>org.apache.ojb.broker.core.PersistenceBrokerImpl.delete(null: no 
>>>source available)
>>>org.apache.ojb.broker.core.DelegatingPersistenceBroker.delete(null: no 
>>>source available)
>>>org.apache.ojb.broker.core.DelegatingPersistenceBroker.delete(null: no 
>>>source available)
>>>kos.generator.DataObject.delete(DataObject.java: 106)
>>>kos.wnetz.modules.editor.DAOEditorModule.deleteIt(DAOEditorModule.java: 403) 
>>>
>>>sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java: 
>>>no source available) 
>>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
>>>39)  
>>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
>>> 
>>>25)  
>>>java.lang.reflect.Method.invoke(Method.java: 324)
>>>kos.wnetz.system.Action.invoke(Action.java: 164) 
>>>kos.wnetz.system.Action$1.call(Action.java: 213) 
>>>EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(null: no source 
>>>available)   
>>>java.lang.Thread.run(Thread.java: 534)
>>>
>>>-- END Stacktrace
>>>
>>>The thing is: I am absolutely sure that we do not modify the object when 
>>>deleting it. Do you have any idea what I can do about it? Should I 
>>>switch to OJB 1.0.1?
>>>
>>>I am glad for any help.
>>>
>>>Tino
>>>
>>>P.S.: The configuration for the Person-Object is the following (it is 
>>>quite long, sorry about that ;-)):
>>>
>>>
>>> >> primarykey="true" 
>>> autoincrement="true" access="readonly"/>
>>> 
>>> 
>>> 
>>> >>jdbc-type="VARCHAR"/>
>>> >>jdbc-type="VARCHAR"/>
>>> >>jdbc-type="VARCHAR"/>
>>> >>jdbc-type="VARCHAR"/>
>>> >>jdbc-type="LONGVARCHAR"/>
>>> 
>>> >> jdbc-type="DATE"/>
>>> >> jdbc-type="VARCHAR"/>
>>> >>jdbc-type="INTEGER"/>
>>> >>access="anonymous"/>
>>> >> jdbc-type="BIT"/>  
>>>   
>>> 
>>> >>jdbc-type="TIMESTAMP"/>
>>> >>jdbc-type="TIMESTAMP"/>
>>> 
>>> 
>>> >> name="type"
>>> class-ref="kos.intranet2.om.PersonType"
>>> auto-retrieve="true"
>>> auto-update="link"
>>> auto-delete="none">
>>> 
>>> >>attribute-value="persons"/>
>>>  
>>> 
>>> 
>>> >> name="addresses"
>>>  
>>>collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
>>> element-class-ref="kos.intranet2.om.Address"
>>> auto-retrieve="true"
>>> auto-update="link"
>>> auto-delete="link"
>>> proxy="true"
>>> ind

RE: ConcurrentModificationException while Deleting Objects

2004-11-19 Thread David . WIESZTAL
Hi Tino and Gerhard,

I had the problem.
Our application is running on WebLogic, in a managed environment.
It's for sure a multi-thread issue and this problem seems to occur when we
use global object caching.
When an object is cached, and has a collection (in this case a Collection of
proxies), if two threads
access the same object and the same collection, this error occurs.
I looked in the source code, and the methods accessing the collections or
the cache are all synchronized.
That's why I don't see why this error occurs, and without a cheap fix, we
decided to live with it, as it does not happen very often.

The only clue I have is the management of "synchronized" methods being used
in a context of a stateless session bean.

Any idea is welcome !!!

David WIESZTAL.


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Gerhard Grosse
Sent: Friday, November 19, 2004 1:35 PM
To: [EMAIL PROTECTED]
Subject: Re: ConcurrentModificationException while Deleting Objects


Hi Tino

this looks like a multi-threading problem. java.util.ConcurrentModification
exception is thrown by the Java runtime when a List is being modified while
an
iterator is iterating over it. The list in this case is one of the
collections
in your Person object. Is it possible that a second thread is working on the
same Person? Also the bottom of your stack trace 

>EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(null: no source 
>available) 
>java.lang.Thread.run(Thread.java: 534)

points into this direction.

Gerhard

On Fri, 19 Nov 2004 11:51:02 +0100, Tino Schöllhorn
<[EMAIL PROTECTED]> wrote:

>Hi,
>
>I have a weird problem. We are using OJB 1.0 and are greatly satisfied. 
>Now we stumbled across a strange problem. When deleting a Person-Object 
>with:
>
>Person p = ...;
>pb.beginTransaction();
>pb.delete(p);
>pb.commitTransaction();
>
>we get (sometimes) the following Exception:
>
>java.util.ConcurrentModificationException  
>java.util.AbstractList$Itr.checkForComodification(AbstractList.java: 
>448)   
>java.util.AbstractList$Itr.next(AbstractList.java: 419)
>org.apache.ojb.broker.core.PersistenceBrokerImpl.deleteCollections(null: 
>no source available)   
>org.apache.ojb.broker.core.PersistenceBrokerImpl.doDelete(null: no 
>source available)  
>org.apache.ojb.broker.core.PersistenceBrokerImpl.delete(null: no 
>source available)  
>org.apache.ojb.broker.core.DelegatingPersistenceBroker.delete(null: no 
>source available)  
>org.apache.ojb.broker.core.DelegatingPersistenceBroker.delete(null: no 
>source available)  
>kos.generator.DataObject.delete(DataObject.java: 106)  
>kos.wnetz.modules.editor.DAOEditorModule.deleteIt(DAOEditorModule.java:
403) 
>
>sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:

>no source available)   
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
>39)
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java: 
>25)
>java.lang.reflect.Method.invoke(Method.java: 324)  
>kos.wnetz.system.Action.invoke(Action.java: 164)   
>kos.wnetz.system.Action$1.call(Action.java: 213)   
>EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(null: no source 
>available) 
>java.lang.Thread.run(Thread.java: 534)
>
>-- END Stacktrace
>
>The thing is: I am absolutely sure that we do not modify the object when 
>deleting it. Do you have any idea what I can do about it? Should I 
>switch to OJB 1.0.1?
>
>I am glad for any help.
>
>Tino
>
>P.S.: The configuration for the Person-Object is the following (it is 
>quite long, sorry about that ;-)):
>
>
>  primarykey="true"
autoincrement="true" access="readonly"/>
>   
>   
>   
>   jdbc-type="VARCHAR"/>
>   jdbc-type="VARCHAR"/>
>   jdbc-type="VARCHAR"/>
>   jdbc-type="VARCHAR"/>
>   jdbc-type="LONGVARCHAR"/>
>   
>   
>   
>   jdbc-type="INTEGER"/>
>   access="anonymous"/>
>  
>  
>   
>   jdbc-type="TIMESTAMP"/>
>   jdbc-type="TIMESTAMP"/>
>   
>   
>  name="type"
>   class-ref="kos.intranet2.om.PersonType"
>   auto-retrieve="true"
>   auto-update="link"
>   auto-delete="none">
>   
>   attribute-value="persons"/>
>
>   
>   
>  name="addresses"
>
>collection-class="org.apache.ojb.broker.util.collections.ManageableArrayLis
t"
>   element-class-ref="kos.intranet2.om.Address"
>   auto-retrieve="true"
>   auto-update="link"
>   auto-delete="link"
>   proxy="true"
>   indirection-table="Person_Address">
>   
>   
>   
>   
>   
>   
>   
>   
>  name="companyPersons"
>

Re: ConcurrentModificationException while Deleting Objects

2004-11-19 Thread Tino Schöllhorn
Hi Gerhard,
our application is single-threaded. With the concurrent-package we are 
ensuring that requests are delivered in a defined time-frame, or else 
they are dismissed. So I do not know which other Thread should modify 
the Person object. But do you know how I could get the name of the 
collection which cannot be iterated?

Tino
Gerhard Grosse wrote:
Hi Tino
this looks like a multi-threading problem. java.util.ConcurrentModification
exception is thrown by the Java runtime when a List is being modified while an
iterator is iterating over it. The list in this case is one of the collections
in your Person object. Is it possible that a second thread is working on the
same Person? Also the bottom of your stack trace 


EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(null: no source 
available)	
java.lang.Thread.run(Thread.java: 534)

points into this direction.
Gerhard
On Fri, 19 Nov 2004 11:51:02 +0100, Tino Schöllhorn
<[EMAIL PROTECTED]> wrote:

Hi,
I have a weird problem. We are using OJB 1.0 and are greatly satisfied. 
Now we stumbled across a strange problem. When deleting a Person-Object 
with:

Person p = ...;
pb.beginTransaction();
pb.delete(p);
pb.commitTransaction();
we get (sometimes) the following Exception:
java.util.ConcurrentModificationException	
java.util.AbstractList$Itr.checkForComodification(AbstractList.java: 
448)	
java.util.AbstractList$Itr.next(AbstractList.java: 419)	
org.apache.ojb.broker.core.PersistenceBrokerImpl.deleteCollections(null: 
no source available)	
org.apache.ojb.broker.core.PersistenceBrokerImpl.doDelete(null: no 
source available)	
org.apache.ojb.broker.core.PersistenceBrokerImpl.delete(null: no 
source available)	
org.apache.ojb.broker.core.DelegatingPersistenceBroker.delete(null: no 
source available)	
org.apache.ojb.broker.core.DelegatingPersistenceBroker.delete(null: no 
source available)	
kos.generator.DataObject.delete(DataObject.java: 106)	
kos.wnetz.modules.editor.DAOEditorModule.deleteIt(DAOEditorModule.java: 403) 

sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java: 
no source available)	
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)	
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)	
java.lang.reflect.Method.invoke(Method.java: 324)	
kos.wnetz.system.Action.invoke(Action.java: 164)	
kos.wnetz.system.Action$1.call(Action.java: 213)	
EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(null: no source 
available)	
java.lang.Thread.run(Thread.java: 534)

-- END Stacktrace
The thing is: I am absolutely sure that we do not modify the object when 
deleting it. Do you have any idea what I can do about it? Should I 
switch to OJB 1.0.1?

I am glad for any help.
Tino
P.S.: The configuration for the Person-Object is the following (it is 
quite long, sorry about that ;-)):


	
		primarykey="true" autoincrement="true" access="readonly"/>
		
	
	
	
	
	
	
	
	
	
	
	
	
		
		
	
	
	
	
	
	
	name="type"
	class-ref="kos.intranet2.om.PersonType"
	auto-retrieve="true"
	auto-update="link"
	auto-delete="none">
   	
   	
   	
   	
	
	
		name="addresses"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.Address"
		auto-retrieve="true"
		auto-update="link"
		auto-delete="link"
		proxy="true"
		indirection-table="Person_Address">
		
		
		
		
		
	
	
	
	
		name="companyPersons"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.CompanyPerson"
		auto-retrieve="true"
		auto-update="object"
		auto-delete="object"
		proxy="true">
		
		
	
	
	
	
	
	
		name="teamPersons"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.TeamPerson"
		auto-retrieve="true"
		auto-update="object"
		auto-delete="object"
		proxy="true">
		
			
			
	
	
	
	
	
		name="projectPersons"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.ProjectPerson"
		auto-retrieve="true"
		auto-update="object"
		auto-delete="object"
		proxy="true">
		
			
			
	
	
	
	
		name="appointments"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.Appointment"
		auto-retrieve="true"
		auto-update="link"
		auto-delete="link"
		proxy="true"
		indirection-table="Person_Appointment">
		
		
		
		
		
		
	
	
	
		name="tasks"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.Task"
		auto-retrieve="true"
		auto-update="link"
		auto-delete="link"
		proxy="true"
		indirection-table="Person_Task">
		
		
		
		
		
		


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [SUGGESTION] - S02 - Answering behaviour on this forum

2004-11-19 Thread Tino Schöllhorn
Hi Ilias,
well I not for starting any flame wars. But if you think there should be 
a common, better FAQ list and the existing documentation is not enough - 
why don't you just start a FAQ-List and try to improve this project. As 
you already stated: this is open source and anyone who is interested can 
try to contribute ;-)

Tino
Ilias Lazaridis wrote:
Daniel Perry wrote:
[moved down]
 >
From: news [mailto:[EMAIL PROTECTED] Behalf Of Ilias Lazaridis
Edson Carlos Ericksson Richter wrote:
[moved down]
Ilias Lazaridis escreveu:
I've noticed several threads, which remained unanswered.
This could imply to visitors that the product OJB is death (or not yet
alive)

!!!

!!!
[...]
To distinguish a project:
  - care about newcomers
  - accept their laziness/confusion, point them to the relevant resource
- hopefully they remember this in future.
  - and act the same against new newcomers.
A few answers can keep a newcomer within the project.
Increased userbase.
[...]
 > I think these comments would be fair for a commercial product,
[...] - (comments)
My suggestions are very fair, even within the context of open source, 
which has become high competitive.

Every involved parties (Team, Contributors, Users) should be interested 
to increase the user-base of OJB.

Questions like "Recommended ObjectCache for ODMG" should be served 
immediately with a link, even if this question was raised several times.

So, creating an FAQ, where every (even non experienced) community member 
can point the 'lazy' newcomers to the relevant subsection, should be a 
major goal.

.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ConcurrentModificationException while Deleting Objects

2004-11-19 Thread Gerhard Grosse
Hi Tino

this looks like a multi-threading problem. java.util.ConcurrentModification
exception is thrown by the Java runtime when a List is being modified while an
iterator is iterating over it. The list in this case is one of the collections
in your Person object. Is it possible that a second thread is working on the
same Person? Also the bottom of your stack trace 

>EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(null: no source 
>available) 
>java.lang.Thread.run(Thread.java: 534)

points into this direction.

Gerhard

On Fri, 19 Nov 2004 11:51:02 +0100, Tino Schöllhorn
<[EMAIL PROTECTED]> wrote:

>Hi,
>
>I have a weird problem. We are using OJB 1.0 and are greatly satisfied. 
>Now we stumbled across a strange problem. When deleting a Person-Object 
>with:
>
>Person p = ...;
>pb.beginTransaction();
>pb.delete(p);
>pb.commitTransaction();
>
>we get (sometimes) the following Exception:
>
>java.util.ConcurrentModificationException  
>java.util.AbstractList$Itr.checkForComodification(AbstractList.java: 
>448)   
>java.util.AbstractList$Itr.next(AbstractList.java: 419)
>org.apache.ojb.broker.core.PersistenceBrokerImpl.deleteCollections(null: 
>no source available)   
>org.apache.ojb.broker.core.PersistenceBrokerImpl.doDelete(null: no 
>source available)  
>org.apache.ojb.broker.core.PersistenceBrokerImpl.delete(null: no 
>source available)  
>org.apache.ojb.broker.core.DelegatingPersistenceBroker.delete(null: no 
>source available)  
>org.apache.ojb.broker.core.DelegatingPersistenceBroker.delete(null: no 
>source available)  
>kos.generator.DataObject.delete(DataObject.java: 106)  
>kos.wnetz.modules.editor.DAOEditorModule.deleteIt(DAOEditorModule.java: 403) 
>
>sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java: 
>no source available)   
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
>39)
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 
>25)
>java.lang.reflect.Method.invoke(Method.java: 324)  
>kos.wnetz.system.Action.invoke(Action.java: 164)   
>kos.wnetz.system.Action$1.call(Action.java: 213)   
>EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(null: no source 
>available) 
>java.lang.Thread.run(Thread.java: 534)
>
>-- END Stacktrace
>
>The thing is: I am absolutely sure that we do not modify the object when 
>deleting it. Do you have any idea what I can do about it? Should I 
>switch to OJB 1.0.1?
>
>I am glad for any help.
>
>Tino
>
>P.S.: The configuration for the Person-Object is the following (it is 
>quite long, sorry about that ;-)):
>
>
>  primarykey="true" 
> autoincrement="true" access="readonly"/>
>   
>   
>   
>   jdbc-type="VARCHAR"/>
>   jdbc-type="VARCHAR"/>
>   jdbc-type="VARCHAR"/>
>   jdbc-type="VARCHAR"/>
>   jdbc-type="LONGVARCHAR"/>
>   
>jdbc-type="DATE"/>
>jdbc-type="VARCHAR"/>
>   jdbc-type="INTEGER"/>
>   access="anonymous"/>
>jdbc-type="BIT"/>  
> 
>   
>   jdbc-type="TIMESTAMP"/>
>   jdbc-type="TIMESTAMP"/>
>   
>   
>  name="type"
>   class-ref="kos.intranet2.om.PersonType"
>   auto-retrieve="true"
>   auto-update="link"
>   auto-delete="none">
>   
>   attribute-value="persons"/>
>
>   
>   
>  name="addresses"
>
>collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
>   element-class-ref="kos.intranet2.om.Address"
>   auto-retrieve="true"
>   auto-update="link"
>   auto-delete="link"
>   proxy="true"
>   indirection-table="Person_Address">
>   
>   
>   
>   
>attribute-value="persons"/>
>   
>   
>   
>  name="companyPersons"
>
>collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
>   element-class-ref="kos.intranet2.om.CompanyPerson"
>   auto-retrieve="true"
>   auto-update="object"
>   auto-delete="object"
>   proxy="true">
>   
>   
>attribute-value="person"/> 
>   
>   
>   
>   
>  name="teamPersons"
>
>collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
>   element-class-ref="kos.intranet2.om.TeamPerson"
>   auto-retrieve="true"
>   auto-update="object"
>   auto-delete="object"
>   proxy="true">
>   
> 
>attribute-value="person"/> 
>   
>   
>   
>   
>  name="projectPerso

Re: [SUGGESTION] - S02 - Answering behaviour on this forum

2004-11-19 Thread Ilias Lazaridis
Daniel Perry wrote:
[moved down]
>
From: news [mailto:[EMAIL PROTECTED] Behalf Of Ilias Lazaridis
Edson Carlos Ericksson Richter wrote:
[moved down]
Ilias Lazaridis escreveu:
I've noticed several threads, which remained unanswered.
This could imply to visitors that the product OJB is death (or not yet
alive)
!!!
!!!
[...]
To distinguish a project:
  - care about newcomers
  - accept their laziness/confusion, point them to the relevant resource
- hopefully they remember this in future.
  - and act the same against new newcomers.
A few answers can keep a newcomer within the project.
Increased userbase.
[...]
> I think these comments would be fair for a commercial product,
[...] - (comments)
My suggestions are very fair, even within the context of open source, 
which has become high competitive.

Every involved parties (Team, Contributors, Users) should be interested 
to increase the user-base of OJB.

Questions like "Recommended ObjectCache for ODMG" should be served 
immediately with a link, even if this question was raised several times.

So, creating an FAQ, where every (even non experienced) community member 
can point the 'lazy' newcomers to the relevant subsection, should be a 
major goal.

.
--
http://lazaridis.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ConcurrentModificationException while Deleting Objects

2004-11-19 Thread Tino Schöllhorn
Hi,
I have a weird problem. We are using OJB 1.0 and are greatly satisfied. 
Now we stumbled across a strange problem. When deleting a Person-Object 
with:

Person p = ...;
pb.beginTransaction();
pb.delete(p);
pb.commitTransaction();
we get (sometimes) the following Exception:
java.util.ConcurrentModificationException	
java.util.AbstractList$Itr.checkForComodification(AbstractList.java: 
448)	
java.util.AbstractList$Itr.next(AbstractList.java: 419)	
org.apache.ojb.broker.core.PersistenceBrokerImpl.deleteCollections(null: 
no source available)	
org.apache.ojb.broker.core.PersistenceBrokerImpl.doDelete(null: no 
source available)	
org.apache.ojb.broker.core.PersistenceBrokerImpl.delete(null: no 
source available)	
org.apache.ojb.broker.core.DelegatingPersistenceBroker.delete(null: no 
source available)	
org.apache.ojb.broker.core.DelegatingPersistenceBroker.delete(null: no 
source available)	
kos.generator.DataObject.delete(DataObject.java: 106)	
kos.wnetz.modules.editor.DAOEditorModule.deleteIt(DAOEditorModule.java: 403) 

sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java: 
no source available)	
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)	
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)	
java.lang.reflect.Method.invoke(Method.java: 324)	
kos.wnetz.system.Action.invoke(Action.java: 164)	
kos.wnetz.system.Action$1.call(Action.java: 213)	
EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(null: no source 
available)	
java.lang.Thread.run(Thread.java: 534)

-- END Stacktrace
The thing is: I am absolutely sure that we do not modify the object when 
deleting it. Do you have any idea what I can do about it? Should I 
switch to OJB 1.0.1?

I am glad for any help.
Tino
P.S.: The configuration for the Person-Object is the following (it is 
quite long, sorry about that ;-)):


	
		primarykey="true" autoincrement="true" access="readonly"/>
		
	
	
	
	
	
	
	
	
	
	
	
	
		
		
	
	
	
	
	
	
	name="type"
	class-ref="kos.intranet2.om.PersonType"
	auto-retrieve="true"
	auto-update="link"
	auto-delete="none">
	
	
	
	
	
	
		name="addresses"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.Address"
		auto-retrieve="true"
		auto-update="link"
		auto-delete="link"
		proxy="true"
		indirection-table="Person_Address">
		
		
		
		
		
	
	
	
	
		name="companyPersons"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.CompanyPerson"
		auto-retrieve="true"
		auto-update="object"
		auto-delete="object"
		proxy="true">
		
		
	
	
	
	
	
	
		name="teamPersons"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.TeamPerson"
		auto-retrieve="true"
		auto-update="object"
		auto-delete="object"
		proxy="true">
		
			
			
	
	
	
	
	
		name="projectPersons"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.ProjectPerson"
		auto-retrieve="true"
		auto-update="object"
		auto-delete="object"
		proxy="true">
		
			
			
	
	
	
	
		name="appointments"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.Appointment"
		auto-retrieve="true"
		auto-update="link"
		auto-delete="link"
		proxy="true"
		indirection-table="Person_Appointment">
		
		
		
		
		
		
	
	
	
		name="tasks"
	 
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
		element-class-ref="kos.intranet2.om.Task"
		auto-retrieve="true"
		auto-update="link"
		auto-delete="link"
		proxy="true"
		indirection-table="Person_Task">
		
		
		
		
		
		


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Java class for ordering SQL statements in ODMG to avoid FK violations

2004-11-19 Thread Gerhard Grosse
Hi Jakob,

On Fri, 19 Nov 2004 08:20:53 +0100 (MET), "Jakob Braeuchi" <[EMAIL PROTECTED]>
wrote:

>hi armin,
>
>in the testcase i mentioned the auto-update is set to LINK. 
>does the scenario you describe also work for odmg ? i was thinking of
>something similar in PB: the PB keeps track of the mn-implementors to be
>inserted and inserts them when the main objects are in the tables.
>

If something like this could be realalized at PB level, it would remove the need
for any ordering of m:n related objects. And this would in turn further reduce
the probability of contradicting constraints. Note that of course deletions in
the link table would have to occur before any deletion / update of the main
objects.

BTW, are the remaining failing test cases all in M2NTest and due to the
bidirectional m:n relationship? I ran my tests against version 1.0.1 and got
only the 2 failures in org.apache.ojb.odmg.CollectionsTest
(testRemoveCollectionElementWithoutBackReference and
testStoreDeleteCollectionElementWithBackReference) which also failed with the
original ordering.

Gerhard

>gerhards new class correctly orders the objects to be inserted, but cannot
>control the settings of auto-update. so the first obj inserted tries to
>update the indirection-table.
>
>jakob
>
>> Jakob Braeuchi wrote:
>> 
>> > hi gerhard,
>> > 
>> > the failing testcases in org.apache.ojb.odmg.M2NTest can not at all be 
>> > fixed by reordering.
>> > 
>> > the problem is the bidirectional m:n relationship with auto-update = 
>> > LINK on both sides. no matter what side is inserted first pb tries to 
>> > insert into the indirection-table as well. this will always fail.
>> > setting auto-update to OBJECT does also not help in this case because 
>> > objects are inserted more than once which leads to a unique key
>> violation.
>> > 
>> > the only solution i see is to _defer_ the insertion of the 
>> > indirection-table until all main objects are saved. unfortunately i have
>> > no idea how to do this :(
>> >
>> 
>> hmm, if we change auto-update to NONE (instead false) for m:n relations, 
>> insert/update both sides, "mark" these objects with m:n relation for 
>> postprocessing and then populate the Indirection Table by using 
>> PBImpl#linkMtoN(Object obj, CollectionDescriptor cod, boolean insert).
>> Note: I never tried this ;-)
>> 
>> regards,
>> Armin
>> 
>> 
>> > jakob
>> > 
>> > Jakob Braeuchi schrieb:
>> > 
>> >> hi gerhard,
>> >>
>> >> thanks for your contribution. it looks really impressive !
>> >> i integrated your class into to current 1.0.x branch an ran all odmg 
>> >> testcases without skipping known issues.
>> >> with the old reorder i get:
>> >>
>> >> Tests run: 207,  Failures: 2,  Errors: 8
>> >>
>> >> with your ordering i still have 6 errors:
>> >>
>> >> Tests run: 207,  Failures: 2,  Errors: 6
>> >>
>> >> ie this one:
>> >>
>> >> 3) 
>> >>
>>
>testStoreComplex(org.apache.ojb.odmg.M2NTest)org.apache.ojb.odmg.TransactionAbortedExceptionOJB
>
>> >>
>> >> at 
>> >>
>>
>org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:174)
>
>> >>
>> >> at 
>> >>
>>
>org.apache.ojb.odmg.TransactionImpl.doWriteObjects(TransactionImpl.java:324)
>
>> >>
>> >> at 
>> >> org.apache.ojb.odmg.TransactionImpl.prepare(TransactionImpl.java:624)
>> >> at 
>> >> org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:581)
>> >> at org.apache.ojb.odmg.M2NTest.doTestStoreComplex(M2NTest.java:157)
>> >> at org.apache.ojb.odmg.M2NTest.testStoreComplex(M2NTest.java:137)
>> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >> at 
>> >>
>>
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>> >>
>> >> at 
>> >>
>>
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>> >>
>> >> at org.apache.ojb.odmg.AllTests.main(AllTests.java:18)
>> >> Caused by: org.apache.ojb.broker.OJBRuntimeException: Given object 
>> >> collection of type class 
>> >> org.apache.ojb.odmg.M2NTest$MovieManageableCollection can not be 
>> >> managed by OJB. Use Array, Collection or ManageableCollection instead!
>> >> at 
>> >>
>>
>org.apache.ojb.odmg.ObjectEnvelopeOrdering.addCollectionEdges(ObjectEnvelopeOrdering.java:312)
>
>> >>
>> >> at 
>> >>
>>
>org.apache.ojb.odmg.ObjectEnvelopeOrdering.addEdgesForVertex(ObjectEnvelopeOrdering.java:241)
>
>> >>
>> >> at 
>> >>
>>
>org.apache.ojb.odmg.ObjectEnvelopeOrdering.reorder(ObjectEnvelopeOrdering.java:133)
>
>> >>
>> >> at 
>> >>
>>
>org.apache.ojb.odmg.ObjectEnvelopeTable.reorder(ObjectEnvelopeTable.java:588)
>
>> >>
>> >> at 
>> >>
>>
>org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:148)
>
>> >>
>> >>
>> >> jakob
>> >>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Java class for ordering SQL statements in ODMG to avoid FK violations

2004-11-19 Thread Gerhard Grosse
Hi Jakob

On Thu, 18 Nov 2004 21:17:04 +0100, Jakob Braeuchi <[EMAIL PROTECTED]> wrote:

>hi gerhard,
>
>i applied a small fix in addCollectionEdges()
>
>...
> else
> {
> if (col instanceof ManageableCollection)
> {
> Collection newCol = new ArrayList();
> CollectionUtils.addAll(newCol, ((ManageableCollection) 
>col).ojbIterator());
>
> refObjects = newCol.toArray();
> }
> else if (col instanceof Collection)
> {
> refObjects = ((Collection) col).toArray();
>
> }
> else if (col instanceof Object[])
>...
>
>two of the reported problems were caused by the fact that ManageableCollection 
>does not extend Collection.
>

Oops... Yep, that's something I overlooked. I should have got suspicious when I
copied that error message from BrokerHelp.getCollectionIterator ... :-)

Gerhard

>but i still have problems in org.apache.ojb.odmg.M2NTest.
>
>Tests run: 207,  Failures: 2,  Errors: 6
>
>jakob
>
>Jakob Braeuchi schrieb:
>
>> hi gerhard,
>> 
>> thanks for your contribution. it looks really impressive !
>> i integrated your class into to current 1.0.x branch an ran all odmg 
>> testcases without skipping known issues.
>> with the old reorder i get:
>> 
>> Tests run: 207,  Failures: 2,  Errors: 8
>> 
>> with your ordering i still have 6 errors:
>> 
>> Tests run: 207,  Failures: 2,  Errors: 6
>> 
>> ie this one:
>> 
>> 3) 
>> testStoreComplex(org.apache.ojb.odmg.M2NTest)org.apache.ojb.odmg.TransactionAbortedExceptionOJB
>>  
>> 
>> at 
>> org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:174) 
>> 
>> at 
>> org.apache.ojb.odmg.TransactionImpl.doWriteObjects(TransactionImpl.java:324) 
>> 
>> at 
>> org.apache.ojb.odmg.TransactionImpl.prepare(TransactionImpl.java:624)
>> at org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:581)
>> at org.apache.ojb.odmg.M2NTest.doTestStoreComplex(M2NTest.java:157)
>> at org.apache.ojb.odmg.M2NTest.testStoreComplex(M2NTest.java:137)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>  
>> 
>> at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>  
>> 
>> at org.apache.ojb.odmg.AllTests.main(AllTests.java:18)
>> Caused by: org.apache.ojb.broker.OJBRuntimeException: Given object 
>> collection of type class 
>> org.apache.ojb.odmg.M2NTest$MovieManageableCollection can not be managed 
>> by OJB. Use Array, Collection or ManageableCollection instead!
>> at 
>> org.apache.ojb.odmg.ObjectEnvelopeOrdering.addCollectionEdges(ObjectEnvelopeOrdering.java:312)
>>  
>> 
>> at 
>> org.apache.ojb.odmg.ObjectEnvelopeOrdering.addEdgesForVertex(ObjectEnvelopeOrdering.java:241)
>>  
>> 
>> at 
>> org.apache.ojb.odmg.ObjectEnvelopeOrdering.reorder(ObjectEnvelopeOrdering.java:133)
>>  
>> 
>> at 
>> org.apache.ojb.odmg.ObjectEnvelopeTable.reorder(ObjectEnvelopeTable.java:588)
>>  
>> 
>> at 
>> org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:148) 
>> 
>> 
>> jakob
>> 
>> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]