Re: Running through Apache, and testing in VMWare/Windows

2010-12-08 Thread Kieran Kelleher
I test Windows on Parallels. One way is to install Bonjour for Windows on 
your Windows VM and then use http://andrewsmac.local/ (or whatever your bonjour 
name is). Another way is to just use the Mac's IP address in the URL.

On Dec 7, 2010, at 4:52 PM, Andrew R. Kinnie wrote:

 Hi all,
 
 I have set up my dev box to run through apache rather than direct connect, 
 but discovered a problem that seems likely to be related.  When I test on 
 Windows running in VMWare Fusion on my machine, it can't connect.  I assume 
 it's because apache is serving it as localhost, and the VM presumably has 
 it's own ip, so it can't see the mac's 127.0.0.1
 
 I assume someone does this, as it seems like a fairly common configuration 
 and requirement.  Can someone point me to what I need to do to configure this?
 
 Eclipse 3.6, WO 5.4.3, Wonder as of last week, WOLips as of . . . a week or 
 two ago, Mac OS X 10.6.5 and the latest update to VMWare Fusion running an XP 
 Virtual Machine.
 
 Any ideas?  Thanks in advance.
 
 Andrew 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com
 
 This email sent to kelleh...@gmail.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Running through Apache, and testing in VMWare/Windows

2010-12-08 Thread Simon
hold on a second - on the bottom of that web page there is an oracle
badge. let me guess: it's free to download and free to install, but drains a
$1000 per second from your bank account when you're not looking ? :-)

simon

On 8 December 2010 00:25, Chuck Hill ch...@global-village.net wrote:

 Mostly unrelated, but I ran across this the other day:

 http://www.virtualbox.org/

 Free(ish) and there is an OS X version.


 Chuck


 On Dec 7, 2010, at 4:22 PM, David Avendasora wrote:

  What is the networking setup of your VMWare virtual machine? Maybe a
 screen capture?
 
  Dave
 
  On Dec 7, 2010, at 5:30 PM, Andrew R. Kinnie wrote:
 
  That didn't work either, though that makes much less sense to me.
 
 
  On Dec 7, 2010, at 5:01 PM, David LeBer wrote:
 
 
  On 2010-12-07, at 4:52 PM, Andrew R. Kinnie wrote:
 
  Hi all,
 
  I have set up my dev box to run through apache rather than direct
 connect, but discovered a problem that seems likely to be related.  When I
 test on Windows running in VMWare Fusion on my machine, it can't connect.  I
 assume it's because apache is serving it as localhost, and the VM presumably
 has it's own ip, so it can't see the mac's 127.0.0.1
 
  I assume someone does this, as it seems like a fairly common
 configuration and requirement.  Can someone point me to what I need to do to
 configure this?
 
  Eclipse 3.6, WO 5.4.3, Wonder as of last week, WOLips as of . . . a
 week or two ago, Mac OS X 10.6.5 and the latest update to VMWare Fusion
 running an XP Virtual Machine.
 
  Any ideas?  Thanks in advance.
 
  Can you use the current IP of the Mac?
 
  ;david
 
  --
  David LeBer
  Codeferous Software
  'co-def-er-ous' adj. Literally 'code-bearing'
  site:   http://codeferous.com
  blog:   http://davidleber.net
  profile:http://www.linkedin.com/in/davidleber
  twitter:http://twitter.com/rebeld
  --
  Toronto Area Cocoa / WebObjects developers group:
  http://tacow.org
 
 
 
 
 
  ___
  Do not post admin requests to the list. They will be ignored.
  Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
  Help/Unsubscribe/Update your Subscription:
 
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
  This email sent to webobje...@avendasora.com
 
 
 
  ___
  Do not post admin requests to the list. They will be ignored.
  Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
  Help/Unsubscribe/Update your Subscription:
 
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
  This email sent to ch...@global-village.net

 --
 Chuck Hill Senior Consultant / VP Development

 Practical WebObjects - for developers who want to increase their overall
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects








  ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:

 http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk

 This email sent to si...@potwells.co.uk

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Running through Apache, and testing in VMWare/Windows

2010-12-08 Thread Pascal Robert
Yep, I think if you use a NAT network setup you can't connect from Windows to 
OS X by IP. I always setup my VMs to use a bridge (don't know the exact term in 
English, my copy of Fusion is running in French).

 What is the networking setup of your VMWare virtual machine? Maybe a screen 
 capture?
 
 Dave
 
 On Dec 7, 2010, at 5:30 PM, Andrew R. Kinnie wrote:
 
 That didn't work either, though that makes much less sense to me.
 
 
 On Dec 7, 2010, at 5:01 PM, David LeBer wrote:
 
 
 On 2010-12-07, at 4:52 PM, Andrew R. Kinnie wrote:
 
 Hi all,
 
 I have set up my dev box to run through apache rather than direct connect, 
 but discovered a problem that seems likely to be related.  When I test on 
 Windows running in VMWare Fusion on my machine, it can't connect.  I 
 assume it's because apache is serving it as localhost, and the VM 
 presumably has it's own ip, so it can't see the mac's 127.0.0.1
 
 I assume someone does this, as it seems like a fairly common configuration 
 and requirement.  Can someone point me to what I need to do to configure 
 this?
 
 Eclipse 3.6, WO 5.4.3, Wonder as of last week, WOLips as of . . . a week 
 or two ago, Mac OS X 10.6.5 and the latest update to VMWare Fusion running 
 an XP Virtual Machine.
 
 Any ideas?  Thanks in advance.
 
 Can you use the current IP of the Mac?
 
 ;david
 
 --
 David LeBer
 Codeferous Software
 'co-def-er-ous' adj. Literally 'code-bearing'
 site:   http://codeferous.com
 blog:   http://davidleber.net
 profile:http://www.linkedin.com/in/davidleber
 twitter:http://twitter.com/rebeld
 --
 Toronto Area Cocoa / WebObjects developers group:
 http://tacow.org
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
 
 This email sent to prob...@macti.ca

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Running through Apache, and testing in VMWare/Windows

2010-12-08 Thread Pascal Robert
They also have a paid version. But personally, I trust more VMWare. 
Virtualization is their core business and so far Fusion have been rock solid 
for me (using it since mid 2008).

 hold on a second - on the bottom of that web page there is an oracle badge. 
 let me guess: it's free to download and free to install, but drains a $1000 
 per second from your bank account when you're not looking ? :-)
 
 simon
 
 On 8 December 2010 00:25, Chuck Hill ch...@global-village.net wrote:
 Mostly unrelated, but I ran across this the other day:
 
 http://www.virtualbox.org/
 
 Free(ish) and there is an OS X version.
 
 
 Chuck
 
 
 On Dec 7, 2010, at 4:22 PM, David Avendasora wrote:
 
  What is the networking setup of your VMWare virtual machine? Maybe a screen 
  capture?
 
  Dave
 
  On Dec 7, 2010, at 5:30 PM, Andrew R. Kinnie wrote:
 
  That didn't work either, though that makes much less sense to me.
 
 
  On Dec 7, 2010, at 5:01 PM, David LeBer wrote:
 
 
  On 2010-12-07, at 4:52 PM, Andrew R. Kinnie wrote:
 
  Hi all,
 
  I have set up my dev box to run through apache rather than direct 
  connect, but discovered a problem that seems likely to be related.  When 
  I test on Windows running in VMWare Fusion on my machine, it can't 
  connect.  I assume it's because apache is serving it as localhost, and 
  the VM presumably has it's own ip, so it can't see the mac's 127.0.0.1
 
  I assume someone does this, as it seems like a fairly common 
  configuration and requirement.  Can someone point me to what I need to 
  do to configure this?
 
  Eclipse 3.6, WO 5.4.3, Wonder as of last week, WOLips as of . . . a week 
  or two ago, Mac OS X 10.6.5 and the latest update to VMWare Fusion 
  running an XP Virtual Machine.
 
  Any ideas?  Thanks in advance.
 
  Can you use the current IP of the Mac?
 
  ;david
 
  --
  David LeBer
  Codeferous Software
  'co-def-er-ous' adj. Literally 'code-bearing'
  site:   http://codeferous.com
  blog:   http://davidleber.net
  profile:http://www.linkedin.com/in/davidleber
  twitter:http://twitter.com/rebeld
  --
  Toronto Area Cocoa / WebObjects developers group:
  http://tacow.org
 
 
 
 
 
  ___
  Do not post admin requests to the list. They will be ignored.
  Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
  Help/Unsubscribe/Update your Subscription:
  http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
  This email sent to webobje...@avendasora.com
 
 
 
  ___
  Do not post admin requests to the list. They will be ignored.
  Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
  Help/Unsubscribe/Update your Subscription:
  http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
  This email sent to ch...@global-village.net
 
 --
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 
 
  ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk
 
 This email sent to si...@potwells.co.uk
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
 
 This email sent to prob...@macti.ca

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Running through Apache, and testing in VMWare/Windows

