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

NullPointerException when creating ScalingPolicyController #249

Closed
danielhunt opened this issue Feb 18, 2013 · 5 comments
Closed

NullPointerException when creating ScalingPolicyController #249

danielhunt opened this issue Feb 18, 2013 · 5 comments

Comments

@danielhunt
Copy link

Ubuntu 12.10, running the latest standalone jar (v1.1.1) file from https://netflix.box.com/asgard

After creating an application and ASG, I went to add a scaling policy, and got a NullPointerException

Error 500: Executing action [show] of controller [com.netflix.asgard.ScalingPolicyController] caused exception: Runtime error executing action
Servlet: grails
URI: /grails/scalingPolicy/show.dispatch
Exception Message: 
Caused by: 
Class: ScalingPolicyController 
At Line: [83] 
Code Snippet:
<blank>
java.lang.NullPointerException
    at com.sun.beans.TypeResolver.resolve(TypeResolver.java:332)
    at com.sun.beans.TypeResolver.resolve(TypeResolver.java:362)
    at com.sun.beans.TypeResolver.resolve(TypeResolver.java:172)
    at com.sun.beans.TypeResolver.resolveInClass(TypeResolver.java:93)
    at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:387)
    at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:114)
    at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:72)
    at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:56)
    at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1131)
    at java.beans.Introspector.getBeanInfo(Introspector.java:414)
    at java.beans.Introspector.getBeanInfo(Introspector.java:161)
    at com.netflix.asgard.CachedMap.putAllAndRemoveMissing(CachedMap.groovy:256)
    at com.netflix.asgard.AwsCloudWatchService.getAlarms(AwsCloudWatchService.groovy:103)
    at com.netflix.asgard.ScalingPolicyController$_closure4.doCall(ScalingPolicyController.groovy:83)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
    at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
@jgritman
Copy link
Contributor

This is a know issue with Java 7 and Asgard. We checked in a fix (#246) last week.

For now, you can either switch to Java 6 or build Asgard from source. We'll try to have new release version of Asgard published by the end of the week containing the fix.

@danielhunt
Copy link
Author

Ah - thanks for the detail.
I'm happy to wait for the next release - it's not critical for me right now.

If that changes, I'll just grab the source and build it myself.

@phstc
Copy link

phstc commented Mar 16, 2013

I'm having a similar error using Java "1.6.0_24". I get the error bellow trying to create an autoscaling policy or trying to access an already created. Even with an error, the policy is created.

Error 500: Executing action [show] of controller [com.netflix.asgard.ScalingPolicyController] caused exception: Runtime error executing action
Servlet: grails
URI: /asgard/grails/scalingPolicy/show.dispatch
Exception Message: 
Caused by: 
Class: ScalingPolicyController 
At Line: [83] 
Code Snippet:


java.lang.NullPointerException

    at com.sun.beans.TypeResolver.resolve(TypeResolver.java:321)

    at com.sun.beans.TypeResolver.resolve(TypeResolver.java:351)

    at com.sun.beans.TypeResolver.resolve(TypeResolver.java:172)

    at com.sun.beans.TypeResolver.resolveInClass(TypeResolver.java:93)

    at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:385)

    at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:116)

    at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:74)

    at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:58)

    at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1200)

    at java.beans.Introspector.getBeanInfo(Introspector.java:424)

    at java.beans.Introspector.getBeanInfo(Introspector.java:190)

    at com.netflix.asgard.CachedMap.putAllAndRemoveMissing(CachedMap.groovy:256)

    at com.netflix.asgard.AwsCloudWatchService.getAlarms(AwsCloudWatchService.groovy:103)

    at com.netflix.asgard.ScalingPolicyController$_closure4.doCall(ScalingPolicyController.groovy:83)

    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)

    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)

    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)

    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)

    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380)

    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)

    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)

    at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)

    at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)

    at de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

    at java.lang.Thread.run(Thread.java:679)

@joesondow
Copy link
Contributor

@phstc Do you know if you were running OpenJDK or Oracle JDK when you saw the NullPointerException in TypeResolver? I've seen TypeResolver errors in the past when running on OpenJDK 6. Switching to Oracle JDK 6 fixed the problem at the time.

It's also possible that some of your Asgard files were cached in Tomcat's work directory, so replacing the Asgard war file wasn't sufficient for a complete upgrade. If you still the see the problem, try stopping Tomcat, replacing the Asgard war with the latest release, then deleting Tomcat's work directory, then restarting Tomcat.

@phstc
Copy link

phstc commented May 23, 2013

I got these errors running Oracle JDK. Now, I'm using only the standalone version, it is working well.

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

4 participants