Bug #40834 Importing a trial jar with trial key fails
Submitted: 18 Nov 2008 20:34 Modified: 13 Jan 2009 17:17
Reporter: Andy Bang
Status: Closed
Category:Monitoring: Server Severity:S1 (Critical)
Version:2.0.0.7097 OS:Any
Assigned to: Sloan Childers Target Version:
Triage: Needs Triage: D1 (Critical)

[18 Nov 2008 20:34] Andy Bang
Description:
When you try to import a Trial JAR using a Trial user account, you get one of the
following error messages:

U0009 The uploaded Advisor jar was invalid

U0161 Please import a Platinum level Advisor .jar to use with this Platinum level product
key

How to repeat:
1) Install and start the Service Manager.
2) On the first-time setup screen, do NOT provide Enterprise login credentials.  Instead,
import a key and JAR from a local file.  I will attach examples.
3) After filling out the rest of the input fields, press the "complete setup" button and
you will see one of the error messages shown above.
[18 Nov 2008 21:35] Josh Sled
<jsled> Okay.  So, there's a disconnect between Trial being a stand-alone "level" vs.
being an attribute of a license.
<jsled> We get "U0161 Please import a Platinum level Advisor .jar to use with this
Platinum level product key" message because the version.props in the Trial .jar says
"Trial".  So, that's what's shoved into the inventory as the current subscription level.
--> schilders (~schilders@localhost) has joined #merlin-internal
<jsled> Now, when the BasicLevelCheck goes to check it's funny thing, it does
Contract.getLevelForName(…) based on this value.
<jsled> And it's not even *parsing* it as Trial and thus returning a Trial-level
subscription, because – while that concept is commented out in the code – it does't
exist.  It's falling off the end of the lookup chain, and thus returning Basic.
--- marcos|brb is now known as marcos
<jsled> So, it thinks its actually the Basic-level advisor bundle.
<jsled> And thus compares that to the Platinum Trial license, and complains that they
don't match.
<oldag> that had to be broken for a while
<jsled> Yup
<oldag> you might want to talk to schilders about the history of that
<oldag> because 'trial' DID used to be a level
<jsled> I see.
<oldag> and he fixed it everywhere we found it
<schilders> no hablas engles
<jsled> heh
<oldag> no blame, that code has gone thru more changes than...
<oldag> well...
<oldag> n/m
<oldag> but it was also product marketing fault, pretty much
<oldag> we're chasing ghosts
<schilders> wonderful
<jsled> I think if the Trial .jar just says it's Silver (in version.props), or something,
it should be fine.
<jsled> That'll probably break something else that I'm not quite aware of.
<schilders> so the trial jar doesn't advertise that it is "trial"?
<jsled> No, it does.  As the Subscription level.  But "Trial" isn't a valid subscription
level.
<schilders> and if it does i guess it wouldn't be a valid subscription... because trial
is an attrib of a subscription
<schilders> right
<jsled> So when we convert the subscription string attribute to an integer level, it
returns Basic.
<schilders> crap
<jsled> But as per the fix for <http://bugs.mysql.com/bug.php?id=39744>, a Basic jar and
a Platinum (Trial) license are not friendly.
--- diego|snack is now known as diego
<jsled> Of course, the lookup here is Contact.getLevelForName(), which does
string.contains checks.  so the Trial jar could even say "subscription=Silver (Trial)"
and we'd be good.
<schilders> now there's a thought
<jsled> We'd need to look at where/how else that string is used, though.
<schilders> sure
<schilders> in the jar i suspect it is only used at import time for validation
[18 Nov 2008 21:49] Josh Sled
The BasicLevelCheck test could also change to detect and except a Trial advisor .jar, as
well … perpetuates the wrongness, but is a small simple fix. :p
[24 Nov 2008 21:43] Sloan Childers
r6512 fixed this issue
[10 Dec 2008 0:25] Bill Weber
verified fixed in version 2.0.0.7122
[13 Jan 2009 17:17] Tony Bedford
An entry was added to the 2.0 changelog:

When you tried to import a Trial-level advisor JAR using a Trial user account, one of the
following error messages was generated:

U0009 The uploaded Advisor jar was invalid

U0161 Please import a Platinum level Advisor .jar to use with this Platinum level product
key