I am using JUnitReportingRunner as below in jbehave .feature file in eclipse. But only BeforeStories and AfterStories are run and the .feature file is not getting executed. Here is the code and error. Please help. What could be the issue? Any help is much appreciated.
#RunWith(JUnitReportingRunner.class)
public class CalcConfig extends JUnitStories {
public CalcConfig() {
JUnitReportingRunner.recommandedControls(configuredEmbedder());
}
...
Here is the error I am getting:
Failed to run story test/resources/calculator/Calculator.feature
java.lang.AbstractMethodError: de.codecentric.jbehave.junit.monitoring.JUnitScenarioReporter.lifecyle(Lorg/jbehave/core/model/Lifecycle;)V
at org.jbehave.core.reporters.DelegatingStoryReporter.lifecyle(DelegatingStoryReporter.java:79)
at org.jbehave.core.reporters.ConcurrentStoryReporter.lifecyle(ConcurrentStoryReporter.java:137)
at org.jbehave.core.embedder.StoryRunner.runCancellable(StoryRunner.java:277)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:220)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:181)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:229)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:201)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
(AfterStories)
Generating reports view to '/Documents/workspace/Calculator/jbehave' using formats '[stats, stats, html, txt, console, junitscenarioreporter]' and view properties '{defaultFormats=stats, decorateNonHtml=true, viewDirectory=view, decorated=ftl/jbehave-report-decorated.ftl, reports=ftl/jbehave-reports-with-totals.ftl, maps=ftl/jbehave-maps.ftl, navigator=ftl/jbehave-navigator.ftl, views=ftl/jbehave-views.ftl, nonDecorated=ftl/jbehave-report-non-decorated.ftl}'
Reports view generated with 0 stories (of which 0 pending) containing 0 scenarios (of which 0 pending)
I've got the same error on my site. My problem was, that I was using a wrong version of JBehave. Please make sure the version of JBehave matches JBehave-Junit-Runner.
Especially, the 3.9-SNAPSHOT version of JBehave introduces an additional method lifecycle, which is not implemented by the JUnitScenarioReporter.
The fix is trivial, so I'll pull it to github today.
Related
I've installed WSO2 Integration Studio version 6.5.0 in my Windows workstation and created a project using the Kafka Consumer and Producer built-in template.
Then I configured the project with my own Kafka server settings (topic name "myTopic").
I then right-clicked the composite application and chose Export Project Artifacts and Run.
The Console window displayed at the very top the following messages:
[2019-06-25 09:23:45,499] [micro-integrator] INFO - LibraryArtifactDeployer Synapse Library named '{org.wso2.carbon.connector}kafkaTransport' has been deployed from file : C:\IntegrationStudio\runtime\microesb\tmp\carbonapps\-1234\1561465425230TestCompositeApplication_1.0.0.car\kafkaTransport-connector_2.0.6\kafkaTransport-connector-2.0.6.zip
[2019-06-25 09:23:45,517] [micro-integrator] INFO - SynapseImportFactory Successfully created Synapse Import: kafkaTransport
[2019-06-25 09:23:45,533] [micro-integrator] ERROR - ClassMediatorFactory
Error in instantiating class :
org.wso2.carbon.connector.KafkaProduceConnector
java.lang.NoClassDefFoundError: org/apache/kafka/common/header/Headers
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
[snipped rest for clarity]
I've tried uninstalling Integrator Studio and running it with elevated right to no avail.
I expected the project to be deployed normally.
EDIT: after copying:
kafka_2.11-2.2.1.jar
metrics-core-2.2.0.jar
zkclient-0.11.jar
kafka-clients-2.2.1.jar
scala-library-2.11.12.jar
zookeeper-3.4.13.jar
to the EI_HOME/lib directory, the exception changed to:
org.apache.axis2.deployment.DeploymentException: kafka/consumer/ConsumerTimeoutException
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:219)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifactType(SynapseAppDeployer.java:1099)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifacts(SynapseAppDeployer.java:114)
at org.wso2.carbon.application.deployer.internal.ApplicationManager.deployCarbonApp(ApplicationManager.java:272)
at org.wso2.carbon.application.deployer.CappAxis2Deployer.deploy(CappAxis2Deployer.java:72)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
[snipped for clarity]
Caused by: org.apache.axis2.deployment.DeploymentException: kafka/consumer/ConsumerTimeoutException
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:207)
... 87 more
Caused by: java.lang.NoClassDefFoundError: kafka/consumer/ConsumerTimeoutException
at org.wso2.carbon.inbound.endpoint.protocol.kafka.KAFKAPollingConsumer.startsMessageListener(KAFKAPollingConsumer.java:90)
at org.wso2.carbon.inbound.endpoint.protocol.kafka.KAFKAProcessor.init(KAFKAProcessor.java:96)
at org.apache.synapse.inbound.InboundEndpoint.init(InboundEndpoint.java:79)
at org.apache.synapse.deployers.InboundEndpointDeployer.deploySynapseArtifact(InboundEndpointDeployer.java:57)
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:197)
... 87 more
Caused by: java.lang.ClassNotFoundException: kafka.consumer.ConsumerTimeoutException cannot be found by synapse-core_2.1.7.wso2v111
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:475)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 92 more
Have you copied the required jars from kafka_home/libs folder to EI_home/lib, if yes then share your code to get the issue detail
According to this documentation https://docs.wso2.com/display/EI650/Kafka+Inbound+Protocol, the recommended versions for Kafka is kafka_2.9.2-0.8.1.1. You can download it in the below link. http://kafka.apache.org/downloads.html. Please use those jars and copy them to the EI_HOME/lib. There is an github issue for this as well. https://github.com/wso2/product-ei/issues/2239
I may be a bit too late but we have been using Custom inbound endpoint for Kafka. We also faced exactly same issue and that was the only way to fix it.
You could use https://github.com/wso2-extensions/esb-inbound-kafka/blob/master/docs/config.md to configure it.
I am having an issue while attempting to compile my Main report which consists of a Sub report in Jaspersoft Studio.
This is the error I am getting:
net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Unable to get next record from result set.
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:524)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:499)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:380)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: net.sf.jasperreports.engine.JRException: Unable to get next record from result set.
at net.sf.jasperreports.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:134)
at net.sf.jasperreports.engine.fill.JRFillDataset.advanceDataSource(JRFillDataset.java:1422)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1271)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1250)
at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1010)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:121)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:558)
at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:119)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.firebirdsql.jdbc.FBSQLException: The result set is closed
at org.firebirdsql.jdbc.AbstractResultSet.checkOpen(AbstractResultSet.java:233)
at org.firebirdsql.jdbc.AbstractResultSet.checkCursorMove(AbstractResultSet.java:222)
at org.firebirdsql.jdbc.AbstractResultSet.next(AbstractResultSet.java:284)
at net.sf.jasperreports.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:130)
... 8 more
I have looked all over the internet and have looked in every Stack Over Flow question that may help with this and I am still coming up short.
Any information on this issue will be greatly appreciated!
-Colt
The problem here can be in 2 areas.
How you created the JasperReports data source that you pass into the report
This is in the code you are using to run JasperReports. The JasperReports Server manages the creation and transaction control for data sources. What is the Firebird JDBC URL you are using?
How you pass the connection to the sub report
This is in the JRXML. When you use the sub report, you have to add:
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
I've been using neo4j 1.9 RC1 for the past two months. Yesterday, after an eclipse crash I started having this this exception:
Exception in thread "main" java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.TxManager#bf5743' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:282)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:90)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:75)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:60)
at fr.inria.atlanmod.neo4emf.drivers.impl.PersistenceService.<init>(PersistenceService.java:44)
at fr.inria.atlanmod.neo4emf.drivers.impl.PersistenceServiceFactory.createPersistenceService(PersistenceServiceFactory.java:27)
at fr.inria.atlanmod.neo4emf.drivers.impl.PersistenceManager.<init>(PersistenceManager.java:80)
at fr.inria.atlanmod.neo4emf.impl.Neo4emfResource.<init>(Neo4emfResource.java:58)
at fr.inria.atlanmod.neo4emf.impl.Neo4emfResourceFactory.createResource(Neo4emfResourceFactory.java:58)
at main.JDTASTMain.main(JDTASTMain.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.TxManager#bf5743' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:497)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:104)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:260)
... 9 more
Caused by: org.neo4j.graphdb.TransactionFailureException: Unable to start TM, no active tx log file found but found either tm_tx_log.1 or tm_tx_log.2 file, please set one of them as active or remove them.
at org.neo4j.kernel.impl.transaction.TxManager.openLog(TxManager.java:738)
at org.neo4j.kernel.impl.transaction.TxManager.start(TxManager.java:138)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:491)
... 11 more
I am running it with Java 1.7. Any ideas?
It seems that your data directory is corrupt. There is already a suggestion printed to the log to fix that issue:
Unable to start TM, no active tx log file found but found either
tm_tx_log.1 or tm_tx_log.2 file, please set one of them as active or
remove them.
I started getting this error yesterday when using the embedded 'jetty-run' task in SBT. I reverted my code to a previous version and it's still happening.
Note that I packaged up the application and deployed it in an actual jetty instance and I don't get the error. I started getting this error after adding some dependencies to my project (may or may not be related), but have since removed them.
I tried 'clean' 'clean-lib' and 'clean-cache' as well as cleaning out my ~/.m2/repository, ~/.ivy2/cache and project/boot directories.
Anybody have any other ideas?
The line that is blowing up is:
templateEngine.layout(uri, Map("flash" -> flash))
More of the stack trace is below:
org.fusesource.scalate.TemplateException: loader constraint violation: when resolving method "scala.tools.nsc.Settings.(Lscala/Function1;)V" the class loader (instance of sbt/jetty/LazyJettyRun7$SbtWebAppLoader$1) of the current class, org/fusesource/scalate/support/ScalaCompiler, and the class loader (instance of java/net/URLClassLoader) for resolved class, scala/tools/nsc/Settings, have different Class objects for the type scala/Function1 used in the signature
at org.fusesource.scalate.TemplateEngine.compileAndLoad(TemplateEngine.scala:775)
at org.fusesource.scalate.TemplateEngine.compileAndLoadEntry(TemplateEngine.scala:637)
at org.fusesource.scalate.TemplateEngine.liftedTree1$1(TemplateEngine.scala:368)
at org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:362)
at org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:420)
at org.fusesource.scalate.TemplateEngine.layout(TemplateEngine.scala:521)
at com.ford.testbuilder.web.AppDefaults$class.com$ford$testbuilder$web$AppDefaults$$render(SharedTraits.scala:79)
at com.ford.testbuilder.web.AppDefaults$$anonfun$6.apply(SharedTraits.scala:52)
at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2$$anonfun$6.apply(ScalatraKernel.scala:133)
at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2$$anonfun$6.apply(ScalatraKernel.scala:133)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:44)
at scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:42)
at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply$mcV$sp(ScalatraKernel.scala:133)
at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply(ScalatraKernel.scala:121)
at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply(ScalatraKernel.scala:121)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:71)
at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(ScalatraKernel.scala:121)
at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply$mcV$sp$1.apply(ScalatraKernel.scala:121)
at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply$mcV$sp$1.apply(ScalatraKernel.scala:121)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:71)
at org.scalatra.ScalatraKernel$$anonfun$handle$1.apply$mcV$sp(ScalatraKernel.scala:120)
at org.scalatra.ScalatraKernel$$anonfun$handle$1.apply(ScalatraKernel.scala:120)
at org.scalatra.ScalatraKernel$$anonfun$handle$1.apply(ScalatraKernel.scala:120)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:71)
at org.scalatra.ScalatraKernel$class.handle(ScalatraKernel.scala:119)
at com.ford.testbuilder.web.LoginServlet.org$scalatra$CookieSupport$$super$handle(LoginServlet.scala:10)
at org.scalatra.CookieSupport$$anonfun$handle$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(CookieSupport.scala:102)
at org.scalatra.CookieSupport$$anonfun$handle$1$$anonfun$apply$mcV$sp$1.apply(CookieSupport.scala:102)
at org.scalatra.CookieSupport$$anonfun$handle$1$$anonfun$apply$mcV$sp$1.apply(CookieSupport.scala:102)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:71)
at org.scalatra.CookieSupport$$anonfun$handle$1.apply$mcV$sp(CookieSupport.scala:101)
at org.scalatra.CookieSupport$$anonfun$handle$1.apply(CookieSupport.scala:101)
at org.scalatra.CookieSupport$$anonfun$handle$1.apply(CookieSupport.scala:101)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:71)
at org.scalatra.CookieSupport$class.handle(CookieSupport.scala:100)
at com.ford.testbuilder.web.LoginServlet.org$scalatra$FlashMapSupport$$super$handle(LoginServlet.scala:10)
at org.scalatra.FlashMapSupport$$anonfun$handle$1.apply$mcV$sp(flashMap.scala:101)
at org.scalatra.FlashMapSupport$$anonfun$handle$1.apply(flashMap.scala:100)
at org.scalatra.FlashMapSupport$$anonfun$handle$1.apply(flashMap.scala:100)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:71)
at org.scalatra.FlashMapSupport$class.handle(flashMap.scala:100)
I figured this out after trying a fresh checkout on someone else's machine (which was working fine) and comparing the classpaths. I found that I had both the scala-library-2.8.1.jar as well as the scala-library.jar in my classpath.
This was caused by the following line in my project file:
override def filterScalaJars = false
Wasted the better part of a day on this :(
I've just tried the the gwtNoEntities sample that is bundled with roo-1.1.0.
when launching using tomcat:run, or jetty:run, I get only the loading box.
When running it in GWT hosted mode, I get the following stacktrace reported in the client,
this appears to be an error related to setting up the default place using browser history, which is empty.
What would be the correct way to go about fixing this?
stacktrace
00:02:08.323 [ERROR] Unable to load module entry point class com.springsource.foo.client.scaffold.Scaffold (see associated exception for details)
java.util.NoSuchElementException: null
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at com.springsource.foo.client.scaffold.ScaffoldDesktopApp.init(ScaffoldDesktopApp.java:139)
at com.springsource.foo.client.scaffold.ScaffoldDesktopApp.run(ScaffoldDesktopApp.java:61)
at com.springsource.foo.client.scaffold.Scaffold.onModuleLoad(Scaffold.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)
generated code in question
/* Browser history integration */
ScaffoldPlaceHistoryMapper mapper = GWT.create(ScaffoldPlaceHistoryMapper.class);
mapper.setFactory(placeHistoryFactory);
PlaceHistoryHandler placeHistoryHandler = new PlaceHistoryHandler(mapper);
/* 139 */ ProxyListPlace defaultPlace = getTopPlaces().iterator().next();
placeHistoryHandler.register(placeController, eventBus, defaultPlace);
placeHistoryHandler.handleCurrentHistory();
You may replace the generated code with while condition block at the below (line 139)
while (getTopPlaces().iterator().hasNext()) {
ProxyListPlace defaultPlace = getTopPlaces().iterator().next();
placeHistoryHandler.register(placeController, eventBus, defaultPlace);
placeHistoryHandler.handleCurrentHistory();
}
recompile with mvn compile, restart with mvn gwt:run. Now you should have no error but with empty page.
The gwtNoEntities.roo example has no data. You may try other example like expenses.roo. The generated code should be okay.
Please remember to accept the answer if it helps.
Thanks.