2010-12-08 Thread Andrew R. Kinnie
Yeah, I just changed that (It is called Bridge vs. NAT which is the default).  
It now can see apache, but can't see the wo app.

(i.e. the ip address gives me an It Works! page, but the full url including 
:port/cgi-bin/WebObjects/MyApp.woa gets me Internet Explorer cannot connect 
to this web page)

If I remove the port I get Web Page cannot be found




On Dec 8, 2010, at 8:43 AM, Pascal Robert wrote:

 Yep, I think if you use a NAT network setup you can't connect from Windows to 
 OS X by IP. I always setup my VMs to use a bridge (don't know the exact term 
 in English, my copy of Fusion is running in French).
 
 What is the networking setup of your VMWare virtual machine? Maybe a screen 
 capture?
 
 Dave
 
 On Dec 7, 2010, at 5:30 PM, Andrew R. Kinnie wrote:
 
 That didn't work either, though that makes much less sense to me.
 
 
 On Dec 7, 2010, at 5:01 PM, David LeBer wrote:
 
 
 On 2010-12-07, at 4:52 PM, Andrew R. Kinnie wrote:
 
 Hi all,
 
 I have set up my dev box to run through apache rather than direct 
 connect, but discovered a problem that seems likely to be related.  When 
 I test on Windows running in VMWare Fusion on my machine, it can't 
 connect.  I assume it's because apache is serving it as localhost, and 
 the VM presumably has it's own ip, so it can't see the mac's 127.0.0.1
 
 I assume someone does this, as it seems like a fairly common 
 configuration and requirement.  Can someone point me to what I need to do 
 to configure this?
 
 Eclipse 3.6, WO 5.4.3, Wonder as of last week, WOLips as of . . . a week 
 or two ago, Mac OS X 10.6.5 and the latest update to VMWare Fusion 
 running an XP Virtual Machine.
 
 Any ideas?  Thanks in advance.
 
 Can you use the current IP of the Mac?
 
 ;david
 
 --
 David LeBer
 Codeferous Software
 'co-def-er-ous' adj. Literally 'code-bearing'
 site:  http://codeferous.com
 blog:  http://davidleber.net
 profile:   http://www.linkedin.com/in/davidleber
 twitter:   http://twitter.com/rebeld
 --
 Toronto Area Cocoa / WebObjects developers group:
 http://tacow.org
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
 
 This email sent to prob...@macti.ca
 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


datepicker on AMD problem

2010-12-08 Thread Theodore Petrosky

I am back to trying to figure out a solution to this datepicker problem.

http://173.54.121.129/cgi-bin/WebObjects/DatePicker

is an example of the problem. I may try next to use D2W content on the AMD to 
see if the issue exists there also.

still hopeful,

Ted





  
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Need help with a (non) deadlock Issue

2010-12-08 Thread Greg Lappen
Hi everyone, was wondering if anyone was up for a game of spot the
deadlock today.  I have a thread dump which I have removed duplicates from
and cleaned up a bit.  It seems that a lot of threads are BLOCKED waiting on
the EOObjectStoreCoordinator.lock() call

Deadlock Detection:

No deadlocks found.

Thread t...@44035: (state = BLOCKED)
 - java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may be
imprecise)
 - sun.security.pkcs11.SunPKCS11$TokenPoller.run() @bci=20, line=692
(Compiled frame)
 - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)


Thread t...@44291: (state = BLOCKED)
 - java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=0, line=388
(Interpreted frame)
 - java.net.ServerSocket.implAccept(java.net.Socket) @bci=60, line=453
(Interpreted frame)
 - java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
 - com.webobjects.appserver._private.WOWorkerThread.run() @bci=26, line=210
(Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)


Thread t...@46083: (state = BLOCKED)
 - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
 - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14,
line=158 (Interpreted frame)
 -
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()
@bci=1, line=811 (Interpreted frame)
 -
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
int) @bci=48, line=842 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int)
@bci=17, line=1178 (Compiled frame)
 - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21,
line=186 (Compiled frame)
 - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262
(Compiled frame)
 - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4, line=420
(Compiled frame)
 - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41,
line=4666 (Compiled frame)
 -
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted
frame)
 -
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
@bci=3, line= (Interpreted frame)
 -
com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKey(com.webobjects.eocontrol.EOEditingContext,
java.lang.String, com.webobjects.foundation.NSDictionary) @bci=34, line=461
(Interpreted frame)
 -
com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKeyValue(com.webobjects.eocontrol.EOEditingContext,
java.lang.String, java.lang.Object) @bci=10, line=432 (Interpreted frame)
 - net.paperfree.lightbeam.DocumentEmailAction.deliverDocumentAction()
@bci=211, line=59 (Interpreted frame)


Thread t...@46595: (state = BLOCKED)
 - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
 - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14,
line=158 (Interpreted frame)
 -
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()
@bci=1, line=811 (Interpreted frame)
 -
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
int) @bci=48, line=842 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int)
@bci=17, line=1178 (Compiled frame)
 - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21,
line=186 (Compiled frame)
 - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262
(Compiled frame)
 - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4, line=420
(Compiled frame)
 - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41,
line=4666 (Compiled frame)
 -
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted
frame)
 -
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
@bci=3, line= (Interpreted
 frame)
 - net.paperfree.lightbeam.LBEntityHelper.getTimezones() @bci=20, line=135
(Interpreted frame)
 - net.paperfree.lightbeam.components.LoginPage.timeZones() @bci=4, line=120
(Interpreted frame)


Thread t...@48387: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be
imprecise)
 - org.quartz.simpl.SimpleThreadPool.runInThread(java.lang.Runnable)
@bci=58, line=384 (Compiled frame)
 - org.quartz.core.QuartzSchedulerThread.run() @bci=665, line=369 (Compiled
frame)


Thread t...@48643: (state = BLOCKED)
 -
net.paperfree.lightbeam.MessageDeliveryJob.execute(org.quartz.JobExecutionContext)
@bci=5, line=20 (Interpreted frame)
 - org.quartz.core.JobRunShell.run() @bci=201, line=203 (Interpreted frame)
 - 

Index problems

2010-12-08 Thread Calven Eggert
Recently a WO app has been getting the unique constraint error when creating a 
record.  This application has been running for years and so I'm surprised at 
this 'just' showing up.  here is the problem:  you'll see in the following 
lines that an index is retrieved for jobs_notes_seq twice because I'm inserting 
two records.  next you'll see the insert statements.  look at the notesid 
field.  

