Re: Hello again

2022-01-18 Thread Mark Wardle via Webobjects-dev
Thanks Ralf! I did find that and tried it but it didn’t work. It didn’t
seem to make any resources available so I wasn’t even sure it had any
effect.

I’ve now put everything into a single maven project and appears to be
working perfectly.

Thank you very much.

If I get time, I might try to reproduce the issue with a set of new empty
frameworks to see whether I can determine the problem!

Mark

On Tue, 18 Jan 2022 at 22:01, Ralf Schuchardt  wrote:

> Hi Mark,
>
> if I remember correctly, I did also run into this no-model-found problem
> lately, and I believe this old hint here
>
>
> https://wiki.wocommunity.org/display/documentation/Maven+Running+or+Debugging+as+WO+Application
>
> did help. If you have not done this yet, try adding the build java
> directory of your model frameworks to the classpath. This may also be
> necessary for components.
>
> Ralf
>
>
> On 18 Jan 2022, at 10:46, Mark Wardle via Webobjects-dev wrote:
>
> Thanks Paul.
>
> I have nuked my local installation of eclipse. I did have dashes in the
> path to my workspace. I tried an installation on a fresh machine, but with
> latest eclipse (4), and I now get NPE when I try to run a WOApplication. So
> I'm going to delete the installation again, install eclipse 3 and a
> compatible wolips, and then see what happens. I do have dependent
> frameworks open in eclipse. Some of those now depend on locally installed
> maven artefacts, but I have manually used mvn install to install them into
> the local repository.
>
> Out of interest, what version of eclipse and wolips are you using? I was
> on eclipse 4 and wolips master on this mac, and then when I tried on a
> fresh linux machine, I mistakenly installed the same. Perhaps that's the
> issue.
>
> Mark
>
> On Tue, 18 Jan 2022 at 08:35, Paul Hoadley via Webobjects-dev <
> webobjects-dev@lists.apple.com> wrote:
>
>> On 18 Jan 2022, at 6:27 pm, Mark Wardle  wrote:
>>
>> I suspect you fixed it through a special incantation on the first blood
>> red moon of April.
>>
>> Anyway, I clearly have a different environment when running at the
>> command line compared to in eclipse.
>>
>>
>> Eclipse isn't doing a full Maven package build either. There's quite a
>> bit of magic going on with a launch from Eclipse.
>>
>> So actually none of my own models are included.
>>
>>
>> Right. It really shouldn't be this hard. Remember to answer these:
>>
>> Do you have the framework projects open in the same workspace? If not,
>> have you run 'mvn install' for the framework projects so that their JARs
>> are in ~/.m2/repository?
>>
>>
>> I have five models. Some were in src/main/resources/models and some were
>> in src/main/resources so I did the same for all frameworks - and put them
>> in src/main/resources.
>>
>>
>> Shouldn't matter (I used a models sub-directory for some projects too),
>> but don't make any further changes for now.
>>
>> I am not clear what I'm doing wrong! Deleting the error messages in
>> eclipse seems to have resolved those errors. So bizarre. They haven't
>> appeared for a while now!
>>
>>
>> Eclipse will occasionally throw up spurious errors like this, and you can
>> just delete them. It's unrelated to the model issue above.
>>
>> Can't help to think I have misconfigured eclipse in some way. I miss
>> IntelliJ and VScode, which I've been using for quite some time!
>>
>>
>> Once we get this working, you will learn to love Eclipse again. Err,
>> maybe.
>>
>>
>> --
>> Paul Hoadley
>> https://logicsquad.net/
>> https://www.linkedin.com/company/logic-squad/
>>
>>  ___
>> 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/mark%40wardle.org
>>
>> This email sent to m...@wardle.org
>>
>
>
> --
> Dr. Mark Wardle
> Consultant Neurologist and Clinical informatician, University Hospital
> Wales, Cardiff, UK
> Chair, NHS Wales Technical Standards Board.
> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>
> ___
> 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 Subsc

Re: Hello again

2022-01-18 Thread Mark Wardle via Webobjects-dev
Thanks Paul. That is very kind of you! But I'm delighted to say I think
I have fixed the problems.

One major issue was that I had .project in my gitignore file, so eclipse
made new ones without the wolips magic / maven features. That meant I got
weird NPE when I tried with a new machine and different behaviour on
another.

I still had a problem finding all of the EOModels, and an odd thing not
finding resources in frameworks, so I ended up sticking with my fix of
bringing all frameworks into the main application. That is fine for now -
and given my plan is to move away from frameworks to simple jars (some
java, most clojure), then this gives me the opportunity to delete lots of
code and migrate to my more modern backend components. One example, for
instance, is https://github.com/wardle/hermes - so my old application had
SNOMED CT as a dependent framework - I'll be replacing by simply calling
that library and deleting that framework code.

It looks rather messy at the moment, with everything together, but at least
I've got maven running, a new version of my application already deployed,
and upgraded to 7.2 of Wonder. It's a great step towards modernisation.

To be fair, building a new maven application using eclipse always worked.
It was bringing all my old cruft along that seems to have caused the
issues, plus a major dose of idiocy on my part.

Thank you again,

Mark






On Tue, 18 Jan 2022 at 21:22, Paul Hoadley via Webobjects-dev <
webobjects-dev@lists.apple.com> wrote:

> Hi Mark,
>
> On 18 Jan 2022, at 8:16 pm, Mark Wardle  wrote:
>
> I have nuked my local installation of eclipse. I did have dashes in the
> path to my workspace. I tried an installation on a fresh machine, but with
> latest eclipse (4), and I now get NPE when I try to run a WOApplication. So
> I'm going to delete the installation again, install eclipse 3 and a
> compatible wolips, and then see what happens. I do have dependent
> frameworks open in eclipse. Some of those now depend on locally installed
> maven artefacts, but I have manually used mvn install to install them into
> the local repository.
>
> Out of interest, what version of eclipse and wolips are you using? I was
> on eclipse 4 and wolips master on this mac, and then when I tried on a
> fresh linux machine, I mistakenly installed the same. Perhaps that's the
> issue.
>
>
> I don't think it's going to turn out to be an Eclipse issue. We're just
> missing one detail here, I'm sure—I just can't put my finger on it. I use a
> range of different Eclipse versions. On this iMac, for example, it's
> 2019-09 and what looks like WOLips 4.10. Head over to #maven on Slack and
> let's see if we can wake up anyone else who might help.
>
>
> --
> Paul Hoadley
> https://logicsquad.net/
> https://www.linkedin.com/company/logic-squad/
>
>
>
>  ___
> 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/mark%40wardle.org
>
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Hello again

2022-01-18 Thread Mark Wardle via Webobjects-dev
Thanks Paul.

I have nuked my local installation of eclipse. I did have dashes in the
path to my workspace. I tried an installation on a fresh machine, but with
latest eclipse (4), and I now get NPE when I try to run a WOApplication. So
I'm going to delete the installation again, install eclipse 3 and a
compatible wolips, and then see what happens. I do have dependent
frameworks open in eclipse. Some of those now depend on locally installed
maven artefacts, but I have manually used mvn install to install them into
the local repository.

Out of interest, what version of eclipse and wolips are you using? I was on
eclipse 4 and wolips master on this mac, and then when I tried on a fresh
linux machine, I mistakenly installed the same. Perhaps that's the issue.

Mark

On Tue, 18 Jan 2022 at 08:35, Paul Hoadley via Webobjects-dev <
webobjects-dev@lists.apple.com> wrote:

> On 18 Jan 2022, at 6:27 pm, Mark Wardle  wrote:
>
> I suspect you fixed it through a special incantation on the first blood
> red moon of April.
>
> Anyway, I clearly have a different environment when running at the command
> line compared to in eclipse.
>
>
> Eclipse isn't doing a full Maven package build either. There's quite a bit
> of magic going on with a launch from Eclipse.
>
> So actually none of my own models are included.
>
>
> Right. It really shouldn't be this hard. Remember to answer these:
>
> Do you have the framework projects open in the same workspace? If not,
> have you run 'mvn install' for the framework projects so that their JARs
> are in ~/.m2/repository?
>
>
> I have five models. Some were in src/main/resources/models and some were
> in src/main/resources so I did the same for all frameworks - and put them
> in src/main/resources.
>
>
> Shouldn't matter (I used a models sub-directory for some projects too),
> but don't make any further changes for now.
>
> I am not clear what I'm doing wrong! Deleting the error messages in
> eclipse seems to have resolved those errors. So bizarre. They haven't
> appeared for a while now!
>
>
> Eclipse will occasionally throw up spurious errors like this, and you can
> just delete them. It's unrelated to the model issue above.
>
> Can't help to think I have misconfigured eclipse in some way. I miss
> IntelliJ and VScode, which I've been using for quite some time!
>
>
> Once we get this working, you will learn to love Eclipse again. Err, maybe.
>
>
> --
> Paul Hoadley
> https://logicsquad.net/
> https://www.linkedin.com/company/logic-squad/
>
>  ___
> 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/mark%40wardle.org
>
> This email sent to m...@wardle.org
>


-- 
Dr. Mark Wardle
Consultant Neurologist and Clinical informatician, University Hospital
Wales, Cardiff, UK
Chair, NHS Wales Technical Standards Board.
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166
 ___
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: Hello again

2022-01-17 Thread Mark Wardle via Webobjects-dev
Hi Paul,

I suspect you fixed it through a special incantation on the first blood red
moon of April.

Anyway, I clearly have a different environment when running at the command
line compared to in eclipse.

I added some code to my main Application startup:


*public* Application() {

NSLog.*out*.appendln("Welcome to " + *this*.name() + " !");


EOModelGroup modelGroup = EOModelGroup.*defaultGroup*();

modelGroup.modelNames().forEach(s -> System.*out*.println ("Model: " + s));

setAllowsConcurrentRequestHandling(*true*);




>From the command-line, I get:

Jan 18 07:51:29 RSNews[65462] INFO  er.extensions.appserver.ERXApplication  -
Wonder version: 7.2

Jan 18 07:51:29 RSNews[65462] INFO  NSLog  - Welcome to RSNews !

Model: NhsModel

Model: ERCoreBusinessLogic

Model: RSBiobank

Model: ERMail

Model: ERAttachment

Model: SnomedCt

Model: RSBusinessLogic

Model: erprototypes

Model: RSGeneticsModel

>From eclipse, I get:

Jan 18 07:48:46 RSNews[65449] INFO  er.extensions.appserver.ERXApplication  -
Wonder version: 7.2

Jan 18 07:48:46 RSNews[65449] INFO  NSLog  - Welcome to RSNews !

Model: ERAttachment

Model: ERCoreBusinessLogic

Model: ERMail

Model: erprototypes


So actually none of my own models are included.


I have five models. Some were in src/main/resources/models and some were in
src/main/resources so I did the same for all frameworks - and put them in
src/main/resources.


I'm on eclipse version:


Version: 2021-12 (4.22.0)

Build id: 20211202-1639


I am not clear what I'm doing wrong! Deleting the error messages in eclipse
seems to have resolved those errors. So bizarre. They haven't appeared for
a while now! Can't help to think I have misconfigured eclipse in some way.
I miss IntelliJ and VScode, which I've been using for quite some time!


Mark

On Mon, 17 Jan 2022 at 22:36, Paul Hoadley via Webobjects-dev <
webobjects-dev@lists.apple.com> wrote:

> Hi Mark,
>
> On 17 Jan 2022, at 6:04 pm, Mark Wardle  wrote:
>
> Right. It *is* all working - from the command-line.
>
> But it is eclipse that is having problems. For some reason I get a 'no
> model found' in this model group error.
>
> Jan 17 07:16:57 RSNews[59144] WARN  NSLog  - A fatal exception occurred:
> There is no model named 'NhsModel' in this model group.
> [2022-1-17 7:16:57 GMT]  java.lang.IllegalArgumentException: There
> is no model named 'NhsModel' in this model group.
>
> I have only a hazy recollection of how model groups work - and they just
> seemed to work before. Oddly, I can't find any eomodel directories in my
> command-line built target, so presume they end up in the jar files.
>
>
> Yes they will.
>
> Do I need a special  statement in any of the pom files?
>
>
> No. Are your models just sitting in src/main/resources?
>
> I note this wasn't an issue when I created a single maven project
> combining all of my frameworks and a single application, but it is an issue
> now my EOModels are in different frameworks from the application. Is there
> a special command-line parameter to set (or unset) for eclipse, as it seems
> to find the models when run from the command-line.
>
>
> No, I don't think so. Do you have the framework projects open in the same
> workspace? If not, have you run 'mvn install' for the framework projects so
> that their JARs are in ~/.m2/repository?
>
> PS Oh and eclipse seems to want to keep changing the .classpath files. I
> know maven will ignore those, but it is disconcerting. Do I check them into
> version control or add them to .gitignore now?
>
>
> I check .classpath into the repo for WebObjects projects, and periodically
> commit changes that Eclipse seems to make on a whim.
>
> The last 5% of the Maven journey can be frustrating, but once we get you
> there, you won't look back.
>
>
> --
> Paul Hoadley
> https://logicsquad.net/
> https://www.linkedin.com/company/logic-squad/
>
>  ___
> 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/mark%40wardle.org
>
> This email sent to m...@wardle.org
>


-- 
Dr. Mark Wardle
Consultant Neurologist and Clinical informatician, University Hospital
Wales, Cardiff, UK
Chair, NHS Wales Technical Standards Board.
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166
 ___
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: Hello again

2022-01-17 Thread Mark Wardle via Webobjects-dev
Amazingly Paul, I found this from the past in which you had exactly the
same issue. I have different models in different frameworks. They are
brought in perfectly using maven at the command line, and everything just
seems to work. In eclipse, it is a different matter - I too have now
unchecked NSProjectBundleEnabled, but it is still showing errors.

The the "Problems" tab, I get errors relating to packaging and the
wolifecycle maven plugin:
[image: image.png]

Super odd, because I cannot see any difference between those two and all of
the other frameworks in the workspace which do not show an error. It just
seems so inconsistent. Maven at the command line appears to be doing nice
reproducible things everytime.

Mark


Paul Hoadley pa...@logicsquad.net via
<https://support.google.com/mail/answer/1311182?hl=en-GB> lists.apple.com
Sun, 9 Oct 2016, 12:29
to WebObjects
Hello,

Well, I say the _last_ two hurdles. They’re at least the _current_ two
hurdles. I’ve got this a long way, but I’m still not there. I’ve been
migrating an app and its 10 or so framework dependencies. Everything builds
(both locally on OS X and on a Jenkins CI server running Amazon Linux), but
I’m stuck on launch.

1. Launching in Eclipse I get this:

WARN  NSLog  - A fatal exception occurred: There is no model named
'LSNotification'
in this model group.
[2016-10-9 11:11:26 UTC]  java.lang.IllegalArgumentException: There is
 no model named 'LSNotification' in this model group.
at er.extensions.migration.ERXMigrator._buildDependenciesForModelsNamed(
ERXMigrator.java:274)

That model is in LSNotification.framework, which appears to be built
correctly, and its JAR (which contains that model) is in the built
application bundle under target. (Is this even what Eclipse is running when
I hit launch?) If I go into that bundle on the command line and launch by
hand, I _don’t_ get this error, which is encouraging—the application finds
that model, runs the migrations (and then fails elsewhere—see below). What
am I overlooking when I launch from Eclipse? I’ve
unchecked NSProjectBundleEnabled—anything else?

On Mon, 17 Jan 2022 at 07:34, Mark Wardle  wrote:

> Right. It *is* all working - from the command-line.
>
> But it is eclipse that is having problems. For some reason I get a 'no
> model found' in this model group error.
>
> Jan 17 07:16:57 RSNews[59144] WARN  NSLog  - A fatal exception occurred:
> There is no model named 'NhsModel' in this model group.
>
> [2022-1-17 7:16:57 GMT]  java.lang.IllegalArgumentException: There
> is no model named 'NhsModel' in this model group.
>
>
> I have only a hazy recollection of how model groups work - and they just
> seemed to work before. Oddly, I can't find any eomodel directories in my
> command-line built target, so presume they end up in the jar files. Do I
> need a special  statement in any of the pom files? I note this
> wasn't an issue when I created a single maven project combining all of my
> frameworks and a single application, but it is an issue now my EOModels are
> in different frameworks from the application. Is there a special
> command-line parameter to set (or unset) for eclipse, as it seems to find
> the models when run from the command-line.
>
>
> Mark
>
>
> PS Oh and eclipse seems to want to keep changing the .classpath files. I
> know maven will ignore those, but it is disconcerting. Do I check them into
> version control or add them to .gitignore now?
>
> On Sun, 16 Jan 2022 at 22:08, Paul Hoadley via Webobjects-dev <
> webobjects-dev@lists.apple.com> wrote:
>
>> On 17 Jan 2022, at 8:05 am, Mark Wardle  wrote:
>>
>> Thanks to Paul and all involved in building the maven plugin and support
>> for WebObjects/Project Wonder, I'm very pleased to say that I can now
>> quickly and easily build my entire project using maven, now as separate
>> frameworks and applications.
>>
>>
>> Brilliant.
>>
>>
>> --
>> Paul Hoadley
>> https://logicsquad.net/
>> https://www.linkedin.com/company/logic-squad/
>>
>>  ___
>> 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/mark%40wardle.org
>>
>> This email sent to m...@wardle.org
>>
>
>
> --
> Dr. Mark Wardle
> Consultant Neurologist and Clinical informatician, University Hospital
> Wales, Cardiff, UK
> Chair, NHS Wales Technical Standards Board.
> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>



Re: Hello again

2022-01-16 Thread Mark Wardle via Webobjects-dev
Right. It *is* all working - from the command-line.

But it is eclipse that is having problems. For some reason I get a 'no
model found' in this model group error.

Jan 17 07:16:57 RSNews[59144] WARN  NSLog  - A fatal exception occurred:
There is no model named 'NhsModel' in this model group.

[2022-1-17 7:16:57 GMT]  java.lang.IllegalArgumentException: There is
no model named 'NhsModel' in this model group.


I have only a hazy recollection of how model groups work - and they just
seemed to work before. Oddly, I can't find any eomodel directories in my
command-line built target, so presume they end up in the jar files. Do I
need a special  statement in any of the pom files? I note this
wasn't an issue when I created a single maven project combining all of my
frameworks and a single application, but it is an issue now my EOModels are
in different frameworks from the application. Is there a special
command-line parameter to set (or unset) for eclipse, as it seems to find
the models when run from the command-line.


Mark


PS Oh and eclipse seems to want to keep changing the .classpath files. I
know maven will ignore those, but it is disconcerting. Do I check them into
version control or add them to .gitignore now?

On Sun, 16 Jan 2022 at 22:08, Paul Hoadley via Webobjects-dev <
webobjects-dev@lists.apple.com> wrote:

> On 17 Jan 2022, at 8:05 am, Mark Wardle  wrote:
>
> Thanks to Paul and all involved in building the maven plugin and support
> for WebObjects/Project Wonder, I'm very pleased to say that I can now
> quickly and easily build my entire project using maven, now as separate
> frameworks and applications.
>
>
> Brilliant.
>
>
> --
> Paul Hoadley
> https://logicsquad.net/
> https://www.linkedin.com/company/logic-squad/
>
>  ___
> 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/mark%40wardle.org
>
> This email sent to m...@wardle.org
>


-- 
Dr. Mark Wardle
Consultant Neurologist and Clinical informatician, University Hospital
Wales, Cardiff, UK
Chair, NHS Wales Technical Standards Board.
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166
 ___
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: Hello again

2022-01-16 Thread Mark Wardle via Webobjects-dev
Update.

1. I have fixed the error from a zip file. It turns out the build was
including a broken jar file, from a dependency of type 'pom'. This results
in an invalid file being brought into the build.


com.sun.xml.ws
jaxws-ri
2.3.3
pom


To make it easier for others to find in the future, this is the exception
that this caused:

Exception in thread "main" com.webobjects.foundation.NSForwardException
[java.util.zip.ZipException] zip END header not
found:java.util.zip.ZipException: zip END header not found

at
com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:45)

at
er.extensions.appserver.ERXApplication$Loader.stringFromJar(ERXApplication.java:857)

at
er.extensions.appserver.ERXApplication$Loader.(ERXApplication.java:517)

at er.extensions.appserver.ERXApplication.setup(ERXApplication.java:1071)

at er.extensions.appserver.ERXApplication.main(ERXApplication.java:884)

at com.eldrix.news.app.Application.main(Application.java:75)

Caused by: java.util.zip.ZipException: zip END header not found

at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1567)

at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1462)

at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1469)

at java.base/java.util.zip.ZipFile$Source.(ZipFile.java:1274)

at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1237)

at
java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:727)

at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:844)

at java.base/java.util.zip.ZipFile.(ZipFile.java:247)

at java.base/java.util.zip.ZipFile.(ZipFile.java:177)

at java.base/java.util.jar.JarFile.(JarFile.java:348)

at java.base/java.util.jar.JarFile.(JarFile.java:319)

at java.base/java.util.jar.JarFile.(JarFile.java:258)

at
er.extensions.appserver.ERXApplication$Loader.stringFromJar(ERXApplication.java:837)

Keywords: maven java 11 broken zip file invalid jar stringFromJar
ERXApplication$Loader ERXApplication


I can see the finish line now, although there are some dimly lit hurdles
ahead. Here be dragons.

On Sun, 16 Jan 2022 at 07:32, Mark Wardle  wrote:

> Hi Paul! Hope you are keeping well! Thanks for the reply. It looks very
> helpful - replies inline below.
>
> On Sun, 16 Jan 2022 at 00:52, Paul Hoadley via Webobjects-dev <
> webobjects-dev@lists.apple.com> wrote:
>
>> Hi Mark,
>>
>> On 16 Jan 2022, at 8:32 am, Mark Wardle via Webobjects-dev <
>> webobjects-dev@lists.apple.com> wrote:
>>
>> Long time no see. I have quietly lurked here while working on a different
>> technology stack (mainly clojure/clojurescript), but now want to migrate my
>> old WO applications to use my newer backend components when possible.
>>
>>
>> Welcome back.
>>
>> 1. Please could I have an invite to the slack channel?
>>
>>
>> Looks like someone has hooked you up—Slack telling me m...@wardle.org would
>> be a duplicate.
>>
>>
> All sorted thank you.
>
>
>> 2. I have restarted my push to migrate to maven, as I need to modernise
>> the build and make it easier to stitch everything I need together. But I've
>> hit some hurdles - are there any maven experts?
>>
>>
>> There are several. There's a #maven channel on Slack.
>>
>> Great.
>
>
>>  > SNIP
>>
>
>
>> Before we wade into these, how did you convert your project(s) to Maven?
>> Did you follow this or something like it?
>>
>> https://gist.github.com/paulhoadley/cd15b90c94eb8c640fddd9ac3fbbc6dc
>>
>>
> No I did not see that. I created a new directory and copied files across
> according what I've used for maven native files. But, I didn't turn off
> eclipse and did get annoyed with all of the autogenerated files appearing
> as I did each framework.
>
>
>> I would suggest doing one project at a time. Choose a framework that is
>> dependent on no other projects, for example. Get it working, then move to
>> the next.
>>
>>
> Yes actually all of the frameworks build, as does the application, but
> that zip file means something is broken.
> I will start again with your guide thank you!
>
>> I would be very grateful for any pointers at all. I still would like to
>> move away from ant for this build, and I need to simplify my frameworks, so
>> moving to maven seems like an important step in modernising my build.
>>
>>
>> You won't regret it. Any time you spend now getting your projects
>> converted will be paid off a hundred times later. It will instantly
>> simplify your CI options, just as one example.
>>
>>
> Best wishes,
>
> Mark
>


-- 
Dr. Mark Wardle
Consultant Neurol

Re: Hello again

2022-01-16 Thread Mark Wardle via Webobjects-dev
I have made some progress, but it is still not working.

I can create a new erxapplication from the 3.0 archetype and it runs from
eclipse.

It looks as if I did have the wrong .project, .classpath and
build.properties files so I have updated those. Maven is now building
modules in the right order and all frameworks appear to be built correctly.
They install into my local repository, and then my main application gets
built without errors.

That still didn't fix the issues - from eclipse - I get class definition
errors - from the command-line, I get that weird zip error.

So I gave up and created a single erxapplication using the maven archetype
and copied everything in from my old application and all its dependent
frameworks. Messy, but it compiled without problems and... runs from
eclipse!  So that's great.

But I still get the odd zip file error - investigating this I note eclipse
is building and running using java8 whereas my command-line has been java
11 for a long time now! Could it a java 11 issue? Do others build using
maven using java 11 and WO/Project Wonder?

Mark



On Sun, 16 Jan 2022 at 07:32, Mark Wardle  wrote:

> Hi Paul! Hope you are keeping well! Thanks for the reply. It looks very
> helpful - replies inline below.
>
> On Sun, 16 Jan 2022 at 00:52, Paul Hoadley via Webobjects-dev <
> webobjects-dev@lists.apple.com> wrote:
>
>> Hi Mark,
>>
>> On 16 Jan 2022, at 8:32 am, Mark Wardle via Webobjects-dev <
>> webobjects-dev@lists.apple.com> wrote:
>>
>> Long time no see. I have quietly lurked here while working on a different
>> technology stack (mainly clojure/clojurescript), but now want to migrate my
>> old WO applications to use my newer backend components when possible.
>>
>>
>> Welcome back.
>>
>> 1. Please could I have an invite to the slack channel?
>>
>>
>> Looks like someone has hooked you up—Slack telling me m...@wardle.org would
>> be a duplicate.
>>
>>
> All sorted thank you.
>
>
>> 2. I have restarted my push to migrate to maven, as I need to modernise
>> the build and make it easier to stitch everything I need together. But I've
>> hit some hurdles - are there any maven experts?
>>
>>
>> There are several. There's a #maven channel on Slack.
>>
>> Great.
>
>
>>  > SNIP
>>
>
>
>> Before we wade into these, how did you convert your project(s) to Maven?
>> Did you follow this or something like it?
>>
>> https://gist.github.com/paulhoadley/cd15b90c94eb8c640fddd9ac3fbbc6dc
>>
>>
> No I did not see that. I created a new directory and copied files across
> according what I've used for maven native files. But, I didn't turn off
> eclipse and did get annoyed with all of the autogenerated files appearing
> as I did each framework.
>
>
>> I would suggest doing one project at a time. Choose a framework that is
>> dependent on no other projects, for example. Get it working, then move to
>> the next.
>>
>>
> Yes actually all of the frameworks build, as does the application, but
> that zip file means something is broken.
> I will start again with your guide thank you!
>
>> I would be very grateful for any pointers at all. I still would like to
>> move away from ant for this build, and I need to simplify my frameworks, so
>> moving to maven seems like an important step in modernising my build.
>>
>>
>> You won't regret it. Any time you spend now getting your projects
>> converted will be paid off a hundred times later. It will instantly
>> simplify your CI options, just as one example.
>>
>>
> Best wishes,
>
> Mark
>


-- 
Dr. Mark Wardle
Consultant Neurologist and Clinical informatician, University Hospital
Wales, Cardiff, UK
Chair, NHS Wales Technical Standards Board.
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166
 ___
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: Hello again

2022-01-15 Thread Mark Wardle via Webobjects-dev
Hi Paul! Hope you are keeping well! Thanks for the reply. It looks very
helpful - replies inline below.

On Sun, 16 Jan 2022 at 00:52, Paul Hoadley via Webobjects-dev <
webobjects-dev@lists.apple.com> wrote:

