Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Message not helpful #1676

Open
rrayst opened this issue Mar 3, 2025 · 0 comments
Open

Error Message not helpful #1676

rrayst opened this issue Mar 3, 2025 · 0 comments

Comments

@rrayst
Copy link
Contributor

rrayst commented Mar 3, 2025

Message:

************** Configuration Error ***********************************

Could not init auth in OAuth2Resource2Interceptor

Reason: java.lang.NullPointerException: Cannot invoke "String.isEmpty()" because the return value of "java.net.URI.getQuery()" is null


Giving up.

Check proxies.xml file for errors.

proxies.xml content:

<spring:beans xmlns:spring="http://www.springframework.org/schema/beans"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns="http://membrane-soa.org/proxies/1/" xmlns:lang="http://www.springframework.org/schema/lang"
              xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
                                            http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd">

    <spring:bean id="propertyPlaceholder" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <spring:property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
        <spring:property name="ignoreResourceNotFound" value="true"/>
        <spring:property name="locations">
            <spring:list>
                <spring:value>file:/file.properties</spring:value>
            </spring:list>
        </spring:property>
    </spring:bean>

    <router>

        <internal name="ms">
            <log body="true" />
            <target host="login.microsoftonline.com"><ssl/></target>
        </internal>

        <api port="80">
            <path>/grafana</path>
            <setHeader name="X-Forwarded-Proto" value="https" />
            <oauth2Resource2>
                <membrane src="internal://ms/${TENANT_ID}/v2.0" clientId="${CLIENT_ID}"
                    clientSecret="${GRAFANA_CLIENT_SECRET}" scope="openid" subject="oid">
                </membrane>
            </oauth2Resource2>
            <target host="demo-backend" />
        </api>

    </router>

</spring:beans>

what is the problem? - no way to find out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant