java.net.MalformedURLException: Unknown protocol: ssh

Atlassian JIRA | David Hergert [Windstream] | 6 years ago
  1. 0

    Shortcut Link called "ssh" with expanded value {{ssh://%s}} such that {{[myHost@ssh]}} renders a hyperlink like {{[ssh://myHost|myHost]}} and we have a protocol handler in our browsers to handle that protocol. But every time someone views a page with several of these shortcut links, our logs FILL with stack traces like below. Can the code be updated to better catch and handle this specific type of IOException and possible not log this as an error, but maybe as a warning and not log a stack trace? {code} 2010-10-07 11:17:48,820 ERROR [http-80-12] [atlassian.confluence.util.GeneralUtil] completeUrlEncode Error while trying to encode the URL! -- referer: http://host/pages/editpage.action?pageId=28706460 | url: /display/SPACEKEY/Page+-+Name+Servers | userName: dhergert | action: viewpage | page: 28706460 java.net.MalformedURLException: Unknown protocol: ssh at java.net.URL.<init>(URL.java:601) at java.net.URL.<init>(URL.java:464) at java.net.URL.<init>(URL.java:413) at com.atlassian.confluence.util.CompleteURLEncoder.encode(CompleteURLEncoder.java:29) at com.atlassian.confluence.util.GeneralUtil.completeUrlEncode(GeneralUtil.java:275) at com.atlassian.confluence.links.linktypes.ShortcutLink.<init>(ShortcutLink.java:26) at com.atlassian.confluence.links.ConfluenceLinkResolver.makeShortcutLink(ConfluenceLinkResolver.java:178) at com.atlassian.confluence.links.ConfluenceLinkResolver.createLink(ConfluenceLinkResolver.java:123) at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy65.createLink(Unknown Source) at com.atlassian.renderer.v2.components.LinkRendererComponent.appendLink(LinkRendererComponent.java:138) at com.atlassian.renderer.v2.components.LinkRendererComponent.render(LinkRendererComponent.java:96) at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53) at com.atlassian.renderer.v2.plugin.PluggableV2Renderer.render(PluggableV2Renderer.java:30) at com.atlassian.renderer.v2.V2SubRenderer.render(V2SubRenderer.java:44) at com.atlassian.renderer.v2.components.table.TableBlockRenderer.prerenderLinks(TableBlockRenderer.java:96) at com.atlassian.renderer.v2.components.table.TableBlockRenderer.renderNextBlock(TableBlockRenderer.java:75) at com.atlassian.renderer.v2.components.block.BlockRendererComponent.applyBlockRenderers(BlockRendererComponent.java:164) at com.atlassian.renderer.v2.components.block.BlockRendererComponent.render(BlockRendererComponent.java:98) at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53) at com.atlassian.renderer.v2.plugin.PluggableV2Renderer.render(PluggableV2Renderer.java:30) at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57) at sun.reflect.GeneratedMethodAccessor331.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy58.convertWikiToXHtml(Unknown Source) at com.atlassian.confluence.pages.actions.ViewPageAction.execute(ViewPageAction.java:194) at net.customware.confluence.plugin.pageapproval.PageApprovalSpaceViewPageAction.execute(PageApprovalSpaceViewPageAction.java:81) <redacted for brevity > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584) at java.lang.Thread.run(Thread.java:619) {code}

    Atlassian JIRA | 6 years ago | David Hergert [Windstream]
    java.net.MalformedURLException: Unknown protocol: ssh
  2. 0

    Shortcut Link called "ssh" with expanded value {{ssh://%s}} such that {{[myHost@ssh]}} renders a hyperlink like {{[ssh://myHost|myHost]}} and we have a protocol handler in our browsers to handle that protocol. But every time someone views a page with several of these shortcut links, our logs FILL with stack traces like below. Can the code be updated to better catch and handle this specific type of IOException and possible not log this as an error, but maybe as a warning and not log a stack trace? {code} 2010-10-07 11:17:48,820 ERROR [http-80-12] [atlassian.confluence.util.GeneralUtil] completeUrlEncode Error while trying to encode the URL! -- referer: http://host/pages/editpage.action?pageId=28706460 | url: /display/SPACEKEY/Page+-+Name+Servers | userName: dhergert | action: viewpage | page: 28706460 java.net.MalformedURLException: Unknown protocol: ssh at java.net.URL.<init>(URL.java:601) at java.net.URL.<init>(URL.java:464) at java.net.URL.<init>(URL.java:413) at com.atlassian.confluence.util.CompleteURLEncoder.encode(CompleteURLEncoder.java:29) at com.atlassian.confluence.util.GeneralUtil.completeUrlEncode(GeneralUtil.java:275) at com.atlassian.confluence.links.linktypes.ShortcutLink.<init>(ShortcutLink.java:26) at com.atlassian.confluence.links.ConfluenceLinkResolver.makeShortcutLink(ConfluenceLinkResolver.java:178) at com.atlassian.confluence.links.ConfluenceLinkResolver.createLink(ConfluenceLinkResolver.java:123) at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy65.createLink(Unknown Source) at com.atlassian.renderer.v2.components.LinkRendererComponent.appendLink(LinkRendererComponent.java:138) at com.atlassian.renderer.v2.components.LinkRendererComponent.render(LinkRendererComponent.java:96) at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53) at com.atlassian.renderer.v2.plugin.PluggableV2Renderer.render(PluggableV2Renderer.java:30) at com.atlassian.renderer.v2.V2SubRenderer.render(V2SubRenderer.java:44) at com.atlassian.renderer.v2.components.table.TableBlockRenderer.prerenderLinks(TableBlockRenderer.java:96) at com.atlassian.renderer.v2.components.table.TableBlockRenderer.renderNextBlock(TableBlockRenderer.java:75) at com.atlassian.renderer.v2.components.block.BlockRendererComponent.applyBlockRenderers(BlockRendererComponent.java:164) at com.atlassian.renderer.v2.components.block.BlockRendererComponent.render(BlockRendererComponent.java:98) at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53) at com.atlassian.renderer.v2.plugin.PluggableV2Renderer.render(PluggableV2Renderer.java:30) at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57) at sun.reflect.GeneratedMethodAccessor331.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy58.convertWikiToXHtml(Unknown Source) at com.atlassian.confluence.pages.actions.ViewPageAction.execute(ViewPageAction.java:194) at net.customware.confluence.plugin.pageapproval.PageApprovalSpaceViewPageAction.execute(PageApprovalSpaceViewPageAction.java:81) <redacted for brevity > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584) at java.lang.Thread.run(Thread.java:619) {code}

    Atlassian JIRA | 6 years ago | David Hergert [Windstream]
    java.net.MalformedURLException: Unknown protocol: ssh
  3. 0

    If you create a shortcut link to a relative URL (as you might do if you had Confluence and JIRA installed on the same instance of tomcat), errors like the following are thrown when saving a page containing a shortcut link: {quote} 2009-07-02 11:52:25,316 ERROR [http-8080-2] [atlassian.confluence.util.GeneralUtil] completeUrlEncode Error while trying to encode the URL! -- url: /display/~admin/Home | page: 131076 | userName: admin | referer: http://localhost:8080/pages/editpage.action?pageId=131076 | action: vie\ wpage java.net.MalformedURLException: no protocol: /admin/browseshortcuts.action at java.net.URL.<init>(URL.java:567) at java.net.URL.<init>(URL.java:464) at java.net.URL.<init>(URL.java:413) at com.atlassian.confluence.util.CompleteURLEncoder.encode(CompleteURLEncoder.java:27) at com.atlassian.confluence.util.GeneralUtil.completeUrlEncode(GeneralUtil.java:385) at com.atlassian.confluence.links.linktypes.ShortcutLink.<init>(ShortcutLink.java:26) at com.atlassian.confluence.links.ConfluenceLinkResolver.makeShortcutLink(ConfluenceLinkResolver.java:177) at com.atlassian.confluence.links.ConfluenceLinkResolver.createLink(ConfluenceLinkResolver.java:122) {quote} Please see the attached log file for the full stack trace. The link works as expected, this issue is just regarding the handling of the error. The steps to reproduce are as follows: # create a shortcut link that references a relative URL # add a shortcut link to a page # save the page

    Atlassian JIRA | 7 years ago | Tony Atkins [Atlassian]
    java.net.MalformedURLException: no protocol: /admin/browseshortcuts.action
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    If you create a shortcut link to a relative URL (as you might do if you had Confluence and JIRA installed on the same instance of tomcat), errors like the following are thrown when saving a page containing a shortcut link: {quote} 2009-07-02 11:52:25,316 ERROR [http-8080-2] [atlassian.confluence.util.GeneralUtil] completeUrlEncode Error while trying to encode the URL! -- url: /display/~admin/Home | page: 131076 | userName: admin | referer: http://localhost:8080/pages/editpage.action?pageId=131076 | action: vie\ wpage java.net.MalformedURLException: no protocol: /admin/browseshortcuts.action at java.net.URL.<init>(URL.java:567) at java.net.URL.<init>(URL.java:464) at java.net.URL.<init>(URL.java:413) at com.atlassian.confluence.util.CompleteURLEncoder.encode(CompleteURLEncoder.java:27) at com.atlassian.confluence.util.GeneralUtil.completeUrlEncode(GeneralUtil.java:385) at com.atlassian.confluence.links.linktypes.ShortcutLink.<init>(ShortcutLink.java:26) at com.atlassian.confluence.links.ConfluenceLinkResolver.makeShortcutLink(ConfluenceLinkResolver.java:177) at com.atlassian.confluence.links.ConfluenceLinkResolver.createLink(ConfluenceLinkResolver.java:122) {quote} Please see the attached log file for the full stack trace. The link works as expected, this issue is just regarding the handling of the error. The steps to reproduce are as follows: # create a shortcut link that references a relative URL # add a shortcut link to a page # save the page

    Atlassian JIRA | 7 years ago | Tony Atkins [Atlassian]
    java.net.MalformedURLException: no protocol: /admin/browseshortcuts.action

  1. boussoffara med ali 11 times, last 1 week ago
  2. bmacedo 2 times, last 1 week ago
  3. Aria Pahlavan 41 times, last 3 weeks ago
  4. Andreas Häber 13 times, last 4 weeks ago
  5. ajinkya_w 21 times, last 2 months ago
33 more registered users
46 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.MalformedURLException

    Unknown protocol: ssh

    at java.net.URL.<init>()
  2. Java RT
    URL.<init>
    1. java.net.URL.<init>(URL.java:601)
    2. java.net.URL.<init>(URL.java:464)
    3. java.net.URL.<init>(URL.java:413)
    3 frames
  3. com.atlassian.confluence
    ConfluenceLinkResolver.createLink
    1. com.atlassian.confluence.util.CompleteURLEncoder.encode(CompleteURLEncoder.java:29)
    2. com.atlassian.confluence.util.GeneralUtil.completeUrlEncode(GeneralUtil.java:275)
    3. com.atlassian.confluence.links.linktypes.ShortcutLink.<init>(ShortcutLink.java:26)
    4. com.atlassian.confluence.links.ConfluenceLinkResolver.makeShortcutLink(ConfluenceLinkResolver.java:178)
    5. com.atlassian.confluence.links.ConfluenceLinkResolver.createLink(ConfluenceLinkResolver.java:123)
    5 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3. java.lang.reflect.Method.invoke(Method.java:597)
    3 frames
  5. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    3 frames
  6. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    1 frame
  7. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  8. Unknown
    $Proxy65.createLink
    1. $Proxy65.createLink(Unknown Source)
    1 frame
  9. com.atlassian.renderer
    V2RendererFacade.convertWikiToXHtml
    1. com.atlassian.renderer.v2.components.LinkRendererComponent.appendLink(LinkRendererComponent.java:138)
    2. com.atlassian.renderer.v2.components.LinkRendererComponent.render(LinkRendererComponent.java:96)
    3. com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53)
    4. com.atlassian.renderer.v2.plugin.PluggableV2Renderer.render(PluggableV2Renderer.java:30)
    5. com.atlassian.renderer.v2.V2SubRenderer.render(V2SubRenderer.java:44)
    6. com.atlassian.renderer.v2.components.table.TableBlockRenderer.prerenderLinks(TableBlockRenderer.java:96)
    7. com.atlassian.renderer.v2.components.table.TableBlockRenderer.renderNextBlock(TableBlockRenderer.java:75)
    8. com.atlassian.renderer.v2.components.block.BlockRendererComponent.applyBlockRenderers(BlockRendererComponent.java:164)
    9. com.atlassian.renderer.v2.components.block.BlockRendererComponent.render(BlockRendererComponent.java:98)
    10. com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53)
    11. com.atlassian.renderer.v2.plugin.PluggableV2Renderer.render(PluggableV2Renderer.java:30)
    12. com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57)
    12 frames
  10. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor331.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3. java.lang.reflect.Method.invoke(Method.java:597)
    3 frames
  11. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    3 frames
  12. com.atlassian.spring
    SpringProfilingInterceptor.invoke
    1. com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
    1 frame
  13. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    1 frame
  14. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    1 frame
  15. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  16. Unknown
    $Proxy58.convertWikiToXHtml
    1. $Proxy58.convertWikiToXHtml(Unknown Source)
    1 frame
  17. com.atlassian.confluence
    ViewPageAction.execute
    1. com.atlassian.confluence.pages.actions.ViewPageAction.execute(ViewPageAction.java:194)
    1 frame
  18. net.customware.confluence
    PageApprovalSpaceViewPageAction.execute
    1. net.customware.confluence.plugin.pageapproval.PageApprovalSpaceViewPageAction.execute(PageApprovalSpaceViewPageAction.java:81)
    1 frame