> Hi Mark,
>
> On 16 Jan 2022, at 8:32 am, Mark Wardle via Webobjects-dev <
> webobjects-dev@lists.apple.com> wrote:
>
> Long time no see. I have quietly lurked here while working on a different
> technology stack (mainly clojure/clojurescript), but now want to migrate my
> old WO applications to use my newer backend components when possible.
>
>
> Welcome back.
>
> 1. Please could I have an invite to the slack channel?
>
>
> Looks like someone has hooked you up—Slack telling me m...@wardle.org would
> be a duplicate.
>
>
All sorted thank you.


> 2. I have restarted my push to migrate to maven, as I need to modernise
> the build and make it easier to stitch everything I need together. But I've
> hit some hurdles - are there any maven experts?
>
>
> There are several. There's a #maven channel on Slack.
>
> Great.


>  > SNIP
>


> Before we wade into these, how did you convert your project(s) to Maven?
> Did you follow this or something like it?
>
> https://gist.github.com/paulhoadley/cd15b90c94eb8c640fddd9ac3fbbc6dc
>
>
No I did not see that. I created a new directory and copied files across
according what I've used for maven native files. But, I didn't turn off
eclipse and did get annoyed with all of the autogenerated files appearing
as I did each framework.


> I would suggest doing one project at a time. Choose a framework that is
> dependent on no other projects, for example. Get it working, then move to
> the next.
>
>
Yes actually all of the frameworks build, as does the application, but that
zip file means something is broken.
I will start again with your guide thank you!

> I would be very grateful for any pointers at all. I still would like to
> move away from ant for this build, and I need to simplify my frameworks, so
> moving to maven seems like an important step in modernising my build.
>
>
> You won't regret it. Any time you spend now getting your projects
> converted will be paid off a hundred times later. It will instantly
> simplify your CI options, just as one example.
>
>
Best wishes,

Mark
 ___
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


Hello again

2022-01-15 Thread Mark Wardle via Webobjects-dev
Dear all,

Long time no see. I have quietly lurked here while working on a different
technology stack (mainly clojure/clojurescript), but now want to migrate my
old WO applications to use my newer backend components when possible.

1. Please could I have an invite to the slack channel?

2. I have restarted my push to migrate to maven, as I need to modernise the
build and make it easier to stitch everything I need together. But I've hit
some hurdles - are there any maven experts?

a) My EOModels in frameworks were not being found until I specifically told
eclipse to NSBundeProjectEnabled to false. That seemed to fix that, but now
I get a weird NPE on startup (in eclipse) which suggests my class
description for an entity isn't being found. I do have
true
in at least the main application package.

[2022-1-15 21:13:14 GMT]  java.lang.NullPointerException

at er.rest.IERXRestDelegate$Factory.delegateForClassDescription(
IERXRestDelegate.java:147)

at er.rest.routes.ERXRouteRequestHandler.addDefaultRoutes(
ERXRouteRequestHandler.java:539)

at com.eldrix.news.app.Application.(Application.java:110)


I'm using v2.5 of the maven lifecycle plugin.

b) At least I get that far in eclipse. At the command-line, when I build
the application, I get the following:

Exception in thread "main" com.webobjects.foundation.NSForwardException
[java.util.zip.ZipException] zip END header not
found:java.util.zip.ZipException: zip END header not found

at
com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:45)

at
er.extensions.appserver.ERXApplication$Loader.stringFromJar(ERXApplication.java:857)

at
er.extensions.appserver.ERXApplication$Loader.(ERXApplication.java:517)

at er.extensions.appserver.ERXApplication.setup(ERXApplication.java:1071)

at er.extensions.appserver.ERXApplication.main(ERXApplication.java:884)

at com.eldrix.news.app.Application.main(Application.java:73)

My google-fu has failed me for this one. I have cleaned all the frameworks,
installed them all and then rebuilt the application without success. I
deleted .m2/repository as a last resort, and did it all again, but the
problem persists. I also thought maven would automatically manage
submodules and build them in the right order, but that doesn't happen
either.

I would be very grateful for any pointers at all. I still would like to
move away from ant for this build, and I need to simplify my frameworks, so
moving to maven seems like an important step in modernising my build.

Mark

-- 
Dr. Mark Wardle
Consultant Neurologist and Clinical informatician, University Hospital
Wales, Cardiff, UK
Chair, NHS Wales Technical Standards Board.
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166
 ___
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


RuleModeler and Catalina

2019-11-03 Thread Mark Wardle via Webobjects-dev
Dear all,

Does anyone have a working RuleModeler on Catalina? I see the Wonder source
code for this has not had any updates since March 2012. I have recompiled
the source using xcode 11.2 and am getting extremely high "index out of
range" errors suggesting problems with the move to 64-bits. I seem to
recall a WOLips RuleModeler as well at some point in the distant past, but
I always thought it wasn't completed.

Mark

-- 
Dr. Mark Wardle
 ___
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: Enterprise objects stored in JSON or byte

2018-12-19 Thread Mark Wardle
Thanks Paul. No, not at all wedded. In fact, I've been stupid in that I did
something similar with modelling consent forms and the responses, but for
some reason simply couldn't see beyond the end of my own nose on this one!

Thanks all,

Now to get on and implement...

[image: image.png]

On Thu, 20 Dec 2018 at 03:58, Paul Hoadley  wrote:

> Hi Mark,
>
> On 20 Dec 2018, at 07:37, Samuel Pelletier  wrote:
>
> I've done dynamic forms in the past (in PHP and WO) and never tried to map
> them to an ORM entity. I think it is better to model your a Form entity and
> another one for answers (FilledForm or CompletedForm). The Form entity is
> the Meta model with the questions and the other contains only answers. You
> end with 2 symmetric hierarchies with one answer class for each question
> type class (numeric, text, choice, boolean, image, ...). Each of the Answer
> class has it's edit component.
>
> The display form component is build by displaying the proper edit
> component for each answer in order. For easy D2W integration, I think you
> can initialize a new form  with blank answers and simply use the D2W magic
> to display the complete form (using an ordered toMany from the
> CompletedForm entity to it's answers) .
>
>
> FWIW, that's pretty much exactly how we implemented a
> SurveyMonkey/Survs-style "create your own arbitrary survey" project for a
> client a few years ago. It worked reasonably well, and it's still in use.
> Are you wedded to the dynamic model approach you describe, Mark?
>
>
> --
> Paul Hoadley
> https://logicsquad.net/
> https://www.linkedin.com/company/logic-squad/
>
>

-- 
Dr. Mark Wardle
Consultant Neurologist and Clinical informatician, University Hospital
Wales, Cardiff, UK
Chair, NHS Wales Technical Standards Board.
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166
 ___
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: Enterprise objects stored in JSON or byte

2018-12-19 Thread Mark Wardle
That is a much better idea than my original thoughts, and feels as if I
won't be fighting the system - which is always a good indicator that one's
design is wrong when building WO applications.

Thank you.

On Wed, 19 Dec 2018 at 18:37, Samuel Pelletier  wrote:

> Hi Mark,
>
> I've done dynamic forms in the past (in PHP and WO) and never tried to map
> them to an ORM entity. I think it is better to model your a Form entity and
> another one for answers (FilledForm or CompletedForm). The Form entity is
> the Meta model with the questions and the other contains only answers. You
> end with 2 symmetric hierarchies with one answer class for each question
> type class (numeric, text, choice, boolean, image, ...). Each of the Answer
> class has it's edit component.
>
> The display form component is build by displaying the proper edit
> component for each answer in order. For easy D2W integration, I think you
> can initialize a new form  with blank answers and simply use the D2W magic
> to display the complete form (using an ordered toMany from the
> CompletedForm entity to it's answers) .
>
> Regards,
>
> Samuel
>
>
> > Le 19 déc. 2018 à 10:39, Mark Wardle  a écrit :
> >
> > I want to define a group enterprise objects at runtime and yet use them
> in a fairly similar way to "normal" enterprise objects.
> >
> > Essentially, I want a generic object that is backed by a NSDictionary
> (or other persistence mechanism like bytes/protobuf) and has a defined
> behaviour class. I would like to define the model at runtime rather than
> using EOModeler. The definition of the object (list of properties and for
> each property: name, dataType, class, prototype etc.) defined itself at
> runtime in the backing database.
> >
> > Anyone done something similar, and if so, what is the best approach? I
> have contemplated building a generic EO that delegates its behaviour and
> data to the behaviour class and the backing NSDictionary respectively, and
> alters the implementation of KVC to make it fairly transparent. I'm aware
> that some of the hidden "magic" that comes from defining an object in
> EOModeler might be lost.
> >
> > Any hints/tips gratefully received!
> >
> > Best wishes,
> >
> > Mark
> >
> >
> >
> > ___
> > 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/samuel%40samkar.com
> >
> > This email sent to sam...@samkar.com
>
>

-- 
Dr. Mark Wardle
Consultant Neurologist and Clinical informatician, University Hospital
Wales, Cardiff, UK
Chair, NHS Wales Technical Standards Board.
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166
 ___
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: Enterprise objects stored in JSON or byte

2018-12-19 Thread Mark Wardle
[forgot to include list in my reply]

Good questions!

The issue is that I want to build runtime forms that are automatically
rendered via D2W.

I currently build data collection forms using horizontal inheritance, so I
define the model and then D2W and everything else normally "just works". I
sometimes add some custom logic or properties.

But that doesn't scale. So firstly, I have to edit the model, rebuild the
application and install it. Doesn't take long, but...  Secondly, horizontal
inheritance doesn't scale, so that to find a list of objects, EOF has to
perform multiple selects (therefore I guess O(n)), so as I add another
"form", I add another table and another SELECT.

I decided that worrying about this when I started out, many years ago, was
premature optimisation, and I haven't yet hit a real performance hurdle,
but it will happen. The idea of defining or supplementing an EOModel at
runtime is quite attractive, but feels like it might be a bit complex!

Mark


On Wed, 19 Dec 2018 at 15:49, Jesse Tayler  wrote:

> Hi Mark
>
> Sounds interesting, I was wondering a while back if an eomodel could work
> on top of a database like Mongo and store anything without need for
> migration or table setup - but it sounds like you want the reverse?
>
> You sort of want to have arbitrary attributes? Even arbitrary
> relationships? What’s the relation to EOF? These then must be made
> persistent regardless of structure?
>
> I’m trying to imagine what you’re after a bit but modeler could be thought
> of as an editor for EOEntities which are meant to be structured and could
> just as easily be created in memory vs. loaded from a model file but I’d
> wonder why
>
>
>
>
> > On Dec 19, 2018, at 10:39 AM, Mark Wardle  wrote:
> >
> > I want to define a group enterprise objects at runtime and yet use them
> in a fairly similar way to "normal" enterprise objects.
> >
> > Essentially, I want a generic object that is backed by a NSDictionary
> (or other persistence mechanism like bytes/protobuf) and has a defined
> behaviour class. I would like to define the model at runtime rather than
> using EOModeler. The definition of the object (list of properties and for
> each property: name, dataType, class, prototype etc.) defined itself at
> runtime in the backing database.
> >
> > Anyone done something similar, and if so, what is the best approach? I
> have contemplated building a generic EO that delegates its behaviour and
> data to the behaviour class and the backing NSDictionary respectively, and
> alters the implementation of KVC to make it fairly transparent. I'm aware
> that some of the hidden "magic" that comes from defining an object in
> EOModeler might be lost.
> >
> > Any hints/tips gratefully received!
> >
> > Best wishes,
> >
> > Mark
> >
> >
> >
> > ___
> > 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/jtayler%40oeinc.com
> >
> > This email sent to jtay...@oeinc.com
>
>

-- 
Dr. Mark Wardle
Consultant Neurologist and Clinical informatician, University Hospital
Wales, Cardiff, UK
Chair, NHS Wales Technical Standards Board.
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166
 ___
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


Enterprise objects stored in JSON or byte

2018-12-19 Thread Mark Wardle
I want to define a group enterprise objects at runtime and yet use them in
a fairly similar way to "normal" enterprise objects.

Essentially, I want a generic object that is backed by a NSDictionary (or
other persistence mechanism like bytes/protobuf) and has a defined
behaviour class. I would like to define the model at runtime rather than
using EOModeler. The definition of the object (list of properties and for
each property: name, dataType, class, prototype etc.) defined itself at
runtime in the backing database.

Anyone done something similar, and if so, what is the best approach? I have
contemplated building a generic EO that delegates its behaviour and data to
the behaviour class and the backing NSDictionary respectively, and alters
the implementation of KVC to make it fairly transparent. I'm aware that
some of the hidden "magic" that comes from defining an object in EOModeler
might be lost.

Any hints/tips gratefully received!

Best wishes,

Mark
 ___
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: Long responses, without a session?

2018-05-29 Thread Mark Wardle
Thanks Samuel. Perhaps I should do this purely in the browser in JS and hit
a REST endpoint and then pass a ticket to a WO DA when I know credentials
are correct.

Mark

On Thu, 24 May 2018 at 22:39 Samuel Pelletier  wrote:

> Hi Mark,
>
> I've never done that with WO but it is possible to return partial data to
> the browser and have it rendered bi using chunked response. I do not know
> if it is possible to force WO to flush the response content to the client
> and keep adding content after...
>
> If you can validate that the request is from a human and look valid, you
> may defer the session creation after this validation and have a quick
> response for failure.
>
> Otherwise, just create session with very short lifespan like 5 minutes
> with setTimeOut(5*60) in the session constructor and adjust it after the
> successful logon with WOSessiion.setTimeOut(3*3600); // for 3 hours
>
> I now tend to add an AjaxPing to my wrapper and use shorter session.
>
> Regards,
>
> Samuel
>
>
> > Le 24 mai 2018 à 17:18, Mark Wardle  a écrit :
> >
> > Hi all,
> >
> > I am cleaning up some code and identifying some long-acting responses
> that sometimes take 2-3 seconds because they call external services over a
> network. I'd like to turn them into long responses to show users that
> something is happening and also prevent alerts in my log files. One of the
> sometimes slow actions is logging in via a KDC.
> >
> > I have found ERXLongResponse which looks as if it will do the trick but
> it is unclear to me whether this will work for user login. My landing page
> using exclusively direct actions to prevent inadvertent session creation.
> Is there a way of running a long response task without creating a session?
> >
> > Many thanks,
> >
> > Mark
> >
> > ___
> > 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/samuel%40samkar.com
> >
> > This email sent to sam...@samkar.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Long responses, without a session?

2018-05-24 Thread Mark Wardle
Hi all,

I am cleaning up some code and identifying some long-acting responses that
sometimes take 2-3 seconds because they call external services over a
network. I'd like to turn them into long responses to show users that
something is happening and also prevent alerts in my log files. One of the
sometimes slow actions is logging in via a KDC.

I have found ERXLongResponse which looks as if it will do the trick but it
is unclear to me whether this will work for user login. My landing page
using exclusively direct actions to prevent inadvertent session creation.
Is there a way of running a long response task without creating a session?

Many thanks,

Mark
 ___
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


PatientCare - EPR

2018-02-13 Thread Mark Wardle
I wrote a working EPR in my spare time and WebObjects (and Project Wonder),
as I have said before, has been a critical component in making that
possible.

It took me a only a day of work to re-skin my entire application to a more
modern and responsive look, and I posted some information about it on
Twitter - https://twitter.com/mwardle/status/962714288120098816

The feedback has been extraordinarily positive and of course, the
underlying technology used isn't as important as what it enables.

WebObjects continues to be a powerful enabler for me to develop rapid
pieces of functionality and is a super technology to write server-side code
for ResearchKit clients on iOS. Combining clinician-data with data sourced
from patients using questionnaires using ERRest has been... trivial. I
don't think any of us know how to best make use of mobile device data, but
I'm glad I'm still using WO as it means I can iterate at speed and do it as
a hobby!

The design patterns and overall architecture are still fit-for-purpose in
this day and age of microservices and single-page applications. I still
haven't found a set of tools that work so well and permit such rapid
development and orchestration of complex business logic and data, usually
sourced from multiple other services.

I write this for two reasons...

1. Apple, if anyone from there is still subscribed to this mailing list,
you have made a mistake in ignoring and not developing this technology.
You really should think about about how WO could be developed as a
technology to make iOS and server-side services interact seamlessly.

2. As a thank you to a great community who have provided fantastic tools
and frameworks on top of the Apple provided services and made working with
it a pleasure. While the community is very small nowadays, there is still
tremendous value in the toolchain.

Thank you!

Mark
 ___
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: Apache static file problems - Centos 7

2018-01-26 Thread Mark Wardle
Thanks Stephan. I fixed it by adding a virtualhost *:80  and changing the
directory from the default of /var/www/html (or whatever it was) to the
/opt path containing my static resources.

Thank you

Mark

On Wed, 24 Jan 2018 at 08:08 Stéphan Mertz  wrote:

> Hello,
>
> Do you have a  configuration in the webobjects.conf
> file, or just  ?
>
> Stéphan
>
>
> Le 24 janv. 2018 à 00:07, Mark Wardle  a écrit :
>
> Dear all,
>
> I have migrated an application to a new server, in the process upgrading
> from Centos 5 to 7, PostgreSQL 8 to 10 and apache 2.2 to 2.4
>
> Apart from a nasty ScriptAlias declaration that needed commenting out,
> installing was mostly a breeze.
>
> I have an odd problem with apache delivering (or rather, not delivering)
> static resources. It works using https:// but not http:// and I have two
> hostnames can resolve to the same IP address and one works with https://
>  and one doesn't.
>
> I have installed the static WebServerResources bit of my application in
> /opt/Local/WebServer/Documents/WebObjects/Appname.woa/...  and
> WebServerResources in the webobjects.conf apache file is
> /opt/Local/WebServer/Documents
>
> Am I missing something obvious? Can't work out why it works only with one
> hostname and only via https.
>
> Mark
>
> ___
> 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/smertz%40me.com
>
> This email sent to sme...@me.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Apache static file problems - Centos 7

2018-01-23 Thread Mark Wardle
Dear all,

I have migrated an application to a new server, in the process upgrading
from Centos 5 to 7, PostgreSQL 8 to 10 and apache 2.2 to 2.4

Apart from a nasty ScriptAlias declaration that needed commenting out,
installing was mostly a breeze.

I have an odd problem with apache delivering (or rather, not delivering)
static resources. It works using https:// but not http:// and I have two
hostnames can resolve to the same IP address and one works with https://
 and one doesn't.

I have installed the static WebServerResources bit of my application in
/opt/Local/WebServer/Documents/WebObjects/Appname.woa/...  and
WebServerResources in the webobjects.conf apache file is
/opt/Local/WebServer/Documents

Am I missing something obvious? Can't work out why it works only with one
hostname and only via https.

Mark
 ___
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: Migrating to google cloud

2017-07-25 Thread Mark Wardle
Thanks all. That is all very helpful. I don’t have a particular preference 
between Google and Amazon here, but was attracted by the automatic encryption 
by default in Google

I’ll give it a whirl.

Mark

> On 24 Jul 2017, at 11:08, Paul Hoadley  wrote:
> 
> Hi Mark,
> 
> On 23 Jul 2017, at 10:18 pm, Mark Gowdy  <mailto:m...@gowdy.co.uk>> wrote:
> 
>> Has anyone considered using the more advanced ELB setup as an alternative to 
>> apache and the adaptor? 
>> Similar to how mod_proxy works.
>> 
>> Static stuff could be served from S3, and ELB would load balance across the 
>> instances?
> 
> Sounds interesting. Are you talking about Application Load Balancers (ALB) 
> that can do URL-based request routing? We’ve used ALBs for different 
> purposes, but not what you’re describing. My first thought is that involving 
> S3 like that would complicate deployment, but nothing you couldn’t script 
> around somehow.
> 
> For my money, the missing piece in the whole jigsaw remains any kind of 
> (reliable) session portability. What would be cool is using auto-scaling to 
> manage a dynamic appserver pool, but in the absence of portability a 
> scale-down event on a session-based app would kill user sessions, which isn’t 
> a great user experience. If anyone’s got any ideas for _that_ issue, I’m all 
> ears.
> 
> 
> -- 
> Paul Hoadley
> https://logicsquad.net/ <https://logicsquad.net/>
> https://www.linkedin.com/company/logic-squad/
> 
> 
> 
> 

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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


Migrating to google cloud

2017-07-21 Thread Mark Wardle
Dear all,

I am migrating some services to google cloud. I now have a mixture of micro 
services (Apache Cayenne / Bootique) and older (but working well and still very 
much alive and in development) WO applications. These have traditionally been 
hosted on the NHS or more recently on linode, but I’ve take the decision to 
make these applications more widely available.

I am used to a simple single server with PostgreSQL, Monitor and wotaskd  so 
this is a bit of a leap. I’d like to take advantage of Cloud SQL 
(https://cloud.google.com/sql/ <https://cloud.google.com/sql/>) running 
PostgreSQL, and probably use nginx as a front-end for future load-balancing 
with WO instances run from a command-line. 

Has anyone done something similar? Does this sound sensible? Are there any 
gotchas that are going to catch me out? Am I better running monitor / wotaskd?

All advice appreciated,

Best wishes,

Mark

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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: using value conversion/factory to encode objects in blobs

2017-02-26 Thread Mark Wardle
Has anyone done this with the (relatively) new JSON classes for PostgreSQL? 

Mark
> On 26 Feb 2017, at 01:53, Paul Hoadley  wrote:
> 
> Hello,
> 
> On 26 Feb 2017, at 2:49 am, o...@ocs.cz wrote:
> 
>> none of which, far as I know, actually exists. In Objective C the solution 
>> would be trivial, I would simply add appropriate methods through a category; 
>> but the bloody Java thing has no similar support.
>> 
>> What am I missing and how does one solve this?
> 
> The methods don’t have to be on the target class. Take a look at the Joda 
> Time prototypes for an example: they use static methods in the 
> er.prototypes.ValueConversion and ValueFactory classes.
> 
> 
> -- 
> Paul Hoadley
> http://logicsquad.net/
> https://www.linkedin.com/company/logic-squad/
> 
> 
> 
> 
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.org

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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: Maven and eclipse #2 - problem with missing bundle? null mainBundleName()

2016-10-16 Thread Mark Wardle
Paul, you’re a better man than me! I really will do this now you’ve proven it 
is possible….  probably next week… maybe!

Mark

> On 16 Oct 2016, at 01:05, Paul Hoadley  wrote:
> 
> Hi Mark,
> 
> On 6 Sep 2016, at 10:04 PM, Mark Wardle  <mailto:m...@wardle.org>> wrote:
> 
>> It isn’t quite right from eclipse. I can run a newly created application 
>> from within eclipse, but when I try to run a migrated application, I get 
>> this error:
>> 
>>  java.lang.ExceptionInInitializerError
>>  at 
>> com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourceAsStream(WOResourceManager.java:116)
>>  at 
>> com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys(WOProperties.java:317)
>>  at 
>> com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:5743)
>>  at com.webobjects.appserver.WOApplication.(WOApplication.java:779)
>>  at 
>> er.extensions.appserver.ajax.ERXAjaxApplication.(ERXAjaxApplication.java:30)
>>  at 
>> er.extensions.appserver.ERXApplication.(ERXApplication.java:1135)
>>  at com.eldrix.news.app.Application.(Application.java:66)
>>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>  at 
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>>  at 
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>  at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
>>  at java.lang.Class.newInstance(Class.java:438)
>>  at com.webobjects.appserver.WOApplication.main(WOApplication.java:547)
>>  at er.extensions.appserver.ERXApplication.main(ERXApplication.java:890)
>>  at com.eldrix.news.app.Application.main(Application.java:63)
>> Caused by: java.lang.NullPointerException
>>  at 
>> er.extensions.appserver.ERXApplication$Loader.collectMainProps(ERXApplication.java:757)
>>  at 
>> er.extensions.appserver.ERXApplication$Loader.bundleDidLoad(ERXApplication.java:682)
>>  at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>>  at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>  at java.lang.reflect.Method.invoke(Method.java:483)
>>  at 
>> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
>>  at 
>> com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
>>  at 
>> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
>>  at 
>> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:562)
>>  at 
>> com.webobjects.foundation.NSBundle.postNotification(NSBundle.java:2546)
>>  at 
>> com.webobjects.foundation.NSBundle.LoadBundlesFromJars(NSBundle.java:735)
>>  at com.webobjects.foundation.NSBundle.(NSBundle.java:345)
>>  ... 15 more
>> 
>> java.lang.NullPointerException
>>  at 
>> er.extensions.appserver.ERXShutdownHook$1.run(ERXShutdownHook.java:64)
> 
> I just hit this exact issue. You know what it turned out to be? Stale 
> patternsets under woproject—I was migrating a Fluffy Bunny project, and 
> forgot that step. Fixed the patternsets, fixed the NPE.
> 
> 
> -- 
> Paul Hoadley
> http://logicsquad.net/ <http://logicsquad.net/>
> 
> 
> 

 ___
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: Maven with subdirectories within the src/main/components/ path

2016-10-10 Thread Mark Wardle
Thanks Hugi , that's great - as I have only a handful of directories so 
certainly a reasonable workaround. I'm definitely going to try this soon!

Mark

-- 
Dr. Mark Wardle
Consultant Neurologist, Cardiff, UK
(Sent from my mobile)


> On 10 Oct 2016, at 16:45, Hugi Thordarson  wrote:
> 
> You can add each subfolder in your “components”-folder as a resource folder. 
> It’s a pretty horrifying workaround, though and I think we should change the 
> wolifecycle-plugin and align the behaviour with ant's (i.e. subfolders in the 
> components directory should always be flattened by default).
> 
> But for the workaround; add the  element to your pom's build 
> element. Each subfolder gets its own  tag.
> 
> 
>…
>
>
>Resources
>
>${basedir}/src/main/components/Folder1
>
>
>
>Resources
>
>${basedir}/src/main/components/Folder2
>
>
>
>...
> 
> 
> - hugi
> 
> 
>> On 10. okt. 2016, at 07:02, Paul Hoadley  wrote:
>> 
>> On 9 Oct 2016, at 8:14 PM, Paul Hoadley  wrote:
>> 
>>>> On 6 Sep 2016, at 10:00 PM, Mark Wardle  wrote:
>>>> 
>>>> I am getting the following error:
>>>> 
>>>>  No template 
>>>> found for component 
>>>> 
>>>> for components held within subdirectories of src/main/components/  There 
>>>> isn’t a problem for .wo directories stored directly in src/main/components.
>>>> 
>>>> Is there any way of supporting such an organisation?
>>> 
>>> Did you find a work-around for this?
>> 
>> Anyone else? Are people using Maven[1] just using a flat structure under 
>> src/main/components, or is there some work-around we’re missing here?
>> 
>> [1] I’m assuming the intersection of that group with this list is non-empty. 
>> Are there actually any WO-Maven people still here?
>> 
>> 
>> -- 
>> Paul Hoadley
>> http://logicsquad.net/
>> 
>> 
>> 
>> 
>> ___
>> 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/hugi%40karlmenn.is
>> 
>> This email sent to h...@karlmenn.is
> 
> 
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Maven with subdirectories within the src/main/components/ path

2016-10-09 Thread Mark Wardle
Sorry Paul. I was probably just shy of getting it all to work but I had spent 
too long by that point and put it to one side as a challenge for another day…

That said, I have adopted maven for another project (non-WO) and am finding it 
very powerful so I will probably try again [once you’ve someone has fixed this 
subdirectory issue!!!  ;)  ]  Not keen on flattening by component 
subdirectories…

