Bug 807452 - refresh pools FAILS WITH: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (rules#737)]
Summary: refresh pools FAILS WITH: org.quartz.SchedulerException: Job threw an unhandl...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Bryan Kearney
QA Contact: Eric Sammons
URL:
Whiteboard:
Depends On:
Blocks: 738066
TreeView+ depends on / blocked
 
Reported: 2012-03-27 20:08 UTC by John Sefler
Modified: 2015-05-14 16:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-17 13:04:56 UTC


Attachments (Terms of Use)

Description John Sefler 2012-03-27 20:08:43 UTC
Description of problem:
After creating products (with a sockets attribute whose value is null) and a subscription that provides these products, a call to refresh pools is failing.



Version-Release number of selected component (if applicable):
[root@jsefler-f14-candlepin candlepin]# git branch
  0.2
  0.3
* master
[root@jsefler-f14-candlepin candlepin]# git show-ref | grep master
530c189e4f0d6984638b5274500a74eeff3d42c5 refs/heads/master
530c189e4f0d6984638b5274500a74eeff3d42c5 refs/remotes/origin/master
[root@jsefler-f14-candlepin candlepin]# 
[root@jsefler-f14-candlepin candlepin]# curl -k -u testuser1:password --stderr /dev/null https://jsefler-f14-candlepin:8443/candlepin/status | python -m simplejson/tool
{
    "release": "1", 
    "result": true, 
    "standalone": true, 
    "timeUTC": "2012-03-27T18:43:03.938+0000", 
    "version": "0.5.26"
}


How reproducible:


Steps to Reproduce:

[root@jsefler-r63-server ~]# curl --stderr /dev/null --insecure --user admin:admin --request POST --data '{"id":"9000","name":"Awesome OS for null sockets BITS","attributes":[{"name":"warning_period","value":"30"},{"name":"sockets"},{"name":"arch","value":"ALL"},{"name":"type","value":"SVC"},{"name":"variant","value":"server"},{"name":"version","value":"0.0"}],"multiplier":1}' --header 'accept: application/json' --header 'content-type: application/json' https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/products | python -m simplejson/tool
{
    "attributes": [
        {
            "created": "2012-03-27T19:54:12.368+0000", 
            "name": "variant", 
            "updated": "2012-03-27T19:54:12.368+0000", 
            "value": "server"
        }, 
        {
            "created": "2012-03-27T19:54:12.368+0000", 
            "name": "arch", 
            "updated": "2012-03-27T19:54:12.368+0000", 
            "value": "ALL"
        }, 
        {
            "created": "2012-03-27T19:54:12.368+0000", 
            "name": "type", 
            "updated": "2012-03-27T19:54:12.368+0000", 
            "value": "SVC"
        }, 
        {
            "created": "2012-03-27T19:54:12.368+0000", 
            "name": "warning_period", 
            "updated": "2012-03-27T19:54:12.368+0000", 
            "value": "30"
        }, 
        {
            "created": "2012-03-27T19:54:12.368+0000", 
            "name": "sockets", 
            "updated": "2012-03-27T19:54:12.368+0000", 
            "value": null
        }, 
        {
            "created": "2012-03-27T19:54:12.368+0000", 
            "name": "version", 
            "updated": "2012-03-27T19:54:12.368+0000", 
            "value": "0.0"
        }
    ], 
    "created": "2012-03-27T19:54:12.368+0000", 
    "dependentProductIds": [], 
    "href": "/products/9000", 
    "id": "9000", 
    "multiplier": 1, 
    "name": "Awesome OS for null sockets BITS", 
    "productContent": [], 
    "updated": "2012-03-27T19:54:12.368+0000"
}
[root@jsefler-r63-server ~]# 
[root@jsefler-r63-server ~]# 
[root@jsefler-r63-server ~]# curl --stderr /dev/null --insecure --user admin:admin --request POST --data '{"id":"null-sockets","name":"Awesome OS for null sockets","attributes":[{"name":"warning_period","value":"30"},{"name":"sockets"},{"name":"arch","value":"ALL"},{"name":"type","value":"MKT"},{"name":"variant","value":"server"},{"name":"version","value":"0.0"}],"multiplier":1}' --header 'accept: application/json' --header 'content-type: application/json' https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/products | python -m simplejson/tool
{
    "attributes": [
        {
            "created": "2012-03-27T19:55:08.470+0000", 
            "name": "variant", 
            "updated": "2012-03-27T19:55:08.470+0000", 
            "value": "server"
        }, 
        {
            "created": "2012-03-27T19:55:08.470+0000", 
            "name": "arch", 
            "updated": "2012-03-27T19:55:08.470+0000", 
            "value": "ALL"
        }, 
        {
            "created": "2012-03-27T19:55:08.470+0000", 
            "name": "type", 
            "updated": "2012-03-27T19:55:08.470+0000", 
            "value": "MKT"
        }, 
        {
            "created": "2012-03-27T19:55:08.471+0000", 
            "name": "warning_period", 
            "updated": "2012-03-27T19:55:08.471+0000", 
            "value": "30"
        }, 
        {
            "created": "2012-03-27T19:55:08.471+0000", 
            "name": "sockets", 
            "updated": "2012-03-27T19:55:08.471+0000", 
            "value": null
        }, 
        {
            "created": "2012-03-27T19:55:08.471+0000", 
            "name": "version", 
            "updated": "2012-03-27T19:55:08.471+0000", 
            "value": "0.0"
        }
    ], 
    "created": "2012-03-27T19:55:08.470+0000", 
    "dependentProductIds": [], 
    "href": "/products/null-sockets", 
    "id": "null-sockets", 
    "multiplier": 1, 
    "name": "Awesome OS for null sockets", 
    "productContent": [], 
    "updated": "2012-03-27T19:55:08.470+0000"
}
[root@jsefler-r63-server ~]# 
[root@jsefler-r63-server ~]# 
[root@jsefler-r63-server ~]# curl --stderr /dev/null --insecure --user admin:admin --request POST --data '{"product":{"id":"null-sockets"},"startDate":"Mon, 26 Mar 2012 15:13:20 -0400","accountNumber":705701520,"quantity":20,"endDate":"Wed, 31 Dec 2014 00:00:00 -0400","contractNumber":351264786,"providedProducts":[{"id":"9000"}]}' --header 'accept: application/json' --header 'content-type: application/json' https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/subscriptions | python -m simplejson/tool
{
    "accountNumber": "705701520", 
    "certificate": null, 
    "contractNumber": "351264786", 
    "created": "2012-03-27T19:58:29.348+0000", 
    "endDate": "2014-12-31T04:00:00.000+0000", 
    "id": "8a90f8143655b58a013655bcf7e40a02", 
    "modified": null, 
    "owner": {
        "displayName": "Admin Owner", 
        "href": "/owners/admin", 
        "id": "8a90f8143655b58a013655b5ab080007", 
        "key": "admin"
    }, 
    "product": {
        "attributes": [
            {
                "created": "2012-03-27T19:55:08.470+0000", 
                "name": "variant", 
                "updated": "2012-03-27T19:55:08.470+0000", 
                "value": "server"
            }, 
            {
                "created": "2012-03-27T19:55:08.470+0000", 
                "name": "arch", 
                "updated": "2012-03-27T19:55:08.470+0000", 
                "value": "ALL"
            }, 
            {
                "created": "2012-03-27T19:55:08.470+0000", 
                "name": "type", 
                "updated": "2012-03-27T19:55:08.470+0000", 
                "value": "MKT"
            }, 
            {
                "created": "2012-03-27T19:55:08.471+0000", 
                "name": "warning_period", 
                "updated": "2012-03-27T19:55:08.471+0000", 
                "value": "30"
            }, 
            {
                "created": "2012-03-27T19:55:08.471+0000", 
                "name": "sockets", 
                "updated": "2012-03-27T19:55:08.471+0000", 
                "value": null
            }, 
            {
                "created": "2012-03-27T19:55:08.471+0000", 
                "name": "version", 
                "updated": "2012-03-27T19:55:08.471+0000", 
                "value": "0.0"
            }
        ], 
        "created": "2012-03-27T19:55:08.470+0000", 
        "dependentProductIds": [], 
        "href": "/products/null-sockets", 
        "id": "null-sockets", 
        "multiplier": 1, 
        "name": "Awesome OS for null sockets", 
        "productContent": [], 
        "updated": "2012-03-27T19:55:08.470+0000"
    }, 
    "providedProducts": [
        {
            "attributes": [
                {
                    "created": "2012-03-27T19:54:12.368+0000", 
                    "name": "variant", 
                    "updated": "2012-03-27T19:54:12.368+0000", 
                    "value": "server"
                }, 
                {
                    "created": "2012-03-27T19:54:12.368+0000", 
                    "name": "arch", 
                    "updated": "2012-03-27T19:54:12.368+0000", 
                    "value": "ALL"
                }, 
                {
                    "created": "2012-03-27T19:54:12.368+0000", 
                    "name": "type", 
                    "updated": "2012-03-27T19:54:12.368+0000", 
                    "value": "SVC"
                }, 
                {
                    "created": "2012-03-27T19:54:12.368+0000", 
                    "name": "warning_period", 
                    "updated": "2012-03-27T19:54:12.368+0000", 
                    "value": "30"
                }, 
                {
                    "created": "2012-03-27T19:54:12.368+0000", 
                    "name": "sockets", 
                    "updated": "2012-03-27T19:54:12.368+0000", 
                    "value": null
                }, 
                {
                    "created": "2012-03-27T19:54:12.368+0000", 
                    "name": "version", 
                    "updated": "2012-03-27T19:54:12.368+0000", 
                    "value": "0.0"
                }
            ], 
            "created": "2012-03-27T19:54:12.368+0000", 
            "dependentProductIds": [], 
            "href": "/products/9000", 
            "id": "9000", 
            "multiplier": 1, 
            "name": "Awesome OS for null sockets BITS", 
            "productContent": [], 
            "updated": "2012-03-27T19:54:12.368+0000"
        }
    ], 
    "quantity": 20, 
    "startDate": "2012-03-26T19:13:20.000+0000", 
    "updated": "2012-03-27T19:58:29.348+0000", 
    "upstreamPoolId": null
}
[root@jsefler-r63-server ~]# 
[root@jsefler-r63-server ~]# 
[root@jsefler-r63-server ~]# curl --stderr /dev/null --insecure --user admin:admin --request PUT https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/subscriptions | python -m simplejson/tool
{
    "created": "2012-03-27T20:00:24.658+0000", 
    "finishTime": null, 
    "group": "async group", 
    "id": "refresh_pools_17cee331-6aa6-4c2a-894c-f45e5afd06ef", 
    "principalName": "admin", 
    "result": null, 
    "startTime": null, 
    "state": "CREATED", 
    "statusPath": "/jobs/refresh_pools_17cee331-6aa6-4c2a-894c-f45e5afd06ef", 
    "targetId": "admin", 
    "targetType": "owner", 
    "updated": "2012-03-27T20:00:24.658+0000"
}
[root@jsefler-r63-server ~]# 
[root@jsefler-r63-server ~]# curl --stderr /dev/null --insecure --user admin:admin --request GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/jobs/refresh_pools_17cee331-6aa6-4c2a-894c-f45e5afd06ef | python -m simplejson/tool
{
    "created": "2012-03-27T20:00:24.658+0000", 
    "finishTime": null, 
    "group": "async group", 
    "id": "refresh_pools_17cee331-6aa6-4c2a-894c-f45e5afd06ef", 
    "principalName": "admin", 
    "result": "org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (rules#737)]", 
    "startTime": "2012-03-27T20:00:24.666+0000", 
    "state": "FAILED", 
    "statusPath": "/jobs/refresh_pools_17cee331-6aa6-4c2a-894c-f45e5afd06ef", 
    "targetId": "admin", 
    "targetType": "owner", 
    "updated": "2012-03-27T20:00:25.581+0000"
}
[root@jsefler-r63-server ~]# 

^^^^ EXPECTED THAT REFRESH POOLS STATE TO FINISH








Additional info:

[root@jsefler-f14-candlepin candlepin]# tail -f /var/log/tomcat6/catalina.out
Mar 27 16:00:25 [QuartzScheduler_Worker-8] ERROR org.quartz.core.JobRunShell - Job async group.refresh_pools_17cee331-6aa6-4c2a-894c-f45e5afd06ef threw an unhandled Exception: 
org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (rules#737)
	at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1773)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
	at org.mozilla.javascript.gen.c1._c33(rules:737)
	at org.mozilla.javascript.gen.c1.call(rules)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
	at org.mozilla.javascript.gen.c1.call(rules)
	at org.candlepin.policy.js.JsRules.invokeMethod(JsRules.java:102)
	at org.candlepin.policy.js.JsRules.invokeMethod(JsRules.java:116)
	at org.candlepin.policy.js.pool.JsPoolRules.createPools(JsPoolRules.java:66)
	at org.candlepin.controller.CandlepinPoolManager.createPoolsForSubscription(CandlepinPoolManager.java:313)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.CGLIB$createPoolsForSubscription$12(<generated>)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39$$FastClassByGuice$$2b4b8b2b.invoke(<generated>)
	at com.google.inject.internal.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at com.google.inject.ProxyFactory$1.intercept(ProxyFactory.java:53)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.createPoolsForSubscription(<generated>)
	at org.candlepin.controller.CandlepinPoolManager.refreshPoolsWithoutRegeneration(CandlepinPoolManager.java:169)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.CGLIB$refreshPoolsWithoutRegeneration$20(<generated>)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39$$FastClassByGuice$$2b4b8b2b.invoke(<generated>)
	at com.google.inject.internal.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at com.google.inject.ProxyFactory$1.intercept(ProxyFactory.java:53)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.refreshPoolsWithoutRegeneration(<generated>)
	at org.candlepin.controller.CandlepinPoolManager.refreshPools(CandlepinPoolManager.java:199)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.CGLIB$refreshPools$2(<generated>)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39$$FastClassByGuice$$2b4b8b2b.invoke(<generated>)
	at com.google.inject.internal.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at com.google.inject.ProxyFactory$1.intercept(ProxyFactory.java:53)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.refreshPools(<generated>)
	at org.candlepin.pinsetter.tasks.RefreshPoolsJob.execute(RefreshPoolsJob.java:66)
	at org.candlepin.pinsetter.tasks.RefreshPoolsJob$$EnhancerByGuice$$14397146.CGLIB$execute$0(<generated>)
	at org.candlepin.pinsetter.tasks.RefreshPoolsJob$$EnhancerByGuice$$14397146$$FastClassByGuice$$f87c7510.invoke(<generated>)
	at com.google.inject.internal.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at com.google.inject.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:64)
	at com.wideplay.warp.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:68)
	at com.google.inject.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:64)
	at com.google.inject.InterceptorStackCallback.intercept(InterceptorStackCallback.java:44)
	at org.candlepin.pinsetter.tasks.RefreshPoolsJob$$EnhancerByGuice$$14397146.execute(<generated>)
	at org.candlepin.pinsetter.core.TransactionalPinsetterJob.execute(TransactionalPinsetterJob.java:50)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:199)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)
