globalIDForObject without a lock

2014-11-21 Thread Raghavender Bokka
Hi Team,

We are getting deadlocks in our production environment. The following is the 
warning message generated in the log files when we enabled the ERX logging. We 
are using Project Wonder ERXEC.newEditingContext() throughout the application 
and we do not have any explicit lock or unlock code in the application:

--
9201362 [WorkerThread93] WARN er.extensions.ERXEC.LockLogger  - called method 
globalIDForObject without a lock, ec=er.extensions.eof.ERXEC@1296d1d
--

Any help would be appreciated.

Thanks,
Raghu.

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

How to build ERRest response for NSDictionary?

2014-11-21 Thread Jürgen Simon
Hi,

I’m having some trouble implementing a simple function with ERRest. I have a 
method I wish to return a serialized NSDictionary from, not a serialized 
EOObject. Is that possible? The method could look something like this:

@GET
@Path(“/somepath/{id:Integer}/dailyReport)
public WOActionResults dailyReport(@PathParam(“id) Integer id)
{
NSDictionaryString,Object report = getDailyReport();

???
}

How would I go about building a response for this? Or do I need to implement 
another controller not inheriting from ERXRouteController for this?

Kind Regards,
Jürgen ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: How to build ERRest response for NSDictionary?

2014-11-21 Thread Ralf Schuchardt
Hi Jürgen,

there ist

   ERXRouteController.response(ERXRestFormat format, Object value, ERXKeyFilter 
filter)

that should do the trick.

Kind regards,
Ralf



Am 21.11.2014 um 13:12 schrieb Jürgen Simon si...@webtecc.com:

 Hi,
 
 I’m having some trouble implementing a simple function with ERRest. I have a 
 method I wish to return a serialized NSDictionary from, not a serialized 
 EOObject. Is that possible? The method could look something like this:
 
   @GET
   @Path(“/somepath/{id:Integer}/dailyReport)
   public WOActionResults dailyReport(@PathParam(“id) Integer id)
   {
   NSDictionaryString,Object report = getDailyReport();
   
   ???
   }
 
 How would I go about building a response for this? Or do I need to implement 
 another controller not inheriting from ERXRouteController for this?
 
 Kind Regards,
 Jürgen
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/rasc%40gmx.de
 
 This email sent to r...@gmx.de

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: WebObjects application instances hanging - Deadlocks occurring

2014-11-21 Thread Ralf Schuchardt
Hi Raghu,

as far as I can see, you have a log of lock/unlock operations with the 
EditingContext IDs and your original deadlock log with blocked thread names. 
But it is not easy to correlate those two logs, as the deadlock log is missing 
object IDs and the lock/unlock log has no thread names. I would expect there to 
be one more lock than unlock in the log, but it is tedious to find the right 
one.

There is the property er.extensions.ERXEC.markOpenLocks that may help, if you 
can get it to work. When the deadlock occurs the direct action 
ERXDirectAction/showOpenEditingContextLockTraces should show you a more 
complete picture of currently open locks and where the offending editing 
context was created.

Kind regards,
Ralf


Am 20.11.2014 um 15:23 schrieb Raghavender Bokka 
raghavender.bo...@prithvisolutions.com:

 Hi Team,
 
 The following are the exceptions generating in the log files when we enable 
 the ERX logging, and we do not have any code in the Session.sleep method. And 
 some of our WebObjects application instances are hanging when some user load 
 (around 1000 users) are testing, when we look into the java process thread 
 dump there are deadlocks occurring.
 
 ---
 ---
 Exception
 at er.extensions.eof.ERXEC.unlock(ERXEC.java:501)
 at 
 com.webobjects.eocontrol.EOEditingContext._sendOrEnqueueNotification(EOEditingContext.java:4721)
 at 
 com.webobjects.eocontrol.EOEditingContext._objectsChangedInStore(EOEditingContext.java:3562)
 at er.extensions.eof.ERXEC._objectsChangedInStore(ERXEC.java:1285)
... skipped 7 stack elements
 at 
 com.webobjects.eocontrol.EOObjectStoreCoordinator._objectsChangedInSubStore(EOObjectStoreCoordinator.java:693)