Mark

> On 9 Oct 2016, at 10:44, Paul Hoadley  wrote:
> 
> Hi Mark,
> 
> On 6 Sep 2016, at 10:00 PM, Mark Wardle  wrote:
> 
>> I am getting the following error:
>> 
>>  No template found 
>> for component 
>> 
>> for components held within subdirectories of src/main/components/  There 
>> isn’t a problem for .wo directories stored directly in src/main/components.
>> 
>> Is there any way of supporting such an organisation?
> 
> Did you find a work-around for this?
> 
> 
> -- 
> Paul Hoadley
> http://logicsquad.net/
> 
> 
> 

 ___
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: Changes

2016-10-09 Thread Mark Wardle
Thanks Paul. Done.

Mark

> On 2 Oct 2016, at 07:13, Paul Hoadley  wrote:
> 
> Hi Mark,
> 
> On 21 Sep 2016, at 6:16 AM, Mark Wardle  wrote:
> 
>> I enclose some simple diffs for wonder 7 - snapshot.
>> 
>> The first is a simple typo but its presence is irritating my sensibilities 
>> in my log files.
> 
>> The other is a simple fix to navigation menu item, (ERExtensions) which 
>> ensures a generated URL stays secure if the current request is secure.
> 
> Thanks. I’ve just made a pull request for these:
> 
> https://github.com/wocommunity/wonder/pull/806
> 
> As I note in that ticket, I don’t use this package, but I assume you have the 
> second patch in use and that it does what it seems to do. If you have time, 
> could you add some reassuring comments to the ticket? Then we’ll merge it.
> 
> 
> -- 
> Paul Hoadley
> http://logicsquad.net/
> 
> 
> 


 ___
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

Changes

2016-09-20 Thread Mark Wardle
I enclose some simple diffs for wonder 7 - snapshot.

The first is a simple typo but its presence is irritating my sensibilities in 
my log files.

diff --git 
a/Frameworks/Core/ERExtensions/Sources/er/extensions/appserver/navigation/ERXNavigationItem.java
 
b/Frameworks/Core/ERExtensions/Sources/er/extensions/appserver/navigation/ERXNavigationItem.java
index 055add3..6518077 100644
--- 
a/Frameworks/Core/ERExtensions/Sources/er/extensions/appserver/navigation/ERXNavigationItem.java
+++ 
b/Frameworks/Core/ERExtensions/Sources/er/extensions/appserver/navigation/ERXNavigationItem.java
@@ -225,7 +225,7 @@
}
}
else {
-   log.warn("For nav core object: {} and 
child binding: {} recieved binding object: {}", this, childrenBinding(), o);
+   log.warn("For nav core object: {} and 
child binding: {} received binding object: {}", this, childrenBinding(), o);
}
}
}


The other is a simple fix to navigation menu item, (ERExtensions) which ensures 
a generated URL stays secure if the current request is secure.

diff --git 
a/Frameworks/Core/ERExtensions/Sources/er/extensions/appserver/navigation/ERXNavigationMenuItem.java
 
b/Frameworks/Core/ERExtensions/Sources/er/extensions/appserver/navigation/ERXNavigationMenuItem.java
index 9165d30..03acd48 100644
--- 
a/Frameworks/Core/ERExtensions/Sources/er/extensions/appserver/navigation/ERXNavigationMenuItem.java
+++ 
b/Frameworks/Core/ERExtensions/Sources/er/extensions/appserver/navigation/ERXNavigationMenuItem.java
@@ -117,7 +117,7 @@
if(_linkDirectlyToDirectActions) {
NSMutableDictionary bindings = 
navigationItem().queryBindings().mutableClone();
bindings.setObjectForKey(context().contextID(), 
"__cid");
-   url = 
context().directActionURLForActionNamed(navigationItem().directActionName(), 
bindings);
+   url = 
context().directActionURLForActionNamed(navigationItem().directActionName(), 
bindings, ERXRequest.isRequestSecure(context().request()), false);
} else {
url = context().componentActionURL();
}



Thanks,

Mark


 ___
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: Maven and eclipse #2 - problem with missing bundle? null mainBundleName()

2016-09-08 Thread Mark Wardle
Thank you! 

I really think eclipse got muddled. When I started clearing everything and 
switching back to using ant, eclipse’s filesystem cache thought that there were 
files around that weren’t and hence I deleted all workspaces, eclipse itself 
and started again with a freshly cleared source code tree. I’m tempted to try 
another migration at the weekend - probably aided by beer - which in my 
experience usually helps considerably…

Mark

> On 8 Sep 2016, at 21:06, Hugi Thordarson  wrote:
> 
> I feel your pain, the migration was a chore at first. I’ve ported ~30 
> projects and they all made it in the end. Don’t hesitate to ask if you’d like 
> more hands on assistance—I love helping people migrate to Maven :).
> 
> - hugi
> 
> 
> 
>> On 8. sep. 2016, at 19:55, Mark Wardle  wrote:
>> 
>> Thank you! I did try this and it just wouldn't work with different errors 
>> running from eclipse (as above) and at command-line (odd JDBC no connection 
>> errors as if no connection dictionary was present). I have temporarily given 
>> up and will try again for a new project. I have also upgraded to eclipse 
>> neon and wolips which seems to have less odd errors with opening eomodel 
>> files than before. 
>> 
>> Mark
>> On Tue, 6 Sep 2016 at 14:26, Hugi Thordarson  wrote:
>> Compare your .project and build.properties with those of a new Maven 
>> project. Specifically make sure build.properties has:
>> 
>> classes.dir=target/classes
>> 
>> …and then make sure your .project file contains the maven builder. In fact, 
>> your .project should probably look exactly like this, apart from the project 
>> name:
>> 
>> https://gist.github.com/hugith/6612765b2449b4ab98ec64ea54fd433c
>> 
>> - hugi
>> 
>> 
>> 
>> 
>>> On 6. sep. 2016, at 13:19, Mark Wardle  wrote:
>>> 
>>> Definitely!
>>> 
>>> As a potential solution, I am going to create a new empty application and 
>>> copy across the code and components and other resources and see what 
>>> happens.
>>> 
>>> Mark
>>> 
>>> 
>>>> On 6 Sep 2016, at 14:08, Hugi Thordarson  wrote:
>>>> 
>>>> This was exactly what happened when the old  was missing.You’re 
>>>> sure it’s in place?
>>>> 
>>>> - hugi
>>>> 
>>>> 
>>>> 
>>>>> On 6. sep. 2016, at 12:34, Mark Wardle  wrote:
>>>>> 
>>>>> I can now build my application on the command-line using maven and it is 
>>>>> packaged beautifully!
>>>>> 
>>>>> It isn’t quite right from eclipse. I can run a newly created application 
>>>>> from within eclipse, but when I try to run a migrated application, I get 
>>>>> this error:
>>>>> 
>>>>>  java.lang.ExceptionInInitializerError
>>>>>at 
>>>>> com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourceAsStream(WOResourceManager.java:116)
>>>>>at 
>>>>> com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys(WOProperties.java:317)
>>>>>at 
>>>>> com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:5743)
>>>>>at 
>>>>> com.webobjects.appserver.WOApplication.(WOApplication.java:779)
>>>>>at 
>>>>> er.extensions.appserver.ajax.ERXAjaxApplication.(ERXAjaxApplication.java:30)
>>>>>at 
>>>>> er.extensions.appserver.ERXApplication.(ERXApplication.java:1135)
>>>>>at com.eldrix.news.app.Application.(Application.java:66)
>>>>>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
>>>>> Method)
>>>>>at 
>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>>>>>at 
>>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>>>>at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
>>>>>at java.lang.Class.newInstance(Class.java:438)
>>>>>at com.webobjects.appserver.WOApplication.main(WOApplication.java:547)
>>>>>at er.extensions.appserver.ERXApplication.main(ERXApplication.java:890)
>>>>>at com.eldrix.news.app.Application.main(Application.java:63)
>>>>> Caused by: java.lang.NullPointerException
>>>>>at 
>>>>> er.extensions

Re: Maven and eclipse #2 - problem with missing bundle? null mainBundleName()

2016-09-08 Thread Mark Wardle
Thank you! I did try this and it just wouldn't work with different errors
running from eclipse (as above) and at command-line (odd JDBC no connection
errors as if no connection dictionary was present). I have temporarily
given up and will try again for a new project. I have also upgraded to
eclipse neon and wolips which seems to have less odd errors with opening
eomodel files than before.

Mark
On Tue, 6 Sep 2016 at 14:26, Hugi Thordarson  wrote:

> Compare your .project and build.properties with those of a new Maven
> project. Specifically make sure build.properties has:
>
> classes.dir=target/classes
>
> …and then make sure your .project file contains the maven builder. In
> fact, your .project should probably look exactly like this, apart from the
> project name:
>
> https://gist.github.com/hugith/6612765b2449b4ab98ec64ea54fd433c
>
> - hugi
>
>
>
>
> > On 6. sep. 2016, at 13:19, Mark Wardle  wrote:
> >
> > Definitely!
> >
> > As a potential solution, I am going to create a new empty application
> and copy across the code and components and other resources and see what
> happens.
> >
> > Mark
> >
> >
> >> On 6 Sep 2016, at 14:08, Hugi Thordarson  wrote:
> >>
> >> This was exactly what happened when the old  was missing.You’re
> sure it’s in place?
> >>
> >> - hugi
> >>
> >>
> >>
> >>> On 6. sep. 2016, at 12:34, Mark Wardle  wrote:
> >>>
> >>> I can now build my application on the command-line using maven and it
> is packaged beautifully!
> >>>
> >>> It isn’t quite right from eclipse. I can run a newly created
> application from within eclipse, but when I try to run a migrated
> application, I get this error:
> >>>
> >>>  java.lang.ExceptionInInitializerError
> >>> at
> com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourceAsStream(WOResourceManager.java:116)
> >>> at
> com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys(WOProperties.java:317)
> >>> at
> com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:5743)
> >>> at
> com.webobjects.appserver.WOApplication.(WOApplication.java:779)
> >>> at
> er.extensions.appserver.ajax.ERXAjaxApplication.(ERXAjaxApplication.java:30)
> >>> at
> er.extensions.appserver.ERXApplication.(ERXApplication.java:1135)
> >>> at com.eldrix.news.app.Application.(Application.java:66)
> >>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> >>> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> >>> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> >>> at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
> >>> at java.lang.Class.newInstance(Class.java:438)
> >>> at
> com.webobjects.appserver.WOApplication.main(WOApplication.java:547)
> >>> at
> er.extensions.appserver.ERXApplication.main(ERXApplication.java:890)
> >>> at com.eldrix.news.app.Application.main(Application.java:63)
> >>> Caused by: java.lang.NullPointerException
> >>> at
> er.extensions.appserver.ERXApplication$Loader.collectMainProps(ERXApplication.java:757)
> >>> at
> er.extensions.appserver.ERXApplication$Loader.bundleDidLoad(ERXApplication.java:682)
> >>> at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> >>> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >>> at java.lang.reflect.Method.invoke(Method.java:483)
> >>> at
> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
> >>> at
> com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
> >>> at
> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
> >>> at
> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:562)
> >>> at
> com.webobjects.foundation.NSBundle.postNotification(NSBundle.java:2546)
> >>> at
> com.webobjects.foundation.NSBundle.LoadBundlesFromJars(NSBundle.java:735)
> >>> at com.webobjects.foundation.NSBundle.(NSBundle.java:345)
> >>> ... 15 more
> >>>
> >>> java.lang.NullPointerException
> >>> at
> er.extensions.a

Re: The WOCommunity slack channel

2016-09-06 Thread Mark Wardle
I'll add some information on my gopher site

On Tue, 6 Sep 2016 at 19:45, Chuck Hill  wrote:

> Might as well include me.  Now I have to figure out what Slack is.  :-P
> The Internet is No Place for Old Men!
>
>
>
>
>
> *From: * on
> behalf of Markus Ruggiero 
> *Date: *Tuesday, September 6, 2016 at 6:57 AM
> *To: *"webobjects-dev@lists.apple.com" 
> *Subject: *Re: The WOCommunity slack channel
>
>
>
> also interested, please add me in
>
>
>
> ---markus---
>
>
>
>
>
> On 06.09.2016, at 14:01, Hugi Thordarson  wrote:
>
> Hi all,
>
> just wanted to remind you that Samuel Pelletier created a slack channel
> for the WOCommunity. It’s a lovely little place for chatting about WO. Just
> let us know if you’d like an invite so you can join.
>
> Cheers,
>
> - hugi
>
> // Hugi Thordarson
>
> // http://www.loftfar.is/
>
> // s. 895-6688
>
> ___
>
> 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/mailinglists%40kataputt.com
>
> This email sent to mailingli...@kataputt.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:
>
>
> https://lists.apple.com/mailman/options/webobjects-dev/chill%40gevityinc.com
>
>
>
> This email sent to ch...@gevityinc.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:
> https://lists.apple.com/mailman/options/webobjects-dev/mark%40wardle.org
>
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Maven and eclipse #2 - problem with missing bundle? null mainBundleName()

2016-09-06 Thread Mark Wardle
Definitely! 

As a potential solution, I am going to create a new empty application and copy 
across the code and components and other resources and see what happens.

Mark


> On 6 Sep 2016, at 14:08, Hugi Thordarson  wrote:
> 
> This was exactly what happened when the old  was missing.You’re sure 
> it’s in place?
> 
> - hugi
> 
> 
> 
>> On 6. sep. 2016, at 12:34, Mark Wardle  wrote:
>> 
>> I can now build my application on the command-line using maven and it is 
>> packaged beautifully! 
>> 
>> It isn’t quite right from eclipse. I can run a newly created application 
>> from within eclipse, but when I try to run a migrated application, I get 
>> this error:
>> 
>>  java.lang.ExceptionInInitializerError
>>  at 
>> com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourceAsStream(WOResourceManager.java:116)
>>  at 
>> com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys(WOProperties.java:317)
>>  at 
>> com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:5743)
>>  at com.webobjects.appserver.WOApplication.(WOApplication.java:779)
>>  at 
>> er.extensions.appserver.ajax.ERXAjaxApplication.(ERXAjaxApplication.java:30)
>>  at 
>> er.extensions.appserver.ERXApplication.(ERXApplication.java:1135)
>>  at com.eldrix.news.app.Application.(Application.java:66)
>>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>  at 
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>>  at 
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>  at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
>>  at java.lang.Class.newInstance(Class.java:438)
>>  at com.webobjects.appserver.WOApplication.main(WOApplication.java:547)
>>  at er.extensions.appserver.ERXApplication.main(ERXApplication.java:890)
>>  at com.eldrix.news.app.Application.main(Application.java:63)
>> Caused by: java.lang.NullPointerException
>>  at 
>> er.extensions.appserver.ERXApplication$Loader.collectMainProps(ERXApplication.java:757)
>>  at 
>> er.extensions.appserver.ERXApplication$Loader.bundleDidLoad(ERXApplication.java:682)
>>  at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>>  at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>  at java.lang.reflect.Method.invoke(Method.java:483)
>>  at 
>> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
>>  at 
>> com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
>>  at 
>> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
>>  at 
>> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:562)
>>  at 
>> com.webobjects.foundation.NSBundle.postNotification(NSBundle.java:2546)
>>  at 
>> com.webobjects.foundation.NSBundle.LoadBundlesFromJars(NSBundle.java:735)
>>  at com.webobjects.foundation.NSBundle.(NSBundle.java:345)
>>  ... 15 more
>> 
>> java.lang.NullPointerException
>>  at 
>> er.extensions.appserver.ERXShutdownHook$1.run(ERXShutdownHook.java:64)
>> 
>> I have ensured that I have the correct .project file. It looks as if 
>> NSProperties._mainBundleName(); is returning null.
>> 
>> This doesn’t occur when building and running from the command-line. I have 
>> tried a clean, refresh and maven refresh with no fix.
>> 
>> Mark
>> 
>> ___
>> 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/hugi%40karlmenn.is
>> 
>> This email sent to h...@karlmenn.is
> 


 ___
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

Maven and eclipse #2 - problem with missing bundle? null mainBundleName()

2016-09-06 Thread Mark Wardle
I can now build my application on the command-line using maven and it is 
packaged beautifully! 

It isn’t quite right from eclipse. I can run a newly created application from 
within eclipse, but when I try to run a migrated application, I get this error:

 java.lang.ExceptionInInitializerError
at 
com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourceAsStream(WOResourceManager.java:116)
at 
com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys(WOProperties.java:317)
at 
com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:5743)
at com.webobjects.appserver.WOApplication.(WOApplication.java:779)
at 
er.extensions.appserver.ajax.ERXAjaxApplication.(ERXAjaxApplication.java:30)
at 
er.extensions.appserver.ERXApplication.(ERXApplication.java:1135)
at com.eldrix.news.app.Application.(Application.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at com.webobjects.appserver.WOApplication.main(WOApplication.java:547)
at er.extensions.appserver.ERXApplication.main(ERXApplication.java:890)
at com.eldrix.news.app.Application.main(Application.java:63)
Caused by: java.lang.NullPointerException
at 
er.extensions.appserver.ERXApplication$Loader.collectMainProps(ERXApplication.java:757)
at 
er.extensions.appserver.ERXApplication$Loader.bundleDidLoad(ERXApplication.java:682)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at 
com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
at 
com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
at 
com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
at 
com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:562)
at 
com.webobjects.foundation.NSBundle.postNotification(NSBundle.java:2546)
at 
com.webobjects.foundation.NSBundle.LoadBundlesFromJars(NSBundle.java:735)
at com.webobjects.foundation.NSBundle.(NSBundle.java:345)
... 15 more

java.lang.NullPointerException
at 
er.extensions.appserver.ERXShutdownHook$1.run(ERXShutdownHook.java:64)

I have ensured that I have the correct .project file. It looks as if 
NSProperties._mainBundleName(); is returning null.

This doesn’t occur when building and running from the command-line. I have 
tried a clean, refresh and maven refresh with no fix.

Mark

 ___
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

Maven with subdirectories within the src/main/components/ path

2016-09-06 Thread Mark Wardle
Dear all,

I am slowly making progress in my switch to maven. I still think it is worth it.

I am getting the following error:

 No template found for 
component 

for components held within subdirectories of src/main/components/  There isn’t 
a problem for .wo directories stored directly in src/main/components.

Is there any way of supporting such an organisation?

Mark


 ___
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: Deadlocks, editing context locking and network tasks

2016-09-05 Thread Mark Wardle
Dear René,

Thank you. This is really helpful. I hadn’t spotted the screencast and will 
check it out.

Mark

> On 5 Sep 2016, at 09:34, René Bock  wrote:
> 
> Hi Mark
> 
>> Am 03.09.2016 um 22:36 schrieb Mark Wardle :
>> 
>> Dear all,
>> 
>> I’m debugging a deadlock and realise that I probably need to re-design some 
>> of my code logic.
>> 
>> Am I right in saying…
>> 
>> 1. For a background thread, it is appropriate to create a new editing 
>> context (ERXEC.newEditingContext(osc)) using a dedicated and new object 
>> store coordinator (created using osc = new ERXObjectStoreCoordinator()).
> 
> you should do that.
> 
>> 
>> 2. For a background thread, all such editing contexts should be lock()’ed 
>> and then unlock()’ed - unlocked in finally {} clause in case of uncaught 
>> exceptions. Automatic locking is only for ECs used within the R-R loop?
> 
> yes
> 
>> 
>> 3. But what should one do if, either during a background thread, R-R loop 
>> (direct action or component action), one locks an editing context, does some 
>> processing of objects within that context, makes a network call, and then 
>> does some more processing within that context. Should one simply lock() and 
>> then hope for the best, or unlock, do the network process and then re-lock 
>> at the end. Are there any issues running unlock() if the EC isn’t actually 
>> locked? What happens if that network call never returns?
> 
> You should handle network time-outs ;-)  How long may the remote call may 
> take? Seconds, minutes or hours? If you have many background tasks waiting 
> network I/O, you may run out of OSCs or memory.. 
> 
> 
>> 
>> 4. Is locking an EC from a newly created OSC completely independent from all 
>> other OSC ECs?
> 
> If you lock en EC, the other OSC (and theire ECs) are not affected
> 
>> If that lock isn’t released for some time, does it matter?
> 
> see above.
> 
>> 
>> All advice appreciated,
> 
> 
> By the way: there is a very helpful screencast on wocummunity:
> 
> http://www.wocommunity.org/podcasts/wowodc/2011/BackgroundTasks.mov
> 
> 
> Best regards
> 
> René Bock
> 
> --
> Phone: +49 69 650096 18
> 
> salient GmbH, Lindleystraße 12, 60314 Frankfurt
> Main: +49 69 65 00 96 0  |  http://www.salient-doremus.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: Maven - No template found for component Main

2016-09-05 Thread Mark Wardle
Hugi,

Thank you. It works!