[2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
[2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
[2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
[2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
[2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
[2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
[2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
[2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
[2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
[2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
10:54:17(submitteddate), 5:gg(notesdescription), 6:922(notesid), 
7:Overview.graffle(attachmentname)
[2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
7:Overview.graffle(attachmentname)
[2010-12-8 10:54:33 EST] WorkerThread1  === Rollback Internal Transaction

see how one is 922 and another is 56?  922 is correct but the 56 should be 923. 
 very strange.  then when the records are committed, sometimes I get the 
dreaded error message:

com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
7:Overview.graffle(attachmentname)
Next exception:SQL State:23000 -- error code: 1 -- msg: ORA-1: unique 
constraint (COREDEV3.SYS_C0031657) violated

Obviously this is a problem because number 56 was already a record in the 
table.  Sometimes, there is no error message and the record is not even 
created.  And sometimes, when the index is correct the record is created 
successfully.  argh!

Anyone have this problem before or know what I can do to solve this mystery? 
(I've dropped the sequences and recreated them a couple of times.  but it 
doesn't solve the problem)

Thanks for your time.

Calven


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Need help with a (non) deadlock Issue

2010-12-08 Thread Mike Schrag
you can't spot the deadlock here ... it means a previous thread left the osc 
locked and went away. because there's no thread BEYOND that lock, it means the 
thread is gone now and you'll have to try and track down the one the had a 
problem. I would look for possibly exceptions that were thrown in the logs that 
might have not had a finally?

On Dec 8, 2010, at 11:27 AM, Greg Lappen wrote:

 Hi everyone, was wondering if anyone was up for a game of spot the deadlock 
 today.  I have a thread dump which I have removed duplicates from and cleaned 
 up a bit.  It seems that a lot of threads are BLOCKED waiting on the 
 EOObjectStoreCoordinator.lock() call
 
 Deadlock Detection:
 
 No deadlocks found.
 
 Thread t...@44035: (state = BLOCKED)
  - java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may be 
 imprecise)
  - sun.security.pkcs11.SunPKCS11$TokenPoller.run() @bci=20, line=692 
 (Compiled frame)
  - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)
 
 
 Thread t...@44291: (state = BLOCKED)
  - java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=0, line=388 
 (Interpreted frame)
  - java.net.ServerSocket.implAccept(java.net.Socket) @bci=60, line=453 
 (Interpreted frame)
  - java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
  - com.webobjects.appserver._private.WOWorkerThread.run() @bci=26, line=210 
 (Interpreted frame)
  - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)
 
 
 Thread t...@46083: (state = BLOCKED)
  - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
  - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, 
 line=158 (Interpreted frame)
  - 
 java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() 
 @bci=1, line=811 (Interpreted frame)
  - 
 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
  int) @bci=48, line=842 (Interpreted frame)
  - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int) 
 @bci=17, line=1178 (Compiled frame)
  - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21, 
 line=186 (Compiled frame)
  - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262 (Compiled 
 frame)
  - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4, line=420 
 (Compiled frame)
  - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41, 
 line=4666 (Compiled frame)
  - 
 com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
  com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted 
 frame)
  - 
 com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
  @bci=3, line= (Interpreted frame)
  - 
 com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKey(com.webobjects.eocontrol.EOEditingContext,
  java.lang.String, com.webobjects.foundation.NSDictionary) @bci=34, line=461 
 (Interpreted frame)
  - 
 com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKeyValue(com.webobjects.eocontrol.EOEditingContext,
  java.lang.String, java.lang.Object) @bci=10, line=432 (Interpreted frame)
  - net.paperfree.lightbeam.DocumentEmailAction.deliverDocumentAction() 
 @bci=211, line=59 (Interpreted frame)
 
 
 Thread t...@46595: (state = BLOCKED)
  - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
  - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, 
 line=158 (Interpreted frame)
  - 
 java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() 
 @bci=1, line=811 (Interpreted frame)
  - 
 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
  int) @bci=48, line=842 (Interpreted frame)
  - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int) 
 @bci=17, line=1178 (Compiled frame)
  - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21, 
 line=186 (Compiled frame)
  - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262 (Compiled 
 frame)
  - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4, line=420 
 (Compiled frame)
  - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41, 
 line=4666 (Compiled frame)
  - 
 com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
  com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted 
 frame)
  - 
 com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
  @bci=3, line= (Interpreted
  frame)
  - net.paperfree.lightbeam.LBEntityHelper.getTimezones() @bci=20, line=135 
 (Interpreted frame)
  - net.paperfree.lightbeam.components.LoginPage.timeZones() @bci=4, line=120 
 (Interpreted frame)
 
 
 Thread t...@48387: (state = BLOCKED)
  - 

WOBrowser selections missing

2010-12-08 Thread Perry, Steven
Having some WOBrowser weirdness, after upgrading from OS X 10.5 to 10.6 (Snow 
Leopard) and from WebObjects 5.3.x to 5.4.1.  This issue did not happen prior 
to the upgrade.  Problem is, the selected items from our WOBrowser are not 
being passed correctly to our Java code.

So I tried running this in Eclipse debug.  My WOBrowser has about 450 items in 
it.

* If I selected the first item in the list, selectedClientList contains 
the one item.  Cool.

* But if I selected any other item besides the first, 
selectedClientList is empty.

* And if I multi-select 3 or 4 items, sometimes selectedClientList is 
empty, and other times it will have just the first item I selected.

Any thoughts on what could be causing this?
Here's our WOBrowser.  selectedClientList is defined as public NSArray in the 
accompanying java class.

Browser3: WOBrowser {
displayString = currentClient.displayName;
item = currentClient;
list = clientList;
multiple = true;
selections = selectedClientList;
style = width:270px;
value = currentClient.displayName;
}

Thanks!
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Need help with a (non) deadlock Issue

2010-12-08 Thread Dov Rosenberg
My guess is that you passed some EOs into your quartz scheduler that is running 
in a separate thread. That is a good way to shoot yourself in the foot. Just 
pass in identifiers to your thread and refetch them in the scope of the thread 
and clean up after your self inside the thread.

Dov Rosenberg


On 12/8/10 11:27 AM, Greg Lappen g...@lapcominc.com wrote:

Hi everyone, was wondering if anyone was up for a game of spot the deadlock 
today.  I have a thread dump which I have removed duplicates from and cleaned 
up a bit.  It seems that a lot of threads are BLOCKED waiting on the 
EOObjectStoreCoordinator.lock() call

Deadlock Detection:

No deadlocks found.

Thread t...@44035: (state = BLOCKED)
 - java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may be 
imprecise)
 - sun.security.pkcs11.SunPKCS11$TokenPoller.run() @bci=20, line=692 (Compiled 
frame)
 - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)


Thread t...@44291: (state = BLOCKED)
 - java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=0, line=388 
(Interpreted frame)
 - java.net.ServerSocket.implAccept(java.net.Socket) @bci=60, line=453 
(Interpreted frame)
 - java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
 - com.webobjects.appserver._private.WOWorkerThread.run() @bci=26, line=210 
(Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)


Thread t...@46083: (state = BLOCKED)
 - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
 - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, 
line=158 (Interpreted frame)
 - 
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() 
@bci=1, line=811 (Interpreted frame)
 - 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
 int) @bci=48, line=842 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int) @bci=17, 
line=1178 (Compiled frame)
 - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21, 
line=186 (Compiled frame)
 - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262 (Compiled 
frame)
 - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4, line=420 
(Compiled frame)
 - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41, 
line=4666 (Compiled frame)
 - 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
 com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted 
frame)
 - 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
 @bci=3, line= (Interpreted frame)
 - 
com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKey(com.webobjects.eocontrol.EOEditingContext,
 java.lang.String, com.webobjects.foundation.NSDictionary) @bci=34, line=461 
(Interpreted frame)
 - 
com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKeyValue(com.webobjects.eocontrol.EOEditingContext,
 java.lang.String, java.lang.Object) @bci=10, line=432 (Interpreted frame)
 - net.paperfree.lightbeam.DocumentEmailAction.deliverDocumentAction() 
@bci=211, line=59 (Interpreted frame)


