You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by um...@wipro.com on 2010/06/01 13:10:45 UTC

Shindig with Java Security Enabled

We are using shindig to render gadgets in our application. Our
application requires Java 2 Security to be enabled in WebSphere
Application server. We enabled java 2 security and ran a load test on
shindig and following exception is thrown in logs:

"WebContainer : 33" daemon prio=3 tid=0x02de2db8 nid=0xcbc waiting on
condition [0x938fd000..0x938ff970]
        at sun.misc.Unsafe.park(Native Method)
        at
java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
        at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterr
upt(AbstractQueuedSynchronizer.java:716)
        at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(Abst
ractQueuedSynchronizer.java:746)
        at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQu
euedSynchronizer.java:1076)
        at
java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.
java:184)
        at
java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:256)
        at
com.google.common.collect.CustomConcurrentHashMap$Impl$Segment.put(Custo
mConcurrentHashMap.java:922)
        at
com.google.common.collect.CustomConcurrentHashMap$Impl.put(CustomConcurr
entHashMap.java:1434)
        at
org.apache.shindig.common.cache.SoftExpiringCache.addElement(SoftExpirin
gCache.java:90)
        at
org.apache.shindig.gadgets.DefaultGadgetSpecFactory.fetchObject(DefaultG
adgetSpecFactory.java:143)
        at
org.apache.shindig.gadgets.DefaultGadgetSpecFactory.getGadgetSpec(Defaul
tGadgetSpecFactory.java:88)
        at
org.apache.shindig.gadgets.process.Processor.process(Processor.java:85)
        at
org.apache.shindig.gadgets.render.Renderer.render(Renderer.java:71)
        at
org.apache.shindig.gadgets.servlet.GadgetRenderingServlet.render(GadgetR
enderingServlet.java:83)
        at
org.apache.shindig.gadgets.servlet.GadgetRenderingServlet.doGet(GadgetRe
nderingServlet.java:185)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:1096)
        at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:1037)
        at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:145)
        at
org.apache.shindig.auth.AuthenticationServletFilter.callChain(Authentica
tionServletFilter.java:123)
        at
org.apache.shindig.auth.AuthenticationServletFilter.doFilter(Authenticat
ionServletFilter.java:86)
        at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:190)
        at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:130)
        at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
hain.java:87)
        at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
Manager.java:832)
        at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
Manager.java:679)
        at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
per.java:566)
        at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr
apper.java:478)
        at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheS
ervletWrapper.java:90)
        at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748
)


We found that the above mentioned exception was caused by a line of code
in DefaultGadetSpecFactory.java. The Code - cache.addElement(uri, obj,
refresh) and line number is 143. If this line of code is commented out,
no exception is thrown.

But the above mentioned exception was not thrown if java security not
enabled.

Please provide us the solution to eliminate the above mentioned
exception.

Thanks,
Uma

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

Re: Shindig with Java Security Enabled

Posted by Paul Lindner <li...@inuus.com>.
Hi Uma,

The stack trace you show appears to be output from a thread dump.  Shindig
uses Google Collections MapMaker which uses a technique similar to a
WeakHashmap to store data.  Are you sure that you've given enough memory to
the heap?  Which version of Java?  What load runner?

The code you commented out basically disables the in-memory cache..

On Tue, Jun 1, 2010 at 4:10 AM, <um...@wipro.com> wrote:

> We are using shindig to render gadgets in our application. Our
> application requires Java 2 Security to be enabled in WebSphere
> Application server. We enabled java 2 security and ran a load test on
> shindig and following exception is thrown in logs:
>
> "WebContainer : 33" daemon prio=3 tid=0x02de2db8 nid=0xcbc waiting on
> condition [0x938fd000..0x938ff970]
>        at sun.misc.Unsafe.park(Native Method)
>        at
> java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
>        at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterr
> upt(AbstractQueuedSynchronizer.java:716)
>        at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(Abst
> ractQueuedSynchronizer.java:746)
>        at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQu
> euedSynchronizer.java:1076)
>        at
> java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.
> java:184)
>        at
> java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:256)
>        at
> com.google.common.collect.CustomConcurrentHashMap$Impl$Segment.put(Custo
> mConcurrentHashMap.java:922)
>        at
> com.google.common.collect.CustomConcurrentHashMap$Impl.put(CustomConcurr
> entHashMap.java:1434)
>        at
> org.apache.shindig.common.cache.SoftExpiringCache.addElement(SoftExpirin
> gCache.java:90)
>        at
> org.apache.shindig.gadgets.DefaultGadgetSpecFactory.fetchObject(DefaultG
> adgetSpecFactory.java:143)
>        at
> org.apache.shindig.gadgets.DefaultGadgetSpecFactory.getGadgetSpec(Defaul
> tGadgetSpecFactory.java:88)
>        at
> org.apache.shindig.gadgets.process.Processor.process(Processor.java:85)
>        at
> org.apache.shindig.gadgets.render.Renderer.render(Renderer.java:71)
>        at
> org.apache.shindig.gadgets.servlet.GadgetRenderingServlet.render(GadgetR
> enderingServlet.java:83)
>        at
> org.apache.shindig.gadgets.servlet.GadgetRenderingServlet.doGet(GadgetRe
> nderingServlet.java:185)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>        at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:1096)
>        at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:1037)
>        at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
> ain.java:145)
>        at
> org.apache.shindig.auth.AuthenticationServletFilter.callChain(Authentica
> tionServletFilter.java:123)
>        at
> org.apache.shindig.auth.AuthenticationServletFilter.doFilter(Authenticat
> ionServletFilter.java:86)
>        at
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
> anceWrapper.java:190)
>        at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
> ain.java:130)
>        at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
> hain.java:87)
>        at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:832)
>        at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:679)
>        at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
> per.java:566)
>        at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr
> apper.java:478)
>        at
> com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheS
> ervletWrapper.java:90)
>        at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748
> )
>
>
> We found that the above mentioned exception was caused by a line of code
> in DefaultGadetSpecFactory.java. The Code - cache.addElement(uri, obj,
> refresh) and line number is 143. If this line of code is commented out,
> no exception is thrown.
>
> But the above mentioned exception was not thrown if java security not
> enabled.
>
> Please provide us the solution to eliminate the above mentioned
> exception.
>
> Thanks,
> Uma
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>