Getting java.lang.IllegalArgumentException error while running cucumber feature file in Java Eclipse - cucumber

I am trying to run a basic cucumber feature file via JAVA ECLIPSE on my MacBook and getting this java.lang.IllegalArgumentException error .
Following steps are taken care.
Added the dependencies
Created a Maven project
Created a feature file
Created a Runner Class
Created a Step Definition class
Trying to run the feature file so that I will get the implementation steps as part of errors in consolidating so that I can use the same in the step definition file.
Feature file :
Feature: POC on gmail Login Page
Scenario: gmail login test
Given User navigated to gmail Login page
When User enter the Loginid
And User enter Password for gmail
And User click on Login button
Then Verification Page Displayed
Then Inbox page is displayed
Error in detail:
Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: /Users/civakalyan/Documents/Java Eclipse/FIrstCucumberMavenProject/--plugin
at cucumber.runtime.io.FileResourceIterator$FileIterator.(FileResourceIterator.java:54)
at cucumber.runtime.io.FileResourceIterator.(FileResourceIterator.java:20)
at cucumber.runtime.io.FileResourceIterable.iterator(FileResourceIterable.java:19)
at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:38)
at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:117)
at cucumber.runtime.Runtime.run(Runtime.java:92)
at cucumber.api.cli.Main.run(Main.java:20)
at cucumber.api.cli.Main.main(Main.java:12)

U have to build the path etc, restart eclipse. Try making a new Fresh Project with the same feature file and run it.
it worked for me , however still looking for a better solution

Related

Broadleaf - running locally - problem getting started the API project

I'm trying to run Heat Clinic 6.0.1 locally following getting started tutorial: https://www.broadleafcommerce.com/docs/core/current/getting-started/running-locally
I managed to run admin and site but not the API project. The application starts without problems but when I go to http://localhost:8082/api/v1/swagger-ui.html I get a 404. In the log I see this exception:
javax.servlet.ServletException: Circular view path [error]: would dispatch back to the current handler URL [/error] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
Also trying to log in directly in the API with user broadleafapi and password gives 404.
My environment: Windows 10, jdk 8, maven 3.6
What's wrong? Can you help me? Thank you
Thanks for the report. I reproduced this and it looks like that with the update to Spring Boot 2.0, we did not appropriately override the updated property that specifies the servlet location to embedded Tomcat. Thus, when you went to /api/v1/swagger-ui.html, the application treats it exactly like that URL which is what gave the 404.
Setting the server.servlet.contextPath=/api/v1 property appropriately stripped off this path as part of the servlet context and resolved the 404.
I tested around a bit and was able to 'Authorize' the app (button at the top right of the Swagger page) with the credentials information that get spit out in the logs:
Basic auth configured with user broadleafapi and password: <<generated>>
then I was able to hit the API endpoints.
The changes you will need to make locally in your project to consume the fix are at https://github.com/BroadleafCommerce/DemoSite/commit/422d1cdc37f847afd8bec0be477ab784cbad2e9d#diff-991c59b6dbb0f619b8570d8f8779eaddR11. You will notice that I moved the original definition in default.properties over to common.properties and I recommend that you do the same. To be clear, follow these steps:
Delete the server.servlet.contextPath entry in `api/src/main/resources/runtime-properties/default.properties
Change server.servletPath in api/src/main/resources/runtime-properties/common.properties to server.servlet.contextPath
Thanks for trying out Broadleaf and the report, sorry for the rough early start!

unable to login with default user name administrator after installing Kentico

I have installed the Kentico and it generated an URL. When we try to login with a default username 'administrator' and getting an error message as follow.
[WebFarmTaskManager.CanCreateTask]: Task type 'DICTIONARYCOMMAND' is not supported. The task needs to be registered with WebFarmHelper.RegisterTask method.
Publish first CMSApp_AppCode, then, in the same folder, CMSApp, however disable the option "Delete all existing files prior to publish" in CMSApp

Jenkins Java: How to get the userid of the user who triggered the build in jenkins

Is there a way to find out who started a build in jenkins using java. I understand that below is the approach for figuring out as to who started a build
import hudson.model.*
import jenkins.security.*
def userBuild
for(hudson.model.Cause cause : build.causes) {
userBuild = cause.getUserName()
}
println "Build Started by: "+userBuild
Likewise, can someone please let me know if there is a similar working way to figure out as to who initiated a jenkins build?
Ther is a Plugin that injects the informations in Build Variables.
https://wiki.jenkins-ci.org/display/JENKINS/Build+User+Vars+Plugin
BUILD_USER – full name of user started build,
BUILD_USER_FIRST_NAME – first name of user started build,
BUILD_USER_LAST_NAME – last name of user started build,
BUILD_USER_ID – id of user started build.
Maybe this is an option for you.
Was able to figure it out on my own. Added the below changes in buildCaption.jelly so that only the user who started the build will be able to abort the build. Mind that this change only gets reflected in the console-output of a build, but there are other places(such as jenkins landing page and job home page) where the abort button gets displayed and will have to make the changes accordingly
<j:forEach var="cause" items="${it.causes}">
<j:if test="${cause.userName == it.currentlyLoggedInUser}">
<l:stopButton href="stop" alt="[${%cancel}]"/>
</j:if>
</j:forEach>

openAm 12.0.0 failed to add user with external opendj

I had build and install openam 12 from source code, from svn checkout
link:
svn checkout https://svn.forgerock.org/openam/tags/12.0.0/openam/
after that I had used external OpenDJ-2.6.0 with openam , installation is successful.
But when I add new user and click OK I got error
Error :”Plug-in org.forgerock.openam.idrepo.ldap.DJLDAPv3Repo encountered a ldap exception. ldap errorcode=65”
Also check in OpenDJ-2.6.0 logs access logs:
[25/Feb/2015:16:27:00 +0530] ADD RES conn=6 op=131 msgID=132 result=65 message=”Entry uid=indranis,dc=xyz,dc=net violates the Directory Server schema configuration because it contains an unknown objectclass iPlanetPreferences” etime=2
Same exception I got when I try to add group ,
but able to solve referring following link:
https://java.net/projects/opensso/lists/users/archive/2007-08/message/21
remove manually from Data Store – opends and remove groupOfURLs or groupOfUniqueNames from the LDAP Groups Object Class
Is there is issue with openDJ2.6 version , or any changes do I need to configure?
I got issue resolve, by installing openAM with embeded datastore and and then after installation ,configured it with an external opendj store and removed embedded one.

Tagged Hooks not recognized in a particular package

I have created a gradle project which uses cucumber and geb. My programming language is groovy.
All my steps files are located at com.bada.bada.bada.cucumber.step
Feature:
User usecases
#Login
Scenario: Login User to website
Given I am on the mywebsite
And I log in with a valid username and a valid password
When I see profile
Then I can see my profile image
and my Hook code is
this.metaClass.mixin(cucumber.api.groovy.Hooks)
this.metaClass.mixin(cucumber.api.groovy.EN)
Before("#Login") {
// Go nuts
}
If the definition of hook is in com.bada.bada.bada.cucumber.step.SomefileSteps.groovy, then the hook is recognised but if it exists in com.bada.bada.bada.cucumber.hooks.SomeHooks.groovy then it is not.
Why is this an issue?
Glue directories were not updated. Updating those fixed the issue.

Resources