Mark
> On 4 Sep 2016, at 23:16, Hugi Thordarson  wrote:
> 
> You probably need to open the Eclipse .project-file in your project and add:
> 
> org.maven.ide.eclipse.maven2Nature
> 
> …as a project nature (inside the “natures"-tag).
> 
> WebObjects uses this identifier to determine if the project is a Maven 
> project, if it isn’t present it will think the bundle is FluffyBunny and 
> looks for resources in wrong places.
> 
> The nature identifier was changed in Eclipse a while back (to 
> “org.eclipse.m2e.core.maven2Nature”, which you’ll see listed in your natures) 
> but unfortunately the old name is defined in ERFoundarion.jar, a top secret, 
> closed source jar donated to Wonder by Apple, so fixing this isn’t 
> straightforward.
> 
> ——
> 
> This is probably the third or fourth time this is mentioned. We need to fix 
> this.
> 
> But anyway; WO with Maven seriously rocks, once you get going :).
> 
> - hugi
> 
> 
>> On 4. sep. 2016, at 21:26, Mark Wardle  wrote:
>> 
>> Dear all,
>> 
>> I have successfully used maven with a non-WO application so I was keen to 
>> switch and make it easy for me to use some jar-based libraries of my own 
>> within WO.
>> 
>> I have created an empty maven project using two different archetypes [from 
>> http://maven.wocommunity.org/service/local/repositories/snapshots/content/archetype-catalog.xml]
>>   using the 2.2-SNAPSHOT version of woapplication-archetype as well as 
>> erxapplication-archetype. Both build beautifully from the command-line and 
>> run with no problems in direct connect mode it seems.
>> 
>> However, running from within eclipse in direct connect mode results in an 
>> error  No template 
>> found for component Main at "file:/Users/mark/Dev/rsdb/projects/rstest-pw/“  
>> from the erxapplication-archetype application. There are no such problems 
>> from woapplication-archetype.
>> 
>> I added 
>> 
>>  if (isDirectConnectEnabled()) {
>>registerRequestHandler(new JarResourceRequestHandler(), 
>> "wr");
>>  }
>> 
>> to my Application class, with JarResourceRequestHandler code from 
>> https://gist.github.com/hprange/1068523 but this did not fix the problem.
>> 
>> If I add Project Wonder dependencies to the plain WO app, it runs but I get 
>> the error above until I remove them. 
>> 
>> If there is no problem at the command-line but only with eclipse, and only 
>> when using Project Wonder, there must be some misconfiguration on my part 
>> within eclipse? Should I upgrade to 3.6? eclipse.org has been down all day 
>> but otherwise I would have updated.
>> 
>> Any suggestions would be gratefully received!
>> 
>> Mark
>> 
>> -- 
>> Dr. Mark Wardle
>> Consultant Neurologist, University Hospital Wales, Cardiff, UK
>> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
>> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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/hugi%40karlmenn.is
>> 
>> This email sent to h...@karlmenn.is
> 


 ___
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

Maven - No template found for component Main

2016-09-04 Thread Mark Wardle
Dear all,

I have successfully used maven with a non-WO application so I was keen to 
switch and make it easy for me to use some jar-based libraries of my own within 
WO.

I have created an empty maven project using two different archetypes [from 
http://maven.wocommunity.org/service/local/repositories/snapshots/content/archetype-catalog.xml]
 
<http://maven.wocommunity.org/service/local/repositories/snapshots/content/archetype-catalog.xml%5D>
  using the 2.2-SNAPSHOT version of woapplication-archetype as well as 
erxapplication-archetype. Both build beautifully from the command-line and run 
with no problems in direct connect mode it seems.

However, running from within eclipse in direct connect mode results in an error 
 No template found for 
component Main at "file:/Users/mark/Dev/rsdb/projects/rstest-pw/“  from the 
erxapplication-archetype application. There are no such problems from 
woapplication-archetype.

I added 

if (isDirectConnectEnabled()) {
  registerRequestHandler(new JarResourceRequestHandler(), 
"wr");
}

to my Application class, with JarResourceRequestHandler code from 
https://gist.github.com/hprange/1068523 
<https://gist.github.com/hprange/1068523> but this did not fix the problem.

If I add Project Wonder dependencies to the plain WO app, it runs but I get the 
error above until I remove them. 

If there is no problem at the command-line but only with eclipse, and only when 
using Project Wonder, there must be some misconfiguration on my part within 
eclipse? Should I upgrade to 3.6? eclipse.org <http://eclipse.org/> has been 
down all day but otherwise I would have updated.

Any suggestions would be gratefully received!

Mark

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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

Deadlocks, editing context locking and network tasks

2016-09-03 Thread Mark Wardle
Dear all,

I’m debugging a deadlock and realise that I probably need to re-design some of 
my code logic.

Am I right in saying…

1. For a background thread, it is appropriate to create a new editing context 
(ERXEC.newEditingContext(osc)) using a dedicated and new object store 
coordinator (created using osc = new ERXObjectStoreCoordinator()).

2. For a background thread, all such editing contexts should be lock()’ed and 
then unlock()’ed - unlocked in finally {} clause in case of uncaught 
exceptions. Automatic locking is only for ECs used within the R-R loop?

3. But what should one do if, either during a background thread, R-R loop 
(direct action or component action), one locks an editing context, does some 
processing of objects within that context, makes a network call, and then does 
some more processing within that context. Should one simply lock() and then 
hope for the best, or unlock, do the network process and then re-lock at the 
end. Are there any issues running unlock() if the EC isn’t actually locked? 
What happens if that network call never returns?

4. Is locking an EC from a newly created OSC completely independent from all 
other OSC ECs? If that lock isn’t released for some time, does it matter?

All advice appreciated,

Mark

PS. Using Wonder, using safeLock ERXEC flag in application properties.


 ___
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: Avoiding session creation for DirectActions

2016-05-31 Thread Mark Wardle
Don’t create sessions in your Direct Actions. 

Use existingSession() rather than session() (latter will create one if there 
isn’t one). For example:

/**
 * Do we have a current and valid logged in user?
 * This method is careful not to create a session if one does not exist.
 * @return
 */
public boolean isLoggedIn() {
Session session = (Session) existingSession();
if (session != null) {
return session.isUserAuthenticated();
}
return false;
}


> On 31 May 2016, at 16:35, Musall Maik  wrote:
> 
> Hi all,
> 
> in an application that gets frequent DirectAction calls from other 
> applications, I'd like to reduce the overhead of creating a new session for 
> every request. Currently I'm setting a short timeout, but creating and 
> removing all those sessions seems like avoidable overhead.
> 
> How about overriding WOApplication.createSessionForRequest()? I could try to 
> determine if it was called from within DA processing, and then return a 
> pooled session, but as I see it I'd have to fiddle with the 
> _activeSessionsCount to compensate, and I suspect the rest of WOApplication 
> always expects this method to return a newly created session.
> 
> So, does anyone else do something similar?
> 
> Thanks
> Maik
> 
> 
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Follow up on closure

2016-05-13 Thread Mark Wardle
I agree and have bought bronze membership to ensure that no-one is left out of 
pocket.

WO has benefitted me and my users and patients enormously. We have over 3000 
clinical encounters recorded every month tracking patient cohorts and their 
outcomes. We have over 2 patients ERRest made building iPad clients trivial 
and the system keeps on running and has done since 2009. Thank you all for 
helping with this as WO and Wonder have been fundamental in its success.

Extraordinarily surprised that Apple hasn’t understood or appreciated what it 
has. For complex applications supporting complex business rules (like 
medicine), I haven’t been able to find another technology stack that would make 
things quite as easy as WO. 

Mark

> On 12 May 2016, at 19:53, Calven Eggert  wrote:
> 
> I too would like to say thank you to the entire WO community for their 
> assistance over the years.  WebObjects is not going anywhere soon as far as 
> I'm concerned.  If that counts for anything:)
> 
> FYI, I work for UHN (a group of teaching hospitals) in Toronto.  We have been 
> using WO apps for over 15 years.  We actively maintain about half a dozen 
> applications, putting out new versions regularly.  All applications run on 
> the intranet.  We've built a framework that all the apps use and that 
> framework as of last year is now using Project WOnder.  We get requests for 
> new applications regularly and we are working on another fair size 
> application as we speak.  With the use of WO and Project Wonder it certain 
> feels like we deliver applications faster than many other bigger IT groups in 
> the company.
> 
> BTW, A colleague and I are excited that we will be attending wowodc in 
> Montreal.
> 
> 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:
> https://lists.apple.com/mailman/options/webobjects-dev/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Nefarious IE / javascript / D2W problem

2016-05-08 Thread Mark Wardle
Dear all,

There are probably not many who might encounter this as a problem as the 
combination of D2W and IE and javascript is less likely. However, I can see it 
might appear if you use ERModernLook’s ERMODTabInspectPage as it looks as if it 
would be subject to the same problem.

Essentially, I was struggling with Internet Explorer ignoring AjaxObserveField 
and AjaxUpdateContainers. I finally tracked it down to a syntax error in 
prototype.js

  function evalScripts() {
return this.extractScripts().map(function(script) { return eval(script); });
  }

It turns out that some of the generated javascript on the page was throwing a 
syntax error on IE - namely some of my D2W page templates that use the 
following to give focus to the first textfield of the D2W page:


Script: WOJavaScript {
scriptString = tabScriptString;
hideInComment = true;
}

The problem is fixed simply by changing hideInComment to false. No more 
Internet Explorer issues.

Unless you are using D2W, then you won’t see this issue but I suggest that 
ERMODTabInspectPage is modified as above to prevent others having the same 
issue.

Best wishes,

Mark
-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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: Ajax version of WOActiveImage

2016-05-05 Thread Mark Wardle
Ok. I’ve done this using some javascript and a plain ol’ image. If it helps 
anyone else…  [see https://twitter.com/mwardle/status/728250997588541441 on how 
I’m using it]. It only uses the data binding as the image is dynamically 
generated annotated with the clicks saved previously but implementing other 
bindings is left as an exercise to the reader…

Best wishes,

Mark

AjaxActiveImage.html


AjaxActiveImage.wod
Image: WOImage {
class = ^class;
alt = ^alt;
border = ^border;
data = ^data;
mimeType = ^mimeType;
id = safeElementID;
style = ^style;
onclick = onClick;
width = ^width;
height = ^height;
}

AjaxActiveImage.java:
package com.eldrix.news.components;

import com.webobjects.appserver.WOActionResults;
import com.webobjects.appserver.WOComponent;
import com.webobjects.appserver.WOContext;
import com.webobjects.appserver.WORequest;
import com.webobjects.appserver.WOResponse;

import er.ajax.AjaxComponent;
import er.ajax.AjaxUtils;
import er.extensions.foundation.ERXStringUtilities;

public class AjaxActiveImage extends AjaxComponent {
private static final long serialVersionUID = 1L;

public AjaxActiveImage(WOContext context) {
super(context);
}

@Override
protected void addRequiredWebResources(WOResponse response) {
addScriptResourceInHead(response, "prototype.js");
addScriptResourceInHead(response, "effects.js");
addScriptResourceInHead(response, "wonder.js");
}

@Override
public WOActionResults handleRequest(WORequest request, WOContext 
context) {
WOComponent component = context.component();
Integer x = 
ERXStringUtilities.integerWithString((String)request.formValueForKey("x"));
Integer y = 
ERXStringUtilities.integerWithString((String)request.formValueForKey("y"));
setValueForBinding(x, "x");
setValueForBinding(y, "y");
WOActionResults results = (WOActionResults) 
valueForBinding("action", component);
if (results == null) {
String script = (String) 
valueForBinding("onClickServer", component);
if (script != null) {
WOResponse response = 
AjaxUtils.createResponse(request, context);
AjaxUtils.appendScriptHeader(response);
response.appendContentString(script);
AjaxUtils.appendScriptFooter(response);
results = response;
}
}
return results;
}

public String onClick() {
StringBuilder sb = new StringBuilder();
if (!booleanValueForBinding("disabled", false)) {
String actionUrl = 
AjaxUtils.ajaxComponentActionUrl(context());
sb.append("var canvas = document.getElementById('");
sb.append(safeElementID());
sb.append("');var rect = 
canvas.getBoundingClientRect();var x = Math.round((event.clientX - rect.left) / 
(rect.right - rect.left) * canvas.width); var y = Math.round((event.clientY - 
rect.top) / (rect.bottom - rect.top) * canvas.height);");
sb.append("new Ajax.Request('");
sb.append(actionUrl);
sb.append("', ");
sb.append("{method:'post', parameters:{x:x,y:y}");
String onSuccess = (String) 
valueForBinding("onSuccess", context().component());
if (onSuccess != null) {
sb.append(",onSuccess:");
sb.append(onSuccess);
}
sb.append("}");
sb.append("); return false");
String onClick = (String) valueForBinding("onClick", 
context().component());
if (onClick != null) {
sb.append(';');
    sb.append(onClick);
}
}
return sb.toString();
}

@Override
public boolean isStateless() {
return true;
}
}
> On 3 May 2016, at 16:02, Mark Wardle  wrote:
> 
> Hi all,
> 
> I would like the functionality of a WOActiveImage but don’t wish to have a 
> full submit. I end up reloading the whole page. Each click adds a coordinate 
> and I manually add a letter to a static PNG to

Ajax version of WOActiveImage

2016-05-03 Thread Mark Wardle
Hi all,

I would like the functionality of a WOActiveImage but don’t wish to have a full 
submit. I end up reloading the whole page. Each click adds a coordinate and I 
manually add a letter to a static PNG to show injections of botulinum toxin 
treatment but on each click the page scrolls.

I saw a similar question on the mailing list but there was no solution that I 
could see in obtaining the X,Y coordinates of the mouse click.

Many thanks,

Mark






 ___
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: Deadlock / stack interpretation

2016-04-09 Thread Mark Wardle
Thank you for all of the advice.

Samuel: I would say yes to both questions…

Chuck: I have renamed any background threads so next time I have a deadlock, it 
might be easier…

Jon: I am contemplating switching to ERXTask which will use a OSC pool as you 
describe, should this crop up again.

Mark

> On 6 Apr 2016, at 16:27, Samuel Pelletier  wrote:
> 
> Hi Mark,
> 
> You do not take the globalId of Document, because it is not an EO and does 
> not have any EO attributes right ?
> 
> Is Report and ExternalDocumentStore are committed to the database when this 
> code is running ?
> 
> If you answered yes to both questions, I think your problem is in another 
> piece of code.
> 
> Samuel
> 
> 
>> Le 5 avr. 2016 à 18:14, Mark Wardle > <mailto:m...@wardle.org>> a écrit :
>> 
>> Thanks Chuck. I have looked at this code. I do spin out a separate thread to 
>> do some background processing after a particular request. I thought that 
>> passing a EOGlobalID would be safe. The class below takes a Document (an 
>> immutable and thread-safe POJO), a Report and an ExternalDocumentStore (both 
>> EOEnterpriseObjects). I just wonder whether I should use 
>> ERXEOGlobalIDUtilities.fetchObjectWithGlobalID() instead of 
>> EOEditingContext.faultForGlobalID() as the former seems to be much more 
>> complex and this might be for a good reason?
>> 
>> 
>>  static class ReportPublisher implements Runnable {
>>  final Document _document;
>>  final EOGlobalID _reportGlobalId;
>>  final EOGlobalID _storeGlobalId;
>> 
>>  ReportPublisher(final Document doc, Report report, 
>> ExternalDocumentStore store) {
>>  if (doc == null || report == null || store == null) {
>>  throw new NullPointerException("A document, 
>> report and store must be supplied.");
>>  }
>>  _document = doc;
>>  _reportGlobalId = report.permanentGlobalID();
>>  _storeGlobalId = store.permanentGlobalID();
>>  } 
>> 
>>  @Override
>>  public void run() {
>>  log.debug("Publishing document '" + 
>> _document.description() +"' in background thread...");
>>  NSTimestamp started = new NSTimestamp();
>>  EOEditingContext ec = ERXEC.newEditingContext();
>>  try {
>>  ec.lock();
>>  ExternalDocumentStore store = 
>> (ExternalDocumentStore) ec.faultForGlobalID(_storeGlobalId, ec);
>>  if (store != null) {
>>  log.debug("Publishing using repository 
>> from class: " +store.implementationClassName());
>>  Class clazz = 
>> Class.forName(store.implementationClassName());
>>  Object reposObject = 
>> clazz.newInstance();
>>  if (reposObject instanceof 
>> DocumentRepository) {
>>  DocumentRepository repos = 
>> (DocumentRepository) reposObject;
>>  DocumentReceipt receipt = 
>> repos.publishDocument(_document);
>>  NSTimestamp finished = new 
>> NSTimestamp();
>>  log.debug(receipt.message());
>>  if (receipt.success()) {
>>  log.debug("Successfully 
>> published document:" + _document.description());
>>  Report r = (Report) 
>> ec.faultForGlobalID(_reportGlobalId, ec);
>>  PublishedReport pr = 
>> r.createPublishedReportsRelationship();
>>  
>> pr.setExternalDocumentStoreRelationship(store);
>>  
>> pr.setReportRelationship(r);
>>  
>> pr.setDateTimeStarted(started);
>>  
>> pr.setDateTimeFinished(finished);
>>  ec.saveChanges();
>>  

Re: Deadlock / stack interpretation

2016-04-06 Thread Mark Wardle
I'll try that for all threads and see what happens. I have changed to using the 
utility methods in ERXEOGlobalIDUtilities in any case. 

Thank you

Mark

-- 
Dr. Mark Wardle
Consultant Neurologist, Cardiff, UK
(Sent from my mobile)


> On 5 Apr 2016, at 23:32, Chuck Hill  wrote:
> 
> That code does not look to be the source of this deadlock.  As a helpful 
> hint, having this code set the thread name to _document.description() makes 
> debugging things like this easier.
> 
> Chuck
> 
> 
> From: Mark Wardle 
> Date: Tuesday, April 5, 2016 at 3:14 PM
> To: Chuck Hill 
> Cc: WebObjects Dev Apple 
> Subject: Re: Deadlock / stack interpretation
> 
> Thanks Chuck. I have looked at this code. I do spin out a separate thread to 
> do some background processing after a particular request. I thought that 
> passing a EOGlobalID would be safe. The class below takes a Document (an 
> immutable and thread-safe POJO), a Report and an ExternalDocumentStore (both 
> EOEnterpriseObjects). I just wonder whether I should use 
> ERXEOGlobalIDUtilities.fetchObjectWithGlobalID() instead of 
> EOEditingContext.faultForGlobalID() as the former seems to be much more 
> complex and this might be for a good reason?
> 
> 
> staticclass ReportPublisher implements Runnable {
> final Document _document;
> final EOGlobalID _reportGlobalId;
> final EOGlobalID _storeGlobalId;
> 
> ReportPublisher(final Document doc, Report report, ExternalDocumentStore 
> store) {
> if (doc == null || report == null || store == null) {
> thrownew NullPointerException("A document, report and store must be 
> supplied.");
> }
> _document = doc;
> _reportGlobalId = report.permanentGlobalID();
> _storeGlobalId = store.permanentGlobalID();
> } 
> 
> @Override
> publicvoid run() {
> log.debug("Publishing document '" + _document.description() +"' in background 
> thread...");
> NSTimestamp started = new NSTimestamp();
> EOEditingContext ec = ERXEC.newEditingContext();
> try {
> ec.lock();
> ExternalDocumentStore store = (ExternalDocumentStore) 
> ec.faultForGlobalID(_storeGlobalId, ec);
> if (store != null) {
> log.debug("Publishing using repository from class: " 
> +store.implementationClassName());
> Class clazz = Class.forName(store.implementationClassName());
> Object reposObject = clazz.newInstance();
> if (reposObjectinstanceof DocumentRepository) {
> DocumentRepository repos = (DocumentRepository) reposObject;
> DocumentReceipt receipt = repos.publishDocument(_document);
> NSTimestamp finished = new NSTimestamp();
> log.debug(receipt.message());
> if (receipt.success()) {
> log.debug("Successfully published document:" + _document.description());
> Report r = (Report) ec.faultForGlobalID(_reportGlobalId, ec);
> PublishedReport pr = r.createPublishedReportsRelationship();
> pr.setExternalDocumentStoreRelationship(store);
> pr.setReportRelationship(r);
> pr.setDateTimeStarted(started);
> pr.setDateTimeFinished(finished);
> ec.saveChanges();
> }
> } else {
> log.debug("Instance of class not a type of DocumentRepository.");
> }
> }
> else {
> log.debug("No store found for global id: " +_storeGlobalId);
> }
> } catch (ClassNotFoundException|InstantiationException|IllegalAccessException 
> e) {
> e.printStackTrace();
> }
> finally {
> ec.unlock();
> }
> }
> }
> 
> 
> Am I doing something wrong converting a EOGlobalID to a proper EO in a 
> background thread?
> 
> Mark
> 
> 
>> On 1 Apr 2016, at 06:03, Chuck Hill  wrote:
>> 
>> Hi Mark
>> 
>> Found one Java-level deadlock:
>> =
>> "WorkerThread127":
>>   waiting for ownable synchronizer 0xec9b7b48, (a 
>> java.util.concurrent.locks.ReentrantLock$NonfairSync),
>>   which is held by "Thread-5”
>> 
>> So this is waiting for an OSC lock:
>> "WorkerThread127":
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0xec9b7b48> (a 
>> java.util.concurrent.locks.ReentrantLock$NonfairSync)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
>> at 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
>> at 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
>> at 
>> java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
>> at java.util.concu

Re: Deadlock / stack interpretation

2016-04-05 Thread Mark Wardle
ec9b7b48> (a 
> java.util.concurrent.locks.ReentrantLock$NonfairSync)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
> at 
> java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
> at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
> at 
> com.webobjects.eocontrol.EOObjectStoreCoordinator.lock(EOObjectStoreCoordinator.java:420)
> at 
> com.webobjects.eocontrol.EOEditingContext.lockObjectStore(EOEditingContext.java:4666)
> 
> "Thread-5":
>   waiting for ownable synchronizer 0xf60726a0, (a 
> java.util.concurrent.locks.ReentrantLock$NonfairSync),
>   which is held by "WorkerThread5"
> 
> This thread is holding the OSC lock and is waiting for an EC lock:
> "Thread-5":
> at sun.misc.Unsafe.park(Native Method)
> - parking to wait for  <0xf60726a0> (a 
> java.util.concurrent.locks.ReentrantLock$NonfairSync)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
> at 
> java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
> at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
> at com.webobjects.eocontrol.EOEditingContext.lock(EOEditingContext.java:4617)
> 
> 
> "WorkerThread5":
>   waiting for ownable synchronizer 0xec9b7b48, (a 
> java.util.concurrent.locks.ReentrantLock$NonfairSync),
>   which is held by "Thread-5"
> 
> And this thread has the EC lock and is waiting for the OSC lock:
> "WorkerThread5":
> at sun.misc.Unsafe.park(Native Method)
> - parking to wait for  <0xec9b7b48> (a 
> java.util.concurrent.locks.ReentrantLock$NonfairSync)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
> at 
> java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
> at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
> at 
> com.webobjects.eocontrol.EOObjectStoreCoordinator.lock(EOObjectStoreCoordinator.java:420)
> 
> What you have here is lock order inversion.  How is it that Thread-5 and 
> WorkerThread5 are using the same EC?  Or is that the Shared EC?  Are you 
> using the SEC?  
> 
> Understanding what this line is doing is probably key:
> at com.eldrix.rsdb.model._Report.addToPublishedReports(_Report.java:319)
> 
> Chuck
> 
> 
> From:  <mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>> on 
> behalf of Mark Wardle mailto:m...@wardle.org>>
> Date: Thursday, March 31, 2016 at 12:07 PM
> To: WebObjects Dev Apple  <mailto:webobjects-dev@lists.apple.com>>
> Subject: Deadlock / stack interpretation
> 
> Hi all,
> 
> I have a deadlocked app and I am not sure how to interpret the jstack output. 
> jstack output is shown below.
> 
> I have 
> er.extensions.ERXEC.safeLocking=true
> 
> 
> It looks to me that in each case it is the auto-locking that is causing the 
> problem. i.e. I am not manually locking or unlocking. The most complicated 
> thread is WorkerThread5 which is initiating a fetch to resolve a KVC lookup 
> to perform an aggregated function with a qualifier and so attempting a lock.
> 
> Is there anything else I can do to either work out where the problem lies or 
> solve it? 
> 
> Thank you,
> 
> Mark
>  
> 
> Found one Java-level deadlock:
> =
> "WorkerThread127":
>   waiting for ownable synchronizer 0xec9b7b48, (a 
> java.util.concurrent.locks.ReentrantLock$NonfairSync),
>   which is held by "Thread-5"
> "Thread-5":
>   waiting for ownable synchronizer 0xf60726a

Deadlock / stack interpretation

2016-03-31 Thread Mark Wardle
Hi all,

I have a deadlocked app and I am not sure how to interpret the jstack output. 
jstack output is shown below.

I have 
er.extensions.ERXEC.safeLocking=true


It looks to me that in each case it is the auto-locking that is causing the 
problem. i.e. I am not manually locking or unlocking. The most complicated 
thread is WorkerThread5 which is initiating a fetch to resolve a KVC lookup to 
perform an aggregated function with a qualifier and so attempting a lock.

Is there anything else I can do to either work out where the problem lies or 
solve it? 

Thank you,

Mark
 

Found one Java-level deadlock:
=
"WorkerThread127":
  waiting for ownable synchronizer 0xec9b7b48, (a 
java.util.concurrent.locks.ReentrantLock$NonfairSync),
  which is held by "Thread-5"
"Thread-5":
  waiting for ownable synchronizer 0xf60726a0, (a 
java.util.concurrent.locks.ReentrantLock$NonfairSync),
  which is held by "WorkerThread5"
"WorkerThread5":
  waiting for ownable synchronizer 0xec9b7b48, (a 
java.util.concurrent.locks.ReentrantLock$NonfairSync),
  which is held by "Thread-5"

=

"WorkerThread127":
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0xec9b7b48> (a 
java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
at 
java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
at 
com.webobjects.eocontrol.EOObjectStoreCoordinator.lock(EOObjectStoreCoordinator.java:420)
at 
com.webobjects.eocontrol.EOEditingContext.lockObjectStore(EOEditingContext.java:4666)
at er.extensions.eof.ERXEC.lockObjectStore(ERXEC.java:793)
at 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4067)
at 
er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1308)
at 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:)
at 
er.extensions.eof.ERXFetchSpecification.fetchObjects(ERXFetchSpecification.java:155)
at com.eldrix.rsdb.model._User.refetchUsers(_User.java:488)
at com.eldrix.rsdb.model._User.refetchUser(_User.java:517)
at com.eldrix.rsdb.model._User.refetchUser(_User.java:497)
at com.eldrix.rsdb.model.User.authenticatedUser(User.java:172)
[some stuff snipped]…

===

"Thread-5":
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0xf60726a0> (a 
java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
at 
java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
at 
com.webobjects.eocontrol.EOEditingContext.lock(EOEditingContext.java:4617)
at er.extensions.eof.ERXEC.lock(ERXEC.java:571)
at er.extensions.eof.ERXEC.autoLock(ERXEC.java:703)
at er.extensions.eof.ERXEC.globalIDForObject(ERXEC.java:932)
at 
com.webobjects.eoaccess.EODatabaseContext._fireDeferredFaultWithSourceObject(EODatabaseContext.java:2370)
at 
com.webobjects.eoaccess.EOAccessDeferredFaultHandler.createFaultForDeferredFault(EOAccessDeferredFaultHandler.java:49)
at 
com.webobjects.eocontrol.EOCustomObject.willReadRelationship(EOCustomObject.java:1279)
at 
er.extensions.eof.ERXGenericRecord.willReadRelationship(ERXGenericRecord.java:380)
at 
com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_LazyGenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:614)
at 
com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634)
at 
er.extensions.eof.ERXDatabaseContextDelegate.batchFetchToManyFault(ERXDatabaseContextDelegate.java:654)
at 
er.extensions.eof.ERXDatabaseContextDelegate.databaseContextShouldFetchArrayFault(ERXDatabaseContextDelegate.java:391)
at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
at 
sun.reflect.DelegatingMet

Re: Performance in many objects manipulation

2016-03-10 Thread Mark Wardle
Yes. I have just checked and found ERXFetchSpecificationBatchIterator in 
er.extensions.

Mark
> On 10 Mar 2016, at 10:51, Daniele Corti  wrote:
> 
> Hi,
> I have a question, about performance while working with LongRequest and many 
> EO.
> 
> Here's the situation: I've prepared a class that extends 
> ERXLongResponseTask.DefaultImplementation.
> In this class, I operate a database migration, over 1 record.
> Each of them has, at least, 50/60 objects releated. From them, I create 
> others objects, for a total of 60 new objects for each of the starting 1 
> rows.
> 
> The procedure works fine, but, I experience a difference in speed during the 
> procedure. At first, 300-400 objects are processed in few seconds, then the 
> procedure slow down until, from 5000, it processes about 7/8 objects in 5 
> seconds.
> 
> The procedure is very simple:
> 1. Fetch all objects in a NSArray
> 2. Manipulate each object in a for loop, fetching related objects and 
> creating other objects in every iteration. 
> 
> I use just one EOEditingContext, so, I think the slowness begin when it 
> became really full of elements.
> 
> I would like to know, if there is a way to "clean up" the manipulated objects 
> from the EC, or if a different approach is preferred.
> 
> One last thing: it is good to use a NSArray of 1000 object in the for loop to 
> do this? I ask this because, I fetch all the objects and save them in memory 
> using EOObject.fetchAllObjects(EC) method from the class.
> 
> Thanks in advance!
> Daniele C.
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Performance in many objects manipulation

2016-03-10 Thread Mark Wardle
I don’t usually fetch all objects but fetch in batches.

You need to recycle the EOEditingContext. I tend to bring the array in batches, 
process, then create a new editing context and repeat.

I have some code included below but I think there is also good batching support 
in Wonder. The code below fetches raw rows and then converts to an EO when 
requested. The code below will automatically use a new editing context for each 
batch.

Mark


package com.eldrix.snomedct.search;

import java.util.Iterator;

import org.apache.log4j.Logger;

import com.webobjects.eoaccess.EODatabaseContext;
import com.webobjects.eoaccess.EOEntity;
import com.webobjects.eoaccess.EOSQLExpression;
import com.webobjects.eocontrol.EOEditingContext;
import com.webobjects.eocontrol.EOFetchSpecification;
import com.webobjects.eocontrol.EOSortOrdering;
import com.webobjects.foundation.NSArray;
import com.webobjects.foundation.NSDictionary;

import er.extensions.eof.ERXEC;
import er.extensions.eof.ERXEOAccessUtilities;
import er.extensions.eof.ERXEOControlUtilities;

/**
 * This is an optimised memory-efficient method of iterating through enterprise 
objects.
 * This will iterate through enterprise objects, either returning the primary 
key, the object or the raw row.
 * 
 * For example:
 * 
 * 
 * for(EOEnterpriseObject eo: 
IterableBatchEnterpriseObjects.allObjectsOfEntity("Patient", 300) {
 *  // process eo
 * }
 * 
 * 
 * 
 * @author mark
 *
 */
@SuppressWarnings("rawtypes")
public class IterableBatchEnterpriseObjects implements Iterable {
private static Logger log = 
Logger.getLogger(IterableBatchEnterpriseObjects.class);
private final static int DEFAULT_BATCH_SIZE=50;
private EOEditingContext _ec;
private EOFetchSpecification _fs; 
private int _rowCount;
private int _start;
private int _batchSize;
private NSArray _currentBatch;
private int _batchPosition;
private IterableBatchMode _mode;
private boolean _refreshEditingContext = true;  // we create a 
new editing context for each batch by default

private enum IterableBatchMode { 
PRIMARY_KEYS {
 NSArray resultsInRange(EOEditingContext ec, 
EOFetchSpecification fs, int start, int end) {
 return 
ERXEOControlUtilities.primaryKeyValuesInRange(ec, fs, start, end);
 }
},
OBJECTS {
NSArray resultsInRange(EOEditingContext ec, 
EOFetchSpecification fs, int start, int end) {
return ERXEOControlUtilities.objectsInRange(ec, 
fs, start, end);
}
},
RAW_ROWS {
NSArray resultsInRange(EOEditingContext ec, 
EOFetchSpecification fs, int start, int end) {
return rawRowsInRange(ec, fs, start, end);
}
};

abstract NSArray resultsInRange(EOEditingContext ec, 
EOFetchSpecification fs, int start, int end);
};  


private IterableBatchEnterpriseObjects(EOFetchSpecification fs, int 
batchSize, IterableBatchMode mode) {
_fs = fs;
_batchSize = batchSize;
_mode = mode;
_rowCount = 
ERXEOAccessUtilities.rowCountForFetchSpecification(editingContext(), _fs);
}

public static IterableBatchEnterpriseObjects allObjectsOfEntity(String 
entityName, NSArray sortOrderings, int batchSize) {
EOFetchSpecification fs = new EOFetchSpecification(entityName, 
null, sortOrderings);
return new IterableBatchEnterpriseObjects(fs, batchSize, 
IterableBatchMode.OBJECTS);
}
public static IterableBatchEnterpriseObjects allObjectsOfEntity(String 
entityName, int batchSize) {
return allObjectsOfEntity(entityName, 
sortByPrimaryKey(entityName), batchSize);
}
public static IterableBatchEnterpriseObjects allObjectsOfEntity(String 
entityName) {
return allObjectsOfEntity(entityName, DEFAULT_BATCH_SIZE);
}

public static IterableBatchEnterpriseObjects 
allPrimaryKeysOfEntity(String entityName, NSArray 
sortOrderings, int batchSize) {
EOFetchSpecification fs = new EOFetchSpecification(entityName, 
null, sortOrderings);
return new IterableBatchEnterpriseObjects(fs, batchSize, 
IterableBatchMode.PRIMARY_KEYS);
}
public static IterableBatchEnterpriseObjects 
allPrimaryKeysOfEntity(String entityName, int batchSize) {
return allPrimaryKeysOfEntity(entityName, 
sortByPrimaryKey(entityName), batchSize);
}
public static IterableBatchEnterpriseObjects 
allPrimaryKeysOfEntity(String entityName) {
return allPrimaryKeysO

Re: ERDDelayedBooleanAssignment question

2016-02-22 Thread Mark Wardle
I wonder whether your rules are being cached. 

I do this instead:

100 : entity.name like 'Result*' => isEntityDeletable = 
"session.authenticatedUser.role.isSystem" 
[er.directtoweb.ERDDelayedKeyValueAssignment]

or

100 : entity.name = 'Seizure' => isEntityEditable = 
"object.summaryEpilepsy.patient.security.PATIENT_EDIT" 
[er.directtoweb.ERDDelayedKeyValueAssignment]

where a security property on the patient entity supports arbitrary key paths 
that correspond with a specific permission.

Mark

> On 22 Feb 2016, at 13:56, Sébastien Rottiers  wrote:
> 
> Hello,
> 
> I have two rules to control the access write of my users (isEntityEditable 
> and isEntityDeletable). Here is these rules :
> 
> 100 : *true* => isEntityEditable = {"conditionKey" = 
> "session.userConnected.isAdmin"; "falseValue" = "0"; "trueValue" = "1"; } 
> [er.directtoweb.assignments.delayed.ERDDelayedBooleanAssignment],
> 100 : *true* => isEntityDeletable = {"conditionKey" = 
> "session.userConnected.isAdmin"; "falseValue" = "0"; "trueValue" = "1"; } 
> [er.directtoweb.assignments.delayed.ERDDelayedBooleanAssignment],
> 
> It works properly for isEntityEditable (if I login with an admin account I 
> can edit the EOs, and if I logout and login with a non admin user I can’t 
> edit EOs). But for isEntityDeletable the issue is : on the List pages 
> (ERModernLook) I already visited, when I logout/login from admin to non 
> admin, the delete button is still displayed. And in dev mode if I clear the 
> D2W cache, the delete button disappear as expected.
> 
> Am I missing something ?
> 
> Thanks,
> Sébastien 
>  
> 
> 
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Odd NPE from deep inside EOF

2016-01-29 Thread Mark Wardle
Thanks Chuck. It may be something to do with threading but it isn't very clear 
to me. I have never used didUpdate() but I might have code using EOAccessXXX 
and EOControlXxx that conceivably might change something - but mostly 
read-only. I'll try some logging on that address relationship to see whether I 
can see any obvious issue. 

-- 
Dr. Mark Wardle
Consultant Neurologist, Cardiff, UK
(Sent from my mobile)


> On 28 Jan 2016, at 19:03, Chuck Hill  wrote:
> 
> That is nasty.  While processing this fetch, a snapshot is going missing.  I 
> don’t think we can tell anything else from that stack trace.  It is likely 
> that the cause of this missing snapshot is in another concurrently executing 
> thread.  And it is likely related to an error in snapshot reference counting.
> 
> Does your app (or any code in Wonder that it calls) invalidate snapshots?  
> Are you using ERXGenericRecord’s didUpdate() method to make changes and 
> re-save?  Is your code calling methods in EOAccess/EOControl that might  
> change snapshots (or fetch or whatever) without locking the OSC?
> 
> Chuck
> 
> 
> From:  on behalf 
> of Mark Wardle 
> Date: Thursday, January 28, 2016 at 3:04 AM
> To: WebObjects-Dev 
> Subject: Re: Odd NPE from deep inside EOF
> 
> Last year, I had an intermittent exception thrown seemingly at random. 
> Something odd is happening from deep within EOF and it isn’t easily 
> reproducible as far as I can tell. 
> 
> I now have the full stack trace. Does this look familiar to anyone?
> 
> Best wishes,
> 
> Mark
> 
> java.lang.NullPointerException
>   at 
> com.webobjects.eocontrol._EOMutableKnownKeyDictionary.(_EOMutableKnownKeyDictionary.java:106)
>   at 
> com.webobjects.eoaccess.EORelationship._foreignKeyForSourceRow(EORelationship.java:1148)
>   at 
> com.webobjects.eoaccess.EODatabaseContext._followToManyRelationshipWithFetchSpecification(EODatabaseContext.java:2497)
>   at 
> com.webobjects.eoaccess.EODatabaseContext._followFetchSpecification(EODatabaseContext.java:2636)
>   at 
> com.webobjects.eoaccess.EODatabaseContext._batchFetchRelationshipForSourceObjectsEditingContext(EODatabaseContext.java:3734)
>   at 
> com.webobjects.eoaccess.EODatabaseContext.batchFetchRelationship(EODatabaseContext.java:3816)
>   at 
> er.extensions.eof.ERXEOAccessUtilities.batchFetchRelationship(ERXEOAccessUtilities.java:1913)
>   at 
> er.extensions.eof.ERXDatabaseContextDelegate.doFetch(ERXDatabaseContextDelegate.java:781)
>   at 
> er.extensions.eof.ERXDatabaseContextDelegate.batchFetchToManyFault(ERXDatabaseContextDelegate.java:669)
>   at 
> er.extensions.eof.ERXDatabaseContextDelegate.databaseContextShouldFetchArrayFault(ERXDatabaseContextDelegate.java:391)
>   at sun.reflect.GeneratedMethodAccessor81.invoke(null:Unknown)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:483)
>   at 
> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
>   at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223)
>   at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163)
>   at 
> com.webobjects.eoaccess.EODatabaseContext._fireArrayFault(EODatabaseContext.java:4236)
>   at 
> com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitializationOfObject(EOAccessArrayFaultHandler.java:77)
>   at 
> com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead(_EOCheapCopyMutableArray.java:39)
>   at 
> com.webobjects.eocontrol._EOCheapCopyMutableArray.count(_EOCheapCopyMutableArray.java:99)
>   at 
> com.webobjects.eocontrol.EOSortOrdering._sortUsingKeyOrderArray(EOSortOrdering.java:185)
>   at 
> com.webobjects.eocontrol.EOSortOrdering.sortedArrayUsingKeyOrderArray(EOSortOrdering.java:249)
>   at com.eldrix.rsdb.model._Patient.addresses(_Patient.java:748)
>   at com.eldrix.rsdb.model.Patient.addressForDate(Patient.java:289)
>   at com.eldrix.rsdb.model.Patient.currentAddress(Patient.java:277)
> 
> 
> 
>> On 31 Mar 2015, at 22:55, Mark Wardle  wrote:
>> 
>> Thanks Ramsey. Have committed the properties change (yes I did have 
>> cleanup=true) so I’ll wait until it happens again! Intermittent and 
>> difficult to fathom!
>> 
>> Mark
>>> On 31 Mar 2015, at 17:31, Ramsey Gurley  wrote:
>>> 
>>> er.extensions.stackTrace.cleanup=true
> 
 ___
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 set up a stateful REST service

2016-01-28 Thread Mark Wardle
ERRest actions are simply direct actions. You can definitely use sessions. Just 
call session() and it will create one. 

Mark
> On 28 Jan 2016, at 19:37, Rudi Angela  wrote:
> 
> How can I use ER-REST in combination with a Session? I have a stateful REST 
> service, so I need a Session. Also I would like to use the session’s 
> defaultEditing Context. A brief look at ER-REST gave me the impression that 
> requests don’t use a Session and use a new EditingContext with every request.
> Any suggestions?
> 
> Thanks,
> 
> Rudi
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Odd NPE from deep inside EOF

2016-01-28 Thread Mark Wardle
Last year, I had an intermittent exception thrown seemingly at random. 
Something odd is happening from deep within EOF and it isn’t easily 
reproducible as far as I can tell. 

I now have the full stack trace. Does this look familiar to anyone?

Best wishes,

Mark

java.lang.NullPointerException
  at 
com.webobjects.eocontrol._EOMutableKnownKeyDictionary.(_EOMutableKnownKeyDictionary.java:106)
  at 
com.webobjects.eoaccess.EORelationship._foreignKeyForSourceRow(EORelationship.java:1148)
  at 
com.webobjects.eoaccess.EODatabaseContext._followToManyRelationshipWithFetchSpecification(EODatabaseContext.java:2497)
  at 
com.webobjects.eoaccess.EODatabaseContext._followFetchSpecification(EODatabaseContext.java:2636)
  at 
com.webobjects.eoaccess.EODatabaseContext._batchFetchRelationshipForSourceObjectsEditingContext(EODatabaseContext.java:3734)
  at 
com.webobjects.eoaccess.EODatabaseContext.batchFetchRelationship(EODatabaseContext.java:3816)
  at 
er.extensions.eof.ERXEOAccessUtilities.batchFetchRelationship(ERXEOAccessUtilities.java:1913)
  at 
er.extensions.eof.ERXDatabaseContextDelegate.doFetch(ERXDatabaseContextDelegate.java:781)
  at 
er.extensions.eof.ERXDatabaseContextDelegate.batchFetchToManyFault(ERXDatabaseContextDelegate.java:669)
  at 
er.extensions.eof.ERXDatabaseContextDelegate.databaseContextShouldFetchArrayFault(ERXDatabaseContextDelegate.java:391)
  at sun.reflect.GeneratedMethodAccessor81.invoke(null:Unknown)
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:483)
  at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
  at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223)
  at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163)
  at 
com.webobjects.eoaccess.EODatabaseContext._fireArrayFault(EODatabaseContext.java:4236)
  at 
com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitializationOfObject(EOAccessArrayFaultHandler.java:77)
  at 
com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead(_EOCheapCopyMutableArray.java:39)
  at 
com.webobjects.eocontrol._EOCheapCopyMutableArray.count(_EOCheapCopyMutableArray.java:99)
  at 
com.webobjects.eocontrol.EOSortOrdering._sortUsingKeyOrderArray(EOSortOrdering.java:185)
  at 
com.webobjects.eocontrol.EOSortOrdering.sortedArrayUsingKeyOrderArray(EOSortOrdering.java:249)
  at com.eldrix.rsdb.model._Patient.addresses(_Patient.java:748)
  at com.eldrix.rsdb.model.Patient.addressForDate(Patient.java:289)
  at com.eldrix.rsdb.model.Patient.currentAddress(Patient.java:277)



> On 31 Mar 2015, at 22:55, Mark Wardle  wrote:
> 
> Thanks Ramsey. Have committed the properties change (yes I did have 
> cleanup=true) so I’ll wait until it happens again! Intermittent and difficult 
> to fathom!
> 
> Mark
>> On 31 Mar 2015, at 17:31, Ramsey Gurley > <mailto:rgur...@smarthealth.com>> wrote:
>> 
>> er.extensions.stackTrace.cleanup=true
> 

 ___
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: Odd backtracking error

2015-11-30 Thread Mark Wardle
Thank you for all of the replies relating to this. I had used a direct action 
but was getting the same problem and do think it might relate to not picking up 
the cookie properly. It is difficult to test as it doesn’t happen on all 
machines - only some specific Windows 7/IE clients in a particular room - so 
I’m going to try adding a wosid manually and seeing how that goes in testing. 
Alternatively, I might switch to storing the session id in the url rather than 
a cookie. 

Best wishes,
Mark

> On 27 Nov 2015, at 08:27, CHRISTOPH WICK | i4innovation GmbH, Bonn 
>  wrote:
> 
> Hi Mark,
> 
> if you are using the new window to show a PDF (which should not have any 
> further links or buttons), it may be a better solution to use a direct action 
> to show it and pass all necessary params to it.  
> 
> C.U.CW
> -- 
> The three great virtues of a programmer are Laziness, Impatience and Hubris. 
> (Randal Schwartz)
> 
>> On 27.11.2015, at 09:08, René Bock > <mailto:b...@salient.de>> wrote:
>> 
>> Hi Mark,
>> 
>> last week, we had a similar issue.  The problem was that, between two 
>> regular POST requests, the client requested for /App.woa
>> 
>> 
>> As noted in http://sourceforge.net/p/wonder/mailman/message/11756245/ 
>> <http://sourceforge.net/p/wonder/mailman/message/11756245/> this request 
>> will create a new session.  
>> 
>> 
>> Some "research" revealed, that 
>> 
>>  WORequest._lookForIDsInCookiesFirst()
>> 
>> always will return false.  This seems the root cause of the problem. 
>> Unfortunately, static methods can't overridden...
>> 
>> 
>> Regards,
>> 
>>  René
>> 
>> 
>>> Am 26.11.2015 um 23:29 schrieb Mark Wardle >> <mailto:m...@wardle.org>>:
>>> 
>>> Thanks Chuck. I’m not sure. How can I check that? I haven’t got a favicon 
>>> set presently. It shouldn’t default to accessing it via WO should it? I had 
>>> thought it independent and a function of apache but of course, I do have a 
>>> rewrite rule which redirects / to my WOA so it might well be doing that! 
>>> Not entirely sure how to check or indeed fix!
>>> 
>>> Mark
>>> 
>>> 
>>>> On 26 Nov 2015, at 22:25, Chuck Hill >>> <mailto:ch...@gevityinc.com>> wrote:
>>>> 
>>>> Is your web server (or Wonder) protecting /favicon.ico from getting to 
>>>> your app or handling it?  That request won’t contain the cookies (IIRC) 
>>>> which results in a new session getting created and the app will return the 
>>>> cookie from the new session (usually with an error response as it is not 
>>>> handling the request.
>>>> 
>>>> Chuck
>>>> 
>>>> 
>>>> From: >>> <mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>> on 
>>>> behalf of Mark Wardle mailto:m...@wardle.org>>
>>>> Date: Thursday, November 26, 2015 at 2:18 PM
>>>> To: Paul Hoadley mailto:pa...@logicsquad.net>>
>>>> Cc: webobjects-dev >>> <mailto:webobjects-dev@lists.apple.com>>
>>>> Subject: Re: Odd backtracking error
>>>> 
>>>> Paul,
>>>> 
>>>> That sounds like what might be happening and explain the inconsistency 
>>>> depending on, perhaps, the URL entered.
>>>> 
>>>> I’ll give it a go. Thank you!
>>>> 
>>>> Mark
>>>> 
>>>>> On 26 Nov 2015, at 22:16, Paul Hoadley >>>> <mailto:pa...@logicsquad.net>> wrote:
>>>>> 
>>>>> Hi Mark,
>>>>> 
>>>>> On 27 Nov 2015, at 6:50 am, Mark Wardle >>>> <mailto:m...@wardle.org>> wrote:
>>>>> 
>>>>>> I’m getting a weird backtracking error. I have a component which mainly 
>>>>>> uses component actions and one of these component actions uses 
>>>>>> target=“_new” to show a PDF document in a new window.
>>>>>> 
>>>>>> The action uses 
>>>>>> WOResponse response = 
>>>>>> WOApplication.application().createResponseInContext(context);
>>>>>> to create a new response.
>>>>>> 
>>>>>> Sessions are stored in cookies.
>>>>>> 
>>>>>> On some computers (but not all), when one clicks the link, I get a login 
>>>>>> page and in the log a session restoration error wit

Re: Odd backtracking error

2015-11-26 Thread Mark Wardle
Thanks Chuck. I’m not sure. How can I check that? I haven’t got a favicon set 
presently. It shouldn’t default to accessing it via WO should it? I had thought 
it independent and a function of apache but of course, I do have a rewrite rule 
which redirects / to my WOA so it might well be doing that! Not entirely sure 
how to check or indeed fix!

Mark


> On 26 Nov 2015, at 22:25, Chuck Hill  wrote:
> 
> Is your web server (or Wonder) protecting /favicon.ico from getting to your 
> app or handling it?  That request won’t contain the cookies (IIRC) which 
> results in a new session getting created and the app will return the cookie 
> from the new session (usually with an error response as it is not handling 
> the request.
> 
> Chuck
> 
> 
> From:  <mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>> on 
> behalf of Mark Wardle mailto:m...@wardle.org>>
> Date: Thursday, November 26, 2015 at 2:18 PM
> To: Paul Hoadley mailto:pa...@logicsquad.net>>
> Cc: webobjects-dev  <mailto:webobjects-dev@lists.apple.com>>
> Subject: Re: Odd backtracking error
> 
> Paul,
> 
> That sounds like what might be happening and explain the inconsistency 
> depending on, perhaps, the URL entered.
> 
> I’ll give it a go. Thank you!
> 
> Mark
> 
>> On 26 Nov 2015, at 22:16, Paul Hoadley > <mailto:pa...@logicsquad.net>> wrote:
>> 
>> Hi Mark,
>> 
>> On 27 Nov 2015, at 6:50 am, Mark Wardle > <mailto:m...@wardle.org>> wrote:
>> 
>>> I’m getting a weird backtracking error. I have a component which mainly 
>>> uses component actions and one of these component actions uses 
>>> target=“_new” to show a PDF document in a new window.
>>> 
>>> The action uses 
>>> WOResponse response = 
>>> WOApplication.application().createResponseInContext(context);
>>> to create a new response.
>>> 
>>> Sessions are stored in cookies.
>>> 
>>> On some computers (but not all), when one clicks the link, I get a login 
>>> page and in the log a session restoration error with no session. It works 
>>> fine on other computers running the same version of IE. I can’t reproduce 
>>> the problem at all on my development machine.
>>> 
>>> Any ideas?
>> 
>> I’m not sure this would explain everything you’re seeing here, but you can 
>> get session loss (and the resulting unexpected bounce to a login page) when 
>> using cookies for session ID storage if WOSession.domainForIDCookies() is 
>> returning something “too specific” for your deployment setup. By default, 
>> that method returns the application’s full path, right down to the “.woa” 
>> extension. So, for example, if you’re using URL re-writing in deployment, 
>> there could easily be a mismatch. I usually override it to return “/”. 
>> Again, not sure it explains everything you’re seeing there, but it’s 
>> something to rule out.
>> 
>> 
>> -- 
>> Paul Hoadley
>> http://logicsquad.net/ <http://logicsquad.net/>
>> 
>> 
>> 
> 

 ___
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: Odd backtracking error

2015-11-26 Thread Mark Wardle
Paul,

That sounds like what might be happening and explain the inconsistency 
depending on, perhaps, the URL entered.

I’ll give it a go. Thank you!

Mark

> On 26 Nov 2015, at 22:16, Paul Hoadley  wrote:
> 
> Hi Mark,
> 
> On 27 Nov 2015, at 6:50 am, Mark Wardle  <mailto:m...@wardle.org>> wrote:
> 
>> I’m getting a weird backtracking error. I have a component which mainly uses 
>> component actions and one of these component actions uses target=“_new” to 
>> show a PDF document in a new window.
>> 
>> The action uses  
>> WOResponse response = 
>> WOApplication.application().createResponseInContext(context);
>> to create a new response.
>> 
>> Sessions are stored in cookies.
>> 
>> On some computers (but not all), when one clicks the link, I get a login 
>> page and in the log a session restoration error with no session. It works 
>> fine on other computers running the same version of IE. I can’t reproduce 
>> the problem at all on my development machine.
>> 
>> Any ideas?
> 
> I’m not sure this would explain everything you’re seeing here, but you can 
> get session loss (and the resulting unexpected bounce to a login page) when 
> using cookies for session ID storage if WOSession.domainForIDCookies() is 
> returning something “too specific” for your deployment setup. By default, 
> that method returns the application’s full path, right down to the “.woa” 
> extension. So, for example, if you’re using URL re-writing in deployment, 
> there could easily be a mismatch. I usually override it to return “/”. Again, 
> not sure it explains everything you’re seeing there, but it’s something to 
> rule out.
> 
> 
> -- 
> Paul Hoadley
> http://logicsquad.net/ <http://logicsquad.net/>
> 
> 
> 

 ___
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: Odd backtracking error

2015-11-26 Thread Mark Wardle
I mean “page restoration error”.

Mark

> On 26 Nov 2015, at 20:20, Mark Wardle  wrote:
> 
> Dear all,
> 
> I’m getting a weird backtracking error. I have a component which mainly uses 
> component actions and one of these component actions uses target=“_new” to 
> show a PDF document in a new window.
> 
> The action uses   
> WOResponse response = 
> WOApplication.application().createResponseInContext(context);
> to create a new response.
> 
> Sessions are stored in cookies.
> 
> On some computers (but not all), when one clicks the link, I get a login page 
> and in the log a session restoration error with no session. It works fine on 
> other computers running the same version of IE. I can’t reproduce the problem 
> at all on my development machine.
> 
> Any ideas?
> 
> Mark
> 
> 
> 
> 
> -- 
> Dr. Mark Wardle
> Consultant Neurologist, University Hospital Wales, Cardiff, UK
> Email: mark.war...@wales.nhs.uk <mailto:mark.war...@wales.nhs.uk> or 
> m...@wardle.org <mailto:m...@wardle.org>  Twitter: @mwardle
> Telephone: 02920745274 (secretary) or facsimile: 02920744166
> 
> 
> 
> 
> 

 ___
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

Odd backtracking error

2015-11-26 Thread Mark Wardle
Dear all,

I’m getting a weird backtracking error. I have a component which mainly uses 
component actions and one of these component actions uses target=“_new” to show 
a PDF document in a new window.

The action uses 
WOResponse response = 
WOApplication.application().createResponseInContext(context);
to create a new response.

Sessions are stored in cookies.

On some computers (but not all), when one clicks the link, I get a login page 
and in the log a session restoration error with no session. It works fine on 
other computers running the same version of IE. I can’t reproduce the problem 
at all on my development machine.

Any ideas?

Mark




-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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: Secure storage of passwords or credit card data

2015-11-07 Thread Mark Wardle
I’m using http://www.jasypt.org 

I have a property such as encryptedPassword and then write code like this:

public void setPassword(String newPassword) {
BasicPasswordEncryptor passwordEncryptor = new 
BasicPasswordEncryptor();

setEncryptedPassword(passwordEncryptor.encryptPassword(newPassword));
}

public boolean canAuthenticateWithPassword(String password) {
BasicPasswordEncryptor passwordEncryptor = new 
BasicPasswordEncryptor();
try {
return passwordEncryptor.checkPassword(password, 
encryptedPassword());
}
catch (EncryptionOperationNotPossibleException e) {
log.error(e);
}
return false;
}

Mark

> On 4 Nov 2015, at 18:29, Ray Kiddy  wrote:
> 
> On Wed, 04 Nov 2015 10:40:49 +0100
> Markus Ruggiero  wrote:
> 
>> Folks,
>> 
>> another quick question: what are you using for secure storage of
>> passowords and credit card data in a Wonder app? Is there anything in
>> Wonder (probably there is, but it is not always easy to find things),
>> or are you using other things/libs/code? Any code examples?
>> 
>> Thanks for any hint / pointer /example
>> ---markus---
>> 
> 
> This is a good source of info on how to do some of these things:
> 
> https://www.owasp.org/index.php/Cheat_Sheets
> 
> See the cheat sheets on password storage, authentication, "forgot
> password", and many, many others. The ones that I have read tend to come
> with both a good explanation and code examples.
> 
> cheers - ray
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Making EOs aware of session properties (I know they should not but I need this anyway)

2015-11-07 Thread Mark Wardle
Markus,

I do this a lot with ERXThreadStorage.

eg. in my session class:

/**
 * @param user set the current user
 */
public void setAuthenticatedUser(User user) {
_authenticatedUser = 
user.localInstanceIn(defaultEditingContext());
ERCoreBusinessLogic.setActor(_authenticatedUser);
}


And in my EO:

@Override public void init(EOEditingContext ec) {
super.init(ec);
setCreatedDateTime(new NSTimestamp());

setCreatedUser((User)ERCoreBusinessLogic.actor(editingContext()));
setStatus(Status.DRAFT);
}


If you look at the source for ERCoreBusinessLogic.setActor(), then it is simply:

/**
 * Sets the actor in the current thread storage.
 * @param actor current user for this thread
 */
public static void setActor(EOEnterpriseObject actor) {
if (log.isDebugEnabled())
log.debug("Setting actor to : "+actor);
if (actor != null) {
ERXThreadStorage.takeValueForKey(actor, "actor");
} else {
ERXThreadStorage.removeValueForKey("actor");
}
}

/**
 * Gets the actor as a local instance in the given context.
 * @param ec editing context to pull a local copy of the actor
 *  into
 * @return actor instance in the given editing context
 */
public static EOEnterpriseObject actor(EOEditingContext ec) {
EOEnterpriseObject actor = actor();
if (actor != null && actor.editingContext() != ec) {
EOEditingContext actorEc = actor.editingContext();
actorEc.lock();
try {
EOEnterpriseObject localActor = 
ERXEOControlUtilities.localInstanceOfObject(ec, actor);
try {
if(actor instanceof ERCoreUserInterface) {
NSArray prefs = 
((ERCoreUserInterface)actor).preferences();
prefs = 
ERXEOControlUtilities.localInstancesOfObjects(ec, prefs);

((ERCoreUserInterface)localActor).setPreferences(prefs);
}
} catch(RuntimeException ex) {
log.error("Error while setting getting actor's 
preferences: " + ex, ex);
}
actor = localActor;
} finally {
actorEc.unlock();
}
}
return actor;
}

Anjo Krank’s BugTracker example uses this as well.

Mark

> On 7 Nov 2015, at 14:56, Markus Ruggiero  wrote:
> 
> Folks,
> 
> I have the following problem:
> My application must support different geographical regions. A logged-in user 
> is assigned a region. This uses info is stored in Session. My EOs have 
> business logic that must act region specific. How can I let the EOs know 
> about the current region (from session().currentUser().region() )? The 
> business logic is in its own framework and knows nothing about sessions 
> (which is how it supposed to be). Would ERXThreadStorage be of any help here?
> 
> Example of what I need:
> Entity Product has a region specific product description. So simple accessors 
> "description()" and "setDescription(String text)" are not good enough. The 
> logic inside these accessors MUST take the current user's region into account.
> 
> I used to have my own editing context class with a session instance variable. 
> This worked before because I had the business logic and all the controller 
> code in the same project. Now with the separation into different projects 
> this does not work anymore (which is actually quite ok, I know it was a 
> kludge before).
> 
> Thanks for any help
> ---markus---
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: SOLVED: problem with willInsert() and willUpdate() when using D2W.

2015-10-19 Thread Mark Wardle
For the avoidance of doubt, this should read:

Dear all,

I thought I would share a tricky problem and its solution.

I have implemented willInsert() and willUpdate() and used them successfully. 
Oddly, they didn’t seem to get called during the editing or creation of a new 
entity and so I was getting validation errors.

It sounds simple now but the D2W edit page checks a D2W key called 
shouldValidateBeforeSave which means that validateForInsert() or 
validateForSave() is called BEFORE willInsert or willUpdate. The documentation 
for ERXEnterpriseObject of course suggests that willInsert/willUpdate will be 
called BEFORE validation. Simply setting D2W key shouldValidateBeforeSave to 
false resolves the issue.

Therefore, if you are using D2W and you have odd willInsert or willUpdate 
errors, then check here. The source code for ERD2WInspectPage shows this 
clearly enough although I can’t work out why anyone would want to explicitly 
call validate before save given that validation should occur before saving 
simply during saveChanges().

Best wishes,

Mark

> On 19 Oct 2015, at 15:32, Mark Wardle  wrote:
> 
> Dear all,
> 
> I thought I would share a tricky problem and its solution.
> 
> I have implemented willInsert() and willUpdate() and used them successfully. 
> Oddly, they didn’t seem to get called during the editing or creation of a new 
> entity and so I was getting validation errors.
> 
> It sounds simple now but the D2W edit page checks a D2W key called 
> shouldValidateBeforeSave which means that validateForInsert() or 
> validateForSave() is called BEFORE willInsert or willUpdate. The 
> documentation for ERXEnterpriseObject of course suggests that 
> willInsert/willUpdate will be called AFTER validation. Simply setting D2W key 
> shouldValidateBeforeSave to false resolves the issue.
> 
> Therefore, if you are using D2W and you have odd willInsert or willUpdate 
> errors, then check here. The source code for ERD2WInspectPage shows this 
> clearly enough although I can’t work out why anyone would want to explicitly 
> call validate before save given that validation should occur before saving 
> simply during saveChanges().
> 
> Best wishes,
> 
> Mark
> 
> — 
> Mark Wardle
> m...@eldrix.co.uk <mailto:m...@eldrix.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

SOLVED: problem with willInsert() and willUpdate() when using D2W.

2015-10-19 Thread Mark Wardle
Dear all,

I thought I would share a tricky problem and its solution.

I have implemented willInsert() and willUpdate() and used them successfully. 
Oddly, they didn’t seem to get called during the editing or creation of a new 
entity and so I was getting validation errors.

It sounds simple now but the D2W edit page checks a D2W key called 
shouldValidateBeforeSave which means that validateForInsert() or 
validateForSave() is called BEFORE willInsert or willUpdate. The documentation 
for ERXEnterpriseObject of course suggests that willInsert/willUpdate will be 
called AFTER validation. Simply setting D2W key shouldValidateBeforeSave to 
false resolves the issue.

Therefore, if you are using D2W and you have odd willInsert or willUpdate 
errors, then check here. The source code for ERD2WInspectPage shows this 
clearly enough although I can’t work out why anyone would want to explicitly 
call validate before save given that validation should occur before saving 
simply during saveChanges().

Best wishes,

Mark

— 
Mark Wardle
m...@eldrix.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: El Capitan

2015-10-03 Thread Mark Wardle
I had a similar problem. 

I had webobjects installed in /System which was what was being used and I also 
happened to have it in /Library/ as well 

I messed about with system integrity protection but then realised it was much 
better to use the stuff in /Library/WebObjects/Versions/WebObjects543/… and so 
switched my /etc/apache2/httpd.conf to that. 

I had a silly problem with permissions on wotaskd which was easily fixed but 
hard to spot without manually trying to run it during debugging.

It is now working fine!

Mark

> On 2 Oct 2015, at 16:15, David LeBer  wrote:
> 
> Does WOInstaller still work? 
> https://wiki.wocommunity.org/display/WEB/Project+Wonder+Installation 
> <https://wiki.wocommunity.org/display/WEB/Project+Wonder+Installation>
> 
> It allows you specify a different location for the WO frameworks than in 
> /Sys/Lib/Fram.
> 
> D
> 
> 
> 
>> Hugi Thordarson <mailto:h...@karlmenn.is> October 2, 2015 at 7:05 AM
>> The El-Capitan installer un-installed WebObjects for me and then refused to 
>> re-install from the 5.4.3 package until I disabled System Integrity 
>> Protection (start the computer up in recovery mode, open a terminal and 
>> enter “csrutil disable”). Probably due to the Installer attempting to modify 
>> /System/Frameworks. Yay.
>> 
>> https://www.dropbox.com/s/in88uc9kvr21t6p/Screenshot%202015-10-02%2010.47.26.png?dl=0
>>  
>> <https://www.dropbox.com/s/in88uc9kvr21t6p/Screenshot%202015-10-02%2010.47.26.png?dl=0>
>> https://www.dropbox.com/s/268c4d9whehw3w1/Screenshot%202015-10-02%2010.47.48.png?dl=0
>>  
>> <https://www.dropbox.com/s/268c4d9whehw3w1/Screenshot%202015-10-02%2010.47.48.png?dl=0>
>> 
>> - hugi
>> 
>> 
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com 
>> <mailto:Webobjects-dev@lists.apple.com>)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
>>  
>> <https://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com>
>> 
>> This email sent to dleber_wo...@codeferous.com 
>> <mailto:dleber_wo...@codeferous.com>
>> Mark Wardle <mailto:m...@wardle.org> October 1, 2015 at 4:47 AM
>> Are there any problems with El Capitan and eclipse and webobjects?
>> 
>> Mark
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com 
>> <mailto:Webobjects-dev@lists.apple.com>)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
>>  
>> <https://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com>
>> 
>> This email sent to dleber_wo...@codeferous.com 
>> <mailto:dleber_wo...@codeferous.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:
> https://lists.apple.com/mailman/options/webobjects-dev/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

El Capitan

2015-10-01 Thread Mark Wardle
Are there any problems with El Capitan and eclipse and webobjects?

Mark
 ___
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: ERRest: Multiple entries

2015-08-28 Thread Mark Wardle
Hi Fred,

ERRest is just a set of convenience methods around direct actions. 

If you step through the code on how an update works, you could duplicate this 
to support multiple entries as you require.

So have a look at ERXRestRequestNode which gives you a format-agnostic tree of 
the body of the request. You could then manually parse that, iterate an array 
and then call the create method with the data.

@POST

@Path("/patients/{patient:Patient}/encounters/{encounter:Encounter}/forms")
public WOActionResults createFormAction(@PathParam("patient") Patient 
patient, @PathParam("encounter") Encounter encounter) {
if (ERXEOControlUtilities.eoEquals(patient, 
encounter.patient())) {
ERXRestRequestNode documentNode = requestNode();

so if I were expecting an array, I might do this

for (ERXRestRequestNode child : documentNode.children()) {
Object o = child.createObjectWithFilter(entityName, filter, 
restContext);
//…. etc
}

I haven’t tested this - typing in email not eclipse - but if you examine the 
source code for ERRest, you should be able to do what you want. It just looks 
like magic because of all of the convenience methods (e.g. create() method).

b/w

Mark

> On 23 Aug 2015, at 21:08, Fred Opims  wrote:
> 
> 
> 
> Hello!
> 
> I'm using ERRest  and  to create an entry, I'm using the POST HTTP method 
> with JSON format.
> 
> For example, to create one entity User, I will execute the request with the 
> following post in the body {"name":"Fred"} as shown in the image:
> 
> 
> 
> 
> Is there a way to create multiple entries in one time ?
> By multiples entries, i mean an array of the same object.
> 
> Let's say : 
> {"name":"Freddy"},
> {"name":"Eric"}
> {"name":"Andre"}
> ...
> {"name":"Pascal"}
> 
> I've tried to put the entries into an array but it does not work:
> [{"name":"Freddy"},{"name":"Eric"},{"name":"Andre"}]
> 
> How can I create 100 Users entities in one time ?
> 
> Thank you.
> 
> Fred
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: NSIncrementalStore

2015-08-27 Thread Mark Wardle
I thought that this was done by RestKit ages ago 
https://github.com/RestKit/RestKit/ 

which could sync core data to REST.

Mark

PS Haven’t used it.


> On 26 Aug 2015, at 17:30, Ramsey Gurley  wrote:
> 
> I knew what was going to happen as I started to read this… wait for it… wait. 
> for. it…
> 
> "So imagine if, instead SQL or NoSQL, we wrote a Core Data store that 
> connected to a webservice.”
> 
> Lol. Every round trip requires a power up on the antenna? Say goodbye to 
> battery life, not to mention speed :)
> 
> http://img.pandawhale.com/165595-your-scientists-were-so-preocc-K8Ym.jpeg 
> 
> 
> 
> On Aug 26, 2015, at 4:47 AM, Aaron Rosenzweig  > wrote:
> 
>> Hi Paul,
>> 
>> I didn’t know either but here’s the 411:
>> 
>> http://nshipster.com/nsincrementalstore/ 
>> 
>> AARON ROSENZWEIG / Chat 'n Bike 
>> e:  aa...@chatnbike.com   t:  (301) 956-2319
>>  
>> 
>> On Aug 25, 2015, at 11:39 PM, Paul Yu mailto:p...@mac.com>> 
>> wrote:
>> 
>>> Michael
>>> 
>>> Can you explain a little more?
>>> 
>>> Paul
>>> 
>>> Sent from my iPad
>>> 
 On Aug 25, 2015, at 11:37 PM, Michael Kondratov 
 mailto:mich...@aspireauctions.com>> wrote:
 
 Hello,
   We are thinking of developing a connector for iOS/OS X via 
 NSIncrementalStore. Any interest? Was it don’t by anyone previously?
 
 
 Michael
 
 
 ___
 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/pyu%40mac.com 
 
 
 This email sent to p...@mac.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:
>>> https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com
>>>  
>>> 
>>> 
>>> This email sent to aa...@chatnbike.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:
>> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>>  
>> 
>> 
>> This email sent to rgur...@smarthealth.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:
> https://lists.apple.com/mailman/options/webobjects-dev/mark%40wardle.org 
> 
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Java 8 optionals

2015-05-23 Thread Mark Wardle
Dear all,

I’ve migrated to java 8 in development and deployment and am now dabbling with 
new “features”.

Optionals seem a potentially good way of documenting nullability although the 
syntax is currently rather cumbersome it seems likely that in future versions, 
the syntax will improve.

However, key value coding fails when an object is encapsulated by an Optional. 
Intuitively, these should be unwrapped during KVC so that “normal” behaviour 
continues - i.e. as KVC gracefully handles null pointers in arbitrary key paths 
it should gracefully handle optionals containing either a value or null.

How would the handling of KVC be patched for future java versions? Is this 
something fixable now? Does all KVC work via 
NSKeyValueCoding.DefaultImplementation or are there multiple implementations? I 
used to have a java decompiler working but haven’t set this up since upgrading 
eclipse so it has been difficult to fathom the internals.

Mark

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Deputy Sub-Dean for Assessments and Honorary Lecturer, Cardiff University
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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: Wonder 7 and 8

2015-05-01 Thread Mark Wardle
Using java 8 here on development and deployment. Seems fine so far.

Mark

> On 1 May 2015, at 15:57, Samuel Pelletier  wrote:
> 
> We should go for 8, doing a API break is hard enough to skip one and the new 
> feature are really useful.
> 
> I also think the Java 8 will be supported for a long time because 9 will 
> break many old things.
> 
> Also, I strongly suggest to remove all methods with more than 3 parameters 
> whenever it is possible when rewriting modules or methods cluster to use 
> builder pattern.
> 
> Samuel
> 
> 
>> Le 2015-05-01 à 09:20, David Avendasora > > a écrit :
>> 
>> Okay, since Java 7 is officially dead as of today, should we just jump 
>> directly to Java 8?
>> 
>> I’m fine with freezing Wonder 6 (feature-wise) as-is and making the current 
>> Wonder 7 branch target Java 8.
>> 
>> Any reason we *shouldn’t* do that?
>> 
>> We can still do additional bug-fix releases of Wonder-6 for the next year or 
>> so, but all new features and development go into Wonder 8.
>> 
>> With that in mind, how about this for a plan:
>> 
>> 3) Create new Wonder_6 branch from Wonder 6.1.3 release
>> 3) Merge Wonder_7 branch into master
>> 3) Make Wonder_7 Jenkins job build master branch, targeting Java 8
>> 3) Process all the current pull requests into master to be included in 
>> Wonder_7, only critical bug fixes will be merged into Wonder_6
>> 
>> To be clear, Wonder_7 isn’t *only* about targeting Java 8, it’s also removes 
>> a lot of deprecated code and fixes long-standing bugs. **IT WILL BREAK 
>> APPS**. The focus for Wonder 7 is to move forward. Backward compatibility 
>> will be considered but it will not *automatically* have a higher priority 
>> than fixing bugs.
>> 
>> If we do this, Wonder_6 will be the stable branch. 6.1.3 will be the 
>> “stable” release.
>> 
>> Dave
>> 
>> P.S. 
>> I know I’m jumping in here. I’m not on the WOCommunity Board, and I don’t 
>> want to be stepping on their toes, or on the toes of committers that have 
>> been trying to push things forward over the past couple years. I *really* 
>> appreciate all the hard work that has been put in by everyone and we 
>> wouldn’t be even a shadow of the phenomenal community that we are without 
>> them! 
>> 
>> Right now, stagnation is our enemy. I laughed out loud at Chuck’s earlier 
>> statement: "He was just indicating that it was an appropriate time for 
>> Wonder to be updated for Java 7!” because it’s so true! However, I want to 
>> laugh just as hard at the total absurdity of him saying: “Getting Wonder to 
>> Java 8 couldn’t have been that hard. Dave Avendasora did it!” at WOWODC next 
>> year!
>> 
>> 
>>> On Apr 30, 2015, at 7:59 PM, Ramsey Gurley >> > wrote:
>>> 
>>> Sounds good to me. What is the ETA on step 3? ;-) Er, merging Wonder_7?
>>> 
>>> On Apr 29, 2015, at 7:44 AM, David Avendasora >> > wrote:
>>> 
 Hey all
 
 About a year ago a bunch of work to make Wonder Java 7 compatible. But the 
 branch is now 86 commits behind the master branch  (Wonder 6). 
 
 I propose we:
 1) Create a branch at the current head of master called Wonder_6 for 
 6-specific bug fixes going forward
 2) Merge Wonder_7 branch into Master and then delete it.
 3) Create the *first* release of Wonder 7 from Master
 4) Work through as much of the current pull requests as possible, making 
 sure they work well with Java 7, create a final Wonder_7 release
 3) Create Wonder_7 branch for 7-specific bug fixes going forward
 5) Use Master for ongoing modern java development until we transition to 
 Wonder_9
 
 If there are features that are added to the more modern branches but you 
 can’t use them because you are limited to Java 6 or 7, then you will be 
 allowed to create pull requests to bring those commits to older branches 
 the the work to do so would be on the developer wanting the back-porting. 
 Not on the original developer.
 
 What does everyone say?
 
 Dave
 
 —
 WebObjects - so easy that even Dave Avendasora can do it!™
 —
 David Avendasora
 Senior Software Abuser
 Nekesto, Inc.
 
 
 
 
 
 ___
 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/rgurley%40smarthealth.com
  
 
 
 This email sent to rgur...@smarthealth.com 
