You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Brian K <ha...@gmail.com> on 2020/05/06 19:47:37 UTC

Re: spring-boot:run in eclipse in v2 M3

I am finding the process id[1] and killing it [2].

Another question:  are your debug breakpoints working for this 2.0.0-M3
simple app in Eclipse?  Mine are not.  I tried jdk8 and jdk13.

Thanks,
Brian


[1]:  netstat -ano |grep 8080 |grep LISTENING
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       15732
  TCP    [::]:8080              [::]:0                 LISTENING       15732

[2]:  tskill 15732


On Thu, Apr 30, 2020 at 9:14 AM Brian K <ha...@gmail.com> wrote:

> In my case, the terminal command shell is what works - Ctrl-C is being
> passed correctly.
>
> In making it run from an Eclipse tomcat 9.0 container, I found that when I
> follow these steps [1], I get this error [2].
>
> -Brian
>
>
> [1]:
>    1.  Add Dynamic Web Module facet
>    2. Modify domainapp.webapp.SimpleApp by adding:
> @Override
>     protected SpringApplicationBuilder configure(SpringApplicationBuilder
> application) {
>         return application.sources(SimpleApp.class);
>     }
>    3.  Copy target webapp directory to WebContent
>    4.  Copy in isis-testing-integtestsupport-applib-2.0.0-M3.jar to
> WebContent/WEB-INF/lib
>
> [2]:
> ***************************
> APPLICATION FAILED TO START
> ***************************
>
> Description:
>
> Parameter 0 of constructor in
> org.apache.isis.core.security.authorization.manager.AuthorizationManager
> required a single bean, but 2 were found:
> - isisSecurityShiro.AuthorizorShiro: defined in null
> - isisSecurityBypass.AuthorizorBypass: defined in null
>
>
> Action:
>
> Consider marking one of the beans as @Primary, updating the consumer to
> accept multiple beans, or using @Qualifier to identify the bean that should
> be consumed
>
>
>
> On Wed, Apr 29, 2020 at 11:13 PM Rade, Joerg / Kuehne + Nagel / HAM GI-DP <
> Joerg.Rade@kuehne-nagel.com> wrote:
>
>> Hi Brian,
>>
>> I had similar experiences under windows with running (mvn spring-boot:run
>> -PPROTOTYPING=true) in git bash.
>>
>> The workaround by executing the command from IntelliJ. Both Run/Debug
>> Configuration and Terminal work.
>> I have no advice for Eclipse though.
>>
>> Eventually signals are not propagated properly, see
>> https://the-asf.slack.com/archives/CFC42LWBV/p1580483192048800
>>
>> HTH -j
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Brian K [mailto:harvestmoon299@gmail.com]
>> Gesendet: Mittwoch, 29. April 2020 20:52
>> An: users@isis.apache.org
>> Betreff: Re: spring-boot:run in eclipse in v2 M3
>>
>> This might be Windows-specific.  I have observed this behavior since 'v2'
>> HEAD started running Spring Boot.  Exiting Eclipse doesn't free the port
>> for me, either.
>>
>> I changed the packaging to "war" for the web project and added the Dynamic
>> Web Project facet, but that was not enough to handily deploy to a
>> workspace
>> tomcat server with "Run on Server..."
>>
>> On Mon, Apr 27, 2020 at 7:59 PM Andi Huber <ah...@apache.org> wrote:
>>
>> > In Eclipse I do terminate a launched process using the "Terminate"
>> > button that is associated with the "Console" view.
>> >
>> > I recently added a new feature to the DemoApps, that allows to run a new
>> > instance by just launching. It will shutdown any already running
>> instance:
>> >
>> > public class DemoAppWicket extends SpringBootServletInitializer {
>> >
>> >      public static void main(String[] args) {
>> >
>> >          ThereCanBeOnlyOne.remoteShutdownOthersIfAny(); // <== shutdown
>> > via rest request
>> >
>> >          SpringApplication.run(new Class[] { DemoAppWicket.class },
>> args);
>> >      }
>> >
>> > }
>> >
>> > Cheers, Andi
>> >
>> > On 27.04.2020 22:57, Dan Haywood wrote:
>> > > Andi, you're an Eclipse user... what's your preferred way to run M3 ?
>> > >
>> > >
>> > > On Mon, 27 Apr 2020 at 19:39, Brian K <ha...@gmail.com>
>> wrote:
>> > >
>> > >> I've noticed that the HTTP port does not get closed when I terminate
>> an
>> > >> eclipse launch.   Running from a terminal window releases it when I
>> > pressed
>> > >> Ctrl-C.   I think it has to do with a Stack Overflow thread [1] that
>> > >> references an outstanding issue [2].
>> > >>
>> > >> I suppose running in a server container would fix this.  How do you
>> run
>> > >> this from Eclipse?
>> > >>
>> > >> Thanks!
>> > >> Brian
>> > >>
>> > >>
>> > >>
>> > >> [1] :
>> > >>
>> > >>
>> >
>> https://stackoverflow.com/questions/8814383/sending-sigint-ctrl-c-to-program-running-in-eclipse-console/28624925
>> > >> [2] : https://bugs.eclipse.org/bugs/show_bug.cgi?id=38016
>> > >>
>> >
>>
>> Kühne + Nagel (AG & Co.) KG
>> Rechtsform: Kommanditgesellschaft, Bremen HRA 21928, USt-IdNr.: DE
>> 812773878.
>> Geschäftsleitung Kühne + Nagel (AG & Co.) KG: Holger Ketz (Vors.), Martin
>> Brinkmann, Lars-Olof Grün, Matthias Knicky, Nicholas Minde, Johannes
>> Trimborn, Lars Wedel, Matthias Weiner.
>> Persönlich haftende Gesellschafterin: Kühne & Nagel A.G., Rechtsform:
>> Aktiengesellschaft nach luxemburgischem Recht, HR-Nr.: B 18745,
>> Geschäftsführendes Verwaltungsratsmitglied: Karl Gernandt.
>> Geschäftsleitung Region Europa: Dr. Hansjörg Rodi (Vors.), Ants Anupold,
>> Dominic Edmonds, Thierry Held, Uwe Hött, Richard Huhn, Jan-Hendrik
>> Köstergarten, André Schiffer, Heiko Schuhmacher.
>>
>> Wir arbeiten ausschließlich auf Grundlage der Allgemeinen Deutschen
>> Spediteurbedingungen 2017 (ADSp 2017). Hinweis: Die ADSp 2017 weichen in
>> Ziffer 23 hinsichtlich des Haftungshöchstbetrages für Güterschäden (§ 431
>> HGB) vom Gesetz ab, indem sie die Haftung bei multimodalen Transporten
>> unter Einschluss einer Seebeförderung und bei unbekanntem Schadenort auf 2
>> SZR/kg und im Übrigen die Regelhaftung von 8,33 SZR/kg zusätzlich auf 1,25
>> Millionen Euro je Schadenfall sowie 2,5 Millionen Euro je Schadenereignis,
>> mindestens aber 2 SZR/kg, beschränken. Die ADSp sind auf unserer Webseite
>> als Download erhältlich. Auf Anfrage senden wir Ihnen diese auch gerne zu.
>>
>