Caused by: java.lang.NullPointerException
	at org.candlepin.model.AbstractPoolAttribute.hashCode(AbstractPoolAttribute.java:113)
	at java.util.HashMap.put(HashMap.java:389)
	at java.util.HashSet.add(HashSet.java:217)
	at org.candlepin.model.Pool.addProductAttribute(Pool.java:567)
	at org.candlepin.model.Pool.setProductAttribute(Pool.java:580)
	at org.candlepin.policy.js.pool.PoolHelper.copyProductIDAttributesOntoPool(PoolHelper.java:228)
	at org.candlepin.policy.js.pool.PoolHelper.copyProductAttributesOntoPool(PoolHelper.java:186)
	at sun.reflect.GeneratedMethodAccessor214.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
	... 40 more
Mar 27 16:00:25 [QuartzScheduler_Worker-8] ERROR org.quartz.core.ErrorLogger - Job (async group.refresh_pools_17cee331-6aa6-4c2a-894c-f45e5afd06ef threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (rules#737)]
	at org.quartz.core.JobRunShell.run(JobRunShell.java:210)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)
Caused by: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (rules#737)
	at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1773)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
	at org.mozilla.javascript.gen.c1._c33(rules:737)
	at org.mozilla.javascript.gen.c1.call(rules)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
	at org.mozilla.javascript.gen.c1.call(rules)
	at org.candlepin.policy.js.JsRules.invokeMethod(JsRules.java:102)
	at org.candlepin.policy.js.JsRules.invokeMethod(JsRules.java:116)
	at org.candlepin.policy.js.pool.JsPoolRules.createPools(JsPoolRules.java:66)
	at org.candlepin.controller.CandlepinPoolManager.createPoolsForSubscription(CandlepinPoolManager.java:313)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.CGLIB$createPoolsForSubscription$12(<generated>)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39$$FastClassByGuice$$2b4b8b2b.invoke(<generated>)
	at com.google.inject.internal.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at com.google.inject.ProxyFactory$1.intercept(ProxyFactory.java:53)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.createPoolsForSubscription(<generated>)
	at org.candlepin.controller.CandlepinPoolManager.refreshPoolsWithoutRegeneration(CandlepinPoolManager.java:169)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.CGLIB$refreshPoolsWithoutRegeneration$20(<generated>)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39$$FastClassByGuice$$2b4b8b2b.invoke(<generated>)
	at com.google.inject.internal.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at com.google.inject.ProxyFactory$1.intercept(ProxyFactory.java:53)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.refreshPoolsWithoutRegeneration(<generated>)
	at org.candlepin.controller.CandlepinPoolManager.refreshPools(CandlepinPoolManager.java:199)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.CGLIB$refreshPools$2(<generated>)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39$$FastClassByGuice$$2b4b8b2b.invoke(<generated>)
	at com.google.inject.internal.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at com.google.inject.ProxyFactory$1.intercept(ProxyFactory.java:53)
	at org.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$f077bf39.refreshPools(<generated>)
	at org.candlepin.pinsetter.tasks.RefreshPoolsJob.execute(RefreshPoolsJob.java:66)
	at org.candlepin.pinsetter.tasks.RefreshPoolsJob$$EnhancerByGuice$$14397146.CGLIB$execute$0(<generated>)
	at org.candlepin.pinsetter.tasks.RefreshPoolsJob$$EnhancerByGuice$$14397146$$FastClassByGuice$$f87c7510.invoke(<generated>)
	at com.google.inject.internal.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at com.google.inject.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:64)
	at com.wideplay.warp.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:68)
	at com.google.inject.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:64)
	at com.google.inject.InterceptorStackCallback.intercept(InterceptorStackCallback.java:44)
	at org.candlepin.pinsetter.tasks.RefreshPoolsJob$$EnhancerByGuice$$14397146.execute(<generated>)
	at org.candlepin.pinsetter.core.TransactionalPinsetterJob.execute(TransactionalPinsetterJob.java:50)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:199)
	... 1 more