>> 
>> —
>> WebObjects - so easy that even Dave Avendasora can do it!™
>> ———

Re: Odd NPE from deep inside EOF

2015-03-31 Thread Mark Wardle
Thanks Ramsey. Have committed the properties change (yes I did have 
cleanup=true) so I’ll wait until it happens again! Intermittent and difficult 
to fathom!

Mark
> On 31 Mar 2015, at 17:31, Ramsey Gurley  wrote:
> 
> er.extensions.stackTrace.cleanup=true

 ___
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

Odd NPE from deep inside EOF

2015-03-31 Thread Mark Wardle
Occasionally I get the below exception from deep within EOF. It usually occurs 
when there has been a recent editing context save changes and then I go back to 
a different summary page which might use that information.

Writing on the off-chance that this is a classic example of breaking one of the 
EOF commandments and someone can tell me what I’m doing wrong.

Thanks

Mark

NullPointerException
 at com.webobjects.eocontrol._EOMutableKnownKeyDictionary.(_EOMutableKnow
nKeyDictionary.java:106)
 at com.webobjects.eoaccess.EORelationship._foreignKeyForSourceRow(EORelationsh
ip.java:1148)
... skipped 4 stack elements
 at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsForSourceGlobalID(
EOObjectStoreCoordinator.java:634)
 at com.webobjects.eocontrol.EOEditingContext.objectsForSourceGlobalID(EOEditin
gContext.java:3923)
 at er.extensions.eof.ERXEC.objectsForSourceGlobalID(ERXEC.java:1268)