Re: spring-boot:run in eclipse in v2 M3

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Thanks for chasing this down, Brian.



On Fri, 8 May 2020, 18:48 Brian K, <ha...@gmail.com> wrote:

> It looks like Spring Boot launches in a fork [1].  Adding this [2] as a
> launch parameter allowed me to debug as a "remote application" in Eclipse.
>
> [1]:
>
> https://docs.spring.io/spring-boot/docs/current/maven-plugin/examples/run-debug.html
> [2]:   key:  spring-boot.run.jvmArguments
>         value: Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
>
> On Wed, May 6, 2020 at 11:47 AM Brian K <ha...@gmail.com> wrote:
>
> > I am finding the process id[1] and killing it [2].
> >
> > Another question:  are your debug breakpoints working for this 2.0.0-M3
> > simple app in Eclipse?  Mine are not.  I tried jdk8 and jdk13.
> >
> > Thanks,
> > Brian
> >
> >
> > [1]:  netstat -ano |grep 8080 |grep LISTENING
> >   TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING
> > 15732
> >   TCP    [::]:8080              [::]:0                 LISTENING
> > 15732
> >
> > [2]:  tskill 15732
> >
> >
> > On Thu, Apr 30, 2020 at 9:14 AM Brian K <ha...@gmail.com>
> wrote:
> >
> >> In my case, the terminal command shell is what works - Ctrl-C is being
> >> passed correctly.
> >>
> >> In making it run from an Eclipse tomcat 9.0 container, I found that when
> >> I follow these steps [1], I get this error [2].
> >>
> >> -Brian
> >>
> >>
> >> [1]:
> >>    1.  Add Dynamic Web Module facet
> >>    2. Modify domainapp.webapp.SimpleApp by adding:
> >> @Override
> >>     protected SpringApplicationBuilder
> configure(SpringApplicationBuilder
> >> application) {
> >>         return application.sources(SimpleApp.class);
> >>     }
> >>    3.  Copy target webapp directory to WebContent
> >>    4.  Copy in isis-testing-integtestsupport-applib-2.0.0-M3.jar to
> >> WebContent/WEB-INF/lib
> >>
> >> [2]:
> >> ***************************
> >> APPLICATION FAILED TO START
> >> ***************************
> >>
> >> Description:
> >>
> >> Parameter 0 of constructor in
> >> org.apache.isis.core.security.authorization.manager.AuthorizationManager
> >> required a single bean, but 2 were found:
> >> - isisSecurityShiro.AuthorizorShiro: defined in null
> >> - isisSecurityBypass.AuthorizorBypass: defined in null
> >>
> >>
> >> Action:
> >>
> >> Consider marking one of the beans as @Primary, updating the consumer to
> >> accept multiple beans, or using @Qualifier to identify the bean that
> should
> >> be consumed
> >>
> >>
> >>
> >> On Wed, Apr 29, 2020 at 11:13 PM Rade, Joerg / Kuehne + Nagel / HAM
> GI-DP
> >> <Jo...@kuehne-nagel.com> wrote:
> >>
> >>> Hi Brian,
> >>>
> >>> I had similar experiences under windows with running (mvn
> >>> spring-boot:run -PPROTOTYPING=true) in git bash.
> >>>
> >>> The workaround by executing the command from IntelliJ. Both Run/Debug
> >>> Configuration and Terminal work.
> >>> I have no advice for Eclipse though.
> >>>
> >>> Eventually signals are not propagated properly, see
> >>> https://the-asf.slack.com/archives/CFC42LWBV/p1580483192048800
> >>>
> >>> HTH -j
> >>>
> >>> -----Ursprüngliche Nachricht-----
> >>> Von: Brian K [mailto:harvestmoon299@gmail.com]
> >>> Gesendet: Mittwoch, 29. April 2020 20:52
> >>> An: users@isis.apache.org
> >>> Betreff: Re: spring-boot:run in eclipse in v2 M3
> >>>
> >>> This might be Windows-specific.  I have observed this behavior since
> 'v2'
> >>> HEAD started running Spring Boot.  Exiting Eclipse doesn't free the
> port
> >>> for me, either.
> >>>
> >>> I changed the packaging to "war" for the web project and added the
> >>> Dynamic
> >>> Web Project facet, but that was not enough to handily deploy to a
> >>> workspace
> >>> tomcat server with "Run on Server..."
> >>>
> >>> On Mon, Apr 27, 2020 at 7:59 PM Andi Huber <ah...@apache.org> wrote:
> >>>
> >>> > In Eclipse I do terminate a launched process using the "Terminate"
> >>> > button that is associated with the "Console" view.
> >>> >
> >>> > I recently added a new feature to the DemoApps, that allows to run a
> >>> new
> >>> > instance by just launching. It will shutdown any already running
> >>> instance:
> >>> >
> >>> > public class DemoAppWicket extends SpringBootServletInitializer {
> >>> >
> >>> >      public static void main(String[] args) {
> >>> >
> >>> >          ThereCanBeOnlyOne.remoteShutdownOthersIfAny(); // <==
> shutdown
> >>> > via rest request
> >>> >
> >>> >          SpringApplication.run(new Class[] { DemoAppWicket.class },
> >>> args);
> >>> >      }
> >>> >
> >>> > }
> >>> >
> >>> > Cheers, Andi
> >>> >
> >>> > On 27.04.2020 22:57, Dan Haywood wrote:
> >>> > > Andi, you're an Eclipse user... what's your preferred way to run
> M3 ?
> >>> > >
> >>> > >
> >>> > > On Mon, 27 Apr 2020 at 19:39, Brian K <ha...@gmail.com>
> >>> wrote:
> >>> > >
> >>> > >> I've noticed that the HTTP port does not get closed when I
> >>> terminate an
> >>> > >> eclipse launch.   Running from a terminal window releases it when
> I
> >>> > pressed
> >>> > >> Ctrl-C.   I think it has to do with a Stack Overflow thread [1]
> that
> >>> > >> references an outstanding issue [2].
> >>> > >>
> >>> > >> I suppose running in a server container would fix this.  How do
> you
> >>> run
> >>> > >> this from Eclipse?
> >>> > >>
> >>> > >> Thanks!
> >>> > >> Brian
> >>> > >>
> >>> > >>
> >>> > >>
> >>> > >> [1] :
> >>> > >>
> >>> > >>
> >>> >
> >>>
> https://stackoverflow.com/questions/8814383/sending-sigint-ctrl-c-to-program-running-in-eclipse-console/28624925
> >>> > >> [2] : https://bugs.eclipse.org/bugs/show_bug.cgi?id=38016
> >>> > >>
> >>> >
> >>>
> >>> Kühne + Nagel (AG & Co.) KG
> >>> Rechtsform: Kommanditgesellschaft, Bremen HRA 21928, USt-IdNr.: DE
> >>> 812773878.
> >>> Geschäftsleitung Kühne + Nagel (AG & Co.) KG: Holger Ketz (Vors.),
> >>> Martin Brinkmann, Lars-Olof Grün, Matthias Knicky, Nicholas Minde,
> Johannes
> >>> Trimborn, Lars Wedel, Matthias Weiner.
> >>> Persönlich haftende Gesellschafterin: Kühne & Nagel A.G., Rechtsform:
> >>> Aktiengesellschaft nach luxemburgischem Recht, HR-Nr.: B 18745,
> >>> Geschäftsführendes Verwaltungsratsmitglied: Karl Gernandt.
> >>> Geschäftsleitung Region Europa: Dr. Hansjörg Rodi (Vors.), Ants
> Anupold,
> >>> Dominic Edmonds, Thierry Held, Uwe Hött, Richard Huhn, Jan-Hendrik
> >>> Köstergarten, André Schiffer, Heiko Schuhmacher.
> >>>
> >>> Wir arbeiten ausschließlich auf Grundlage der Allgemeinen Deutschen
> >>> Spediteurbedingungen 2017 (ADSp 2017). Hinweis: Die ADSp 2017 weichen
> in
> >>> Ziffer 23 hinsichtlich des Haftungshöchstbetrages für Güterschäden (§
> 431
> >>> HGB) vom Gesetz ab, indem sie die Haftung bei multimodalen Transporten
> >>> unter Einschluss einer Seebeförderung und bei unbekanntem Schadenort
> auf 2
> >>> SZR/kg und im Übrigen die Regelhaftung von 8,33 SZR/kg zusätzlich auf
> 1,25
> >>> Millionen Euro je Schadenfall sowie 2,5 Millionen Euro je
> Schadenereignis,
> >>> mindestens aber 2 SZR/kg, beschränken. Die ADSp sind auf unserer
> Webseite
> >>> als Download erhältlich. Auf Anfrage senden wir Ihnen diese auch gerne
> zu.
> >>>
> >>
>

