Nitz
Nitz

Reputation: 31

WSO2 Identity Server - Concurrency Issue

We are working with WSO2 IS, v5.1.0. When testing, we got the following results:

  1. When running one suite of tests, all works ok.
  2. When running concurrent tests, meaning - concurrent requests are being sent, we got NPE. Moreover, We got "200" on adding two users, for example, but then when trying to query and get both of them, we got a message that 2 values were expected but only 1 is returned.

Any idea how can I solve this issue? what is causing it? Let me know if any further info is required.

Thanks!

Upvotes: 3

Views: 224

Answers (1)

gusto2
gusto2

Reputation: 12087

Now I see..

there are two issues in the WSO2 IS 5.1.0 you can / have to fix.

Use of the embedded JSP pages

First - see there's a difference in the parameters of the wso2server.bat/.sh and the bin/yajsw/wrapper.conf. In the wrapper.conf add:

wrapper.java.additional.27 = -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false

please change the parameter order to fit your parameter list

StringUtil bundle dependency

Here comes the NPE stacktrace in play and without it, you cannot pinpoint the exact problem. Apparently the some UI bundles are having invalid dependencies specified, particularly there's no dependency specified to the Commons-Lang StringUtil package which is used.

We have solved it by following actions:

  • download and copy commons-lang-2.6.jar into the repository/components/dropins
  • create a new OSGi bundle (assuming you know Java and how to create OSGi bundle fragments) which imports org.apache.commons.lang;version="[2.6,3)" and is a fragment to the org.wso2.carbon.identity.mgt.ui bundle. Copy this bundle to the dropins folder.
  • create a new OSGi bundle which imports org.apache.commons.lang;version="[2.6,3)" and is a fragment to the org.wso2.carbon.identity.application.mgt.ui bundle. Copy this bundle to the dropins folder.

Edit:

part of the maven plugin to generate the bundles

        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <version>2.3.7</version>
            <extensions>true</extensions>
            <configuration>
                <instructions>
                    <Fragment-Host>org.wso2.carbon.identity.application.mgt.ui</Fragment-Host>
                    <Import-Package>org.apache.commons.lang.*</Import-Package>
                    <!--
                    <Export-Package>org.apache.commons.lang.*</Export-Package>
                    <Embed-Dependency>commons-lang</Embed-Dependency>
                    -->
                </instructions>
            </configuration>
        </plugin>

There are multiple bundles having this issue, but to get the IS 5.1.0 usable, at least these bundles were necessary to fix.

In all cases, this answer is still based on assumptions and our experience rather than evidence (the stacktrace).

g

Upvotes: 1

Related Questions