Jenkins Maven SoapUI Java403 Forbidden error - java

I have an automation which is written in SoapUI. I am kicking it off using Java/Maven/SoapUI API. Basically I can kick off soapUI automation from Java > Project > Run As> Maven Test. It works perfectly.
Now I committed my project to SVN and Integrating to local Jenkins. When I click Build now, I get following error.
23:11:49,514 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
23:11:49,514 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /myApp/ProcessorService HTTP/1.1
23:11:50,377 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 403 Forbidden
23:11:50,388 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive for 15000 MILLISECONDS
One thing i wanted to to mention is that my SoapUI project has some security (.JKS) files. I am not sure it is causing the problem or not.
Also whenever I run a job through jenkins, it tries to create soapui-settings.xml in C: drive. As this is my organization laptop, I do not have access to create a file in C Drive. Not sure this could be a problem or not.
Please help.
Thanks,

Related

409 conflict error when i try mvn appengine:update

After i perform mvn appengine:devserver,
i set my project key using:
gcloud config set project {my-key}
and i run mvn appengine:update, i receive this error ::::
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?module=apol-web&app_id=apol-145566&version=1&
409 Conflict
Another transaction by user arokoyuolalekan is already in progress for app: e~apol-145566, version: 1. That user can undo the transaction with "appcfg rollback".
Please what do i do to solve it.
I just solve the problem by rolling back the ongoing transaction using this maven command on the command prompt:
mvn appengine:rollback
409 error when you deploy your app means that there's already another deployment going on and you can't start another one, hence the conflict.
You can either use appcfg rollback to rollback your deployment, or wait till current deployment expires, it should take no more than an hour.
You can read more about appcfg tool on this page https://cloud.google.com/appengine/docs/standard/java/tools/appcfg-arguments

Tomcat started in STS but unable to connect to http://localhost:8080/Portal

I configured Tomcat Server 6.0.24 in STS and started successfully
But when I am trying to connect to http://localhost:8080/ it is giving me the following error
HTTP Status 404 - /
type Status report
message /
description The requested resource is not available.
Apache Tomcat/7.0.57
Any Solution, unfortunately i'm a newbie...my Java developer isn't available for the next one more week and I've to do the HTML modification in the portal.
I need a solution to fix this.
I tried to switch server location but Tomcat never starts. I closed the STS and went into localhost:8080 then my tomcat page shows up.
But the problem is only when STS is open i get 404 error.

GWT JUnit Test - Is it possible to ignore same-origin policy

I am trying to run an asynchronous test and need to send a request to my server, which has a REST-API. So my problem is that the tests are executed on the local machine, but this obviously violates the same origin policy and I get a RuntimeError if I try to run the GWTtestCase:
com.google.gwt.http.client.RequestPermissionException: The URL http://<url-to-my-rest-service> is invalid or violates the same-origin security restriction
at com.google.gwt.http.client.RequestBuilder.doSend(RequestBuilder.java:394)
at com.google.gwt.http.client.RequestBuilder.send(RequestBuilder.java:242)
...
I know that I can run these tests manually, but with the latest updates of my browser (chromium), the GWT-Plugin was removed. So I don't know how to launch the tests in SuperDevMode.
Questions:
Is there a way to ignore the same-origin policy for the GWT JUnit Tests?
Can I change the browser which is used for the test to Chrome/Chromium?
How can I manually run the tests with SuperDevMode in a browser?
Edit:
If I want to run the tests manually I write the following into the terminal:
mvn gwt:test -Dgwt.args="-prod -userAgents safari -runStyle Manual:1"
Maven then will print an URL to the terminal which I should enter into the browser to execute the tests:
http://127.0.1.1:57818/<my-package>.JUnit/junit-standards.html?gwt.codesvr=127.0.1.1:40387
But if I enter this URL into my browser (Chromium) it will notify me that the GWT-Plugin is currently not installed. If I remove the part behind the question mark (like I do if I want to run the GWT-Code in SuperDevMode on the localhost) ?gwt.codesvr=127.0.1.1:40387 then the browser will show only a blank page, and also if I started the codeserver with:
mvn process-classes gwt:run-codeserver
the codeserver-bookmarks (Dev Mode On) are not working and GWT is not able to detect a module which is "compilable".
Question:
So how excatly do I compile the JUnit-Test-Module with the SuperDevMode?
You can't bypass the SOP, but you could use a servlet to proxy requests to your remote server (servlets declared with <servlet> in your gwt.xml files are honored by JUnitShell).
And if you want to run the tests in Chrome/Chromium, you can either use -runStyle Manual or Selenium (note: there's even a custom run style for PhantomJS), and because DevMode no longer works, as you noted, you'd have to run tests in prod mode: -prod -userAgents safari

Configuring Jenkins with Bitbucket URL

I am trying to configure a maven job to run in jenkins - I have been getting the following error for some time now (with other variations dependant on what I change)
Failed to connect to repository : Failed to connect to
https://bitbucket.org/rickilambert/secondstoryuk/Core.git using
credentials (status = 404)
I have tried many variations of connection URL inclusive of the 2 most recommended on stack overflow
https://<user>:<pass>#bitbucket.org/<user>/<project>.git
https://bitbucket.org/<username>/<project>.git
Both to no avail - has anyone come across an error like this before or indeed have any idea how to fix it? For reference Jenkins is running the GIT plugin version 2.2.2
Thanks
404 error means the url does not exist.
You should double check if the url is valid or not.

Deploying a java play application

I created a small play application and generated the dist files using "play dist"
After running the "start" script, the application works locally, but when I try to unzip the file generated on a server or giving it to other colleagues, the output says :
./start
Play server process ID is 13585
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
When i access the server on port 9000 (http://correct-server-url-or-ip:9000) , the browser shows that the page is loading but it never loads.
If I kill the process on the server, the browser immediately shows an error.
I am not sure why it works on my machine but doesn't deploy on other machines with similar configurations.
Did anyone have a problem like that? or know how to fix it?
Thank you

Categories