java.net.MalformedURLException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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
    via by Tony Atkins [Atlassian],
  • 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
    via by Tony Atkins [Atlassian],
  • 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}
    via by David Hergert [Windstream],
  • 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}
    via by David Hergert [Windstream],
  • JSP « Võ Văn Hải's blog
    via by Unknown author,
  • Re: LTS 1.424.1 RC
    via by vjuranek,
  • URL is malformed
    via GitHub by matteosister
    ,
  • Scans 总是抛异常
    via GitHub by zozoh
    ,
    • 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)

    Users with the same issue

    Unknown visitor
    Unknown visitor4 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    93 more bugmates