Unable to start jira - Unable to execute mojo exception

Hi,

I am running JIRA 5.0.3 in my system .

OS-Windows 7

I have my own plugins and when i ever i try to run jira by atlas-debug i get this exception-

Skipping OBR generation... no OSGi bundle manifest instructions found in pom.xm
[jira:test-jar]
[amps-dispatcher:debug]
[jira:debug {execution: virtual-execution}]
------------------------------------------------------------------------
] BUILD ERROR
------------------------------------------------------------------------
Unable to execute mojo

ed error: java.net.UnknownHostException: marketplace.atlassian.com
------------------------------------------------------------------------
For more information, run Maven with the -e switch
------------------------------------------------------------------------
.

This was not happening before,I see that it is trying to contact marketplace.atlassian.com but my proxy is not allowing.Any idea how to fix this?

7 answers

1 accepted

This widget could not be displayed.

Try this...

atlas-debug --jvmargs -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy -Dhttps.proxyPort=8080

why does this work and running atlas-debug on its own gives the mojo exception?

I faced this error intermittently. Even though the proxy details are specified in maven settings xml, I am not sure why but for some unknown reason the Java do not pick these proxy settings and hence we pass the proxy information directly to the process as JVM arguments.

This widget could not be displayed.

Not sure if below helps.

Just noting my experience with "Unable to execute mojo exception".

I was getting "Unable to execute mojo exception" when running atlas-run -Dhttps.proxyHost=xxx.xxx.x.xx -Dhttp.proxyHost=xxx.xxx.x.xx -Dhttps.proxyPort=80 -Dhttp.proxyPort=80 when developing a Confluence plug-in.

I had edited C:\QA\atlassian-plugin-sdk\apache-maven\conf\ settings.xml

And added Proxies there too (see below).

When I removed the settings.xml changes, I no longer get "Unable to execute mojo exception"

I now get

[INFO] confluence started successfully in 180s at http://MN26C001162386:1990/confluence
[INFO] Type Ctrl-D to shutdown gracefully
[INFO] Type Ctrl-C to exit

Problem fixed. :)

<!-- proxies
| This is a list of proxies which can be used on this machine to connect to the network.
| Unless otherwise specified (by system property or command-line switch), the first proxy
| specification in this list marked as active will be used.
|
| -Dhttps.proxyHost=xxx.xx.x.xx -Dhttp.proxyHost=xxx.xx.x.xx -Dhttps.proxyPort=80 -Dhttp.proxyPort=80
|-->
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>xxx.xx.x.xx</host>
<port>80</port>
<nonProxyHosts></nonProxyHosts>
</proxy>
<proxy>
<active>true</active>
<protocol>https</protocol>
<username></username>
<password></password>
<host>xxx.xx.x.xx</host>
<port>80</port>
<nonProxyHosts></nonProxyHosts>
</proxy>
</proxies>

This widget could not be displayed.
[INFO] No manifest found or validation skip flag specified, skipping validation
[INFO] [jira:jar]
[INFO] [jar:jar]
[INFO] Building jar: C:\Users\i065939\PERFORCEWORKSPACE\jira\JiraExt\dev\SAP-JIRA-SERVICES\target\SAP-JIRA-SERVICES-1.0.2.jar
[INFO] [jira:generate-obr-artifact]
[INFO] Skipping OBR generation... no OSGi bundle manifest instructions found in pom.xml
[INFO] [jira:test-jar]
[INFO] [amps-dispatcher:debug]
[INFO] [jira:debug {execution: virtual-execution}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to execute mojo

Embedded error: java.net.UnknownHostException: marketplace.atlassian.com
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to execute mojo
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
        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 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
        at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojoImpl(MojoExecutor.java:128)
        at org.twdata.maven.mojoexecutor.MojoExecutor$ExecutionEnvironmentM2.executeMojo(MojoExecutor.java:466)
        at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:80)
        at com.atlassian.maven.plugins.ampsdispatcher.AbstractAmpsDispatcherMojo.execute(AbstractAmpsDispatcherMojo.java:64)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
        ... 16 more
Caused by: java.lang.RuntimeException: java.net.UnknownHostException: marketplace.atlassian.com
        at com.atlassian.maven.plugins.updater.MarketplaceSdkResource.getPluginJsonAsMap(MarketplaceSdkResource.java:136)
        at com.atlassian.maven.plugins.updater.MarketplaceSdkResource.getLatestSdkVersion(MarketplaceSdkResource.java:98)
        at com.atlassian.maven.plugins.amps.util.UpdateCheckerImpl.check(UpdateCheckerImpl.java:57)
        at com.atlassian.maven.plugins.amps.DebugMojo.doExecute(DebugMojo.java:40)
        at com.atlassian.maven.plugins.amps.AbstractProductHandlerMojo.execute(AbstractProductHandlerMojo.java:650)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
        at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojoImpl(MojoExecutor.java:126)
        ... 21 more
Caused by: java.net.UnknownHostException: marketplace.atlassian.com
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
        at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
        at sun.net.www.protocol.https.HttpsClient.&lt;init&gt;(HttpsClient.java:272)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
        at com.atlassian.maven.plugins.updater.MarketplaceSdkResource.getPluginJsonAsMap(MarketplaceSdkResource.java:133)
        ... 27 more

Yes I am.Here is the stack trace

Hi,
If you use a proxy, I think that you must do some configuration in your file settings.xml


INFO] [jar:jar]

INFO] Building jar: C:\git\stash-notify-push-to-ref-hook\target\stash-notify-push-to-ref-hook-1.0.0-SNAPSHOT.jar

INFO] [stash:generate-obr-artifact]

INFO] Skipping OBR generation... no OSGi bundle manifest instructions found in pom.xml

INFO] [stash:test-jar]

INFO] [amps-dispatcher:debug]

INFO] [stash:debug {execution: virtual-execution}]

INFO] ------------------------------------------------------------------------

ERROR] BUILD ERROR

INFO] ------------------------------------------------------------------------

INFO] Unable to execute mojo

mbedded error: java.net.ConnectException: Connection timed out: connect

INFO] ------------------------------------------------------------------------

INFO] For more information, run Maven with the -e switch

INFO] ------------------------------------------------------------------------

INFO] Total time: 1 minute 8 seconds

INFO] Finished at: Tue Dec 31 13:15:52 CST 2013

INFO] Final Memory: 108M/313M

INFO] ------------------------------------------------------------------------

This was not happening before.

I have the same issuse the above solution didnt help . Is there any other soloution?

This widget could not be displayed.

Hi,

You are connecting to the web?

This widget could not be displayed.

Answed by Erik Salko-Saari .. I tried that it worked out thanks.

Restarting might help

This widget could not be displayed.

great!

This widget could not be displayed.

What if we are not connected to the internet?

I tried the flag "-Dupm.pac.disable=true" with these both commands:

atlas-run -Dupm.pac.disable=true

atlas-run --jvmArgs '-Dupm.pac.disable=true'

atlas-run --jvmargs '-Dupm.pac.disable=true'

None are working. Atlassian sdk 4.2.7

I'm behind a quite restrictive firewall, and can't access lots of hosts. So I would like to disable it. Any clue?

Arg... it works when adding the "-o" (offline) option

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

62 views 0 1
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you