pascalleclercq / aether-fitnesse-widget

Apache License 2.0
6 stars 2 forks source link

COMMAND_PATTERN not working #2

Open ekkerbj opened 13 years ago

ekkerbj commented 13 years ago

I have

!define COMMAND_PATTERN { java -cp %p %m }

and unless I comment it out, the tests do not start. If I do comment it out, only the !artifact statements get added to the -cp line, my other !path statements are ignored. Is there an issue with classpath expansion and also with mixing the regular path widgits on the same page?

I need the command_pattern to send in some specific switches to the fitnesse test runner.

pascalleclercq commented 13 years ago

Hi, thanks for your feedback I never tried with other !path in the wiki page. I thought It would work but obviously I need a double check.

I'll try also with the "COMMAND_PATTERN" issue.

pascalleclercq commented 13 years ago

I just modify the code to handle moultiple "classpath" entries (as you can see in the new "multiplePathIssues" test).

For the command pattern issue I have no Idea so far why It does not work.

Please note : fitnesse does not handle backward compatibilty and the widget is compiled against version 20081201 It won't works with any version of fitnesse.

Snapshots are deployed to oss.sonatype.org.

Regards

pascalleclercq commented 13 years ago

Version 1.2.4 has been released.

ClassPath Issue has been solved and COMMAND PATTERN works now.

Thanks for your feedback.

2011/10/13 Jeff Brekke < reply@reply.github.com>

I have

!define COMMAND_PATTERN { java -cp %p %m }

and unless I comment it out, the tests do not start. If I do comment it out, only the !artifact statements get added to the -cp line, my other !path statements are ignored. Is there an issue with classpath expansion and also with mixing the regular path widgits on the same page?

I need the command_pattern to send in some specific switches to the fitnesse test runner.

Reply to this email directly or view it on GitHub: https://github.com/pascalleclercq/aether-fitnesse-widget/issues/2

Pascal Leclercq

ekkerbj commented 13 years ago

I just tried the download ( and built myself ) and got a stack trace on pages with the !artifact widget:

java.lang.NoClassDefFoundError: Could not initialize class com.ning.http.client.AsyncHttpClient at org.sonatype.aether.connector.async.AsyncRepositoryConnector.(AsyncRepositoryConnector.java:150) at org.sonatype.aether.connector.async.AsyncRepositoryConnectorFactory.newInstance(AsyncRepositoryConnectorFactory.java:110) at org.sonatype.aether.impl.internal.DefaultRemoteRepositoryManager.getRepositoryConnector(DefaultRemoteRepositoryManager.java:333) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:456) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:172) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:196) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:370) at fr.opensagres.fitnesse.widgets.internal.Aether.resolve(Aether.java:98) at fr.opensagres.fitnesse.widgets.ArtifactWidget.getText(ArtifactWidget.java:97) at fr.opensagres.fitnesse.widgets.ArtifactWidget.render(ArtifactWidget.java:74) at fitnesse.wikitext.widgets.ParentWidget.childHtml(ParentWidget.java:70) at fitnesse.wikitext.widgets.CollapsableWidget.render(CollapsableWidget.java:121) at fitnesse.wikitext.widgets.ParentWidget.childHtml(ParentWidget.java:70) at fitnesse.wikitext.widgets.WidgetRoot.render(WidgetRoot.java:105) at fitnesse.wiki.PageData.processHTMLWidgets(PageData.java:241) at fitnesse.wiki.PageData.getHtml(PageData.java:193) at fitnesse.html.HtmlUtil.makePageHtmlWithHeaderAndFooter(HtmlUtil.java:241) at fitnesse.responders.WikiPageResponder.generateHtml(WikiPageResponder.java:101) at fitnesse.responders.WikiPageResponder.makeHtml(WikiPageResponder.java:89) at fitnesse.responders.WikiPageResponder.makePageResponse(WikiPageResponder.java:71) at fitnesse.responders.WikiPageResponder.makeResponse(WikiPageResponder.java:46) at fitnesse.FitNesseExpediter.createGoodResponse(FitNesseExpediter.java:122) at fitnesse.FitNesseExpediter.makeResponse(FitNesseExpediter.java:105) at fitnesse.FitNesseExpediter.start(FitNesseExpediter.java:47) at fitnesse.FitNesseServer.serve(FitNesseServer.java:24) at fitnesse.FitNesseServer.serve(FitNesseServer.java:17) at fitnesse.socketservice.SocketService$ServerRunner.run(SocketService.java:95) at java.lang.Thread.run(Thread.java:619)

