You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Jo...@eventim.de on 2009/12/10 15:29:08 UTC

Caught in the while-loop

Hi all,

 

Recently I've noticed a high cpu load on my machine. The problem was a
thread caught in the while loop from the HashMap class.

Here is the stacktrace:

 

   java.lang.Thread.State: RUNNABLE

            at java.util.HashMap.get(Unknown Source)

            at
org.apache.velocity.util.introspection.ClassMap$MethodCache.get(ClassMap
.java:249)

            at
org.apache.velocity.util.introspection.ClassMap.findMethod(ClassMap.java
:102)

            at
org.apache.velocity.util.introspection.IntrospectorBase.getMethod(Intros
pectorBase.java:105)

            at
org.apache.velocity.util.introspection.Introspector.getMethod(Introspect
or.java:94)

            at
org.apache.velocity.runtime.parser.node.PropertyExecutor.discover(Proper
tyExecutor.java:99)

            at
org.apache.velocity.runtime.parser.node.PropertyExecutor.<init>(Property
Executor.java:56)

            at
org.apache.velocity.util.introspection.UberspectImpl.getPropertyGet(Uber
spectImpl.java:246)

            at
org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentif
ier.java:148)

            at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReferenc
e.java:252)

            at
org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReferen
ce.java:460)

            at
org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpres
sion.java:62)

            at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfState
ment.java:85)

            at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
a:336)

            at
org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)

            at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
.java:175)

            at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
a:336)

            at
org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)

            at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
.java:175)

            at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
a:336)

            at org.apache.velocity.Template.merge(Template.java:328)

 

It seems that the reason is concurrent access to the get and put methods
of HashMap which are not synchronized. Is this the problem?

 

Best Regards,

Johann


Re: Caught in the while-loop

Posted by Nathan Bubna <nb...@gmail.com>.
Ick.  I haven't time to investigate right now.  Can you open a bug
report so this is not forgotten?

2009/12/10 Johann.Weber <Jo...@eventim.de>:
> Sorry, it's Apache Velocity v1.6.2 (compiled: 2009-02-19 16:29:46)
>
> -----Ursprüngliche Nachricht-----
> Von: Nathan Bubna [mailto:nbubna@gmail.com]
> Gesendet: Donnerstag, 10. Dezember 2009 17:56
> An: Velocity Users List
> Betreff: Re: Caught in the while-loop
>
> Ick.  Version?
>
> 2009/12/10 Johann.Weber <Jo...@eventim.de>:
>> Hi all,
>>
>>
>>
>> Recently I've noticed a high cpu load on my machine. The problem was a
>> thread caught in the while loop from the HashMap class.
>>
>> Here is the stacktrace:
>>
>>
>>
>>   java.lang.Thread.State: RUNNABLE
>>
>>            at java.util.HashMap.get(Unknown Source)
>>
>>            at
>> org.apache.velocity.util.introspection.ClassMap$MethodCache.get(ClassMap
>> .java:249)
>>
>>            at
>> org.apache.velocity.util.introspection.ClassMap.findMethod(ClassMap.java
>> :102)
>>
>>            at
>> org.apache.velocity.util.introspection.IntrospectorBase.getMethod(Intros
>> pectorBase.java:105)
>>
>>            at
>> org.apache.velocity.util.introspection.Introspector.getMethod(Introspect
>> or.java:94)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.PropertyExecutor.discover(Proper
>> tyExecutor.java:99)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.PropertyExecutor.<init>(Property
>> Executor.java:56)
>>
>>            at
>> org.apache.velocity.util.introspection.UberspectImpl.getPropertyGet(Uber
>> spectImpl.java:246)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentif
>> ier.java:148)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReferenc
>> e.java:252)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReferen
>> ce.java:460)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpres
>> sion.java:62)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfState
>> ment.java:85)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
>> a:336)
>>
>>            at
>> org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
>> .java:175)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
>> a:336)
>>
>>            at
>> org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
>> .java:175)
>>
>>            at
>> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
>> a:336)
>>
>>            at org.apache.velocity.Template.merge(Template.java:328)
>>
>>
>>
>> It seems that the reason is concurrent access to the get and put methods
>> of HashMap which are not synchronized. Is this the problem?
>>
>>
>>
>> Best Regards,
>>
>> Johann
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