Thread t...@46595: (state = BLOCKED)
 - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
 - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, 
line=158 (Interpreted frame)
 - 
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() 
@bci=1, line=811 (Interpreted frame)
 - 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
 int) @bci=48, line=842 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int) @bci=17, 
line=1178 (Compiled frame)
 - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21, 
line=186 (Compiled frame)
 - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262 (Compiled 
frame)
 - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4, line=420 
(Compiled frame)
 - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41, 
line=4666 (Compiled frame)
 - 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
 com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted 
frame)
 - 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
 @bci=3, line= (Interpreted
 frame)
 - net.paperfree.lightbeam.LBEntityHelper.getTimezones() @bci=20, line=135 
(Interpreted frame)
 - net.paperfree.lightbeam.components.LoginPage.timeZones() @bci=4, line=120 
(Interpreted frame)


Thread t...@48387: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be 
imprecise)
 - 

RE: WOBrowser selections missing

2010-12-08 Thread Perry, Steven
Meant to mention - getting _slowTakeValuesFromRequest() Value not in list 
messages on the console when debugging.
Was not able to locate any info about that message.

From: webobjects-dev-bounces+steven.perry=c-e@lists.apple.com 
[mailto:webobjects-dev-bounces+steven.perry=c-e@lists.apple.com] On Behalf 
Of Perry, Steven
Sent: Wednesday, December 08, 2010 11:38 AM
To: webobjects-dev@lists.apple.com
Subject: WOBrowser selections missing

Having some WOBrowser weirdness, after upgrading from OS X 10.5 to 10.6 (Snow 
Leopard) and from WebObjects 5.3.x to 5.4.1.  This issue did not happen prior 
to the upgrade.  Problem is, the selected items from our WOBrowser are not 
being passed correctly to our Java code.

So I tried running this in Eclipse debug.  My WOBrowser has about 450 items in 
it.

* If I selected the first item in the list, selectedClientList contains 
the one item.  Cool.

* But if I selected any other item besides the first, 
selectedClientList is empty.

* And if I multi-select 3 or 4 items, sometimes selectedClientList is 
empty, and other times it will have just the first item I selected.

Any thoughts on what could be causing this?
Here's our WOBrowser.  selectedClientList is defined as public NSArray in the 
accompanying java class.

Browser3: WOBrowser {
displayString = currentClient.displayName;
item = currentClient;
list = clientList;
multiple = true;
selections = selectedClientList;
style = width:270px;
value = currentClient.displayName;
}

Thanks!
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Index problems

2010-12-08 Thread Chuck Hill

On Dec 8, 2010, at 8:28 AM, Calven Eggert wrote:

 Recently a WO app has been getting the unique constraint error when creating 
 a record.  This application has been running for years and so I'm surprised 
 at this 'just' showing up.  here is the problem:  you'll see in the following 
 lines that an index is retrieved for jobs_notes_seq twice because I'm 
 inserting two records.  next you'll see the insert statements.  look at the 
 notesid field.  
 
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:17(submitteddate), 5:gg(notesdescription), 6:922(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:33 EST] WorkerThread1  === Rollback Internal Transaction
 
 see how one is 922 and another is 56?  922 is correct but the 56 should be 
 923.

I don't think that is the problem.  I think the problem is that the second was 
supposed to be an UPDATE or DELETE statement.  This happens when you violate 
EOF commandments (not locking properly for example).  EOF gets confused between 
one operation and another.

Go forth and sin no more!