Also, pages/tests that do not have the widget never launched the test. It just looked like it was starting but no fit test was running on the server.

Then I downgraded fitnesse to 20081201, but with the plugin enabled, variables were not getting expanded in the java command that launched the test. For example we have !define myHome {} defined, then use that in !path ${myHome}/kdkdk/dkdkdk.jar, but they were not being expanded in the paths.

pascalleclercq commented 13 years ago

Can you try with fitnesse version 20101101 ?

I had to upgrade to be able to test the value of the "command pattern".

pascalleclercq commented 13 years ago

BTW version 1.2.4 is available on central maven repo now.

ekkerbj commented 13 years ago

20101101 did not change the behavior. There was another stacktrace earlier in my logs, maybe this is causing an issue?

SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding. SLF4J: Your binding is version 1.5.5 or earlier. SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder; at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254) at com.ning.http.client.AsyncHttpClient.(AsyncHttpClient.java:147) at org.sonatype.aether.connector.async.AsyncRepositoryConnector.(AsyncRepositoryConnector.java:150) at org.sonatype.aether.connector.async.AsyncRepositoryConnectorFactory.newInstance(AsyncRepositoryConnectorFactory.java:110) at org.sonatype.aether.impl.internal.DefaultRemoteRepositoryManager.getRepositoryConnector(DefaultRemoteRepositoryManager.java:333) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:456) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:172) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:196) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:370) at fr.opensagres.fitnesse.widgets.internal.Aether.resolve(Aether.java:98) at fr.opensagres.fitnesse.widgets.ArtifactWidget.getText(ArtifactWidget.java:97) at fr.opensagres.fitnesse.widgets.ArtifactWidget.render(ArtifactWidget.java:74) at fitnesse.wikitext.widgets.ParentWidget.childHtml(ParentWidget.java:70) at fitnesse.wikitext.widgets.CollapsableWidget.render(CollapsableWidget.java:121) at fitnesse.wikitext.widgets.ParentWidget.childHtml(ParentWidget.java:70) at fitnesse.wikitext.widgets.WidgetRoot.render(WidgetRoot.java:106) at fitnesse.wiki.PageData.processHTMLWidgets(PageData.java:239) at fitnesse.wiki.PageData.getHtml(PageData.java:195) at fitnesse.html.HtmlUtil.makePageHtmlWithHeaderAndFooter(HtmlUtil.java:241) at fitnesse.responders.WikiPageResponder.generateHtml(WikiPageResponder.java:101) at fitnesse.responders.WikiPageResponder.makeHtml(WikiPageResponder.java:89) at fitnesse.responders.WikiPageResponder.makePageResponse(WikiPageResponder.java:71) at fitnesse.responders.WikiPageResponder.makeResponse(WikiPageResponder.java:46) at fitnesse.FitNesseExpediter.createGoodResponse(FitNesseExpediter.java:123) at fitnesse.FitNesseExpediter.makeResponse(FitNesseExpediter.java:106) at fitnesse.FitNesseExpediter.start(FitNesseExpediter.java:48) at fitnesse.FitNesseServer.serve(FitNesseServer.java:24) at fitnesse.FitNesseServer.serve(FitNesseServer.java:17) at fitnesse.socketservice.SocketService$ServerRunner.run(SocketService.java:95) at java.lang.Thread.run(Thread.java:619)

Then.....