Caused by: java.lang.NullPointerException
	at org.candlepin.model.AbstractPoolAttribute.hashCode(AbstractPoolAttribute.java:113)
	at java.util.HashMap.put(HashMap.java:389)
	at java.util.HashSet.add(HashSet.java:217)
	at org.candlepin.model.Pool.addProductAttribute(Pool.java:567)
	at org.candlepin.model.Pool.setProductAttribute(Pool.java:580)
	at org.candlepin.policy.js.pool.PoolHelper.copyProductIDAttributesOntoPool(PoolHelper.java:228)
	at org.candlepin.policy.js.pool.PoolHelper.copyProductAttributesOntoPool(PoolHelper.java:186)
	at sun.reflect.GeneratedMethodAccessor214.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
	... 40 more
^C
[root@jsefler-f14-candlepin candlepin]#

Comment 1 William Poteat 2012-04-02 19:20:51 UTC
commit 61923ea0b9406899e0da61e3cf1ebc799081d1f5 on master.

Comment 3 John Sefler 2012-04-17 17:01:50 UTC
Verify Version...
[root@jsefler-f14-candlepin candlepin]# git show-ref | grep master
82216d9e5e38fe3d2d62d7d9860cc3d346832919 refs/heads/master
82216d9e5e38fe3d2d62d7d9860cc3d346832919 refs/remotes/origin/master