Chuck


  very strange.  then when the records are committed, sometimes I get the 
 dreaded error message:
 
 com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
 Next exception:SQL State:23000 -- error code: 1 -- msg: ORA-1: unique 
 constraint (COREDEV3.SYS_C0031657) violated
 
 Obviously this is a problem because number 56 was already a record in the 
 table.  Sometimes, there is no error message and the record is not even 
 created.  And sometimes, when the index is correct the record is created 
 successfully.  argh!
 
 Anyone have this problem before or know what I can do to solve this mystery? 
 (I've dropped the sequences and recreated them a couple of times.  but it 
 doesn't solve the problem)
 
 Thanks for your time.
 
 Calven
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects









smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:

Re: Index problems

2010-12-08 Thread Calven Eggert
the second record is valid.  I am indeed wanting to insert two records.  so why 
would the retrieving of the next sequence number return me a number not in 
sequence?


On 2010-12-08, at 12:24 PM, Chuck Hill wrote:

 
 On Dec 8, 2010, at 8:28 AM, Calven Eggert wrote:
 
 Recently a WO app has been getting the unique constraint error when creating 
 a record.  This application has been running for years and so I'm surprised 
 at this 'just' showing up.  here is the problem:  you'll see in the 
 following lines that an index is retrieved for jobs_notes_seq twice because 
 I'm inserting two records.  next you'll see the insert statements.  look at 
 the notesid field.  
 
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:17(submitteddate), 5:gg(notesdescription), 6:922(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:33 EST] WorkerThread1  === Rollback Internal Transaction
 
 see how one is 922 and another is 56?  922 is correct but the 56 should be 
 923.
 
 I don't think that is the problem.  I think the problem is that the second 
 was supposed to be an UPDATE or DELETE statement.  This happens when you 
 violate EOF commandments (not locking properly for example).  EOF gets 
 confused between one operation and another.
 
 Go forth and sin no more!
 
 Chuck
 
 
 very strange.  then when the records are committed, sometimes I get the 
 dreaded error message:
 
 com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression 
 failed: com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT 
 INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
Next exception:SQL State:23000 -- error code: 1 -- msg: ORA-1: unique 
 constraint (COREDEV3.SYS_C0031657) violated
 
 Obviously this is a problem because number 56 was already a record in the 
 table.  Sometimes, there is no error message and the record is not even 
 created.  And sometimes, when the index is correct the record is created 
 successfully.  argh!
 
 Anyone have this problem before or know what I can do to solve this mystery? 
 (I've dropped the sequences and recreated them a couple of times.  but it 
 doesn't solve the problem)
 
 Thanks for your time.
 
 Calven
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 


 ___
Do not post admin requests to the list. They will be 

Re: Index problems

2010-12-08 Thread Chuck Hill
On Dec 8, 2010, at 10:20 AM, Calven Eggert wrote:

 the second record is valid.  I am indeed wanting to insert two records.  so 
 why would the retrieving of the next sequence number return me a number not 
 in sequence?

It is not.  I am pretty sure that it is doing what I said.  There is another 
(later) insert that you don't see due to the DB error.


Chuck



 On 2010-12-08, at 12:24 PM, Chuck Hill wrote:
 
 
 On Dec 8, 2010, at 8:28 AM, Calven Eggert wrote:
 
 Recently a WO app has been getting the unique constraint error when 
 creating a record.  This application has been running for years and so I'm 
 surprised at this 'just' showing up.  here is the problem:  you'll see in 
 the following lines that an index is retrieved for jobs_notes_seq twice 
 because I'm inserting two records.  next you'll see the insert statements.  
 look at the notesid field.  
 
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:17(submitteddate), 5:gg(notesdescription), 6:922(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:33 EST] WorkerThread1  === Rollback Internal Transaction
 
 see how one is 922 and another is 56?  922 is correct but the 56 should be 
 923.
 
 I don't think that is the problem.  I think the problem is that the second 
 was supposed to be an UPDATE or DELETE statement.  This happens when you 
 violate EOF commandments (not locking properly for example).  EOF gets 
 confused between one operation and another.
 
 Go forth and sin no more!
 
 Chuck
 
 
 very strange.  then when the records are committed, sometimes I get the 
 dreaded error message:
 
 com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression 
 failed: com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT 
 INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
   Next exception:SQL State:23000 -- error code: 1 -- msg: ORA-1: unique 
 constraint (COREDEV3.SYS_C0031657) violated
 
 Obviously this is a problem because number 56 was already a record in the 
 table.  Sometimes, there is no error message and the record is not even 
 created.  And sometimes, when the index is correct the record is created 
 successfully.  argh!
 
 Anyone have this problem before or know what I can do to solve this 
 mystery? (I've dropped the sequences and recreated them a couple of times.  
 but it doesn't solve the problem)
 
 Thanks for your time.
 
 Calven
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific 

Re: datepicker on AMD problem

2010-12-08 Thread Chuck Hill

On Dec 8, 2010, at 6:48 AM, Theodore Petrosky wrote:

 
 I am back to trying to figure out a solution to this datepicker problem.
 
 http://173.54.121.129/cgi-bin/WebObjects/DatePicker

It is almost certainly an offset calculation problem in the calendar.js.


 is an example of the problem. I may try next to use D2W content on the AMD to 
 see if the issue exists there also.


It will be there too.


-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects









smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Index problems

2010-12-08 Thread Calven Eggert
I still don't follow what you are saying.  actually, I want to insert two 
records at a time.  I have a page that allows the user to insert records, but I 
don't actually do the insert until the user clicks on the save button.  that's 
when I do the saving/inserting into the database.  but then the sequence 
numbers are incorrect for the second one.

what is the other insert you are talking about?

Still confused on what you are suggesting I do...


On 2010-12-08, at 1:24 PM, Chuck Hill wrote:

 On Dec 8, 2010, at 10:20 AM, Calven Eggert wrote:
 
 the second record is valid.  I am indeed wanting to insert two records.  so 
 why would the retrieving of the next sequence number return me a number not 
 in sequence?
 
 It is not.  I am pretty sure that it is doing what I said.  There is another 
 (later) insert that you don't see due to the DB error.
 
 
 Chuck
 
 
 
 On 2010-12-08, at 12:24 PM, Chuck Hill wrote:
 
 
 On Dec 8, 2010, at 8:28 AM, Calven Eggert wrote:
 
 Recently a WO app has been getting the unique constraint error when 
 creating a record.  This application has been running for years and so I'm 
 surprised at this 'just' showing up.  here is the problem:  you'll see in 
 the following lines that an index is retrieved for jobs_notes_seq twice 
 because I'm inserting two records.  next you'll see the insert statements. 
  look at the notesid field.  
 
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:17(submitteddate), 5:gg(notesdescription), 6:922(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:33 EST] WorkerThread1  === Rollback Internal Transaction
 
 see how one is 922 and another is 56?  922 is correct but the 56 should be 
 923.
 
 I don't think that is the problem.  I think the problem is that the second 
 was supposed to be an UPDATE or DELETE statement.  This happens when you 
 violate EOF commandments (not locking properly for example).  EOF gets 
 confused between one operation and another.
 
 Go forth and sin no more!
 
 Chuck
 
 
 very strange.  then when the records are committed, sometimes I get the 
 dreaded error message:
 
 com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression 
 failed: com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT 
 INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
  Next exception:SQL State:23000 -- error code: 1 -- msg: ORA-1: unique 
 constraint (COREDEV3.SYS_C0031657) violated
 
 Obviously this is a problem because number 56 was already a record in the 
 table.  Sometimes, there is no error message and the record is not even 
 created.  And sometimes, when the index is correct the record is created 
 successfully.  argh!
 
 Anyone have this problem before or know what I can do to solve this 
 mystery? (I've dropped the sequences and recreated them a couple of times. 
  but it doesn't solve the problem)
 
 Thanks for your time.
 
 Calven
 
 
 

Re: Index problems

2010-12-08 Thread Chuck Hill

On Dec 8, 2010, at 10:41 AM, Calven Eggert wrote:

 I still don't follow what you are saying.  actually, I want to insert two 
 records at a time.  I have a page that allows the user to insert records, but 
 I don't actually do the insert until the user clicks on the save button.

As in ec.insertObject()?  That is violating EOF commandments for sure.


  that's when I do the saving/inserting into the database.  but then the 
 sequence numbers are incorrect for the second one.
 
 what is the other insert you are talking about?
 
 Still confused on what you are suggesting I do...

What I am suggesting is that you DON'T violate EOF commandments.  You are doing 
something that is corrupting the internal EOF state.  Don't do that and it will 
work.


Chuck



 
 
 On 2010-12-08, at 1:24 PM, Chuck Hill wrote:
 
 On Dec 8, 2010, at 10:20 AM, Calven Eggert wrote:
 
 the second record is valid.  I am indeed wanting to insert two records.  so 
 why would the retrieving of the next sequence number return me a number not 
 in sequence?
 
 It is not.  I am pretty sure that it is doing what I said.  There is another 
 (later) insert that you don't see due to the DB error.
 
 
 Chuck
 
 
 
 On 2010-12-08, at 12:24 PM, Chuck Hill wrote:
 
 
 On Dec 8, 2010, at 8:28 AM, Calven Eggert wrote:
 
 Recently a WO app has been getting the unique constraint error when 
 creating a record.  This application has been running for years and so 
 I'm surprised at this 'just' showing up.  here is the problem:  you'll 
 see in the following lines that an index is retrieved for jobs_notes_seq 
 twice because I'm inserting two records.  next you'll see the insert 
 statements.  look at the notesid field.  
 
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:17(submitteddate), 5:gg(notesdescription), 6:922(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:33 EST] WorkerThread1  === Rollback Internal 
 Transaction
 
 see how one is 922 and another is 56?  922 is correct but the 56 should 
 be 923.
 
 I don't think that is the problem.  I think the problem is that the second 
 was supposed to be an UPDATE or DELETE statement.  This happens when you 
 violate EOF commandments (not locking properly for example).  EOF gets 
 confused between one operation and another.
 
 Go forth and sin no more!
 
 Chuck
 
 
 very strange.  then when the records are committed, sometimes I get the 
 dreaded error message:
 
 com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression 
 failed: com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: 
 INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, 
 NOTES_USER_VISIBLE, NOTES_JOB_ID, NOTES_SUBMITTED_DATE, 
 NOTES_DESCRIPTION, NOTES_ID, NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, 
 ?, ?, ?, ?, ?) withBindings: 1:204(submittedby), 2:N(uservisible), 
 3:292(jobid), 4:2010-12-08 10:54:23(submitteddate), 
 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
 Next exception:SQL State:23000 -- error code: 1 -- msg: ORA-1: unique 
 constraint (COREDEV3.SYS_C0031657) violated
 
 Obviously this is a problem because number 56 was already a record in the 
 table.  Sometimes, there is no error message and the record is not even 
 created.  And sometimes, when the index is 

Re: Index problems

2010-12-08 Thread David Avendasora
Hi Calven,

What Chuck is saying is that while you are _expecting_ two inserts, that second 
insert is _not_ the one you think it is. EOF hasn't yet gotten around to that 
insert yet and because it is failing on the one with a PK of 56, you don't see 
it.

As far as the insert with the PK of 56, he's saying that that insert really is 
probably supposed to be an update or a delete, but because EOF is in a confused 
state, you are getting a completely bogus SQL command that just happens to be 
an insert.

Chucks point is that when this type of thing happens, it's because you are 
violating one or more EOF commandments (see: 
http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-The+EOF+Commandments)
 somewhere in your code.

Dave


On Dec 8, 2010, at 1:41 PM, Calven Eggert wrote:

 I still don't follow what you are saying.  actually, I want to insert two 
 records at a time.  I have a page that allows the user to insert records, but 
 I don't actually do the insert until the user clicks on the save button.  
 that's when I do the saving/inserting into the database.  but then the 
 sequence numbers are incorrect for the second one.
 
 what is the other insert you are talking about?
 
 Still confused on what you are suggesting I do...
 
 
 On 2010-12-08, at 1:24 PM, Chuck Hill wrote:
 
 On Dec 8, 2010, at 10:20 AM, Calven Eggert wrote:
 
 the second record is valid.  I am indeed wanting to insert two records.  so 
 why would the retrieving of the next sequence number return me a number not 
 in sequence?
 
 It is not.  I am pretty sure that it is doing what I said.  There is another 
 (later) insert that you don't see due to the DB error.
 
 
 Chuck
 
 
 
 On 2010-12-08, at 12:24 PM, Chuck Hill wrote:
 
 
 On Dec 8, 2010, at 8:28 AM, Calven Eggert wrote:
 
 Recently a WO app has been getting the unique constraint error when 
 creating a record.  This application has been running for years and so 
 I'm surprised at this 'just' showing up.  here is the problem:  you'll 
 see in the following lines that an index is retrieved for jobs_notes_seq 
 twice because I'm inserting two records.  next you'll see the insert 
 statements.  look at the notesid field.  
 
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:17(submitteddate), 5:gg(notesdescription), 6:922(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:33 EST] WorkerThread1  === Rollback Internal 
 Transaction
 
 see how one is 922 and another is 56?  922 is correct but the 56 should 
 be 923.
 
 I don't think that is the problem.  I think the problem is that the second 
 was supposed to be an UPDATE or DELETE statement.  This happens when you 
 violate EOF commandments (not locking properly for example).  EOF gets 
 confused between one operation and another.
 
 Go forth and sin no more!
 
 Chuck
 
 
 very strange.  then when the records are committed, sometimes I get the 
 dreaded error message:
 
 com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression 
 failed: com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: 
 INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, 
 NOTES_USER_VISIBLE, NOTES_JOB_ID, NOTES_SUBMITTED_DATE, 
 NOTES_DESCRIPTION, NOTES_ID, NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, 
 ?, ?, ?, ?, ?) 

Re: Index problems

2010-12-08 Thread Calven Eggert

On 2010-12-08, at 1:44 PM, Chuck Hill wrote:

 
 On Dec 8, 2010, at 10:41 AM, Calven Eggert wrote:
 
 I still don't follow what you are saying.  actually, I want to insert two 
 records at a time.  I have a page that allows the user to insert records, 
 but I don't actually do the insert until the user clicks on the save button.
 
 As in ec.insertObject()?  That is violating EOF commandments for sure.
then how?  (I've read the commandments and I don't see your comment above in 
there)

Essentially this is what is done...
   EOClassDescription cd = 
EOClassDescription.classDescriptionForEntityName(entityName);
EOEnterpriseObject eo = 
(EOEnterpriseObject)cd.createInstanceWithEditingContext(ec, null);
ec.insertObject(eo);
eo.takeValueForKey(noteDescription, notesdescription);
...
ec.saveChanges();

 
 
 that's when I do the saving/inserting into the database.  but then the 
 sequence numbers are incorrect for the second one.
 
 what is the other insert you are talking about?
 
 Still confused on what you are suggesting I do...
 
 What I am suggesting is that you DON'T violate EOF commandments.  You are 
 doing something that is corrupting the internal EOF state.  Don't do that and 
 it will work.
 
 
 Chuck
 
 
 
 
 
 On 2010-12-08, at 1:24 PM, Chuck Hill wrote:
 
 On Dec 8, 2010, at 10:20 AM, Calven Eggert wrote:
 
 the second record is valid.  I am indeed wanting to insert two records.  
 so why would the retrieving of the next sequence number return me a number 
 not in sequence?
 
 It is not.  I am pretty sure that it is doing what I said.  There is 
 another (later) insert that you don't see due to the DB error.
 
 
 Chuck
 
 
 
 On 2010-12-08, at 12:24 PM, Chuck Hill wrote:
 
 
 On Dec 8, 2010, at 8:28 AM, Calven Eggert wrote:
 
 Recently a WO app has been getting the unique constraint error when 
 creating a record.  This application has been running for years and so 
 I'm surprised at this 'just' showing up.  here is the problem:  you'll 
 see in the following lines that an index is retrieved for jobs_notes_seq 
 twice because I'm inserting two records.  next you'll see the insert 
 statements.  look at the notesid field.  
 
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:17(submitteddate), 5:gg(notesdescription), 6:922(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:33 EST] WorkerThread1  === Rollback Internal 
 Transaction
 
 see how one is 922 and another is 56?  922 is correct but the 56 should 
 be 923.
 
 I don't think that is the problem.  I think the problem is that the 
 second was supposed to be an UPDATE or DELETE statement.  This happens 
 when you violate EOF commandments (not locking properly for example).  
 EOF gets confused between one operation and another.
 
 Go forth and sin no more!
 
 Chuck
 
 
 very strange.  then when the records are committed, sometimes I get the 
 dreaded error message:
 
 com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression 
 failed: com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: 
 INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, 
 NOTES_USER_VISIBLE, NOTES_JOB_ID, NOTES_SUBMITTED_DATE, 
 NOTES_DESCRIPTION, NOTES_ID, NOTES_ATTACHMENT_NAME) VALUES (?, 

Re: Index problems

2010-12-08 Thread Chuck Hill

On Dec 8, 2010, at 10:57 AM, David Avendasora wrote:

 Hi Calven,
 
 What Chuck is saying is that while you are _expecting_ two inserts, that 
 second insert is _not_ the one you think it is.

These inserts are not the ones you are looking for.
:-P


 EOF hasn't yet gotten around to that insert yet and because it is failing on 
 the one with a PK of 56, you don't see it.
 
 As far as the insert with the PK of 56, he's saying that that insert really 
 is probably supposed to be an update or a delete, but because EOF is in a 
 confused state, you are getting a completely bogus SQL command that just 
 happens to be an insert.
 
 Chucks point is that when this type of thing happens, it's because you are 
 violating one or more EOF commandments (see: 
 http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-The+EOF+Commandments)
  somewhere in your code.
 
 Dave
 
 
 On Dec 8, 2010, at 1:41 PM, Calven Eggert wrote:
 
 I still don't follow what you are saying.  actually, I want to insert two 
 records at a time.  I have a page that allows the user to insert records, 
 but I don't actually do the insert until the user clicks on the save button. 
  that's when I do the saving/inserting into the database.  but then the 
 sequence numbers are incorrect for the second one.
 
 what is the other insert you are talking about?
 
 Still confused on what you are suggesting I do...
 
 
 On 2010-12-08, at 1:24 PM, Chuck Hill wrote:
 
 On Dec 8, 2010, at 10:20 AM, Calven Eggert wrote:
 
 the second record is valid.  I am indeed wanting to insert two records.  
 so why would the retrieving of the next sequence number return me a number 
 not in sequence?
 
 It is not.  I am pretty sure that it is doing what I said.  There is 
 another (later) insert that you don't see due to the DB error.
 
 
 Chuck
 
 
 
 On 2010-12-08, at 12:24 PM, Chuck Hill wrote:
 
 
 On Dec 8, 2010, at 8:28 AM, Calven Eggert wrote:
 
 Recently a WO app has been getting the unique constraint error when 
 creating a record.  This application has been running for years and so 
 I'm surprised at this 'just' showing up.  here is the problem:  you'll 
 see in the following lines that an index is retrieved for jobs_notes_seq 
 twice because I'm inserting two records.  next you'll see the insert 
 statements.  look at the notesid field.  
 
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:17(submitteddate), 5:gg(notesdescription), 6:922(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) withBindings: 
 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 4:2010-12-08 
 10:54:23(submitteddate), 5:hh(notesdescription), 6:56(notesid), 
 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:33 EST] WorkerThread1  === Rollback Internal 
 Transaction
 
 see how one is 922 and another is 56?  922 is correct but the 56 should 
 be 923.
 
 I don't think that is the problem.  I think the problem is that the 
 second was supposed to be an UPDATE or DELETE statement.  This happens 
 when you violate EOF commandments (not locking properly for example).  
 EOF gets confused between one operation and another.
 
 Go forth and sin no more!
 
 Chuck
 
 
 very strange.  then when the records are committed, sometimes I get the 
 dreaded error message:
 
 com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression 
 failed: com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: 
 INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, 
 NOTES_USER_VISIBLE, 

Re: Index problems

2010-12-08 Thread Chuck Hill
On Dec 8, 2010, at 11:10 AM, Calven Eggert wrote:
 On 2010-12-08, at 1:44 PM, Chuck Hill wrote:
 On Dec 8, 2010, at 10:41 AM, Calven Eggert wrote:
 
 I still don't follow what you are saying.  actually, I want to insert two 
 records at a time.  I have a page that allows the user to insert records, 
 but I don't actually do the insert until the user clicks on the save button.
 
 As in ec.insertObject()?  That is violating EOF commandments for sure.
 then how?  (I've read the commandments and I don't see your comment above in 
 there)
 
 Essentially this is what is done...
EOClassDescription cd = 
 EOClassDescription.classDescriptionForEntityName(entityName);
 EOEnterpriseObject eo = 
 (EOEnterpriseObject)cd.createInstanceWithEditingContext(ec, null);

Save some typing:
MyClass myClass = (MyClass)EOUtilities.createAndInsertInstance(ec, entityName);

Wonder templates make it even easier.

 ec.insertObject(eo);
 eo.takeValueForKey(noteDescription, notesdescription);

That is OK, provided that noteDescription is a local ivar and not on an EO.  
Touching an attribute of an EO that has not been inserted (which is what I 
thought you were describing) is a Bad Thing (tm) to do.


   ...
   ec.saveChanges();

If that is exactly what you are doing, then ec is already trashed by the time 
you get here or is not locked.  I would suspect the former.  Tracking this 
problem down to the code causing it can be very hard as the cause maybe far 
away in code and appear totally innocent.


Chuck


 that's when I do the saving/inserting into the database.  but then the 
 sequence numbers are incorrect for the second one.
 
 what is the other insert you are talking about?
 
 Still confused on what you are suggesting I do...
 
 What I am suggesting is that you DON'T violate EOF commandments.  You are 
 doing something that is corrupting the internal EOF state.  Don't do that 
 and it will work.
 
 
 Chuck
 
 
 
 
 
 On 2010-12-08, at 1:24 PM, Chuck Hill wrote:
 
 On Dec 8, 2010, at 10:20 AM, Calven Eggert wrote:
 
 the second record is valid.  I am indeed wanting to insert two records.  
 so why would the retrieving of the next sequence number return me a 
 number not in sequence?
 
 It is not.  I am pretty sure that it is doing what I said.  There is 
 another (later) insert that you don't see due to the DB error.
 
 
 Chuck
 
 
 
 On 2010-12-08, at 12:24 PM, Chuck Hill wrote:
 
 
 On Dec 8, 2010, at 8:28 AM, Calven Eggert wrote:
 
 Recently a WO app has been getting the unique constraint error when 
 creating a record.  This application has been running for years and so 
 I'm surprised at this 'just' showing up.  here is the problem:  you'll 
 see in the following lines that an index is retrieved for 
 jobs_notes_seq twice because I'm inserting two records.  next you'll 
 see the insert statements.  look at the notesid field.  
 
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal 
 Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT 
 JOBS_NOTES_SEQ.NEXTVAL FROM DUAL withBindings: 
 [2010-12-8 10:54:32 EST] WorkerThread1 1 row(s) processed
 [2010-12-8 10:54:32 EST] WorkerThread1  === Commit Internal 
 Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  === Begin Internal Transaction
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) 
 withBindings: 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 
 4:2010-12-08 10:54:17(submitteddate), 5:gg(notesdescription), 
 6:922(notesid), 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:32 EST] WorkerThread1  evaluateExpression: 
 com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: INSERT INTO 
 JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
 NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
 NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?) 
 withBindings: 1:204(submittedby), 2:N(uservisible), 3:292(jobid), 
 4:2010-12-08 10:54:23(submitteddate), 5:hh(notesdescription), 
 6:56(notesid), 7:Overview.graffle(attachmentname)
 [2010-12-8 10:54:33 EST] WorkerThread1  === Rollback Internal 
 Transaction
 
 see how one is 922 and another is 56?  922 is correct but the 56 should 
 be 923.
 
 I don't think that is the problem.  I think 