java.lang.NoClassDefFoundError: Could not initialize class com.ning.http.client.AsyncHttpClient at org.sonatype.aether.connector.async.AsyncRepositoryConnector.(AsyncRepositoryConnector.java:150) at org.sonatype.aether.connector.async.AsyncRepositoryConnectorFactory.newInstance(AsyncRepositoryConnectorFactory.java:110) at org.sonatype.aether.impl.internal.DefaultRemoteRepositoryManager.getRepositoryConnector(DefaultRemoteRepositoryManager.java:333) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:456) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:172) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:196) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:370) at fr.opensagres.fitnesse.widgets.internal.Aether.resolve(Aether.java:98) at fr.opensagres.fitnesse.widgets.ArtifactWidget.getText(ArtifactWidget.java:97) at fr.opensagres.fitnesse.widgets.ArtifactWidget.render(ArtifactWidget.java:74) at fitnesse.wikitext.widgets.ParentWidget.childHtml(ParentWidget.java:70) at fitnesse.wikitext.widgets.CollapsableWidget.render(CollapsableWidget.java:121) at fitnesse.wikitext.widgets.ParentWidget.childHtml(ParentWidget.java:70) at fitnesse.wikitext.widgets.WidgetRoot.render(WidgetRoot.java:106) at fitnesse.wiki.PageData.processHTMLWidgets(PageData.java:239) at fitnesse.wiki.PageData.getHtml(PageData.java:195) at fitnesse.html.HtmlUtil.makePageHtmlWithHeaderAndFooter(HtmlUtil.java:241) at fitnesse.responders.WikiPageResponder.generateHtml(WikiPageResponder.java:101) at fitnesse.responders.WikiPageResponder.makeHtml(WikiPageResponder.java:89) at fitnesse.responders.WikiPageResponder.makePageResponse(WikiPageResponder.java:71) at fitnesse.responders.WikiPageResponder.makeResponse(WikiPageResponder.java:46) at fitnesse.FitNesseExpediter.createGoodResponse(FitNesseExpediter.java:123) at fitnesse.FitNesseExpediter.makeResponse(FitNesseExpediter.java:106) at fitnesse.FitNesseExpediter.start(FitNesseExpediter.java:48) at fitnesse.FitNesseServer.serve(FitNesseServer.java:24) at fitnesse.FitNesseServer.serve(FitNesseServer.java:17) at fitnesse.socketservice.SocketService$ServerRunner.run(SocketService.java:95) at java.lang.Thread.run(Thread.java:619)

pascalleclercq commented 13 years ago

Hi,

from what I see, you are using a "old" (before 1.6) release of slf4j impl.

slf4j-api 1.6.1 is required for async-http-client (http://github.com/AsyncHttpClient/async-http-client) used by aether.

I think you have to upgrade your version of slf4j impl to a 1.6+ one.

I'm pretty sure you can do It without damage since slf4j handles well with upward compatibility : I personnaly use the most recent version of slf4j when possible.

Best regards

pascalleclercq commented 13 years ago

Hi,

I finally removed the use of async-http-client.

Download time during test might be a bit slower but obviously enforcing version of slf4j to users is very bad.

And the jar-with-dependencies package is much smaller.

pascalleclercq commented 13 years ago

Hi,

slf4j is not required anymore in transitive dependencies of the widget.

Can you try once more ?

The artifact is not deployed on central maven repo yet so you can grab It from

oss.sonatype.org

or

build It from source as you already done....

Thx.

2011/10/21 Jeff Brekke < reply@reply.github.com>

20101101 did not change the behavior. There was another stacktrace earlier in my logs, maybe this is causing an issue?

SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding. SLF4J: Your binding is version 1.5.5 or earlier. SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder; at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254) at com.ning.http.client.AsyncHttpClient.(AsyncHttpClient.java:147) at org.sonatype.aether.connector.async.AsyncRepositoryConnector.(AsyncRepositoryConnector.java:150) at org.sonatype.aether.connector.async.AsyncRepositoryConnectorFactory.newInstance(AsyncRepositoryConnectorFactory.java:110) at org.sonatype.aether.impl.internal.DefaultRemoteRepositoryManager.getRepositoryConnector(DefaultRemoteRepositoryManager.java:333) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:456) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:172) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:196) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:370) at fr.opensagres.fitnesse.widgets.internal.Aether.resolve(Aether.java:98) at fr.opensagres.fitnesse.widgets.ArtifactWidget.getText(ArtifactWidget.java:97) at fr.opensagres.fitnesse.widgets.ArtifactWidget.render(ArtifactWidget.java:74) at fitnesse.wikitext.widgets.ParentWidget.childHtml(ParentWidget.java:70) at fitnesse.wikitext.widgets.CollapsableWidget.render(CollapsableWidget.java:121) at fitnesse.wikitext.widgets.ParentWidget.childHtml(ParentWidget.java:70) at fitnesse.wikitext.widgets.WidgetRoot.render(WidgetRoot.java:106) at fitnesse.wiki.PageData.processHTMLWidgets(PageData.java:239) at fitnesse.wiki.PageData.getHtml(PageData.java:195) at fitnesse.html.HtmlUtil.makePageHtmlWithHeaderAndFooter(HtmlUtil.java:241) at fitnesse.responders.WikiPageResponder.generateHtml(WikiPageResponder.java:101) at fitnesse.responders.WikiPageResponder.makeHtml(WikiPageResponder.java:89) at fitnesse.responders.WikiPageResponder.makePageResponse(WikiPageResponder.java:71) at fitnesse.responders.WikiPageResponder.makeResponse(WikiPageResponder.java:46) at fitnesse.FitNesseExpediter.createGoodResponse(FitNesseExpediter.java:123) at fitnesse.FitNesseExpediter.makeResponse(FitNesseExpediter.java:106) at fitnesse.FitNesseExpediter.start(FitNesseExpediter.java:48) at fitnesse.FitNesseServer.serve(FitNesseServer.java:24) at fitnesse.FitNesseServer.serve(FitNesseServer.java:17) at fitnesse.socketservice.SocketService$ServerRunner.run(SocketService.java:95) at java.lang.Thread.run(Thread.java:619)