... skipped 1 stack elements
 at com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitializationOfO
bject(EOAccessArrayFaultHandler.java:77)
 at com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead(_EOCheapCopyMuta
bleArray.java:39)
 at com.webobjects.eocontrol._EOCheapCopyMutableArray.count(_EOCheapCopyMutable
Array.java:99)
 at com.webobjects.eocontrol.EOQualifier.filteredArrayWithQualifier(EOQualifier
.java:687)
 at com.eldrix.rsdb.model._Patient.encounters(_Patient.java:1361)
 at com.eldrix.rsdb.model.Patient.activeEncounters(Patient.java:482)
 at com.eldrix.rsdb.model.Patient.activeEncounters(Patient.java:472)
 at com.eldrix.rsdb.model.Patient.formsOfClass(Patient.java:653)
 at com.eldrix.news.components.patients.PatientMedication.prescriptions(Patient
Medication.java:47)
... skipped 13 stack elements
 at com.webobjects.directtoweb.D2WList.dataSource(D2WList.java:75)
 ___
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: ant build error - too many open files

2015-03-08 Thread Mark Wardle
Thank you all. I believe I have identified the problem.

Never never hide an old version of woproject.jar in your ~/.ant/lib directory.

If you are getting standalone ant build errors and weirdness after upgrading, 
always always check. It also breaks ant builds from within eclipse.

I should have guessed as the stack trace showed it was a problem with the 
woproject ant task:

org.objectstyle.woproject.ant.FrameworkSet.getEclipseFrameworks(Unknown 
Source)