Re: Need help with a (non) deadlock Issue

2010-12-08 Thread Greg Lappen
Thanks for taking the time to look

I don't have any code that is directly calling methods on the osc - does
locking editing contexts cause the underlying osc to get locked?  Just
wondering what kind of cleanup code is in the hypothetical missing finally
block that I need to find.

Thanks again!

On Wed, Dec 8, 2010 at 11:36 AM, Mike Schrag msch...@pobox.com wrote:

 you can't spot the deadlock here ... it means a previous thread left the
 osc locked and went away. because there's no thread BEYOND that lock, it
 means the thread is gone now and you'll have to try and track down the one
 the had a problem. I would look for possibly exceptions that were thrown in
 the logs that might have not had a finally?

 On Dec 8, 2010, at 11:27 AM, Greg Lappen wrote:

  Hi everyone, was wondering if anyone was up for a game of spot the
 deadlock today.  I have a thread dump which I have removed duplicates from
 and cleaned up a bit.  It seems that a lot of threads are BLOCKED waiting on
 the EOObjectStoreCoordinator.lock() call
 
  Deadlock Detection:
 
  No deadlocks found.
 
  Thread t...@44035: (state = BLOCKED)
   - java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may
 be imprecise)
   - sun.security.pkcs11.SunPKCS11$TokenPoller.run() @bci=20, line=692
 (Compiled frame)
   - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)
 
 
  Thread t...@44291: (state = BLOCKED)
   - java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=0, line=388
 (Interpreted frame)
   - java.net.ServerSocket.implAccept(java.net.Socket) @bci=60, line=453
 (Interpreted frame)
   - java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
   - com.webobjects.appserver._private.WOWorkerThread.run() @bci=26,
 line=210 (Interpreted frame)
   - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)
 
 
  Thread t...@46083: (state = BLOCKED)
   - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
   - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14,
 line=158 (Interpreted frame)
   -
 java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()
 @bci=1, line=811 (Interpreted frame)
   -
 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
 int) @bci=48, line=842 (Interpreted frame)
   - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int)
 @bci=17, line=1178 (Compiled frame)
   - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21,
 line=186 (Compiled frame)
   - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262
 (Compiled frame)
   - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4,
 line=420 (Compiled frame)
   - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41,
 line=4666 (Compiled frame)
   -
 com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
 com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted
 frame)
   -
 com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
 @bci=3, line= (Interpreted frame)
   -
 com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKey(com.webobjects.eocontrol.EOEditingContext,
 java.lang.String, com.webobjects.foundation.NSDictionary) @bci=34, line=461
 (Interpreted frame)
   -
 com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKeyValue(com.webobjects.eocontrol.EOEditingContext,
 java.lang.String, java.lang.Object) @bci=10, line=432 (Interpreted frame)
   - net.paperfree.lightbeam.DocumentEmailAction.deliverDocumentAction()
 @bci=211, line=59 (Interpreted frame)
 
 
  Thread t...@46595: (state = BLOCKED)
   - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
   - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14,
 line=158 (Interpreted frame)
   -
 java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()
 @bci=1, line=811 (Interpreted frame)
   -
 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
 int) @bci=48, line=842 (Interpreted frame)
   - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int)
 @bci=17, line=1178 (Compiled frame)
   - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21,
 line=186 (Compiled frame)
   - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262
 (Compiled frame)
   - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4,
 line=420 (Compiled frame)
   - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41,
 line=4666 (Compiled frame)
   -
 com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
 com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted
 frame)
   -
 