Re-executing same scenario in comment 0 ...


[root@jsefler-f14-candlepin candlepin]# curl --stderr /dev/null --insecure --user admin:admin --request POST --data '{"id":"9000","name":"Awesome OS for null sockets BITS","attributes":[{"name":"warning_period","value":"30"},{"name":"sockets"},{"name":"arch","value":"ALL"},{"name":"type","value":"SVC"},{"name":"variant","value":"server"},{"name":"version","value":"0.0"}],"multiplier":1}' --header 'accept: application/json' --header 'content-type: application/json' https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/products | python -m simplejson/tool
{
    "attributes": [
        {
            "created": "2012-04-17T16:51:52.906+0000", 
            "name": "variant", 
            "updated": "2012-04-17T16:51:52.906+0000", 
            "value": "server"
        }, 
        {
            "created": "2012-04-17T16:51:52.906+0000", 
            "name": "arch", 
            "updated": "2012-04-17T16:51:52.906+0000", 
            "value": "ALL"
        }, 
        {
            "created": "2012-04-17T16:51:52.906+0000", 
            "name": "type", 
            "updated": "2012-04-17T16:51:52.906+0000", 
            "value": "SVC"
        }, 
        {
            "created": "2012-04-17T16:51:52.906+0000", 
            "name": "warning_period", 
            "updated": "2012-04-17T16:51:52.906+0000", 
            "value": "30"
        }, 
        {
            "created": "2012-04-17T16:51:52.906+0000", 
            "name": "sockets", 
            "updated": "2012-04-17T16:51:52.906+0000", 
            "value": null
        }, 
        {
            "created": "2012-04-17T16:51:52.906+0000", 
            "name": "version", 
            "updated": "2012-04-17T16:51:52.906+0000", 
            "value": "0.0"
        }
    ], 
    "created": "2012-04-17T16:51:52.905+0000", 
    "dependentProductIds": [], 
    "href": "/products/9000", 
    "id": "9000", 
    "multiplier": 1, 
    "name": "Awesome OS for null sockets BITS", 
    "productContent": [], 
    "updated": "2012-04-17T16:51:52.905+0000"
}
[root@jsefler-f14-candlepin candlepin]# 
[root@jsefler-f14-candlepin candlepin]# 
[root@jsefler-f14-candlepin candlepin]# curl --stderr /dev/null --insecure --user admin:admin --request POST --data '{"id":"null-sockets","name":"Awesome OS for null sockets","attributes":[{"name":"warning_period","value":"30"},{"name":"sockets"},{"name":"arch","value":"ALL"},{"name":"type","value":"MKT"},{"name":"variant","value":"server"},{"name":"version","value":"0.0"}],"multiplier":1}' --header 'accept: application/json' --header 'content-type: application/json' https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/products | python -m simplejson/tool
{
    "attributes": [
        {
            "created": "2012-04-17T16:53:34.023+0000", 
            "name": "variant", 
            "updated": "2012-04-17T16:53:34.023+0000", 
            "value": "server"
        }, 
        {
            "created": "2012-04-17T16:53:34.023+0000", 
            "name": "arch", 
            "updated": "2012-04-17T16:53:34.023+0000", 
            "value": "ALL"
        }, 
        {
            "created": "2012-04-17T16:53:34.023+0000", 
            "name": "type", 
            "updated": "2012-04-17T16:53:34.023+0000", 
            "value": "MKT"
        }, 
        {
            "created": "2012-04-17T16:53:34.023+0000", 
            "name": "warning_period", 
            "updated": "2012-04-17T16:53:34.023+0000", 
            "value": "30"
        }, 
        {
            "created": "2012-04-17T16:53:34.024+0000", 
            "name": "sockets", 
            "updated": "2012-04-17T16:53:34.024+0000", 
            "value": null
        }, 
        {
            "created": "2012-04-17T16:53:34.024+0000", 
            "name": "version", 
            "updated": "2012-04-17T16:53:34.024+0000", 
            "value": "0.0"
        }
    ], 
    "created": "2012-04-17T16:53:34.023+0000", 
    "dependentProductIds": [], 
    "href": "/products/null-sockets", 
    "id": "null-sockets", 
    "multiplier": 1, 
    "name": "Awesome OS for null sockets", 
    "productContent": [], 
    "updated": "2012-04-17T16:53:34.023+0000"
}
[root@jsefler-f14-candlepin candlepin]# 
[root@jsefler-f14-candlepin candlepin]# 
[root@jsefler-f14-candlepin candlepin]# curl --stderr /dev/null --insecure --user admin:admin --request POST --data '{"product":{"id":"null-sockets"},"startDate":"Mon, 26 Mar 2012 15:13:20 -0400","accountNumber":705701520,"quantity":20,"endDate":"Wed, 31 Dec 2014 00:00:00 -0400","contractNumber":351264786,"providedProducts":[{"id":"9000"}]}' --header 'accept: application/json' --header 'content-type: application/json' https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/subscriptions | python -m simplejson/tool
{
    "accountNumber": "705701520", 
    "certificate": null, 
    "contractNumber": "351264786", 
    "created": "2012-04-17T16:55:01.147+0000", 
    "endDate": "2014-12-31T04:00:00.000+0000", 
    "id": "8a90f81436c0c9c80136c13a8b1b0a9a", 
    "modified": null, 
    "owner": {
        "displayName": "Admin Owner", 
        "href": "/owners/admin", 
        "id": "8a90f81436c0c9c80136c0c9ebf80002", 
        "key": "admin"
    }, 
    "product": {
        "attributes": [
            {
                "created": "2012-04-17T16:53:34.023+0000", 
                "name": "variant", 
                "updated": "2012-04-17T16:53:34.023+0000", 
                "value": "server"
            }, 
            {
                "created": "2012-04-17T16:53:34.023+0000", 
                "name": "arch", 
                "updated": "2012-04-17T16:53:34.023+0000", 
                "value": "ALL"
            }, 
            {
                "created": "2012-04-17T16:53:34.023+0000", 
                "name": "type", 
                "updated": "2012-04-17T16:53:34.023+0000", 
                "value": "MKT"
            }, 
            {
                "created": "2012-04-17T16:53:34.023+0000", 
                "name": "warning_period", 
                "updated": "2012-04-17T16:53:34.023+0000", 
                "value": "30"
            }, 
            {
                "created": "2012-04-17T16:53:34.024+0000", 
                "name": "sockets", 
                "updated": "2012-04-17T16:53:34.024+0000", 
                "value": null
            }, 
            {
                "created": "2012-04-17T16:53:34.024+0000", 
                "name": "version", 
                "updated": "2012-04-17T16:53:34.024+0000", 
                "value": "0.0"
            }
        ], 
        "created": "2012-04-17T16:53:34.023+0000", 
        "dependentProductIds": [], 
        "href": "/products/null-sockets", 
        "id": "null-sockets", 
        "multiplier": 1, 
        "name": "Awesome OS for null sockets", 
        "productContent": [], 
        "updated": "2012-04-17T16:53:34.023+0000"
    }, 
    "providedProducts": [
        {
            "attributes": [
                {
                    "created": "2012-04-17T16:51:52.906+0000", 
                    "name": "variant", 
                    "updated": "2012-04-17T16:51:52.906+0000", 
                    "value": "server"
                }, 
                {
                    "created": "2012-04-17T16:51:52.906+0000", 
                    "name": "arch", 
                    "updated": "2012-04-17T16:51:52.906+0000", 
                    "value": "ALL"
                }, 
                {
                    "created": "2012-04-17T16:51:52.906+0000", 
                    "name": "type", 
                    "updated": "2012-04-17T16:51:52.906+0000", 
                    "value": "SVC"
                }, 
                {
                    "created": "2012-04-17T16:51:52.906+0000", 
                    "name": "warning_period", 
                    "updated": "2012-04-17T16:51:52.906+0000", 
                    "value": "30"
                }, 
                {
                    "created": "2012-04-17T16:51:52.906+0000", 
                    "name": "sockets", 
                    "updated": "2012-04-17T16:51:52.906+0000", 
                    "value": null
                }, 
                {
                    "created": "2012-04-17T16:51:52.906+0000", 
                    "name": "version", 
                    "updated": "2012-04-17T16:51:52.906+0000", 
                    "value": "0.0"
                }
            ], 
            "created": "2012-04-17T16:51:52.905+0000", 
            "dependentProductIds": [], 
            "href": "/products/9000", 
            "id": "9000", 
            "multiplier": 1, 
            "name": "Awesome OS for null sockets BITS", 
            "productContent": [], 
            "updated": "2012-04-17T16:51:52.905+0000"
        }
    ], 
    "quantity": 20, 
    "startDate": "2012-03-26T19:13:20.000+0000", 
    "updated": "2012-04-17T16:55:01.147+0000", 
    "upstreamPoolId": null
}
[root@jsefler-f14-candlepin candlepin]# 
[root@jsefler-f14-candlepin candlepin]# 
[root@jsefler-f14-candlepin candlepin]# curl --stderr /dev/null --insecure --user admin:admin --request PUT https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/subscriptions | python -m simplejson/tool{
    "created": "2012-04-17T16:55:29.747+0000", 
    "finishTime": null, 
    "group": "async group", 
    "id": "refresh_pools_4ec900f2-1668-4080-85df-5248cd14f0ca", 
    "principalName": "admin", 
    "result": null, 
    "startTime": null, 
    "state": "CREATED", 
    "statusPath": "/jobs/refresh_pools_4ec900f2-1668-4080-85df-5248cd14f0ca", 
    "targetId": "admin", 
    "targetType": "owner", 
    "updated": "2012-04-17T16:55:29.747+0000"
}
[root@jsefler-f14-candlepin candlepin]# curl --stderr /dev/null --insecure --user admin:admin --request GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/jobs/refresh_pools_4ec900f2-1668-4080-85df-5248cd14f0ca | python -m simplejson/tool{
    "created": "2012-04-17T16:55:29.747+0000", 
    "finishTime": "2012-04-17T16:55:30.475+0000", 
    "group": "async group", 
    "id": "refresh_pools_4ec900f2-1668-4080-85df-5248cd14f0ca", 
    "principalName": "admin", 
    "result": "Pools refreshed for owner Admin Owner", 
    "startTime": "2012-04-17T16:55:29.750+0000", 
    "state": "FINISHED", 
    "statusPath": "/jobs/refresh_pools_4ec900f2-1668-4080-85df-5248cd14f0ca", 
    "targetId": "admin", 
    "targetType": "owner", 
    "updated": "2012-04-17T16:55:30.490+0000"
}



^^^ VERIFIED - Refresh pools job successfully finished




[root@jsefler-r63-server ~]# subscription-manager register --username testuser1 --password password --org admin --force
The system with UUID a3f98d91-ac3a-4a18-b0e2-b5c7e7229913 has been unregistered
The system has been registered with id: 1b044cb5-5a56-4894-a345-6215555e52ce 
[root@jsefler-r63-server ~]# subscription-manager list --avail | grep "null-sockets" -B1 -A8
Product Name:         	Awesome OS for null sockets
Product Id:           	null-sockets             
Pool Id:              	8a90f81436c0c9c80136c13afd910a9b
Quantity:             	20                       
Service Level:        	                         
Service Type:        	                         
Multi-Entitlement:    	No                       
Expires:              	12/31/2014               
Machine Type:         	physical                 

[root@jsefler-r63-server ~]# 


^^^ Also VERIFIED the pool is successfully available.

Comment 4 Bryan Kearney 2012-07-17 13:04:56 UTC
Marking all community bugs modified or beyong as closed.


Note You need to log in before you can comment on or make changes to this bug.