Interestingly, [https://wiki.wocommunity.org/display/WOL/WOProject-Ant] says " 
It is not recommended to drop woproject.jar into your ant lib directory since 
woproject is under continuous development and different versions can trigger 
problems such as errors when build WOnder from source.” Not sure how to avoid 
this if you want command-line ant to work. I have lots of frameworks so have 
never used eclipse to actually build the application.

In fact, I’ve now build wolips locally from Flavio’s instructions 
(http://lists.apple.com/archives/webobjects-dev/2014/Sep/msg00109.html) and 
symlinked this in so I’ll hopefully notice OR will find this email on the 
mailing list and remind myself (when we’re on eclipse 6 and webobjects 7 ahem).

Yours (idiotically),

Mark


> On 8 Mar 2015, at 21:15, Robert B. Hanviriyapunt  
> wrote:
> 
> I had strange seemingly recursion issues just because my project had some 
> parent folder containing a space in the name once.  Just throwing that out 
> there.
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: ant build error - too many open files

2015-03-08 Thread Mark Wardle
Thanks Chuck,

No links in my projects.

Have searched elsewhere and there are links in the wonder sources (build.xml).

I created an empty project and it compiled with ant.
I then repeatedly added frameworks into the build path.
My application frameworks added without problems.
I then started adding wonder frameworks.
At some point it reproduced the issue. It didn’t seem to matter which framework 
I added. Remove and it builds. Add another and usually fails. Add another and 
definitely fails.

This is jdk1.8 (rev 40), ant 1.9.4, eclipse 4.4 (luno) and wolips installed 
from http://buero-sde.de/downloads/wolips4_4_0 
.

I might go back to eclipse 4.2 and a wolips from 
https://jenkins.wocommunity.org/job/WOLips42/lastSuccessfulBuild/artifact/ 


Thank you for your suggestion!

Mark




> On 8 Mar 2015, at 18:08, Chuck Hill  wrote:
> 
> My best guess is that you have circular links (soft or hard) somewhere in the 
> main executable.
> 

 ___
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: ant build error - too many open files

2015-03-07 Thread Mark Wardle
Ok still having problems. 

Compiling fine within eclipse. 

Ant working for compiling and installing own frameworks. 

Ant fails with too many open files when building main executable. Occurs with a 
random framework. Can't open info.plist. 

Have increased kernel parameters per process and total to x100 more than 
defaults - it just takes longer to fail. Feels as if woproject build steps is 
doing something wrong -recursion?

May have to downgrade to java16 and an earlier eclipse. What are people running 
generally at the moment?

Any help / pointers / ideas gratefully received!

Mark



-- 
Dr. Mark Wardle
Consultant Neurologist, Cardiff, UK
(Sent from my mobile)


> On 21 Feb 2015, at 07:27, Mark Wardle  wrote:
> 
> Fixed this. 
> 
> For any future readers - doing these steps fixed it (but I’m not sure what 
> exactly solved it).
> 
> Clean everything
> Delete local frameworks 
> /Library/WebObjects/Versions/WebObjects543/Library/Frameworks
> Rebuild wonder
> Check all class paths for all homegrown frameworks and application and fix 
> problems.
> Move local project based frameworks so listed in dependent projects rather 
> than external libraries. 
> Check correct wolips.properties file listed in eclipse preferences. 
> Delete spurious wolips.properties definition from project’s own 
> build.properties that point to wrong wolips.properties files. 
> 
> Mark
>> On 20 Feb 2015, at 15:54, Mark Wardle  wrote:
>> 
>> Forgot to cc. list
>> 
>>> Begin forwarded message:
>>> 
>>> Subject: Re: ant build error - too many open files
>>> From: Mark Wardle 
>>> Date: 20 February 2015 15:54:30 GMT
>>> Message-Id: <605a3035-0a99-45f7-bbc4-4f95ec615...@wardle.org>
>>> To: Fabian Peters 
>>> 
>>> Thanks Fabian. Have tried that but get the error. Odd thing is that it 
>>> happens so quickly; almost as if there is recursion. It seems to randomly 
>>> throw this error on different frameworks each time I build.
>>> 
>>> Mark
>>> 
>>> 
>>>> On 20 Feb 2015, at 14:08, Fabian Peters  wrote:
>>>> 
>>>> Hi Mark,
>>>> 
>>>> Have you tried a reboot? Maybe you've somehow managed to exceed 
>>>> kern.maxfiles or kern.maxfilesperproc?
>>>> 
>>>> Fabian
>>>> 
>>>>> Am 20.02.2015 um 13:53 schrieb Mark Wardle :
>>>>> 
>>>>> I’ve upgraded to java8, eclipse4.4 and latest Wonder.
>>>>> 
>>>>> Can compile and run from within eclipse but command line ant build 
>>>>> failing with “too many open files”. 
>>>>> 
>>>>> Has anyone encountered this error? Rather stuck - have tried cleaning and 
>>>>> re-cleaning and re-installing wonder frameworks. 
>>>>> 
>>>>> Mark
>>>>> 
>>>>> [woapplication] AppFormat prepare
>>>>> 
>>>>> BUILD FAILED
>>>>> /Users/mark/Dev/rsdb/Applications/RSNews/build.xml:80: Failed to process 
>>>>> eclipse frameworks: Failed to load info.plist for 
>>>>> ERPersistentSessionStorage.
>>>>>   at 
>>>>> org.objectstyle.woproject.ant.FrameworkSet.getEclipseFrameworks(Unknown 
>>>>> Source)
>>>>>   at org.objectstyle.woproject.ant.FrameworkSet.getJarsPath(Unknown 
>>>>> Source)
>>>>>   at 
>>>>> org.objectstyle.woproject.ant.FrameworkSet.jarsPathForFrameworkSets(Unknown
>>>>>  Source)
>>>>>   at org.objectstyle.woproject.ant.AppFormat.buildFrameworkPaths(Unknown 
>>>>> Source)
>>>>>   at org.objectstyle.woproject.ant.AppFormat.preparePaths(Unknown Source)
>>>>>   at org.objectstyle.woproject.ant.AppFormat.prepare(Unknown Source)
>>>>>   at org.objectstyle.woproject.ant.AppFormat.(Unknown Source)
>>>>>   at org.objectstyle.woproject.ant.WOApplication.execute(Unknown Source)
>>>>>   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
>>>>>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>   at 
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>>>   at 
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>   at java.lang.reflect.Method.invoke(Method.java:483)
>>>>>   at 
>>>>> org.apache.tools.ant.disp

Re: looong saveChanges in a background task

2015-02-24 Thread Mark Wardle
I do this a lot when importing SNOMED-CT data (which is huge) but am afraid I 
import in batches and saveChanges and use a new editingContext for each batch. 

Mark
> On 23 Feb 2015, at 18:43, OC  wrote:
> 
> Hello there,
> 
> this time, my problem -- at least I hope so -- is going to be simple and 
> straightforward.
> 
> My application allows users to import CSV; since it is a lengthy task and 
> sice we need it to stay responsive for others, the import runs in a 
> background task (an ERXLongResponseTask) with a lowered thread priority.
> 
> Nevertheless, there still is a problem: if there's a number of imported 
> objects, the threadEC.saveChanges() at the end can take a small eternity. 
> And, given EOF is single-thread, it blocks other threads' access to the DB. 
> Which, alas, rather kills the responsiveness for other users.
> 
> One solution would be to use more EOF stacks, but I am told setting 
> ERXObjectStoreCoordinatorPool.maxCoordinators>1 leaks memory as a sieve if 
> one uses BLOBs, and we use them pretty often.
> 
> Another solution would be saving changes after importing each 100-odd items, 
> but that brings problems with potential fail of some later save and a need to 
> clean up the previous ones.
> 
> Is there another solution to the problem which I have missed? Or do I have to 
> cope with the partial-import-saving?
> 
> Thanks a lot,
> OC
> 
> 
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: ERPDFGeneration and inline images

2015-02-23 Thread Mark Wardle
I agree, it’s not looking good for him.

As an aside, is there any chance someone could patch Wonder with the changes in 
that patch?

Mark

> On 22 Feb 2015, at 23:42, Flavio Donadio  wrote:
> 
> Mark,
> 
> 
> I am afraid Mr. Donald Duck is going to die... One of the most terrible 
> diagnoses I've ever seen... ;)
> 
> 
> Cheers,
> Flavio
> 
> On 13/02/2015, at 05:03, Mark Wardle  <mailto:m...@wardle.org>> wrote:
> 
>> Thanks Ray. Answers below.
>> 
>>> On 13 Feb 2015, at 00:21, Ray Kiddy  wrote:
>>> 
>>> On Thu, 12 Feb 2015 13:36:58 +
>>> Mark Wardle  wrote:
>>> 
>>>> I struggled to use dynamically generated images in ERPDFGeneration
>>>> and couldn’t get it to work - generally getting incorrect URLs in the
>>>> generated HTML files generated from a WOComponent template.
>>> 
>>> What kind of URLs were you trying to use? Were you trying to use
>>> relative URLs to get a component-generated image in the app? I would
>>> have tried a direct action and non-relative URLs. Did you try that and
>>> did it not work?
>>> 
>> 
>> Yes initially relative URLs. Then I created a DA but that didn’t work either 
>> with odd wr resource URLs generated that had _NO_FRAMEWORK__NO_FILENAME in 
>> the raw HTML generated from the WOComponent. Plus, putting that logic in a 
>> DA felt odd as it separated the functionality and caused me anguish 
>> regarding security.
>> 
>>>> 
>>>> As a fix, I added support for ERPDFGeneration to handle html IMG tags
>>>> with base64 encoded data in the SRC attribute.
>>>> 
>>> 
>>> It sounds as though you believe you have settled for this solution, but
>>> this seems to be the best way to do this. Putting data into a img
>>> tag in this manner has been a great solution for me several times. Would
>>> the dynamic images you are generating be re-used or are they actually
>>> dynamic every time? Or are you tiling them together from something
>>> that has stored?
>> 
>> The dynamic images are dynamically generated charts from JFreeChart based on 
>> patient data. I wanted them embedded in patient letters generated from the 
>> software (see attached). 
>> 
>> 
>> <2015-02-11-14032-procedure-958.pdf>
>> 
>>> 
>>> It is not ERPDFGeneration-specific but it is possible that Wonder's
>>> support for dynamically generated graphics could be better. Or, as is
>>> more likely, there is probably more than one way to do this in Wonder
>>> and it is probably not clear which is better. What did you use for
>>> generating your images?
>> 
>> Using JFreeChart and then included them in a WOComponent used to create a 
>> “report” (patient letter) using this:
>> 
>> RSDEmbeddedImage.java
>> public class RSDEmbeddedImage extends ERXStatelessComponent {
>>  private String _mimeType;
>>  private NSData _data;
>>  public RSDEmbeddedImage(WOContext context) {
>>  super(context);
>>  }
>>  @Override
>>  public void reset() {
>>  super.reset();
>>  _mimeType = null;
>>  _data = null;
>>  }
>> 
>>  public String mimeType() {
>>  if (_mimeType == null) {
>>  _mimeType = valueForStringBinding("mimeType", 
>> "image/jpeg");
>>  }
>>  return _mimeType;
>>  }
>>  public NSData data() {
>>  if (_data == null) {
>>  _data = (NSData) valueForBinding("data");
>>  }
>>  return _data;
>>  }
>> 
>>  public String imageSource() {
>>  StringBuilder sb = new StringBuilder();
>>  sb.append("data:");
>>  sb.append(mimeType());
>>  sb.append(";base64,");
>>  NSData data = data();
>>  if (data != null) {
>>  sb.append(Base64.encodeBase64String(data.bytes()));
>>  }
>>  return sb.toString();
>>  }
>> }
>> 
>> RSDEmbeddedImage.HTML:
>> mailto:Webobjects-dev@lists.apple.com>)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/mark%40wardle.org 
>>> <https://lists.apple.com/mailman/options/webobjects-dev/mark%40wardle.org>
>>>

ant build error - too many open files

2015-02-20 Thread Mark Wardle
Fixed this.

For any future readers - doing these steps fixed it (but I'm not sure what
exactly solved it).

Clean everything
Delete local frameworks
/Library/WebObjects/Versions/WebObjects543/Library/Frameworks
Rebuild wonder
Check all class paths for all homegrown frameworks and application and fix
problems.
Move local project based frameworks so listed in dependent projects rather
than external libraries.
Check correct wolips.properties file listed in eclipse preferences.
Delete spurious wolips.properties definition from project's
own build.properties that point to wrong wolips.properties files.

Mark

On 20 Feb 2015, at 15:54, Mark Wardle > wrote:

Forgot to cc. list

Begin forwarded message:

*Subject: **Re: ant build error - too many open files*
*From: *Mark Wardle >
*Date: *20 February 2015 15:54:30 GMT
*Message-Id: *<605a3035-0a99-45f7-bbc4-4f95ec615...@wardle.org

>
*To: *Fabian Peters >

Thanks Fabian. Have tried that but get the error. Odd thing is that it
happens so quickly; almost as if there is recursion. It seems to randomly
throw this error on different frameworks each time I build.

Mark


On 20 Feb 2015, at 14:08, Fabian Peters > wrote:

Hi Mark,

Have you tried a reboot? Maybe you've somehow managed to exceed
kern.maxfiles or kern.maxfilesperproc?

Fabian

Am 20.02.2015 um 13:53 schrieb Mark Wardle >:

I've upgraded to java8, eclipse4.4 and latest Wonder.

Can compile and run from within eclipse but command line ant build failing
with "too many open files".

Has anyone encountered this error? Rather stuck - have tried cleaning and
re-cleaning and re-installing wonder frameworks.

Mark

[woapplication] AppFormat prepare

BUILD FAILED
/Users/mark/Dev/rsdb/Applications/RSNews/build.xml:80: Failed to process
eclipse frameworks: Failed to load info.plist for
ERPersistentSessionStorage.
at org.objectstyle.woproject.ant.FrameworkSet.getEclipseFrameworks(Unknown
Source)
at org.objectstyle.woproject.ant.FrameworkSet.getJarsPath(Unknown Source)
at
org.objectstyle.woproject.ant.FrameworkSet.jarsPathForFrameworkSets(Unknown
Source)
at org.objectstyle.woproject.ant.AppFormat.buildFrameworkPaths(Unknown
Source)
at org.objectstyle.woproject.ant.AppFormat.preparePaths(Unknown Source)
at org.objectstyle.woproject.ant.AppFormat.prepare(Unknown Source)
at org.objectstyle.woproject.ant.AppFormat.(Unknown Source)
at org.objectstyle.woproject.ant.WOApplication.execute(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.RuntimeException: Failed to load info.plist for
ERPersistentSessionStorage.
at
org.objectstyle.woenvironment.frameworks.AbstractFolderFramework.getInfoPlist(Unknown
Source)
at
org.objectstyle.woenvironment.frameworks.AbstractFolderFramework.reloadLibraries(Unknown
Source)
at
org.objectstyle.woenvironment.frameworks.AbstractFolderFramework.(Unknown
Source)
at
org.objectstyle.woenvironment.frameworks.ExternalFolderFramework.(Unknown
Source)
at
org.objectstyle.woenvironment.frameworks.ExternalFolderRoot.createFramework(Unknown
Source)
at
org.objectstyle.woenvironment.frameworks.AbstractFolderRoot.getFrameworks(Unknown
Source)
at
org.objectstyle.woenvironment.frameworks.Root.getFrameworkWithName(Unknown
Source)
at
org.objectstyle.woenvironment.frameworks.FrameworkModel.getFrameworkWithName(Unknown
Source)
... 25 more
Caused by: java.io.FileNotFoundException:
/Library/WebObjects/Versions/WebObjects543/Library/Frameworks/ERPersistentSessionStorage.framework/Resources/Info.plist
(Too many open files in system)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at org.objectstyle.woenvironment.util.Parser.(Unknown Source)
... 33 more

Total time: 9 seconds
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects

Fwd: ant build error - too many open files

2015-02-20 Thread Mark Wardle
Forgot to cc. list

> Begin forwarded message:
> 
> Subject: Re: ant build error - too many open files
> From: Mark Wardle 
> Date: 20 February 2015 15:54:30 GMT
> Message-Id: <605a3035-0a99-45f7-bbc4-4f95ec615...@wardle.org>
> To: Fabian Peters 
> 
> Thanks Fabian. Have tried that but get the error. Odd thing is that it 
> happens so quickly; almost as if there is recursion. It seems to randomly 
> throw this error on different frameworks each time I build.
> 
> Mark
> 
> 
>> On 20 Feb 2015, at 14:08, Fabian Peters  wrote:
>> 
>> Hi Mark,
>> 
>> Have you tried a reboot? Maybe you've somehow managed to exceed 
>> kern.maxfiles or kern.maxfilesperproc?
>> 
>> Fabian
>> 
>> Am 20.02.2015 um 13:53 schrieb Mark Wardle :
>> 
>>> I’ve upgraded to java8, eclipse4.4 and latest Wonder.
>>> 
>>> Can compile and run from within eclipse but command line ant build failing 
>>> with “too many open files”. 
>>> 
>>> Has anyone encountered this error? Rather stuck - have tried cleaning and 
>>> re-cleaning and re-installing wonder frameworks. 
>>> 
>>> Mark
>>> 
>>> [woapplication] AppFormat prepare
>>> 
>>> BUILD FAILED
>>> /Users/mark/Dev/rsdb/Applications/RSNews/build.xml:80: Failed to process 
>>> eclipse frameworks: Failed to load info.plist for 
>>> ERPersistentSessionStorage.
>>> at 
>>> org.objectstyle.woproject.ant.FrameworkSet.getEclipseFrameworks(Unknown 
>>> Source)
>>> at org.objectstyle.woproject.ant.FrameworkSet.getJarsPath(Unknown 
>>> Source)
>>> at 
>>> org.objectstyle.woproject.ant.FrameworkSet.jarsPathForFrameworkSets(Unknown 
>>> Source)
>>> at org.objectstyle.woproject.ant.AppFormat.buildFrameworkPaths(Unknown 
>>> Source)
>>> at org.objectstyle.woproject.ant.AppFormat.preparePaths(Unknown Source)
>>> at org.objectstyle.woproject.ant.AppFormat.prepare(Unknown Source)
>>> at org.objectstyle.woproject.ant.AppFormat.(Unknown Source)
>>> at org.objectstyle.woproject.ant.WOApplication.execute(Unknown Source)
>>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at 
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>> at 
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:483)
>>> at 
>>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>>> at org.apache.tools.ant.Task.perform(Task.java:348)
>>> at org.apache.tools.ant.Target.execute(Target.java:435)
>>> at org.apache.tools.ant.Target.performTasks(Target.java:456)
>>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
>>> at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
>>> at 
>>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>>> at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
>>> at org.apache.tools.ant.Main.runBuild(Main.java:851)
>>> at org.apache.tools.ant.Main.startAnt(Main.java:235)
>>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
>>> Caused by: java.lang.RuntimeException: Failed to load info.plist for 
>>> ERPersistentSessionStorage.
>>> at 
>>> org.objectstyle.woenvironment.frameworks.AbstractFolderFramework.getInfoPlist(Unknown
>>>  Source)
>>> at 
>>> org.objectstyle.woenvironment.frameworks.AbstractFolderFramework.reloadLibraries(Unknown
>>>  Source)
>>> at 
>>> org.objectstyle.woenvironment.frameworks.AbstractFolderFramework.(Unknown
>>>  Source)
>>> at 
>>> org.objectstyle.woenvironment.frameworks.ExternalFolderFramework.(Unknown
>>>  Source)
>>> at 
>>> org.objectstyle.woenvironment.frameworks.ExternalFolderRoot.createFramework(Unknown
>>>  Source)
>>> at 
>>> org.objectstyle.woenvironment.frameworks.AbstractFolderRoot.getFrameworks(Unknown
>>>  Source)
>>> at 
>>> org.objectstyle.woenvironment.frameworks.Root.getFrameworkWithName(Unknown 
>>> Source)
>>> at 
>>> org.objectstyle.woenvironment.framew

ant build error - too many open files

2015-02-20 Thread Mark Wardle
I’ve upgraded to java8, eclipse4.4 and latest Wonder.

Can compile and run from within eclipse but command line ant build failing with 
“too many open files”. 

Has anyone encountered this error? Rather stuck - have tried cleaning and 
re-cleaning and re-installing wonder frameworks. 

Mark

[woapplication] AppFormat prepare

BUILD FAILED
/Users/mark/Dev/rsdb/Applications/RSNews/build.xml:80: Failed to process 
eclipse frameworks: Failed to load info.plist for ERPersistentSessionStorage.
at 
org.objectstyle.woproject.ant.FrameworkSet.getEclipseFrameworks(Unknown Source)
at org.objectstyle.woproject.ant.FrameworkSet.getJarsPath(Unknown 
Source)
at 
org.objectstyle.woproject.ant.FrameworkSet.jarsPathForFrameworkSets(Unknown 
Source)
at org.objectstyle.woproject.ant.AppFormat.buildFrameworkPaths(Unknown 
Source)
at org.objectstyle.woproject.ant.AppFormat.preparePaths(Unknown Source)
at org.objectstyle.woproject.ant.AppFormat.prepare(Unknown Source)
at org.objectstyle.woproject.ant.AppFormat.(Unknown Source)
at org.objectstyle.woproject.ant.WOApplication.execute(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.RuntimeException: Failed to load info.plist for 
ERPersistentSessionStorage.
at 
org.objectstyle.woenvironment.frameworks.AbstractFolderFramework.getInfoPlist(Unknown
 Source)
at 
org.objectstyle.woenvironment.frameworks.AbstractFolderFramework.reloadLibraries(Unknown
 Source)
at 
org.objectstyle.woenvironment.frameworks.AbstractFolderFramework.(Unknown 
Source)
at 
org.objectstyle.woenvironment.frameworks.ExternalFolderFramework.(Unknown 
Source)
at 
org.objectstyle.woenvironment.frameworks.ExternalFolderRoot.createFramework(Unknown
 Source)
at 
org.objectstyle.woenvironment.frameworks.AbstractFolderRoot.getFrameworks(Unknown
 Source)
at 
org.objectstyle.woenvironment.frameworks.Root.getFrameworkWithName(Unknown 
Source)
at 
org.objectstyle.woenvironment.frameworks.FrameworkModel.getFrameworkWithName(Unknown
 Source)
... 25 more
Caused by: java.io.FileNotFoundException: 
/Library/WebObjects/Versions/WebObjects543/Library/Frameworks/ERPersistentSessionStorage.framework/Resources/Info.plist
 (Too many open files in system)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at org.objectstyle.woenvironment.util.Parser.(Unknown Source)
... 33 more

Total time: 9 seconds ___
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

ERPDFGeneration and inline images

2015-02-12 Thread Mark Wardle
I struggled to use dynamically generated images in ERPDFGeneration and couldn’t 
get it to work - generally getting incorrect URLs in the generated HTML files 
generated from a WOComponent template.

As a fix, I added support for ERPDFGeneration to handle html IMG tags with 
base64 encoded data in the SRC attribute.

Mark




0001-Add-support-for-data-URLs-during-PDF-conversion.patch
Description: Binary data


 ___
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: Unknown key [SOLVED]

2015-02-10 Thread Mark Wardle
You can force the entity name to use with an EntityAssignment in the rule 
system when you create page configurations which might make it difficult for 
the system to parse your entity. This is particularly an issue if you have 
compound and non-compound entity names. For example:

100 : pageConfiguration = 'ListEmbeddedProjectUsersForUser' => entity = 
"ProjectUser" [com.webobjects.directtoweb.EntityAssignment]

Of course, this is just an example and I would never use such a crazy page 
configuration myself, or indeed create a model with such redundancy in names...

Mark

> On 10 Feb 2015, at 15:45, Lize Anthonin (@JCOMMOPS)  
> wrote:
> 
> Wow.
> 
> I just renamed - as you suggested - "Ship" into "DaShip", and there is no 
> problem anymore...
> 
> A thing to know, no "Ship" named entity for D2W apps. Must be conflicting 
> with "relationSHIP" indeed...
> 
> Anyway, thank you for your help and patience!
> 
> Anthonin
> 
> On Tue, 2015-02-10 at 07:28 -0800, David Holt wrote:
>> 
>> It looks to me like SHIP may be the problem especially if you have other 
>> entities with that word contained in it. It is also contained in the word 
>> relationSHIP, so I'm wondering if you're running into something obscure 
>> here. 
>> 
>> Sent from my iPad
>> 
>> On Feb 10, 2015, at 7:20 AM, Lize Anthonin (@JCOMMOPS) > > wrote:
>> 
>> 
>>> Yes I agree on that, must be tied to a D2W rule problem. Yes I have 
>>> entities with similar names, but they are not the ones involved in this 
>>> issue (at least the entites "Ship" and "ShipLoc" are causing any trouble).
>>> Another example, quite paradoxical, when I open a page for creating a new 
>>> record of the Ship Entity, this problem happens for some fields (e.g. Ship 
>>> is bound to the Entity Doc via a M-to-N relationship, but it appears in the 
>>> Docs section  "No matching Ship records found").
>>> 
>>> I have not added so many rules. Here is my rule configuration :
>>> 
>>> 
>>> You see I have added nothing more than the defaults ones, except for the 
>>> top five ones. I haven't dived into rule system yet, just enough to handle 
>>> tabs in ERModernLook. 
>>> 
>>> Is it possible that it is caused by WOLips dev server ? Like it would mix 
>>> up rules ?
>>> I use WOLips 4.4 under eclipse 4.4, working on ubuntu. WebObjects 5.4.3, 
>>> Wonder 6.1.3-SNAPSHOT.
>>> 
>>> Thanks,
>>> 
>>> Anthonin
>>> 
>>> 
>>> On Tue, 2015-02-10 at 06:32 -0800, David Holt wrote: 
 This looks like a D2W rule problem to me. Do you have two entities with 
 similar names? Are you using 'like' to qualify on the LHS?
 
 
 
 Sent from my iPad
 
 On Feb 9, 2015, at 1:11 AM, Lize Anthonin (@JCOMMOPS) >>> > wrote:
 
 
> Hi all,
> 
> I ran into the following - quite classic - error, and I don't know what 
> is causing this :
>  valueForKey(): 
> lookup of unknown key: 'autonomy'. This class does not have an instance 
> variable of the name autonomy or _autonomy, nor a method of the name 
> autonomy, _autonomy, getAutonomy, or _getAutonomy
> 
> Just to present the situation, in my design, a Platform (PTF) is bound to 
> a Ship (SHIP).
> It's a D2W app and it appears when I want to edit a PTF, but not when I 
> want to edit a SHIP (so probably tied to a not nullable constraint or 
> something like that).
> 
> Here is what I have checked so far :
> - Given the attached stack trace, I checked the Ship entity and the 
> "autonomy" field is indeed present in my table.
> - The Ship_id field in PTF is indeed nullable. 
> - If I delete from my eomodel the 'autonomy' field (which is the first in 
> alphabetical order), the next one fires the same exception.
> - If you look at the stacktrace, you can see that the rule 
> 'pageConfiguration' is set to EditEmbeddedRelationshipObs :
> "D2W-PageConfiguration" = "EditRelationshipEmbeddedObs";
> Obs is another table (a PTF is bound to * Obs). But Obs is not bound 
> to Ship in the model. It is like it is looking for Ship fields when 
> listing the Obs and obviously it does not find the ship fields inside the 
> obs entity.
> 
> It seems to be a quite obvious problem to resolve, but I can't see it 
> apparently.
> If someone has an idea, it would be very helpful!
> 
> I keep digging.
> 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:
> https://lists.apple.com/mailman/options/webobjects-dev/mark%40wardle.org
> 
> This email sent to m...@wardle.org

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists

Re: mark custom attributes in eomodeler ?

2014-12-04 Thread Mark Wardle
You can put arbitrary information in the user info  but I'd prefer to use the 
localisation functions. 

-- 
Dr. Mark Wardle
Consultant Neurologist, Cardiff, UK
(Sent from my mobile)


> On 4 Dec 2014, at 19:37, James Cicenia  wrote:
> 
> 
> Is it possible to use the EOModeler to build a dictionary of attribute name 
> vs. user readable name?
> 
> I saw UserInfo in EOModeler but I can’t figure out how to insert anything 
> into it.
> 
> I would like to be able to read in the attributes and relationships and if I 
> have marked it in the EOModel to add to a dictionary pick list.
> 
> doable?
> 
> 
> 
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Neo4j adaptor

2014-11-25 Thread Mark Wardle
Hi. Is this adaptor ready for production and can one have models spanning 
adaptors - ie relationships between entities in say a PostgreSQL db linked to 
entities in a neo4j database (obv without expecting integrity necessarily)? 
Presumably if so, one can save an editing context and both backends would be 
updated as one "transaction"?

Thanks

Mark

-- 
Dr. Mark Wardle
Consultant Neurologist, Cardiff, UK
(Sent from my mobile)


 ___
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: Component caching?

2014-11-11 Thread Mark Wardle
Thanks Chuck,

I’ve replaced the component with a barebones stateless non-synchronising 
component and it works. Must be something odd with the ERDCustomEditComponent - 
I was using D2W to fetch some D2W rules relating to what to display but clearly 
this didn’t work properly.

Mark

> On 10 Nov 2014, at 19:56, Chuck Hill  wrote:
> 
> If it is only one value getting cached, then that is not it.  So you 
> subclassed ERDCustomEditComponent into a stateless component?  Did you 
> implement public void reset() to clear the value (set to null or empty 
> collection) of ALL instance variables?
> 
> 
> Chuck
> 
> 
> On 2014-11-08, 1:30 PM, "Mark Wardle" wrote:
> 
> Thanks Chuck. Not sure as this is generating intermediary HTML which is then 
> rendered into PDF. The intermediary HTML and therefore the subsequent PDF has 
> incorrect values for this boolean component which is really odd.
> 
> It must be something in my display boolean component. I’ll create a basic 
> debugging version and use that instead to see what is going on.
> 
> Thanks,
> 
> Mark
> 
>> On 7 Nov 2014, at 21:28, Chuck Hill > <mailto:ch...@gevityinc.com>> wrote:
>> 
>> Could it be this?
>> 
>> public boolean isPageRefreshOnBacktrackEnabled()
>> Returns whether caching of pages is disabled in the client. If it is, the 
>> client does not restore request pages from its cache but re-creates them 
>> "from scratch" by resending the URL to the server. This flag is set to true 
>> by default.
>> 
>> 
>> On 2014-11-07, 12:48 PM, "Mark Wardle" wrote:
>> 
>> Thanks Johann. I’m not caching anything but it is a subclass of 
>> ERDCustomEditComponent so perhaps so state information is being cached 
>> inappropriately only in production. I might have to try debugging in a 
>> production environment.
>> 
>> Mark
>> 
>> On 7 Nov 2014, at 10:20, Johann Werner > <mailto:j...@oyosys.de>> wrote:
>> Hi Mark,
>> do you cache the binding values within your component? When using stateless 
>> components you need to clean any local variables yourself within the reset 
>> method.
>> jw
>> Am 07.11.2014 um 10:33 schrieb Mark Wardle > <mailto:m...@wardle.org>>:
>> Hi.  I’m generating a PDF report :
>> WOComponent page = 
>> ERXApplication.application().pageWithName(componentName(), privateContext());
>> page.takeValueForKey(obj, "object");
>> page.takeValueForKey(report, "report");
>> WOResponse response = page.generateResponse();
>> report.setInterimHtml(response.contentString());
>> This looks up a named WOComponent and generates the response, storing the 
>> HTML and allowing users to fine-tune the HTML in a web-based HTML editor. 
>> This has worked perfectly previously.
>> Now I have added a custom “display boolean” component which is used within 
>> the report WOComponent. This is a stateless component but it displays the 
>> same value again and again when in production. In development, the component 
>> works properly.
>> It is like the content of the component is being cached inappropriately. I 
>> thought component caching was related to caching the contents of the WOD 
>> file, not the bindings.
>> Does anyone have any thoughts? Debugging this on a production machine quite 
>> tricky so if anyone can thing of something obvious, I’ll try that first!
>> Thanks,
>> Mark
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com 
>> <mailto:Webobjects-dev@lists.apple.com>)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/chill%40gevityinc.com 
>> <https://lists.apple.com/mailman/options/webobjects-dev/chill%40gevityinc.com>
>> 
>> This email sent to ch...@gevityinc.com <mailto:ch...@gevityinc.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Component caching?

2014-11-08 Thread Mark Wardle
Thanks Chuck. Not sure as this is generating intermediary HTML which is then 
rendered into PDF. The intermediary HTML and therefore the subsequent PDF has 
incorrect values for this boolean component which is really odd.

It must be something in my display boolean component. I’ll create a basic 
debugging version and use that instead to see what is going on.

Thanks,

Mark

> On 7 Nov 2014, at 21:28, Chuck Hill  wrote:
> 
> Could it be this?
> 
> public boolean isPageRefreshOnBacktrackEnabled()
> Returns whether caching of pages is disabled in the client. If it is, the 
> client does not restore request pages from its cache but re-creates them 
> "from scratch" by resending the URL to the server. This flag is set to true 
> by default.
> 
> 
> On 2014-11-07, 12:48 PM, "Mark Wardle" wrote:
> 
> Thanks Johann. I’m not caching anything but it is a subclass of 
> ERDCustomEditComponent so perhaps so state information is being cached 
> inappropriately only in production. I might have to try debugging in a 
> production environment.
> 
> Mark
> 
> On 7 Nov 2014, at 10:20, Johann Werner  <mailto:j...@oyosys.de>> wrote:
> Hi Mark,
> do you cache the binding values within your component? When using stateless 
> components you need to clean any local variables yourself within the reset 
> method.
> jw
> Am 07.11.2014 um 10:33 schrieb Mark Wardle  <mailto:m...@wardle.org>>:
> Hi.  I’m generating a PDF report :
> WOComponent page = ERXApplication.application().pageWithName(componentName(), 
> privateContext());
> page.takeValueForKey(obj, "object");
> page.takeValueForKey(report, "report");
> WOResponse response = page.generateResponse();
> report.setInterimHtml(response.contentString());
> This looks up a named WOComponent and generates the response, storing the 
> HTML and allowing users to fine-tune the HTML in a web-based HTML editor. 
> This has worked perfectly previously.
> Now I have added a custom “display boolean” component which is used within 
> the report WOComponent. This is a stateless component but it displays the 
> same value again and again when in production. In development, the component 
> works properly.
> It is like the content of the component is being cached inappropriately. I 
> thought component caching was related to caching the contents of the WOD 
> file, not the bindings.
> Does anyone have any thoughts? Debugging this on a production machine quite 
> tricky so if anyone can thing of something obvious, I’ll try that first!
> Thanks,
> Mark
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com 
> <mailto:Webobjects-dev@lists.apple.com>)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/chill%40gevityinc.com 
> <https://lists.apple.com/mailman/options/webobjects-dev/chill%40gevityinc.com>
> 
> This email sent to ch...@gevityinc.com <mailto:ch...@gevityinc.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Component caching?

2014-11-07 Thread Mark Wardle
Thanks Johann. I’m not caching anything but it is a subclass of 
ERDCustomEditComponent so perhaps so state information is being cached 
inappropriately only in production. I might have to try debugging in a 
production environment.

Mark

> On 7 Nov 2014, at 10:20, Johann Werner  wrote:
> 
> Hi Mark,
> 
> do you cache the binding values within your component? When using stateless 
> components you need to clean any local variables yourself within the reset 
> method.
> 
> jw
> 
> 
>> Am 07.11.2014 um 10:33 schrieb Mark Wardle :
>> 
>> Hi.  I’m generating a PDF report :
>> 
>>  WOComponent page = 
>> ERXApplication.application().pageWithName(componentName(), privateContext());
>>  page.takeValueForKey(obj, "object");
>>  page.takeValueForKey(report, "report");
>>  WOResponse response = page.generateResponse();
>>  report.setInterimHtml(response.contentString());
>> 
>> This looks up a named WOComponent and generates the response, storing the 
>> HTML and allowing users to fine-tune the HTML in a web-based HTML editor. 
>> This has worked perfectly previously.
>> 
>> Now I have added a custom “display boolean” component which is used within 
>> the report WOComponent. This is a stateless component but it displays the 
>> same value again and again when in production. In development, the component 
>> works properly.
>> 
>> It is like the content of the component is being cached inappropriately. I 
>> thought component caching was related to caching the contents of the WOD 
>> file, not the bindings. 
>> 
>> Does anyone have any thoughts? Debugging this on a production machine quite 
>> tricky so if anyone can thing of something obvious, I’ll try that first!
>> 
>> Thanks,
>> 
>> Mark
> 
> 


 ___
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

Component caching?

2014-11-07 Thread Mark Wardle
Hi.  I’m generating a PDF report :

WOComponent page = 
ERXApplication.application().pageWithName(componentName(), privateContext());
page.takeValueForKey(obj, "object");
page.takeValueForKey(report, "report");
WOResponse response = page.generateResponse();
report.setInterimHtml(response.contentString());

This looks up a named WOComponent and generates the response, storing the HTML 
and allowing users to fine-tune the HTML in a web-based HTML editor. This has 
worked perfectly previously.

Now I have added a custom “display boolean” component which is used within the 
report WOComponent. This is a stateless component but it displays the same 
value again and again when in production. In development, the component works 
properly.

It is like the content of the component is being cached inappropriately. I 
thought component caching was related to caching the contents of the WOD file, 
not the bindings. 

Does anyone have any thoughts? Debugging this on a production machine quite 
tricky so if anyone can thing of something obvious, I’ll try that first!

Thanks,

Mark ___
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: FileUpload in Modern D2W help/ideas needed

2014-10-04 Thread Mark Wardle
Hi Markus,

I’d create a new relationship for the entity - using ERAttachment.