Re: Need help with a (non) deadlock Issue

2010-12-08 Thread Greg Lappen
Hi Dov,

Thanks for the input.  I did find one quartz job that I'm passing EOs into.
 But inside the quartz job I create a new editing contenxt use
editingContext.faultForGlobalID to bring those objects into the local
editing context, and then I dispose that editingContext in a finally block.
 Is disposing editingContexts what you mean by cleaning up after myself, or
is there more to it?


On Wed, Dec 8, 2010 at 11:45 AM, Dov Rosenberg drosenb...@inquira.comwrote:

 My guess is that you passed some EOs into your quartz scheduler that is
 running in a separate thread. That is a good way to shoot yourself in the
 foot. Just pass in identifiers to your thread and refetch them in the scope
 of the thread and clean up after your self inside the thread.

 Dov Rosenberg


 On 12/8/10 11:27 AM, Greg Lappen g...@lapcominc.com wrote:

 Hi everyone, was wondering if anyone was up for a game of spot the
 deadlock today.  I have a thread dump which I have removed duplicates from
 and cleaned up a bit.  It seems that a lot of threads are BLOCKED waiting on
 the EOObjectStoreCoordinator.lock() call

 Deadlock Detection:

 No deadlocks found.

 Thread t...@44035: (state = BLOCKED)
  - java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may be
 imprecise)
  - sun.security.pkcs11.SunPKCS11$TokenPoller.run() @bci=20, line=692
 (Compiled frame)
  - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)


 Thread t...@44291: (state = BLOCKED)
  - java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=0, line=388
 (Interpreted frame)
  - java.net.ServerSocket.implAccept(java.net.Socket) @bci=60, line=453
 (Interpreted frame)
  - java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
  - com.webobjects.appserver._private.WOWorkerThread.run() @bci=26, line=210
 (Interpreted frame)
  - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)


 Thread t...@46083: (state = BLOCKED)
  - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
  - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14,
 line=158 (Interpreted frame)
  -
 java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()
 @bci=1, line=811 (Interpreted frame)
  -
 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
 int) @bci=48, line=842 (Interpreted frame)
  - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int)
 @bci=17, line=1178 (Compiled frame)
  - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21,
 line=186 (Compiled frame)
  - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262
 (Compiled frame)
  - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4,
 line=420 (Compiled frame)
  - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41,
 line=4666 (Compiled frame)
  -
 com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
 com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted
 frame)
  -
 com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
 @bci=3, line= (Interpreted frame)
  -
 com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKey(com.webobjects.eocontrol.EOEditingContext,
 java.lang.String, com.webobjects.foundation.NSDictionary) @bci=34, line=461
 (Interpreted frame)
  -
 com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKeyValue(com.webobjects.eocontrol.EOEditingContext,
 java.lang.String, java.lang.Object) @bci=10, line=432 (Interpreted frame)
  - net.paperfree.lightbeam.DocumentEmailAction.deliverDocumentAction()
 @bci=211, line=59 (Interpreted frame)


 Thread t...@46595: (state = BLOCKED)
  - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
  - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14,
 line=158 (Interpreted frame)
  -
 java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()
 @bci=1, line=811 (Interpreted frame)
  -
 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
 int) @bci=48, line=842 (Interpreted frame)
  - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int)
 @bci=17, line=1178 (Compiled frame)
  - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21,
 line=186 (Compiled frame)
  - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262
 (Compiled frame)
  - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4,
 line=420 (Compiled frame)
  - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41,
 line=4666 (Compiled frame)
  -
 com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
 com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted
 frame)
  -
 