AW: Caught in the while-loop

Posted by Jo...@eventim.de.
Sorry, it's Apache Velocity v1.6.2 (compiled: 2009-02-19 16:29:46)

-----Ursprüngliche Nachricht-----
Von: Nathan Bubna [mailto:nbubna@gmail.com] 
Gesendet: Donnerstag, 10. Dezember 2009 17:56
An: Velocity Users List
Betreff: Re: Caught in the while-loop

Ick.  Version?

2009/12/10 Johann.Weber <Jo...@eventim.de>:
> Hi all,
>
>
>
> Recently I've noticed a high cpu load on my machine. The problem was a
> thread caught in the while loop from the HashMap class.
>
> Here is the stacktrace:
>
>
>
>   java.lang.Thread.State: RUNNABLE
>
>            at java.util.HashMap.get(Unknown Source)
>
>            at
> org.apache.velocity.util.introspection.ClassMap$MethodCache.get(ClassMap
> .java:249)
>
>            at
> org.apache.velocity.util.introspection.ClassMap.findMethod(ClassMap.java
> :102)
>
>            at
> org.apache.velocity.util.introspection.IntrospectorBase.getMethod(Intros
> pectorBase.java:105)
>
>            at
> org.apache.velocity.util.introspection.Introspector.getMethod(Introspect
> or.java:94)
>
>            at
> org.apache.velocity.runtime.parser.node.PropertyExecutor.discover(Proper
> tyExecutor.java:99)
>
>            at
> org.apache.velocity.runtime.parser.node.PropertyExecutor.<init>(Property
> Executor.java:56)
>
>            at
> org.apache.velocity.util.introspection.UberspectImpl.getPropertyGet(Uber
> spectImpl.java:246)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentif
> ier.java:148)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReferenc
> e.java:252)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReferen
> ce.java:460)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpres
> sion.java:62)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfState
> ment.java:85)
>
>            at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
> a:336)
>
>            at
> org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
> .java:175)
>
>            at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
> a:336)
>
>            at
> org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
> .java:175)
>
>            at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
> a:336)
>
>            at org.apache.velocity.Template.merge(Template.java:328)
>
>
>
> It seems that the reason is concurrent access to the get and put methods
> of HashMap which are not synchronized. Is this the problem?
>
>
>
> Best Regards,
>
> Johann
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Caught in the while-loop

Posted by Nathan Bubna <nb...@gmail.com>.
Ick.  Version?

2009/12/10 Johann.Weber <Jo...@eventim.de>:
> Hi all,
>
>
>
> Recently I've noticed a high cpu load on my machine. The problem was a
> thread caught in the while loop from the HashMap class.
>
> Here is the stacktrace:
>
>
>
>   java.lang.Thread.State: RUNNABLE
>
>            at java.util.HashMap.get(Unknown Source)
>
>            at
> org.apache.velocity.util.introspection.ClassMap$MethodCache.get(ClassMap
> .java:249)
>
>            at
> org.apache.velocity.util.introspection.ClassMap.findMethod(ClassMap.java
> :102)
>
>            at
> org.apache.velocity.util.introspection.IntrospectorBase.getMethod(Intros
> pectorBase.java:105)
>
>            at
> org.apache.velocity.util.introspection.Introspector.getMethod(Introspect
> or.java:94)
>
>            at
> org.apache.velocity.runtime.parser.node.PropertyExecutor.discover(Proper
> tyExecutor.java:99)
>
>            at
> org.apache.velocity.runtime.parser.node.PropertyExecutor.<init>(Property
> Executor.java:56)
>
>            at
> org.apache.velocity.util.introspection.UberspectImpl.getPropertyGet(Uber
> spectImpl.java:246)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentif
> ier.java:148)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReferenc
> e.java:252)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReferen
> ce.java:460)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpres
> sion.java:62)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfState
> ment.java:85)
>
>            at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
> a:336)
>
>            at
> org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
> .java:175)
>
>            at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
> a:336)
>
>            at
> org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)
>
>            at
> org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
> .java:175)
>
>            at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
> a:336)
>
>            at org.apache.velocity.Template.merge(Template.java:328)
>
>
>
> It seems that the reason is concurrent access to the get and put methods
> of HashMap which are not synchronized. Is this the problem?
>
>
>
> Best Regards,
>
> Johann
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org