You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Andreas Schaefer <sc...@me.com.INVALID> on 2018/07/03 21:06:23 UTC

Failure to open Composum on latest Sling

Hi

I just checked out the latest from Sling GIT repo and built org-apache-sling-starter (mvn --update-snapshots clean install). When I start the resulting standalone jar file opening Composum fails with:

java.lang.NullPointerException
	at com.composum.sling.core.util.LinkUtil.getExtension(LinkUtil.java:342)
	at com.composum.sling.core.util.LinkUtil.getExtension(LinkUtil.java:299)
	at com.composum.sling.core.util.LinkUtil.getUrl(LinkUtil.java:136)
	at com.composum.sling.core.util.LinkUtil.getUrl(LinkUtil.java:94)
	at com.composum.sling.core.util.LinkUtil.getUrl(LinkUtil.java:45)
	at com.composum.sling.core.servlet.AbstractConsoleServlet.doGet(AbstractConsoleServlet.java:80)

I tried to reverse the logic in that line:

//                    if (resourceType != null && !content.getPrimaryType().equals(resourceType)) {
                    if (resourceType != null && !resourceType.equals(content.getPrimaryType())) {

But then I still cannot bring up Composum.

Cheers - Andy Schaefer

Re: Failure to open Composum on latest Sling

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Tuesday 03 July 2018 14:06:23 Andreas Schaefer wrote:
> Hi

Hi,

> I just checked out the latest from Sling GIT repo and built
> org-apache-sling-starter (mvn --update-snapshots clean install). When I
> start the resulting standalone jar file opening Composum fails with:
> 
> java.lang.NullPointerException
> 	at com.composum.sling.core.util.LinkUtil.getExtension(LinkUtil.java:342)
> 	at com.composum.sling.core.util.LinkUtil.getExtension(LinkUtil.java:299)
> 	at com.composum.sling.core.util.LinkUtil.getUrl(LinkUtil.java:136)
> 	at com.composum.sling.core.util.LinkUtil.getUrl(LinkUtil.java:94)
> 	at com.composum.sling.core.util.LinkUtil.getUrl(LinkUtil.java:45)
> 	at
> com.composum.sling.core.servlet.AbstractConsoleServlet.doGet(AbstractConsol
> eServlet.java:80)
> 
> I tried to reverse the logic in that line:
> 
> //                    if (resourceType != null &&
> !content.getPrimaryType().equals(resourceType)) { if (resourceType != null
> && !resourceType.equals(content.getPrimaryType())) {
> 
> But then I still cannot bring up Composum.

this is a known and fixed issue (see Composum #132).

Regards,
O.

> Cheers - Andy Schaefer


Re: Failure to open Composum on latest Sling

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Andy,

On Tue, Jul 3, 2018 at 11:06 PM Andreas Schaefer
<sc...@me.com.invalid> wrote:
...
> java.lang.NullPointerException
>         at com.composum.sling.core.util.LinkUtil.getExtension(LinkUtil.java:342) ...

FWIW, I get the same error at http://localhost:8080/bin/browser.html
if not logged in, but that URL works after logging in as admin.

-Bertrand