Re: spring-boot:run in eclipse in v2 M3

Posted by Brian K <ha...@gmail.com>.
It looks like Spring Boot launches in a fork [1].  Adding this [2] as a
launch parameter allowed me to debug as a "remote application" in Eclipse.

[1]:
https://docs.spring.io/spring-boot/docs/current/maven-plugin/examples/run-debug.html
[2]:   key:  spring-boot.run.jvmArguments
        value: Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005

On Wed, May 6, 2020 at 11:47 AM Brian K <ha...@gmail.com> wrote:

> I am finding the process id[1] and killing it [2].
>
> Another question:  are your debug breakpoints working for this 2.0.0-M3
> simple app in Eclipse?  Mine are not.  I tried jdk8 and jdk13.
>
> Thanks,
> Brian
>
>
> [1]:  netstat -ano |grep 8080 |grep LISTENING
>   TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING
> 15732
>   TCP    [::]:8080              [::]:0                 LISTENING
> 15732
>
> [2]:  tskill 15732
>
>
> On Thu, Apr 30, 2020 at 9:14 AM Brian K <ha...@gmail.com> wrote:
>
>> In my case, the terminal command shell is what works - Ctrl-C is being
>> passed correctly.
>>
>> In making it run from an Eclipse tomcat 9.0 container, I found that when
>> I follow these steps [1], I get this error [2].
>>
>> -Brian
>>
>>
>> [1]:
>>    1.  Add Dynamic Web Module facet
>>    2. Modify domainapp.webapp.SimpleApp by adding:
>> @Override
>>     protected SpringApplicationBuilder configure(SpringApplicationBuilder
>> application) {
>>         return application.sources(SimpleApp.class);
>>     }
>>    3.  Copy target webapp directory to WebContent
>>    4.  Copy in isis-testing-integtestsupport-applib-2.0.0-M3.jar to
>> WebContent/WEB-INF/lib
>>
>> [2]:
>> ***************************
>> APPLICATION FAILED TO START
>> ***************************
>>
>> Description:
>>
>> Parameter 0 of constructor in
>> org.apache.isis.core.security.authorization.manager.AuthorizationManager
>> required a single bean, but 2 were found:
>> - isisSecurityShiro.AuthorizorShiro: defined in null
>> - isisSecurityBypass.AuthorizorBypass: defined in null
>>
>>
>> Action:
>>
>> Consider marking one of the beans as @Primary, updating the consumer to
>> accept multiple beans, or using @Qualifier to identify the bean that should
>> be consumed
>>
>>
>>
>> On Wed, Apr 29, 2020 at 11:13 PM Rade, Joerg / Kuehne + Nagel / HAM GI-DP
>> <Jo...@kuehne-nagel.com> wrote:
>>
>>> Hi Brian,
>>>
>>> I had similar experiences under windows with running (mvn
>>> spring-boot:run -PPROTOTYPING=true) in git bash.
>>>
>>> The workaround by executing the command from IntelliJ. Both Run/Debug
>>> Configuration and Terminal work.
>>> I have no advice for Eclipse though.
>>>
>>> Eventually signals are not propagated properly, see
>>> https://the-asf.slack.com/archives/CFC42LWBV/p1580483192048800
>>>
>>> HTH -j
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Brian K [mailto:harvestmoon299@gmail.com]
>>> Gesendet: Mittwoch, 29. April 2020 20:52
>>> An: users@isis.apache.org
>>> Betreff: Re: spring-boot:run in eclipse in v2 M3
>>>
>>> This might be Windows-specific.  I have observed this behavior since 'v2'
>>> HEAD started running Spring Boot.  Exiting Eclipse doesn't free the port
>>> for me, either.
>>>
>>> I changed the packaging to "war" for the web project and added the
>>> Dynamic
>>> Web Project facet, but that was not enough to handily deploy to a
>>> workspace
>>> tomcat server with "Run on Server..."
>>>
>>> On Mon, Apr 27, 2020 at 7:59 PM Andi Huber <ah...@apache.org> wrote:
>>>
>>> > In Eclipse I do terminate a launched process using the "Terminate"
>>> > button that is associated with the "Console" view.
>>> >
>>> > I recently added a new feature to the DemoApps, that allows to run a
>>> new
>>> > instance by just launching. It will shutdown any already running
>>> instance:
>>> >
>>> > public class DemoAppWicket extends SpringBootServletInitializer {
>>> >
>>> >      public static void main(String[] args) {
>>> >
>>> >          ThereCanBeOnlyOne.remoteShutdownOthersIfAny(); // <== shutdown
>>> > via rest request
>>> >
>>> >          SpringApplication.run(new Class[] { DemoAppWicket.class },
>>> args);
>>> >      }
>>> >
>>> > }
>>> >
>>> > Cheers, Andi
>>> >
>>> > On 27.04.2020 22:57, Dan Haywood wrote:
>>> > > Andi, you're an Eclipse user... what's your preferred way to run M3 ?
>>> > >
>>> > >
>>> > > On Mon, 27 Apr 2020 at 19:39, Brian K <ha...@gmail.com>
>>> wrote:
>>> > >
>>> > >> I've noticed that the HTTP port does not get closed when I
>>> terminate an
>>> > >> eclipse launch.   Running from a terminal window releases it when I
>>> > pressed
>>> > >> Ctrl-C.   I think it has to do with a Stack Overflow thread [1] that
>>> > >> references an outstanding issue [2].
>>> > >>
>>> > >> I suppose running in a server container would fix this.  How do you
>>> run
>>> > >> this from Eclipse?
>>> > >>
>>> > >> Thanks!
>>> > >> Brian
>>> > >>
>>> > >>
>>> > >>
>>> > >> [1] :
>>> > >>
>>> > >>
>>> >
>>> https://stackoverflow.com/questions/8814383/sending-sigint-ctrl-c-to-program-running-in-eclipse-console/28624925
>>> > >> [2] : https://bugs.eclipse.org/bugs/show_bug.cgi?id=38016
>>> > >>
>>> >
>>>
>>> Kühne + Nagel (AG & Co.) KG
>>> Rechtsform: Kommanditgesellschaft, Bremen HRA 21928, USt-IdNr.: DE
>>> 812773878.
>>> Geschäftsleitung Kühne + Nagel (AG & Co.) KG: Holger Ketz (Vors.),
>>> Martin Brinkmann, Lars-Olof Grün, Matthias Knicky, Nicholas Minde, Johannes
>>> Trimborn, Lars Wedel, Matthias Weiner.
>>> Persönlich haftende Gesellschafterin: Kühne & Nagel A.G., Rechtsform:
>>> Aktiengesellschaft nach luxemburgischem Recht, HR-Nr.: B 18745,
>>> Geschäftsführendes Verwaltungsratsmitglied: Karl Gernandt.
>>> Geschäftsleitung Region Europa: Dr. Hansjörg Rodi (Vors.), Ants Anupold,
>>> Dominic Edmonds, Thierry Held, Uwe Hött, Richard Huhn, Jan-Hendrik
>>> Köstergarten, André Schiffer, Heiko Schuhmacher.
>>>
>>> Wir arbeiten ausschließlich auf Grundlage der Allgemeinen Deutschen
>>> Spediteurbedingungen 2017 (ADSp 2017). Hinweis: Die ADSp 2017 weichen in
>>> Ziffer 23 hinsichtlich des Haftungshöchstbetrages für Güterschäden (§ 431
>>> HGB) vom Gesetz ab, indem sie die Haftung bei multimodalen Transporten
>>> unter Einschluss einer Seebeförderung und bei unbekanntem Schadenort auf 2
>>> SZR/kg und im Übrigen die Regelhaftung von 8,33 SZR/kg zusätzlich auf 1,25
>>> Millionen Euro je Schadenfall sowie 2,5 Millionen Euro je Schadenereignis,
>>> mindestens aber 2 SZR/kg, beschränken. Die ADSp sind auf unserer Webseite
>>> als Download erhältlich. Auf Anfrage senden wir Ihnen diese auch gerne zu.
>>>
>>