Re: [Tomcat] -Classpath ordering issue (Dev WO)
t.artifactId}/WEB-INF/lib/JavaWebServicesSupport.jar" > webAppMount="/WEB-INF/lib/JavaWebServicesSupport.jar" /> >className="org.apache.catalina.webresources.FileResourceSet" > > base="${catalina.base}/webapps/${project.artifactId}/WEB-INF/lib/JavaXML.jar" > webAppMount="/WEB-INF/lib/JavaXML.jar" /> > > > > > Hope it helps, > > F > > -- > Faizel Dakri > list...@dakri.com <mailto:list...@dakri.com> >> On Jan 30, 2020, at 04:13 AM, Dev WO via Webobjects-dev >> mailto:webobjects-dev@lists.apple.com>> >> wrote: >> >> Hi Matthew, >> >> I will try that. >> >> Also I’m currently looking into using the PreResources feature like this: >> >> -creating a directory mywebapp/WEB-INF/prelib with all the system jars (the >> Apple ones) >> -mywebapp/WEB-INF/context.xml contains >> >> >> >> > className="org.apache.catalina.webresources.DirResourceSet" >> base=“/WEB-INF/prelib" webAppMount="/WEB-INF/lib" /> >> >> >> >> but it doesn’t work for now. I also tried with an absolute path, but same >> failure ( java.lang.ClassNotFoundException for WOApplication) >> >> Have you ever tried that way? any pointers? >> >> Thanks, >> >> Xavier >> >> >>> On 30 Jan 2020, at 10:57, >> <mailto:matthew.long...@proact.net>> >> <mailto:matthew.long...@proact.net>> wrote: >>> >>> Hi Xavier >>> >>> We had exactly the same issue on one of our sites. In the end the resolution >>> was not to change the tomcat class loaders but to actually pre expand the >>> required jars into a classes directory within the war, in our case it was >>> only the ERExtensions.jar needed >>> >>> e.g. >>> X.war/WEB-INF/classes/com/webobjects/... >>> X.war/WEB-INF/classes/er/extensions/... >>> >>> Anything in here will be loaded prior to the jars within WEB-INF/lib >>> >>> Regards >>> Matt >>> >>> -Original Message- >>> From: Webobjects-dev >>> >> <mailto:webobjects-dev-bounces+matthew.longden=proact@lists.apple.com>> >>> On >>> Behalf Of webobjects-dev-requ...@lists.apple.com >>> <mailto:webobjects-dev-requ...@lists.apple.com> >>> Sent: 29 January 2020 17:57 >>> To: webobjects-dev@lists.apple.com <mailto:webobjects-dev@lists.apple.com> >>> Subject: Webobjects-dev Digest, Vol 17, Issue 32 >>> Importance: Low >>> >>> Send Webobjects-dev mailing list submissions to >>> webobjects-dev@lists.apple.com <mailto:webobjects-dev@lists.apple.com> >>> >>> To subscribe or unsubscribe via the World Wide Web, visit >>> https://lists.apple.com/mailman/listinfo/webobjects-dev >>> <https://lists.apple.com/mailman/listinfo/webobjects-dev> >>> or, via email, send a message with subject or body 'help' to >>> webobjects-dev-requ...@lists.apple.com >>> >>> You can reach the person managing the list at >>> webobjects-dev-ow...@lists.apple.com >>> >>> When replying, please edit your Subject line so it is more specific than >>> "Re: Contents of Webobjects-dev digest..." >>> >>> >>> Today's Topics: >>> >>> 1. [Tomcat] -Classpath ordering issue (Dev WO) >>> 2. Re: [Tomcat] -Classpath ordering issue (Konrad Kubacki) >>> 3. Fwd: [Tomcat] -Classpath ordering issue (Dev WO) >>> 4. Re: [Tomcat] -Classpath ordering issue (Dev WO) >>> >>> >>> -- >>> >>> Message: 1 >>> Date: Wed, 29 Jan 2020 08:32:25 +0100 >>> From: Dev WO >>> To: "webobjects-dev@lists.apple.com" >>> Subject: [Tomcat] -Classpath ordering issue >>> Message-ID: <06d8ad23-3cd7-43d1-a9c9-4f7e34337...@anazys.com> >>> Content-Type: text/plain; charset=utf-8 >>> >>> Hi WOers, >>> >>> I?m starting to lost my mind with a Tomcat deployment (not my choice) >>> >>> I have 4 machines: >>> 1-Dev machine running through Eclipse and Apache (OS X) => Everything works >>> 2-Test Tomcat deployment machine (OS X / Tomcat 9.0.29) => Everything works >&
Re: [Tomcat] -Classpath ordering issue (Dev WO)
Xavier, I make use of the PreResources and PostResources directives in my context.xml file. FYI, I noticed you put the context.xml file in WEB-INF. I have mine in the META-INF folder. Mine looks like this: Hope it helps, F -- Faizel Dakri list...@dakri.com > On Jan 30, 2020, at 04:13 AM, Dev WO via Webobjects-dev > wrote: > > Hi Matthew, > > I will try that. > > Also I’m currently looking into using the PreResources feature like this: > > -creating a directory mywebapp/WEB-INF/prelib with all the system jars (the > Apple ones) > -mywebapp/WEB-INF/context.xml contains > > > >className="org.apache.catalina.webresources.DirResourceSet" > base=“/WEB-INF/prelib" webAppMount="/WEB-INF/lib" /> > > > > but it doesn’t work for now. I also tried with an absolute path, but same > failure ( java.lang.ClassNotFoundException for WOApplication) > > Have you ever tried that way? any pointers? > > Thanks, > > Xavier > > >> On 30 Jan 2020, at 10:57, > <mailto:matthew.long...@proact.net>> > <mailto:matthew.long...@proact.net>> wrote: >> >> Hi Xavier >> >> We had exactly the same issue on one of our sites. In the end the resolution >> was not to change the tomcat class loaders but to actually pre expand the >> required jars into a classes directory within the war, in our case it was >> only the ERExtensions.jar needed >> >> e.g. >> X.war/WEB-INF/classes/com/webobjects/... >> X.war/WEB-INF/classes/er/extensions/... >> >> Anything in here will be loaded prior to the jars within WEB-INF/lib >> >> Regards >> Matt >> >> -Original Message- >> From: Webobjects-dev >> > <mailto:webobjects-dev-bounces+matthew.longden=proact@lists.apple.com>> >> On >> Behalf Of webobjects-dev-requ...@lists.apple.com >> <mailto:webobjects-dev-requ...@lists.apple.com> >> Sent: 29 January 2020 17:57 >> To: webobjects-dev@lists.apple.com <mailto:webobjects-dev@lists.apple.com> >> Subject: Webobjects-dev Digest, Vol 17, Issue 32 >> Importance: Low >> >> Send Webobjects-dev mailing list submissions to >> webobjects-dev@lists.apple.com <mailto:webobjects-dev@lists.apple.com> >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.apple.com/mailman/listinfo/webobjects-dev >> or, via email, send a message with subject or body 'help' to >> webobjects-dev-requ...@lists.apple.com >> >> You can reach the person managing the list at >> webobjects-dev-ow...@lists.apple.com >> >> When replying, please edit your Subject line so it is more specific than >> "Re: Contents of Webobjects-dev digest..." >> >> >> Today's Topics: >> >> 1. [Tomcat] -Classpath ordering issue (Dev WO) >> 2. Re: [Tomcat] -Classpath ordering issue (Konrad Kubacki) >> 3. Fwd: [Tomcat] -Classpath ordering issue (Dev WO) >> 4. Re: [Tomcat] -Classpath ordering issue (Dev WO) >> >> >> -- >> >> Message: 1 >> Date: Wed, 29 Jan 2020 08:32:25 +0100 >> From: Dev WO >> To: "webobjects-dev@lists.apple.com" >> Subject: [Tomcat] -Classpath ordering issue >> Message-ID: <06d8ad23-3cd7-43d1-a9c9-4f7e34337...@anazys.com> >> Content-Type: text/plain;charset=utf-8 >> >> Hi WOers, >> >> I?m starting to lost my mind with a Tomcat deployment (not my choice) >> >> I have 4 machines: >> 1-Dev machine running through Eclipse and Apache (OS X) => Everything works >> 2-Test Tomcat deployment machine (OS X / Tomcat 9.0.29) => Everything works >> 3-Another test Tomcat deployment (Debian / Tomcat 9.0.20) => Everything >> works 4-Customer ?beta test" machine (Debian / Tomcat 9.0.20) => Some part >> of the app doesn?t work >> >> Of course machine #4 is the one I have the least access? >> >> By "Some part of the app doesn?t work? I mean that I have some asynchronous >> thread that do their job, I have some HTML interfaces that works, but other >> don?t... >> After way too much trial, I was able to get basically the same errors on my >> dev machine by changing the class path
Re: [Tomcat] -Classpath ordering issue (Dev WO)
First, thanks a lot Matthew, that did the trick. May I ask how you automate that for subsequent build? I’m still trying to make the PreResources work without success so far. But I feel like it would be the most reliable way for futur version of Tomcat… Thanks Xavier > On 30 Jan 2020, at 11:13, Dev WO via Webobjects-dev > wrote: > > Hi Matthew, > > I will try that. > > Also I’m currently looking into using the PreResources feature like this: > > -creating a directory mywebapp/WEB-INF/prelib with all the system jars (the > Apple ones) > -mywebapp/WEB-INF/context.xml contains > > > >className="org.apache.catalina.webresources.DirResourceSet" > base=“/WEB-INF/prelib" webAppMount="/WEB-INF/lib" /> > > > > but it doesn’t work for now. I also tried with an absolute path, but same > failure ( java.lang.ClassNotFoundException for WOApplication) > > Have you ever tried that way? any pointers? > > Thanks, > > Xavier > > >> On 30 Jan 2020, at 10:57, > <mailto:matthew.long...@proact.net>> > <mailto:matthew.long...@proact.net>> wrote: >> >> Hi Xavier >> >> We had exactly the same issue on one of our sites. In the end the resolution >> was not to change the tomcat class loaders but to actually pre expand the >> required jars into a classes directory within the war, in our case it was >> only the ERExtensions.jar needed >> >> e.g. >> X.war/WEB-INF/classes/com/webobjects/... >> X.war/WEB-INF/classes/er/extensions/... >> >> Anything in here will be loaded prior to the jars within WEB-INF/lib >> >> Regards >> Matt >> >> -Original Message- >> From: Webobjects-dev >> > <mailto:webobjects-dev-bounces+matthew.longden=proact@lists.apple.com>> >> On >> Behalf Of webobjects-dev-requ...@lists.apple.com >> <mailto:webobjects-dev-requ...@lists.apple.com> >> Sent: 29 January 2020 17:57 >> To: webobjects-dev@lists.apple.com <mailto:webobjects-dev@lists.apple.com> >> Subject: Webobjects-dev Digest, Vol 17, Issue 32 >> Importance: Low >> >> Send Webobjects-dev mailing list submissions to >> webobjects-dev@lists.apple.com <mailto:webobjects-dev@lists.apple.com> >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.apple.com/mailman/listinfo/webobjects-dev >> or, via email, send a message with subject or body 'help' to >> webobjects-dev-requ...@lists.apple.com >> >> You can reach the person managing the list at >> webobjects-dev-ow...@lists.apple.com >> >> When replying, please edit your Subject line so it is more specific than >> "Re: Contents of Webobjects-dev digest..." >> >> >> Today's Topics: >> >> 1. [Tomcat] -Classpath ordering issue (Dev WO) >> 2. Re: [Tomcat] -Classpath ordering issue (Konrad Kubacki) >> 3. Fwd: [Tomcat] -Classpath ordering issue (Dev WO) >> 4. Re: [Tomcat] -Classpath ordering issue (Dev WO) >> >> >> -- >> >> Message: 1 >> Date: Wed, 29 Jan 2020 08:32:25 +0100 >> From: Dev WO >> To: "webobjects-dev@lists.apple.com" >> Subject: [Tomcat] -Classpath ordering issue >> Message-ID: <06d8ad23-3cd7-43d1-a9c9-4f7e34337...@anazys.com> >> Content-Type: text/plain;charset=utf-8 >> >> Hi WOers, >> >> I?m starting to lost my mind with a Tomcat deployment (not my choice) >> >> I have 4 machines: >> 1-Dev machine running through Eclipse and Apache (OS X) => Everything works >> 2-Test Tomcat deployment machine (OS X / Tomcat 9.0.29) => Everything works >> 3-Another test Tomcat deployment (Debian / Tomcat 9.0.20) => Everything >> works 4-Customer ?beta test" machine (Debian / Tomcat 9.0.20) => Some part >> of the app doesn?t work >> >> Of course machine #4 is the one I have the least access? >> >> By "Some part of the app doesn?t work? I mean that I have some asynchronous >> thread that do their job, I have some HTML interfaces that works, but other >> don?t... >> After way too much trial, I was able to get basically the same errors on my >> dev machine by changing the class path (moving down ERExtensions frameworks >> in the classpath). Finally getting errors like: >> >> NoSuchMethodError: >> com.webobjects.foundation.NSArray.(Ljava/lang/Object;[Ljava/lang/Objec >> t;)V >> and >> NoSu
Re: [Tomcat] -Classpath ordering issue (Dev WO)
Hi Matthew, I will try that. Also I’m currently looking into using the PreResources feature like this: -creating a directory mywebapp/WEB-INF/prelib with all the system jars (the Apple ones) -mywebapp/WEB-INF/context.xml contains but it doesn’t work for now. I also tried with an absolute path, but same failure ( java.lang.ClassNotFoundException for WOApplication) Have you ever tried that way? any pointers? Thanks, Xavier > On 30 Jan 2020, at 10:57, > wrote: > > Hi Xavier > > We had exactly the same issue on one of our sites. In the end the resolution > was not to change the tomcat class loaders but to actually pre expand the > required jars into a classes directory within the war, in our case it was > only the ERExtensions.jar needed > > e.g. > X.war/WEB-INF/classes/com/webobjects/... > X.war/WEB-INF/classes/er/extensions/... > > Anything in here will be loaded prior to the jars within WEB-INF/lib > > Regards > Matt > > -Original Message- > From: Webobjects-dev > On > Behalf Of webobjects-dev-requ...@lists.apple.com > Sent: 29 January 2020 17:57 > To: webobjects-dev@lists.apple.com > Subject: Webobjects-dev Digest, Vol 17, Issue 32 > Importance: Low > > Send Webobjects-dev mailing list submissions to > webobjects-dev@lists.apple.com > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.apple.com/mailman/listinfo/webobjects-dev > or, via email, send a message with subject or body 'help' to > webobjects-dev-requ...@lists.apple.com > > You can reach the person managing the list at > webobjects-dev-ow...@lists.apple.com > > When replying, please edit your Subject line so it is more specific than > "Re: Contents of Webobjects-dev digest..." > > > Today's Topics: > > 1. [Tomcat] -Classpath ordering issue (Dev WO) > 2. Re: [Tomcat] -Classpath ordering issue (Konrad Kubacki) > 3. Fwd: [Tomcat] -Classpath ordering issue (Dev WO) > 4. Re: [Tomcat] -Classpath ordering issue (Dev WO) > > > -- > > Message: 1 > Date: Wed, 29 Jan 2020 08:32:25 +0100 > From: Dev WO > To: "webobjects-dev@lists.apple.com" > Subject: [Tomcat] -Classpath ordering issue > Message-ID: <06d8ad23-3cd7-43d1-a9c9-4f7e34337...@anazys.com> > Content-Type: text/plain; charset=utf-8 > > Hi WOers, > > I?m starting to lost my mind with a Tomcat deployment (not my choice) > > I have 4 machines: > 1-Dev machine running through Eclipse and Apache (OS X) => Everything works > 2-Test Tomcat deployment machine (OS X / Tomcat 9.0.29) => Everything works > 3-Another test Tomcat deployment (Debian / Tomcat 9.0.20) => Everything > works 4-Customer ?beta test" machine (Debian / Tomcat 9.0.20) => Some part > of the app doesn?t work > > Of course machine #4 is the one I have the least access? > > By "Some part of the app doesn?t work? I mean that I have some asynchronous > thread that do their job, I have some HTML interfaces that works, but other > don?t... > After way too much trial, I was able to get basically the same errors on my > dev machine by changing the class path (moving down ERExtensions frameworks > in the classpath). Finally getting errors like: > > NoSuchMethodError: > com.webobjects.foundation.NSArray.(Ljava/lang/Object;[Ljava/lang/Objec > t;)V > and > NoSuchMethodError: > com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String > ;Ljava/lang/String;Ljava/lang/String;IZZ)V > > After reading every thread about Tomcat from the mailing list from 2004 up > to today, I still don?t get the issue. > I?m using the exact same .war file on all machines, with the web.xml > relevant part (when framework order is correct) at the end of the message. > > I have no clue and no idea regarding how to find the issue on this machine > #4. > > I?m using Wonder7 and WO5.4, the Application class extends ERXApplication > (having JavaWOJSPServlet in the build path or not doesn?t change the fact it > works on machine 1,2 and 3 but not 4) > > Thanks for your help, > > Xavier > > > > > WOClasspath > > WEBINFROOT/Resources/Java/ > WEBINFROOT/CloudManager.woa/Contents/Resources/Java/cloudmanager.jar > WEBINFROOT/Resources/Java/gson-2.5.jar > WEBINFROOT/CloudManager.woa/Contents/Frameworks/ERCoolComponents.framework/R > esources/Java/ERCoolComponents.jar > WEBINFROOT/CloudManager.woa/Contents/Frameworks/AjaxLook.framework/Resources > /Java/AjaxLook.jar > WEBINFROOT/CloudManager.woa/Contents/Frameworks/Ajax.framework/Resources/Jav >