Re: Need help with a (non) deadlock Issue

2010-12-08 Thread Chuck Hill

On Dec 8, 2010, at 7:24 PM, Greg Lappen wrote:

 Thanks for taking the time to look
 
 I don't have any code that is directly calling methods on the osc - does 
 locking editing contexts cause the underlying osc to get locked?

No, not directly.  Fetching and saving cause OSC locks.  Those should be 
released automatically.  If you are using Wonder, it is possible that something 
you are using has a bug that is leaving a hanging lock.  Is there a more recent 
version you could update to?

Running out of memory can also sometimes cause this (and a lot of other 
unpredictable chaos).  Check the log for heap and OutOfMemory.

Otherwise, some code in your app or in some code you are using is locking the 
OSC and not unlocking it.


  Just wondering what kind of cleanup code is in the hypothetical missing 
 finally block that I need to find.

osc.unlock()


Chuck

 
 Thanks again!
 
 On Wed, Dec 8, 2010 at 11:36 AM, Mike Schrag msch...@pobox.com wrote:
 you can't spot the deadlock here ... it means a previous thread left the osc 
 locked and went away. because there's no thread BEYOND that lock, it means 
 the thread is gone now and you'll have to try and track down the one the had 
 a problem. I would look for possibly exceptions that were thrown in the logs 
 that might have not had a finally?
 
 On Dec 8, 2010, at 11:27 AM, Greg Lappen wrote:
 
  Hi everyone, was wondering if anyone was up for a game of spot the 
  deadlock today.  I have a thread dump which I have removed duplicates from 
  and cleaned up a bit.  It seems that a lot of threads are BLOCKED waiting 
  on the EOObjectStoreCoordinator.lock() call
 
  Deadlock Detection:
 
  No deadlocks found.
 
  Thread t...@44035: (state = BLOCKED)
   - java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may be 
  imprecise)
   - sun.security.pkcs11.SunPKCS11$TokenPoller.run() @bci=20, line=692 
  (Compiled frame)
   - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)
 
 
  Thread t...@44291: (state = BLOCKED)
   - java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=0, line=388 
  (Interpreted frame)
   - java.net.ServerSocket.implAccept(java.net.Socket) @bci=60, line=453 
  (Interpreted frame)
   - java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
   - com.webobjects.appserver._private.WOWorkerThread.run() @bci=26, line=210 
  (Interpreted frame)
   - java.lang.Thread.run() @bci=11, line=680 (Interpreted frame)
 
 
  Thread t...@46083: (state = BLOCKED)
   - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
   - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, 
  line=158 (Interpreted frame)
   - 
  java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()
   @bci=1, line=811 (Interpreted frame)
   - 
  java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
   int) @bci=48, line=842 (Interpreted frame)
   - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int) 
  @bci=17, line=1178 (Compiled frame)
   - java.util.concurrent.locks.ReentrantLock$NonfairSync.lock() @bci=21, 
  line=186 (Compiled frame)
   - java.util.concurrent.locks.ReentrantLock.lock() @bci=4, line=262 
  (Compiled frame)
   - com.webobjects.eocontrol.EOObjectStoreCoordinator.lock() @bci=4, 
  line=420 (Compiled frame)
   - com.webobjects.eocontrol.EOEditingContext.lockObjectStore() @bci=41, 
  line=4666 (Compiled frame)
   - 
  com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
   com.webobjects.eocontrol.EOEditingContext) @bci=70, line=4067 (Interpreted 
  frame)
   - 
  com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
   @bci=3, line= (Interpreted frame)
   - 
  com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKey(com.webobjects.eocontrol.EOEditingContext,
   java.lang.String, com.webobjects.foundation.NSDictionary) @bci=34, 
  line=461 (Interpreted frame)
   - 
  com.webobjects.eoaccess.EOUtilities.objectWithPrimaryKeyValue(com.webobjects.eocontrol.EOEditingContext,
   java.lang.String, java.lang.Object) @bci=10, line=432 (Interpreted frame)
   - net.paperfree.lightbeam.DocumentEmailAction.deliverDocumentAction() 
  @bci=211, line=59 (Interpreted frame)
 
 
  Thread t...@46595: (state = BLOCKED)
   - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
   - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, 
  line=158 (Interpreted frame)
   - 
  java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()
   @bci=1, line=811 (Interpreted frame)
   - 
  java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node,
   int) @bci=48, line=842 (Interpreted frame)
   - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int) 
  @bci=17,