Then.....

java.lang.NoClassDefFoundError: Could not initialize class com.ning.http.client.AsyncHttpClient at org.sonatype.aether.connector.async.AsyncRepositoryConnector.(AsyncRepositoryConnector.java:150) at org.sonatype.aether.connector.async.AsyncRepositoryConnectorFactory.newInstance(AsyncRepositoryConnectorFactory.java:110) at org.sonatype.aether.impl.internal.DefaultRemoteRepositoryManager.getRepositoryConnector(DefaultRemoteRepositoryManager.java:333) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:456) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267) at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:172) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:196) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:370) at fr.opensagres.fitnesse.widgets.internal.Aether.resolve(Aether.java:98) at fr.opensagres.fitnesse.widgets.ArtifactWidget.getText(ArtifactWidget.java:97) at fr.opensagres.fitnesse.widgets.ArtifactWidget.render(ArtifactWidget.java:74) at fitnesse.wikitext.widgets.ParentWidget.childHtml(ParentWidget.java:70) at fitnesse.wikitext.widgets.CollapsableWidget.render(CollapsableWidget.java:121) at fitnesse.wikitext.widgets.ParentWidget.childHtml(ParentWidget.java:70) at fitnesse.wikitext.widgets.WidgetRoot.render(WidgetRoot.java:106) at fitnesse.wiki.PageData.processHTMLWidgets(PageData.java:239) at fitnesse.wiki.PageData.getHtml(PageData.java:195) at fitnesse.html.HtmlUtil.makePageHtmlWithHeaderAndFooter(HtmlUtil.java:241) at fitnesse.responders.WikiPageResponder.generateHtml(WikiPageResponder.java:101) at fitnesse.responders.WikiPageResponder.makeHtml(WikiPageResponder.java:89) at fitnesse.responders.WikiPageResponder.makePageResponse(WikiPageResponder.java:71) at fitnesse.responders.WikiPageResponder.makeResponse(WikiPageResponder.java:46) at fitnesse.FitNesseExpediter.createGoodResponse(FitNesseExpediter.java:123) at fitnesse.FitNesseExpediter.makeResponse(FitNesseExpediter.java:106) at fitnesse.FitNesseExpediter.start(FitNesseExpediter.java:48) at fitnesse.FitNesseServer.serve(FitNesseServer.java:24) at fitnesse.FitNesseServer.serve(FitNesseServer.java:17) at fitnesse.socketservice.SocketService$ServerRunner.run(SocketService.java:95) at java.lang.Thread.run(Thread.java:619)

Reply to this email directly or view it on GitHub:

https://github.com/pascalleclercq/aether-fitnesse-widget/issues/2#issuecomment-2484659

Pascal Leclercq