It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Help needed with JCLI error

NickW Jun 27, 2012

I want to copy versions between several projects (they all have the same versions). So I am trying to use the JCLI to do this. Howver I get the following errors and am now stuck. Can anyone help? The user login provided is for the sysadmin account. The following is from the cmd window:

C:\Program Files\jira-cli-2.6.0>
jira --action copyVersions --project "ABC" --toProject "ABC Test Project" --verbose


Server address: http://ia-jirasvr:8080/rpc/soap/jirasoapservice-v2

Successful
login to: http://ia-jirasvr:8080/rpc/soap/jirasoapservice-v2 by user: nick watson

URL requested: http://ia-jirasvr:8080/rest/api/latest/version/10000?os_username=nick watson&os_password=***

Request type: GET

Content type: application/json

Response code: 505, message: HTTP Version Not Supported, url: http://ia-jirasvr: 8080/rest/api/latest/version/10000?os_username=nick watson&os_password=***

Problem determination - response: 505: HTTP Version Not Supported

Problem determination - response url: http://ia-jirasvr:8080/rest/api/latest/version/10000?os_username=nick watson&os_password=***

Problem determination - request url: http://ia-jirasvr:8080/rest/api/latest/version/10000?os_username=nick watson&os_password=***

org.swift.common.cli.AbstractRemoteClient$RemoteRestException: Unknown error occurred on server. Use the problem determination urls from a browser to see more details.

Remote error: 1 versions failed to be copied.

0 versions copied from ABC to project ATP.

java.rmi.RemoteException: 1 versions failed to be copied.

0 versions copied from ABC to project ATP.
at org.swift.jira.cli.JiraClient.copyVersions(JiraClient.java:3997)
at org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:483)
at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:119)
at org.swift.common.cli.CliClient.doWork(CliClient.java:298)
at org.swift.jira.cli.JiraClient.main(JiraClient.java:158)
FbpEc3X060 logged out.

Error: Parameter 'server' is required.
Error: Parameter 'password' is required.

1 answer

It appears that your user name has a space it in. Use your JIRA user id - it should not have spaces.
NickW Jun 27, 2012

Hi Bob,

Guess I am being particulariliy dense here... is the JIRA User ID the same as the Username? If so it has a space.

Regardless I created a new user called automation (put in administartor group) and used that. I still get the same error e.g.

C:\Program Files\jira-cli-2.6.0>jira --action getServerInfo
JIRA version: 5.0.5, build: 732, time: 2012-06-28T12:29:35.818+0100, time zone:
Europe/London

Error: Parameter 'server' is required.
Error: Parameter 'password' is required.

Nick

My apologies, apparently a user id (username) can be created with a blank or other special characters :(. Supporting these will require a fix in the CLI. In the meantime use an id without blanks for special characters.

Regarding your error, you need to check your customization of the jira.bat command to ensure it is correct. If you don't see an obvious error, post it.

NickW Jun 27, 2012

I really cant see whats wrong, I literally just edited the servername, usrname and password anyway here goes:

Incase its relevant its on a Win7 Box, 64 bit machine

Thanks.

@echo off
rem remember the directory path to this bat file
set dirPath=%~dp0

rem need to reverse windows names to posix names by changing \ to /
set dirPath=%dirPath:\=/%
rem remove blank at end of string
set dirPath=%dirPath:~0,-1%

rem - Customize for your installation, for instance yo might want to add default parameters like the following:
rem java -jar "%dirPath%"/lib/jira-cli-2.6.0.jar --server http://my-server --user automation --password automation %*

java -jar "%dirPath%"/lib/jira-cli-2.6.0.jar --server http://ia-jirasvr:8080 --user automation --password aut0mat1on %*

java -jar "%dirPath%"/lib/jira-cli-2.6.0.jar %*

rem Exit with the correct error level.

echo ">>"
echo ">>jira.bat run completed"

EXIT /B %ERRORLEVEL%

David W Mar 09, 2017

I have the same .bat configuration, with the same error  message.

Confluence ver 1000.1035.0

C.L.I ver 6.2.0

Is there any update on this?

 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira Software

Early Access: If you use Jenkins and Jira Software Cloud, you need to read this!

The Jira Software Cloud Team has been busy working on a simple, secure, and reliable way to integrate your build and deployment information from Jenkins with Jira Software Cloud. This means you don’t...

334 views 0 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you