Bug 751101 - Runtime Error org.mozilla.javascript.UniqueTag cannot be cast to org.mozilla.javascript.Function
Summary: Runtime Error org.mozilla.javascript.UniqueTag cannot be cast to org.mozilla....
Keywords:
Status: CLOSED DUPLICATE of bug 743968
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: Unspecified
OS: Solaris
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Bryan Kearney
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-03 14:28 UTC by Lukas Zapletal
Modified: 2015-05-14 15:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-07 13:55:33 UTC


Attachments (Terms of Use)

Description Lukas Zapletal 2011-11-03 14:28:14 UTC
When registering rhsm against Katello proxy to Candlepin (loaded with a fake certificates from 

http://git.fedorahosted.org/git/?p=katello.git;a=tree;f=cli/test-system;h=528354cc813500ee274f21362827558255cf7dbe;hb=HEAD

I am having this strange error:

2011-11-03 09:04:01,734 [ERROR]  @managercli.py:66 - Runtime Error org.mozilla.javascript.UniqueTag cannot be cast to org.mozilla.javascript.Function at org.fedoraproject.candlepin.policy.js.JsRules.init:64
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 713, in _do_command
    managerlib.unregister(self.cp, consumer)
  File "/usr/share/rhsm/subscription_manager/managerlib.py", line 782, in unregister
    uep.unregisterConsumer(consumer_uuid)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 495, in unregisterConsumer
    return self.conn.request_delete(method)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 267, in request_delete
    return self._request("DELETE", method)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 222, in _request
    self.validateResponse(result)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 242, in validateResponse
    raise RestlibException(response['status'], error_msg)
RestlibException: Runtime Error org.mozilla.javascript.UniqueTag cannot be cast to org.mozilla.javascript.Function at org.fedoraproject.candlepin.policy.js.JsRules.init:64

OS: EL 6.1

Comment 1 Lukas Zapletal 2011-11-04 08:59:33 UTC
java.lang.ClassCastException: org.mozilla.javascript.UniqueTag cannot be cast to org.mozilla.javascript.Function
        at org.fedoraproject.candlepin.policy.js.JsRules.init(JsRules.java:64)
        at org.fedoraproject.candlepin.policy.js.JsRules.reinitTo(JsRules.java:81)
        at org.fedoraproject.candlepin.policy.js.entitlement.AbstractEntitlementRules.preUnbind(AbstractEntitlementRules.java:387)
        at org.fedoraproject.candlepin.policy.EnforcerDispatcher.preUnbind(EnforcerDispatcher.java:84)
        at org.fedoraproject.candlepin.controller.CandlepinPoolManager.removeEntitlement(CandlepinPoolManager.java:609)
        at org.fedoraproject.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$eea63b03.CGLIB$removeEntitlement$18(<generated>)
        at org.fedoraproject.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$eea63b03$$FastClassByGuice$$dc89b06c.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:58)
        at com.google.inject.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:64)
        at com.google.inject.InterceptorStackCallback.intercept(InterceptorStackCallback.java:44)
        at org.fedoraproject.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$eea63b03.removeEntitlement(<generated>)
        at org.fedoraproject.candlepin.controller.CandlepinPoolManager.revokeEntitlement(CandlepinPoolManager.java:655)
        at org.fedoraproject.candlepin.controller.CandlepinPoolManager$$EnhancerByGuice$$eea63b03.CGLIB$revokeEntitlement$3(<generated>)

Comment 2 Devan Goodwin 2011-11-07 13:55:33 UTC
I believe this is a duplicate, the issue is an export file generated on an older version of Candlepin than the new one you are importing into. I think the import succeeds, but as soon as something tries to run the rules you get this error.


We don't yet know how to solve, but the workaround is to generate a new export on a newer candlepin.

Closing as a dupe.

*** This bug has been marked as a duplicate of bug 743968 ***


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