Then create a dynamically derived property that, for existing entities, uses 
the old stored binary file. However, on editing, the new system of attachment 
can be used and this then displaces the old type.

I might even consider having a single direct action that, on running, iterates 
through all existing objects with old style attachments and inserts them as a 
ERAttachment instead.

After you’ve run this, you could delete the old relationship / storage 
mechanism.

I don’t think you can retrofit ERAttachment as it supports multiple different 
types.

Mark

> On 4 Oct 2014, at 12:12, Markus Ruggiero  wrote:
> 
> On 27.09.2014, at 16:11, Markus Ruggiero  > wrote:
> 
>> I am converting a legacy D2W application to Modern style. In the old 
>> application the create page for a given entity was frozen and then hand 
>> edited. The application implements something similar to ERAttachment and in 
>> the frozen edit page there is a plain WOFileUpload button. All the files go 
>> into the same directory (unlike with ERAttachment, where the files are 
>> stored in a multi-level subdirectory structure).
>> 
>> I want to do as much as possible without custom components (at least no page 
>> level components). I can easily do the Create/Edit/List page configuration 
>> for the given entity, but I am struggling with the file upload. I don't 
>> think I can use ERAttachment, or can I? My data model is Product <-->> 
>> Attachment (yes, the name already maches). Attachment has just a to-one 
>> relationship to product and a file name attribute (path is "hard coded" via 
>> properties file. It is is certainly possible to extend the existing 
>> Attachment entity with more fields, but how wold I handle the differing way 
>> of storing the attached files? This is a legacy application where I cannot 
>> just simply alter the file system layout. And there are already several 
>> 1000's of attachments.
>> 
> 
> No takers? I have been playing with and studying the source of ERAttachment 
> and things (including ERMD2WEditAttachment) but I cannot make sense of these 
> things (yet). This is a legacy application that needs to be brought over to 
> the modern D2W world but the data structures and file names are a given and 
> cannot be changed (and don't fit with what ERAttachment needs)
> 
> Please help me, I don't see things anymore
> Thanks a lot
> ---markus---
> 
> ___
> 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/mark%40wardle.org
> 
> This email sent to m...@wardle.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Primary keys

2014-10-02 Thread Mark Wardle
Thanks Ted, that is interesting. Unfortunately, the existing primary key is 
used in joins from other tables so I think it will need to be a multi-step 
procedure.

Take home message for me is never ever have primary keys with any kind of 
meaning, even if coming from an external reputable third-party because even 
they will decide to change their primary keys in the future.  I’ve not done it 
since but this is from work from years ago so I blame my younger self!

Mark

> On 2 Oct 2014, at 12:01, Theodore Petrosky  wrote:
> 
> if there is already a primary key, then I think the correct thing to do is to 
> drop the first and add what you want. I have no experience doing this, but it 
> seems logical.
> 
> 
> ERXMigrationTable theTable = database.existingTableNamed(“yourTable”);
> 
> theTable.dropPrimaryKey(columns);
> theTable.setPrimaryKey(columns);
> 
> interesting that when I ask WOLips, it comes up with columns (plural). I 
> assume you can add a multi column primary key. I have no idea where that 
> would be useful. or this implications as a primary key does not want to be a 
> class property.
> 
> Ted
> 
> 
> On Oct 2, 2014, at 5:00 AM, Mark Wardle  <mailto:m...@wardle.org>> wrote:
> 
>> Dear all,
>> 
>> I need to add a new primary key to a table that already contains data. 
>> 
>> Is it possible to use migrations to add this and have the column 
>> auto-populated with a serial number?
>> 
>> My other plan was to create an integer column and then, in code, iterate 
>> through the objects manually setting the serial integer, and then later on 
>> migrating that to a primary key. Would this then break primary key 
>> generation for newly created objects?
>> 
>> All advice appreciated!
>> 
>> Many thanks,
>> 
>> Mark
>> 
>> 
>> -- 
>> Dr. Mark Wardle
>> Consultant Neurologist, University Hospital Wales, Cardiff, UK
>> Email: mark.war...@wales.nhs.uk <mailto:mark.war...@wales.nhs.uk> or 
>> m...@wardle.org <mailto:m...@wardle.org>  Twitter: @mwardle
>> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>> 
>> 
>> 
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com 
>> <mailto:Webobjects-dev@lists.apple.com>)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com 
>> <https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com>
>> 
>> This email sent to tedp...@yahoo.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Primary keys

2014-10-02 Thread Mark Wardle
Thanks Fabian.

Can one use ERXMigration to add a serial column? I don’t think it is a JDBC 
column type? I can create an integer column and then add the serial default 
value in SQL presumably. I suspect there isn’t a database agnostic way to do 
this.

I’ll try that. Thank you again,

Mark

> On 2 Oct 2014, at 10:43, Fabian Peters  wrote:
> 
> Hi Mark,
> 
> For postgresql you could add a column "serial". When the column is added, it 
> is populated with values by postgres. You could then use migration's 
> "setPrimaryKey" and "dropPrimaryKey".
> 
> This is totally untested…
> 
> Fabian
> 
> Am 02.10.2014 um 11:00 schrieb Mark Wardle :
> 
>> Dear all,
>> 
>> I need to add a new primary key to a table that already contains data. 
>> 
>> Is it possible to use migrations to add this and have the column 
>> auto-populated with a serial number?
>> 
>> My other plan was to create an integer column and then, in code, iterate 
>> through the objects manually setting the serial integer, and then later on 
>> migrating that to a primary key. Would this then break primary key 
>> generation for newly created objects?
>> 
>> All advice appreciated!
>> 
>> Many thanks,
>> 
>> Mark
>> 
>> 
>> -- 
>> Dr. Mark Wardle
>> Consultant Neurologist, University Hospital Wales, Cardiff, UK
>> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
>> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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/lists.fabian%40e-lumo.com
>> 
>> This email sent to lists.fab...@e-lumo.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Primary keys

2014-10-02 Thread Mark Wardle
Dear all,

I need to add a new primary key to a table that already contains data. 

Is it possible to use migrations to add this and have the column auto-populated 
with a serial number?

My other plan was to create an integer column and then, in code, iterate 
through the objects manually setting the serial integer, and then later on 
migrating that to a primary key. Would this then break primary key generation 
for newly created objects?

All advice appreciated!

Many thanks,

Mark


-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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: Yosemite

2014-08-06 Thread Mark Wardle
Thanks all. How interesting! I’d never come across using mod_proxy and would 
echo Paul’s questions.

For the time being I will use direct connect and luckily I have an application 
level property whether to force SSL redirection or not so can switch that off 
for development and on for deployment.

Still using old java monitor so will upgrade to Wonder’s version and have a 
look in the migrations panel as you describe.

Thank you

Mark

> On 5 Aug 2014, at 17:57, Chuck Hill  wrote:
> 
> I’d take a long, hard look at moving to mod_proxy and ending this dependance 
> on third party Apache plugins.  Unless your configuration changes frequently 
> this seems like a better choice.
> 
> Chuck
> 
> 
> On 2014-08-05, 9:08 AM, "Mark Wardle" wrote:
> 
> Yosemite upgrades Apache from 2.2 and 2.4.
> 
> I’ve tried recompiling the apache adaptor but compilation files despite 
> entering a magic incantation:
> 
> make ADAPTORS=Apache2.4 LTFLAGS='--tag CC’
> 
> 
> /usr/share/apr-1/build-1/libtool: line 8962: 
> /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain/usr/bin/cc:
>  No such file or directory
> apxs:Error: Command failed with rc=8323072
> 
> It looks like it may be a problem with the new yosemite Xcode but I’m not 
> sure.
> 
> Has anyone either downgraded gracefully to apache 2.2 or got a binary apache 
> 2.4 mac os x yosemite adapter. For the latter, we then have to do battle with 
> the updated configuration files which look like they’re more restrictive than 
> before.
> 
> If this doesn’t work, then I might have to face the horror of remembering how 
> to do development in direct connect mode and somehow dynamically switch SSL 
> on or off depending on whether in development!
> 
> Mark
> -- 
> Dr. Mark Wardle
> Consultant Neurologist, University Hospital Wales, Cardiff, UK
> Email: mark.war...@wales.nhs.uk <mailto:mark.war...@wales.nhs.uk> or 
> m...@wardle.org <mailto:m...@wardle.org>  Twitter: @mwardle
> Telephone: 02920745274 (secretary) or facsimile: 02920744166
> 
> 
> 
> 
> 

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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

Yosemite

2014-08-05 Thread Mark Wardle
Yosemite upgrades Apache from 2.2 and 2.4.

I’ve tried recompiling the apache adaptor but compilation files despite 
entering a magic incantation:

make ADAPTORS=Apache2.4 LTFLAGS='--tag CC’


/usr/share/apr-1/build-1/libtool: line 8962: 
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain/usr/bin/cc:
 No such file or directory
apxs:Error: Command failed with rc=8323072

It looks like it may be a problem with the new yosemite Xcode but I’m not sure.

Has anyone either downgraded gracefully to apache 2.2 or got a binary apache 
2.4 mac os x yosemite adapter. For the latter, we then have to do battle with 
the updated configuration files which look like they’re more restrictive than 
before.

If this doesn’t work, then I might have to face the horror of remembering how 
to do development in direct connect mode and somehow dynamically switch SSL on 
or off depending on whether in development!

Mark
-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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

WebObjects development

2014-03-07 Thread Mark Wardle
Hi all. 

It is sad to hear the despondency permeating through the email list today.

I think many of us have achieved so much with this technology stack, solutions 
that would be much more difficult with other technologies. 

I think Apple is missing a trick here. Perhaps I am naive but isn’t their focus 
on vertical integration? WebObjects is and could be the server side answer for 
iOS in the enterprise. For me, we’re just about to deploy our first iOS apps 
running on iPads in our outpatient clinics, linking to our WebObjects 
applications handling all of the complex business logic that we need in 
healthcare. We’ve achieved this on a shoestring and it’s due to the great 
design - seen in WebObjects and of course, by logical extension in the related 
frameworks inherited from NeXT in modern Apple operating systems.

Personally, I want Apple stuff in the enterprise - in my enterprise - in my 
outpatient clinic. I think it would make a tremendous difference to how we 
provide healthcare. WebObjects is such a good fit for iOS devices I just cannot 
believe that Apple does not want to support such a great and productive 
technology.

Whatever the case, my WebObjects applications are still running and we are 
getting more and more users here in this part of the UK! It is just a shame 
Apple seems to have given up on it.

I’ve copied in Tim Cook to this. At the back of my mind, I’m hoping he’ll take 
an interest, realise overnight what a great technology this is and how it can 
be a great product for both large and small enterprises, can form part of a 
great technology stack and support iOS, and as such, re-incarnate WebObjects - 
the technology we love! Mr Cook - could Apple un-deprecate this technology 
please? It is really rather good!

Best wishes,

Mark

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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: Linking iOS and WebObjects

2014-02-27 Thread Mark Wardle
Related to this, has anyone used NSIncrementalDataStore as the glue linking 
core data to the remote API?

Mark

On 20 Feb 2014, at 09:59, Mark Wardle  wrote:

> Wow Ken - that sounds fantastic.
> 
> I’m just at the early stages - but would rather work on something more 
> generic than a quick-and-dirty model-specific solution - but was going to go 
> for latter due to time constraints… perfection being enemy of the productive…
> 
> Mark
> 
> On 18 Feb 2014, at 22:56, Ken Anderson  wrote:
> 
>> Mark,
>> 
>> I built a library on both iOS and WO that syncs a data model between the 2.  
>> It has some pretty decent features, like you can define an ownership key 
>> path on the server side, and only those EO’s owned by the person syncing are 
>> sent over.
>> 
>> It’s not really documented yet or anything, but I could probably put 
>> something together to share.
>> 
>> The big difference between mine and other sync mechanisms is I don’t keep a 
>> log of everything to send to everybody (my data model is big, so it would 
>> get painful).  Also, it’s reasonably smart about doing things offline (like 
>> maintaining relationships even when a number of transactions have happened 
>> on the device without an internet connection).
>> 
>> Let me know if this interests you enough for me to spruce it up.
>> 
>> Ken
>> 
>> On Feb 18, 2014, at 3:51 PM, Mark Wardle  wrote:
>> 
>>> Hi. Glad it is a common use-case. Not sure if you have misunderstood my 
>>> intentions but I was asking for advice rather than planning a super-duper 
>>> automatic EOF to obj-c/core data magic converter - although I had hoped 
>>> someone else had already invented such a wonder (no pun intended).
>>> 
>>> Am experimenting with the iOS library RestKit which I think can make a core 
>>> data model from what it receives from a REST service automagically… I think…
>>> 
>>> Mark
>>> On 14 Feb 2014, at 14:41, Jesse Tayler  wrote:
>>> 
>>>> 
>>>> FANTASTIC!
>>>> 
>>>> yes, ERSync is not going to work for the main question which is how to 
>>>> store a local object graph that loads as the user sees things, and keep it 
>>>> updated while still being able to rationally send data back to the server 
>>>> in a way that can handle offline or poor network conditions etc.
>>>> 
>>>> ERRest is SUPER-FAB for being the server of an iPhone client and there’s 
>>>> quite a few tricks we can and should compile together.
>>>> 
>>>> So, definitely call upon me to have something to say about all this and 
>>>> I’ve been at it a few years now, so I have gone through all this at least 
>>>> once or twice.
>>>> 
>>>> greatly looking forward!
>>>> 
>>>> jess
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Feb 14, 2014, at 9:37 AM, Mark Wardle  wrote:
>>>> 
>>>>> Hi all,
>>>>> 
>>>>> I am starting to work on a new presentation layer for our web application 
>>>>> using the iOS SDK. We plan on writing custom small iOS apps that 
>>>>> integrate with the larger more complex backend web-application built in 
>>>>> WebObjects. 
>>>>> 
>>>>> I can see ERSync but note it is not in Wonder yet. Is this still in 
>>>>> development or is it ready for deployment? It certainly looks an easy way 
>>>>> to get started.
>>>>> 
>>>>> However, we might want more finely grained control anyway. We’ve been 
>>>>> adding REST interfaces to the backend. Does anyone have any 
>>>>> recommendations for an iOS client library to make this work trivial? I 
>>>>> would think that we could create some stub object-graph in objective c 
>>>>> that then gets sent to the server semi-automatically? Is there something 
>>>>> that would take an EOModel and create a core data equivalent or skeleton 
>>>>> classes? 
>>>>> 
>>>>> I can see various references on the mailing list but nothing on the wiki. 
>>>>> 
>>>>> Any pointers (*) much appreciated!
>>>>> 
>>>>> Mark
>>>>> (*) you can tell I’m back to coding in C and not just using java (!)
>>>>> -- 
>>>>> Dr. Mark Wardle
>>>>> Consultant Neurologist, University Hospital Wales, Cardiff, UK
>>>>> Em

Re: Linking iOS and WebObjects

2014-02-20 Thread Mark Wardle
Wow Ken - that sounds fantastic.

I’m just at the early stages - but would rather work on something more generic 
than a quick-and-dirty model-specific solution - but was going to go for latter 
due to time constraints… perfection being enemy of the productive…

Mark

On 18 Feb 2014, at 22:56, Ken Anderson  wrote:

> Mark,
> 
> I built a library on both iOS and WO that syncs a data model between the 2.  
> It has some pretty decent features, like you can define an ownership key path 
> on the server side, and only those EO’s owned by the person syncing are sent 
> over.
> 
> It’s not really documented yet or anything, but I could probably put 
> something together to share.
> 
> The big difference between mine and other sync mechanisms is I don’t keep a 
> log of everything to send to everybody (my data model is big, so it would get 
> painful).  Also, it’s reasonably smart about doing things offline (like 
> maintaining relationships even when a number of transactions have happened on 
> the device without an internet connection).
> 
> Let me know if this interests you enough for me to spruce it up.
> 
> Ken
> 
> On Feb 18, 2014, at 3:51 PM, Mark Wardle  wrote:
> 
>> Hi. Glad it is a common use-case. Not sure if you have misunderstood my 
>> intentions but I was asking for advice rather than planning a super-duper 
>> automatic EOF to obj-c/core data magic converter - although I had hoped 
>> someone else had already invented such a wonder (no pun intended).
>> 
>> Am experimenting with the iOS library RestKit which I think can make a core 
>> data model from what it receives from a REST service automagically… I think…
>> 
>> Mark
>> On 14 Feb 2014, at 14:41, Jesse Tayler  wrote:
>> 
>>> 
>>> FANTASTIC!
>>> 
>>> yes, ERSync is not going to work for the main question which is how to 
>>> store a local object graph that loads as the user sees things, and keep it 
>>> updated while still being able to rationally send data back to the server 
>>> in a way that can handle offline or poor network conditions etc.
>>> 
>>> ERRest is SUPER-FAB for being the server of an iPhone client and there’s 
>>> quite a few tricks we can and should compile together.
>>> 
>>> So, definitely call upon me to have something to say about all this and 
>>> I’ve been at it a few years now, so I have gone through all this at least 
>>> once or twice.
>>> 
>>> greatly looking forward!
>>> 
>>> jess
>>> 
>>> 
>>> 
>>> 
>>> On Feb 14, 2014, at 9:37 AM, Mark Wardle  wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> I am starting to work on a new presentation layer for our web application 
>>>> using the iOS SDK. We plan on writing custom small iOS apps that integrate 
>>>> with the larger more complex backend web-application built in WebObjects. 
>>>> 
>>>> I can see ERSync but note it is not in Wonder yet. Is this still in 
>>>> development or is it ready for deployment? It certainly looks an easy way 
>>>> to get started.
>>>> 
>>>> However, we might want more finely grained control anyway. We’ve been 
>>>> adding REST interfaces to the backend. Does anyone have any 
>>>> recommendations for an iOS client library to make this work trivial? I 
>>>> would think that we could create some stub object-graph in objective c 
>>>> that then gets sent to the server semi-automatically? Is there something 
>>>> that would take an EOModel and create a core data equivalent or skeleton 
>>>> classes? 
>>>> 
>>>> I can see various references on the mailing list but nothing on the wiki. 
>>>> 
>>>> Any pointers (*) much appreciated!
>>>> 
>>>> Mark
>>>> (*) you can tell I’m back to coding in C and not just using java (!)
>>>> -- 
>>>> Dr. Mark Wardle
>>>> Consultant Neurologist, University Hospital Wales, Cardiff, UK
>>>> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
>>>> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ___
>>>> 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/mailma

Re: Linking iOS and WebObjects

2014-02-18 Thread Mark Wardle
Hi. Glad it is a common use-case. Not sure if you have misunderstood my 
intentions but I was asking for advice rather than planning a super-duper 
automatic EOF to obj-c/core data magic converter - although I had hoped someone 
else had already invented such a wonder (no pun intended).

Am experimenting with the iOS library RestKit which I think can make a core 
data model from what it receives from a REST service automagically… I think…

Mark
On 14 Feb 2014, at 14:41, Jesse Tayler  wrote:

> 
> FANTASTIC!
> 
> yes, ERSync is not going to work for the main question which is how to store 
> a local object graph that loads as the user sees things, and keep it updated 
> while still being able to rationally send data back to the server in a way 
> that can handle offline or poor network conditions etc.
> 
> ERRest is SUPER-FAB for being the server of an iPhone client and there’s 
> quite a few tricks we can and should compile together.
> 
> So, definitely call upon me to have something to say about all this and I’ve 
> been at it a few years now, so I have gone through all this at least once or 
> twice.
> 
> greatly looking forward!
> 
> jess
> 
> 
> 
> 
> On Feb 14, 2014, at 9:37 AM, Mark Wardle  wrote:
> 
>> Hi all,
>> 
>> I am starting to work on a new presentation layer for our web application 
>> using the iOS SDK. We plan on writing custom small iOS apps that integrate 
>> with the larger more complex backend web-application built in WebObjects. 
>> 
>> I can see ERSync but note it is not in Wonder yet. Is this still in 
>> development or is it ready for deployment? It certainly looks an easy way to 
>> get started.
>> 
>> However, we might want more finely grained control anyway. We’ve been adding 
>> REST interfaces to the backend. Does anyone have any recommendations for an 
>> iOS client library to make this work trivial? I would think that we could 
>> create some stub object-graph in objective c that then gets sent to the 
>> server semi-automatically? Is there something that would take an EOModel and 
>> create a core data equivalent or skeleton classes? 
>> 
>> I can see various references on the mailing list but nothing on the wiki. 
>> 
>> Any pointers (*) much appreciated!
>> 
>> Mark
>> (*) you can tell I’m back to coding in C and not just using java (!)
>> -- 
>> Dr. Mark Wardle
>> Consultant Neurologist, University Hospital Wales, Cardiff, UK
>> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
>> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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/jtayler%40oeinc.com
>> 
>> This email sent to jtay...@oeinc.com
> 

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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

Linking iOS and WebObjects

2014-02-14 Thread Mark Wardle
Hi all,

I am starting to work on a new presentation layer for our web application using 
the iOS SDK. We plan on writing custom small iOS apps that integrate with the 
larger more complex backend web-application built in WebObjects. 

I can see ERSync but note it is not in Wonder yet. Is this still in development 
or is it ready for deployment? It certainly looks an easy way to get started.

However, we might want more finely grained control anyway. We’ve been adding 
REST interfaces to the backend. Does anyone have any recommendations for an iOS 
client library to make this work trivial? I would think that we could create 
some stub object-graph in objective c that then gets sent to the server 
semi-automatically? Is there something that would take an EOModel and create a 
core data equivalent or skeleton classes? 

I can see various references on the mailing list but nothing on the wiki. 

Any pointers (*) much appreciated!

Mark
(*) you can tell I’m back to coding in C and not just using java (!)
-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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

Problem with ERD2WEditToOneRelationship [solved]

2013-10-09 Thread Mark Wardle
A difficult to find bug (in my code):

Configure ERD2WEditToOneRelationship to show a list of objects. User chooses 
one, validation error - "a prescription must have a medication".

I've had a similar problem before when the foreign key was accidentally a class 
property.

For anyone with a similar problem, make sure your keyWhenRelationship key is 
not returning a text string with a trailing space. It is a difficult to track 
bug but resulted in much pulling of hair. My userPresentableDescription was 
configured to build a string from a number of the object's properties and I 
left a trailing space for some objects.

I've seen prior reports on the mailing list so hope this might solve a similar 
problem for others.

Best wishes,

Mark
-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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: Changing from horizontal to single table inheritance

2013-10-09 Thread Mark Wardle
Thanks all. Alternate data stores are an intriguing idea - I already switched 
away from using PostgreSQL to implement SNOMED_CT in favour of Lucene as the 
free text searching was too slow with PostgreSQL. That said, it is nice that 
some of the data collection forms have relational constraints to other parts of 
the patient record. 

Good to think about this, but I think I'll park the ideas for now. Only issue 
is keeping a hand on performance metrics and considering again if we do hit a 
problem.

Best wishes,

Mark

On 6 Oct 2013, at 21:02, Kieran Kelleher  wrote:

> Might be worth checking a Graph Database such as Neo4j as a possible solution 
> for your domain model requirements.
> 
> The book: http://amzn.com/1449356265
> 
> Free PDF Version of the book: http://graphdatabases.com
> 
> 
> On Oct 6, 2013, at 2:08 PM, Ramsey Gurley  wrote:
> 
>> You need a schema-less approach if you need to create these things at 
>> runtime. Relational databases really aren't such a good fit in these cases. 
>> You can shoe horn something into a RDBMS with EAV or datablobs, but it won't 
>> scale well.
>> 
>> If you're using Postgres 9.2.x or better, there is built in JSON data 
>> storage you could use. You can write stored procedures using PLV8, an 
>> embedded V8 javascript engine. It's also faster than 
>> MongoDB based on what I've read.
>> 
>> 
>> 
>> On Sat, Oct 5, 2013 at 2:25 PM, Mark Wardle  wrote:
>> Thanks both,
>> 
>> This advice is all very helpful. I might do some performance measurement to 
>> see whether keeping horizontal inheritance is actually causing problems. I 
>> think I'm batch fetching which should mean joining on multiple tables and 
>> not a SELECT on each and every entity. 
>> 
>> The problem is that with single table inheritance, combining all data forms, 
>> I will end up with a database table with 449 columns - which might have its 
>> own set of problems!
>> 
>> Out of curiosity, am I going to hit any problems combining approaches? Using 
>> single table inheritance when there are many common properties and using 
>> horizontal inheritance when the majority of properties are not shared.
>> 
>> What I should do instead is write a generic entity which itself stores a 
>> runtime-defined, stored in the database (and modelling in EOF) bunch of 
>> properties in an NSDictionary and has logic provided a runtime chosen 
>> delegate. Then I could create new data collection forms using a dedicated UI 
>> and little overhead. Then we'd just set-up a bunch of D2W rules to ask the 
>> generic entity for displayPropertyKeys etc. for the appropriate fake entity. 
>> Anyone created fake entities like this either?
>> 
>> Best wishes,
>> 
>> Mark
>> 
>> 
>> On 4 Oct 2013, at 19:23, Chuck Hill  wrote:
>> 
>>> On 2013-10-04 11:06 AM, "Ramsey Gurley" wrote:
>>> 
>>> Not to contradict Chuck (he is always right), 
>>> 
>>> Will someone PLEASE tell my wife?
>>> 
>>> 
>>> -- 
>>> Chuck Hill 
>>> Executive Managing Partner, VP Development and Technical Services
>>> 
>>> 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/gvc/practical_webobjects
>>> 
>>> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest 
>>> Growing Companies in B.C! 
>>> 
>>> Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of 
>>> Canada’s Fastest-Growing Companies by PROFIT Magazine!
>> 
>> -- 
>> Dr. Mark Wardle
>> Consultant Neurologist, University Hospital Wales, Cardiff, UK
>> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
>> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>> 
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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/kelleherk%40gmail.com
>> 
>> This email sent to kelleh...@gmail.com
> 

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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: Changing from horizontal to single table inheritance

2013-10-05 Thread Mark Wardle
Thanks both,

This advice is all very helpful. I might do some performance measurement to see 
whether keeping horizontal inheritance is actually causing problems. I think 
I'm batch fetching which should mean joining on multiple tables and not a 
SELECT on each and every entity. 

The problem is that with single table inheritance, combining all data forms, I 
will end up with a database table with 449 columns - which might have its own 
set of problems!

Out of curiosity, am I going to hit any problems combining approaches? Using 
single table inheritance when there are many common properties and using 
horizontal inheritance when the majority of properties are not shared.

What I should do instead is write a generic entity which itself stores a 
runtime-defined, stored in the database (and modelling in EOF) bunch of 
properties in an NSDictionary and has logic provided a runtime chosen delegate. 
Then I could create new data collection forms using a dedicated UI and little 
overhead. Then we'd just set-up a bunch of D2W rules to ask the generic entity 
for displayPropertyKeys etc. for the appropriate fake entity. Anyone created 
fake entities like this either?

Best wishes,

Mark


On 4 Oct 2013, at 19:23, Chuck Hill  wrote:

> On 2013-10-04 11:06 AM, "Ramsey Gurley" wrote:
> 
> Not to contradict Chuck (he is always right), 
> 
> Will someone PLEASE tell my wife?
> 
> 
> -- 
> Chuck Hill 
> Executive Managing Partner, VP Development and Technical Services
> 
> 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/gvc/practical_webobjects
> 
> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
> Companies in B.C! 
> 
> Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of 
> Canada’s Fastest-Growing Companies by PROFIT Magazine!

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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

  1   2   3   >