You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Michele Mazzucco (JIRA)" <ji...@apache.org> on 2008/01/11 23:42:34 UTC

[jira] Created: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Options.getProperty() causes StackOverflowError if the property is not defined
------------------------------------------------------------------------------

                 Key: AXIS2-3441
                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.3
         Environment: axis2 1.3, java 1.5
            Reporter: Michele Mazzucco
            Priority: Blocker


Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.

java.lang.StackOverflowError
	at java.util.HashMap.get(HashMap.java:343)
	at org.apache.axis2.client.Options.getProperty(Options.java:346)
	at org.apache.axis2.client.Options.getProperty(Options.java:349)
	at org.apache.axis2.client.Options.getProperty(Options.java:349)
	at org.apache.axis2.client.Options.getProperty(Options.java:349)
	at org.apache.axis2.client.Options.getProperty(Options.java:349)
       .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-3441:
------------------------------------

    Fix Version/s:     (was: 1.4)

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581948#action_12581948 ] 

Davanum Srinivas commented on AXIS2-3441:
-----------------------------------------

Michele,

I can understand that "msgCtx.getOptions().setParent(msgCtx.getOptions()); " causes the issue. We need to find the exact place where this is happening and not just fix the symptom. 

-- dims

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Michele Mazzucco (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558226#action_12558226 ] 

Michele Mazzucco commented on AXIS2-3441:
-----------------------------------------

As I said the problem arises only if the property is not set (or if it's set to null).

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Priority: Blocker
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581960#action_12581960 ] 

Davanum Srinivas commented on AXIS2-3441:
-----------------------------------------

So how about in the constructor of Options, we add a small check to see if the parent is itself, then we throw an exception?

-- dims

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558157#action_12558157 ] 

Andreas Veithen commented on AXIS2-3441:
----------------------------------------

Do you use the MessageContext#setOptions method in your code?

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Priority: Blocker
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Michele Mazzucco (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582072#action_12582072 ] 

Michele Mazzucco commented on AXIS2-3441:
-----------------------------------------

I don't see the necessity, it's just that implementing equals/hashCode is never a bad idea.

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574338#action_12574338 ] 

Davanum Srinivas commented on AXIS2-3441:
-----------------------------------------

Looks like the work around is to be careful when we call setOptions. does not hurt if we add additional checks as Michele notes...but not a blocker.

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Michele Mazzucco (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581947#action_12581947 ] 

Michele Mazzucco commented on AXIS2-3441:
-----------------------------------------

Here it is

public class OptionsTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws AxisFault{
		ServiceClient sender = new ServiceClient();
		MessageContext msgCtx = new MessageContext();
		msgCtx.getOptions().setProperty("TARGET_SERVICE", "SERVICE1"); 
		msgCtx.getOptions().setProperty("TARGET_ACTION_MAPPING", "urn:echo"); 
		msgCtx.getOptions().setProperty("COOKIE", "cookie"); 
		
                // somewhere in the axis2 code there is a call like this where the parent is set to the same object
		msgCtx.getOptions().setParent(msgCtx.getOptions());
		
		Options options = new Options(msgCtx.getOptions());
		
		System.out.println(options.getProperty("TARGET_SERVICE1"));
	}

}


> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-3441:
------------------------------------

    Priority: Critical  (was: Blocker)

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582053#action_12582053 ] 

Andreas Veithen commented on AXIS2-3441:
----------------------------------------

To keep it simple I would use ==. Why do you want to test for equality instead of identity?

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Michele Mazzucco (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582061#action_12582061 ] 

Michele Mazzucco commented on AXIS2-3441:
-----------------------------------------

Andreas,

if you implement equals() you have to implement hashCode() as well. 
Now, you can compute the hash code by using all or only some of the fields, but the same fields *must* be used into the equals() method.

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558228#action_12558228 ] 

Andreas Veithen commented on AXIS2-3441:
----------------------------------------

The stack trace indicates that the problem comes from an Options object having its parent set to itself (or being part of some other form of circular parent-child relationship). The only way this can happen to the Options object linked to a MessageContext is when MessageContext#setOptions is used. Therefore I repeat my question: do you use this method in any way in your code?

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Priority: Blocker
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581920#action_12581920 ] 

Davanum Srinivas commented on AXIS2-3441:
-----------------------------------------

won't target for 1.4 unless we get a patch / test case. 

-- dims

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>             Fix For: 1.4
>
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Michele Mazzucco (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581964#action_12581964 ] 

Michele Mazzucco commented on AXIS2-3441:
-----------------------------------------

That's OK for me. 
hashCode() and equals() must be implemented though. To keep it simple and fast I would use a counter (or UUID) and use only that field.

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582064#action_12582064 ] 

Andreas Veithen commented on AXIS2-3441:
----------------------------------------

Michele,

I know the contract of the equals and hashCode methods. My question was why do you see the necessity to implement equals, i.e. to check for equality (Object#equals) instead of identity (==).

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe resolved AXIS2-3441.
--------------------------------------

    Resolution: Fixed

Applied the patch , thank you for that

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>         Attachments: AXIS2-3441.patch
>
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Michele Mazzucco (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581956#action_12581956 ] 

Michele Mazzucco commented on AXIS2-3441:
-----------------------------------------

- MessageContext.setOptions(), or
- OperationClient: the constructor calls new Options(options) and 
a - OutInAxisOperationClient.send() calls MessageContext.setOptions(new Options(options))
b - OperationClient.prepareMessageContext()  calls MessageContext.setOptions(new Options(options))

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-3441:
----------------------------------------

    Assignee: Deepal Jayasinghe

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3441) Options.getProperty() causes StackOverflowError if the property is not defined

Posted by "Michele Mazzucco (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michele Mazzucco updated AXIS2-3441:
------------------------------------

    Fix Version/s: 1.4

should fix in version 1.4

> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-3441
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3441
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: axis2 1.3, java 1.5
>            Reporter: Michele Mazzucco
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>             Fix For: 1.4
>
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any value (or points to null). The same applies to almost all get methods (i.e. getReplyTo).
> The problem is that if the returned value is null the value is searched on the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> 	at java.util.HashMap.get(HashMap.java:343)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:346)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
> 	at org.apache.axis2.client.Options.getProperty(Options.java:349)
>        .... and so on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org