I am running Cucumber JVM for a POC with Selenium 2.37.
The folder structure of my project as follows
src
>> main
> test
>java
>package
>TestRunner.java
>StepfDef.java
>resource
>package
>bdddemo.features
When i run the test runner via Junit, i am getting the following error message.
cucumber.runtime.CucumberException:
No features found at [classpath:test/java/com/package]
I believe the folder structure has some issue.
Can anybody post me where the Cucumber-JVM is actually looking for story files by default ?
By default, when using classpath:, Cucumber starts looking in the root of you classpath.
If you configure Cucumber to search in "classpath:features", you can put your features in src/test/resources/features.
Related
I have an extJs 4 app that is extending 3rd party non-extJs classes. I just can't seem to build the app. It keeps giving me the error below. Objective is to minify the app with appropriate dependencies since it is taking longer time to load both libraries and slowing down the application.
I am using Sencha Cmd v4.0.4.84.
/*********************************************/
C2008: Requirement had no matching files
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: Failed to find any files
/*********************************************/
Any help is truly appreciated.
So far I have tried:
1) modified app/.sencha/app/sencha.cfg classpath to include the external library. No luck.
2) Added to section of the index.html. No luck.
3) Added loaders and set path of the external library. No luck.
External library is already on my local machine inside of the app folder.
Anyone out there?
I take you out for a lunch if you help me resolve this issue. No seriously!
This is really a showstopper for me.
Thank you,
Ritesh
Issue is resolved in the Sencha Forum post below.
http://www.sencha.com/forum/showthread.php?285252-Sencha-Cmd-build-ExtJs-with-external-library&p=1043385#post1043385
If you can't get to the link then....
If a testing build works and production build does not you might try disabling optimizations. If you look in ".sencha/app/production.defaults.properties" you will see the various settings that make production builds unique.
Try adding this setting:
build.optimize=${build.optimize.disable}
Hope this will help someone.
Thanks,
Ritesh
You cannot extend a 3rd party class as Ext.define expects that all classes inherit from Ext.Base what is unlikely for non-ext 3rd party lib.
Of course, you can use a third party lib by including its javascript outside of <x-compile> block in your index.html
I have a Solr 4.0 module in my project (basically, a maven web project with all the solr dependencies). It worked pretty well, including content extraction and everything.
But, when I tested it with a .docx document, It gives me the following error:
13:50:34,468 ERROR [org.apache.solr.servlet.SolrDispatchFilter] (http--0.0.0.0-8080-9)
null:java.lang.RuntimeException: java.lang.NoSuchMethodError:
org.apache.poi.openxml4j.opc.PackagePart.getRelatedPart(Lorg/apache/poi/openxml4j/opc/PackageRelationship;)
Lorg/apache/poi/openxml4j/opc/PackagePart;
I tried to manually add the openxml4j dependency to the project. I've downloaded the sources and looked at it, the PackagePart#getRelatedPart really doesn't exist.
What is this error? How can I fix this?
Thanks in advance.
EDIT
I noticed that poi-ooxml already had those classes inside it. Cool, but I also inspected those sources, and still doesn't have the needed method in the PackagePart class.
BTW: I tried to add openxml4j version 1.0-beta.
It was a jarhell related issue.
Thanks, "jarhell related" was the clue I needed!
My project had POI jars prior to import of the Tika app jar, which includes its own POI jars. I deleted the standalone POI jars, and then Tika was able to handle DOCX Word 2013 file without error.
Now hopefully I won't run into a situation where I need both! :|
I am a Find bugs fan and have used it before with Intellij Idea . It has a very nice plugin for Intellij Idea. Now I am using JDeveloper as it has the best support for Oracle ADF framework and my application is built on top of ADF . I want to find out what is the best possible way to integrate JDeveloper directly with FindBugs ? Are there any plugins ?
Edit: I have been through this blog which describes how to integrate FindBugs into a build script for Ant but when I followed the steps mentioned there I see the following :
Buildfile: D:\Software\findbugs-2.0.2\findbugs.xml
init:
findbugs:
[findbugs] Executing findbugs from ant task
[findbugs] Running FindBugs...
[findbugs] edu.umd.cs.findbugs.NoClassesFoundToAnalyzeException: No classes found to analyze in *C:\Oracle\Middleware\jdk160_24\jre\lib\resources.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\rt.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\jsse.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\jce.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\charsets.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\ext\dnsns.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\ext\localedata.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\ext\sunjce_provider.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\ext\sunmscapi.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\ext\sunpkcs11.jar *D:\Software\findbugs-2.0.2\lib\annotations.jar *D:\Software\findbugs-2.0.2\lib\jsr305.jar
[findbugs] at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:273)
[findbugs] at edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:391)
[findbugs] at edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1298)
[findbugs] Java Result: 4
BUILD SUCCESSFUL
Total time: 4 seconds
I think it is not finding any files to analyze . But I have set the value of basedir2 as the following :
${project.classpath}${java.path}${project.dir}${project.sourcepath}${target.class}${workspace.path}
You know that you can debug ant scripts in jdev?
You can step into each target, set breakpoints on targets and definitions.
This would help you find out which parameters are passed to a target. You can even see the values of each variable like in a normal Java code.
Note that in the blog the value set for basedir2 is ${project.dir}
Also make sure that before your run the findbugs you actually compile your project so the class files will be created in the right directory.
Using Cmd 3.0.0.141, I have successfully generated a workspace and an Ext app in that workspace. The application builds correctly until I attempt to integrate the Bryntum Scheduler, where I encounter an error when I try to build:
"Failed to resolve dependency Sch.panel.SchedulerTree for file ExtCalendar.view.Tree"
the app is very simple at this point, uses Ext.application and follows the MVC pattern where I have a view defined "ExtCalendar.view.Tree" that extends 'Sch.panel.SchedulerTree". I also have models and stores that extend Bryntum classes as well, so I assume the compiler will trip over those as well, since it can't see the Sch namespace.
I've added a 'js' path to my app.json that points to the bryntum js file where 'Sch.panel.SchedulerTree' comes from. I've tried to run the 'refresh' command with the same results (Failed to resolve...). I've regenerated the bootstrap.js file manually using 'compile', but nothing from the Sch namespace ever gets added to it, despite the Brytum lib file being in the classpath.
What do I need to do in order to successfully run the 'build' command with libs like this?
Or, do I need to take a more granular approach using the 'compile' command?
With the help of the nice folks on the Sencha forums, I was able to resolve my build issues. The solution, for me, involved a shim. I added an external shim.js file to my index with as many //#require and //#define directives as needed in order to resolve the dependency issues.
According to the nice folks at Bryntum, once I upgrade from the free-trial version of the Bryntum Scheduler, I will be able to get rid of the shim and simply rely on the sencha.cfg classpath pointing at the Bryntum src.
Also, as an aside, the app.json file is not used in ExtJS apps, its inclusion in the generated files was a bug in build 141 of Cmd v3.
See this thread for more detail.
I'm trying to use jTwitter to get an oauth instance to twitter with my consumer key/secret and access token/secret. This is well documented in the javadoc here. I have downloaded signpost, signpost-jetty, and the jtwitter library, but after deploying and running the servlet, I get a error java.lang.NoClassDefFoundError: winterwell/jtwitter/OAuthSignpostClient Eclipse isn't complaining about the class not being there, because it is there-- I can see it in the JAR file itself, which is in my project. So, I said forget it, I'll try out OAuthScribeClient instead, but this generated a VERY SIMILAR ERROR java.lang.NoClassDefFoundError: org/scribe/oauth/Token This one confuses me even further because I have the following code in my java file, and it compiles without error or warning:
import org.scribe.oauth.Token;
Token token = new Token("myaccesstokeninfo", "accesstokensecret");
Clearly, I'm missing something very fundamental, but I am at an absolute loss as to what it may be. Thanks.
Usually "NoClassDefFoundError" happens when you forget to copy all jar-files to your "/war/WEB-INF/lib" directory, so those libs will be unavailable from server-side.
Xo4yHaMope is probably right.
If you're working from Eclipse but running using a web container, then your runtime classpath might be different from your project classpath - which can cause this error.
In order to complete Ben Winters answer what I actually did and worked is add the jar in
the libs folder within the project
see also here about folder hierarchy.
When you do this eclipse will normally add the jar to the android dependencies before launching the application. What I realise is that adding a jar in the build path will make classes available only during the build