I have found that Jetty works very well within any sane environment that a simple java application could run in. As launch4j is providing the environment in the failed case, I would be inclined to examine the environment that it provides. On 2 Oct 2014 19:39, "William Ferguson" <[email protected]> wrote:
> @Michael Launch4J doesn't have anything to do with Jetty's webapp content > extraction process. So asking these questions of Launch4J would be > inappropriate. > Clearly some context that is being expected within Jetty is not being met > when bundled as an EXE. You can only answer these questions from within a > Jetty perspective. > ------ > So my question is, what is responsible within Jetty for extracting the > webapp content? > What might be causing it to not extract from an application.exe archive vs > an application.war archive? > What can be done to make it extract the content when repackaged as EXE? > ------ > > I'm happy to dive into the Jetty code, but I need a jumping off point. > > William > > On Fri, Oct 3, 2014 at 9:32 AM, Michael Dykman <[email protected]> wrote: > >> The problem appears to be with launch4j, not Java or Jetty. This is the >> wrong forum to ask. >> On 2 Oct 2014 19:23, "William Ferguson" <[email protected]> >> wrote: >> >>> The EXE has full permissions. >>> >>> There is no extra SecutiryManager being applied by the launcher. >>> >>> I wasn't specifying an explicit WebAppContext#tempDirectory so it was >>> already using java.io.tmpdir >>> >>> Now this seems strange .. >>> When I specify an explicit WebAppContext#tempDirectory (for both the EXE >>> and WAR versions), the explicit folder is never created. And if it existed >>> beforehand it is deleted on server start. And there is no folder being >>> created in java.io.tmpdir. In any case for the WAR Jetty serves normally, >>> for the EXE it now throws a 503. >>> >>> William >>> >>> On Fri, Oct 3, 2014 at 9:01 AM, Joakim Erdfelt <[email protected]> >>> wrote: >>> >>>> Most EXE processes are merely launchers for java and your app. >>>> Nothing really changes as far as the jars / classes etc. >>>> They are usually left, in-tact. >>>> >>>> Since this is being launched on windows, via an EXE, I would start to >>>> look at permissions that your EXE has. >>>> It might not have the rights to do what you think it should be able to >>>> do. (look at the rights of the application/exe on windows for this) >>>> >>>> Also look into any sort of java SecurityManager that is applied to your >>>> running application. (some launchers apply custom SecurityManager >>>> configurations) >>>> >>>> Out of curiosity, are there files in your java.io.tmpdir instead? >>>> >>>> >>>> -- >>>> Joakim Erdfelt <[email protected]> >>>> webtide.com <http://www.webtide.com/> - intalio.com/jetty >>>> Expert advice, services and support from from the Jetty & CometD >>>> experts >>>> eclipse.org/jetty - cometd.org >>>> >>>> On Thu, Oct 2, 2014 at 3:37 PM, William Ferguson < >>>> [email protected]> wrote: >>>> >>>>> I have a webapp that is packaged as a WAR but for which I have a main >>>>> application class that creates an embedded Jetty instance to serve the >>>>> WAR. >>>>> All works well. >>>>> When the app starts Jetty extracts the WebApp content into the >>>>> WebAppContext#tempDirectory and Jetty serves all resources. >>>>> >>>>> But I am trying to package the WAR as an EXE using launch4J and am >>>>> running into a problem. Launch4J creates the EXE, the EXE starts and my >>>>> main class starts the Jetty server. But while >>>>> the WebAppContext#tempDirectory is being correctly set, the contents of >>>>> the >>>>> WebApp are not being extracted into it. >>>>> >>>>> Jetty does create the tempDirectory with a webapp child folder, but >>>>> that child folder is empty. This means that Jetty returns 404 for >>>>> everything. >>>>> >>>>> NB the EXE that is generated by Launch4J is a valid archive and can be >>>>> opened as such by WinZip etc. >>>>> >>>>> So my question is, what is responsible within Jetty for extracting the >>>>> webapp content? >>>>> What might be causing it to not extract from an application.exe >>>>> archive vs an application.war archive? >>>>> What can be done to make it extract the content when repackaged as EXE? >>>>> >>>>> This is on Jetty 9.1.1.v20140108 >>>>> >>>>> William >>>>> >>>>> _______________________________________________ >>>>> jetty-users mailing list >>>>> [email protected] >>>>> To change your delivery options, retrieve your password, or >>>>> unsubscribe from this list, visit >>>>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>>>> >>>> >>>> >>>> _______________________________________________ >>>> jetty-users mailing list >>>> [email protected] >>>> To change your delivery options, retrieve your password, or unsubscribe >>>> from this list, visit >>>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>>> >>> >>> >>> _______________________________________________ >>> jetty-users mailing list >>> [email protected] >>> To change your delivery options, retrieve your password, or unsubscribe >>> from this list, visit >>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>> >> >> _______________________________________________ >> jetty-users mailing list >> [email protected] >> To change your delivery options, retrieve your password, or unsubscribe >> from this list, visit >> https://dev.eclipse.org/mailman/listinfo/jetty-users >> > > > _______________________________________________ > jetty-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