... skipped 16 stack elements
 at 
 com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:386)
 at 
 com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
 at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:981)
 at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:903)
 at 
 TestTakingMode$StudentTestSessionMode.testSubmitted(TestTakingMode.java:648)
 at ReviewTestResponsePage.submitTest(ReviewTestResponsePage.java:99)
... skipped 4 stack elements
 at 
 KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAccessor.java:60)
... skipped 46 stack elements
 at Application.dispatchRequest(Application.java:670)
 Nov 17 22:22:01 Solar[6009] DEBUG er.extensions.appserver.ERXSession  - Will 
 terminate, sessionId is FkDsWpsOxKy1TDaligNLDg
 Nov 17 22:22:01 Solar[6009] DEBUG er.extensions.appserver.ERXBrowserFactory  
 - _incrementReferenceCounterForKey() - count = 26, key = 
 IE.7.0.4.0.Windows.{cpu = Unknown CPU; geckoRevision = No Gecko; }
 Nov 17 22:22:01 Solar[6009] DEBUG er.extensions.eof.ERXEC  - After popping: 
 [er.extensions.eof.ERXEC@dd151f]
 Nov 17 22:22:01 Solar[6009] DEBUG er.extensions.ERXEC.LockLogger  - unlocked 
 er.extensions.eof.ERXEC@13cd5b5
 Exception
 at er.extensions.eof.ERXEC.unlock(ERXEC.java:501)
 at com.webobjects.appserver.WOSession._sleepInContext(WOSession.java:849)
 at 
 com.webobjects.appserver.WOApplication.saveSessionForContext(WOApplication.java:1883)
 at 
 er.extensions.appserver.ERXApplication.saveSessionForContext(ERXApplication.java:2075)
... skipped 6 stack elements
 at Application.dispatchRequest(Application.java:670)
 ... skipped 3 stack elements
 Nov 17 22:22:01 Solar[6009] DEBUG er.extensions.ERXEC.LockLogger  - locked 
 er.extensions.eof.ERXEC@13cd5b5
 Exception
 at er.extensions.eof.ERXEC.lock(ERXEC.java:483)
 at 
 com.webobjects.eocontrol.EOEditingContext._dispose(EOEditingContext.java:1116)
 at 
 com.webobjects.eocontrol.EOEditingContext.dispose(EOEditingContext.java:)
 at er.extensions.eof.ERXEC.dispose(ERXEC.java:610)
 at com.webobjects.appserver.WOSession._sleepInContext(WOSession.java:854)
 at 
 com.webobjects.appserver.WOApplication.saveSessionForContext(WOApplication.java:1883)
 at 
 er.extensions.appserver.ERXApplication.saveSessionForContext(ERXApplication.java:2075)
... skipped 6 stack elements
 at Application.dispatchRequest(Application.java:670)
 ... skipped 3 stack elements
 Nov 17 22:22:01 Solar[6009] DEBUG er.extensions.eof.ERXEC  - After pushing: 
 [er.extensions.eof.ERXEC@dd151f, er.extensions.eof.ERXEC@13cd5b5]
 Nov 17 22:22:01 Solar[6009] DEBUG er.extensions.eof.ERXEC  - After popping: 
 [er.extensions.eof.ERXEC@dd151f]
 Nov 17 22:22:01 Solar[6009] DEBUG er.extensions.ERXEC.LockLogger  - unlocked 
 er.extensions.eof.ERXEC@13cd5b5
 Exception
 at er.extensions.eof.ERXEC.unlock(ERXEC.java:501)
 at 
 com.webobjects.eocontrol.EOEditingContext._dispose(EOEditingContext.java:1218)
 at 
 com.webobjects.eocontrol.EOEditingContext.dispose(EOEditingContext.java:)
 at er.extensions.eof.ERXEC.dispose(ERXEC.java:610)
 at 

Deploying to tomcat 8

2014-11-21 Thread John Huss
FYI, for the few people who might be deploying with Tomcat:

In the recently released Tomcat 8, there is a breaking change that causes
WO apps which use the generated WOClasspath to break (fail to load).

The call to servletContext.getRealPath(WEB-INF) in WOServletAdaptor now
fails and needs to be changed to use an absolute path like so:
servletContext.getRealPath(/WEB-INF).

I don't see anyway to override the old class, so if you have this problem
you'll have to either replace WOServletAdaptor or use a custom web.xml file
that doesn't depend on WEBINFROOT being defined.  I love WO!   ;-)

John
 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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