Start a Conversation

Unsolved

This post is more than 5 years old

3805

December 17th, 2013 09:00

Migrating from SAM v7.2 to SAM v9.2 ?

Hello, I am about to embark on a project where we have to migrate from Solaris SMARTS SAM Dynamic Model v7.2 environment over to brand new Linux RHEL6 based SMARTS SAM v9.2. Before we even start on this, I am wondering if the custome in-house developed v7.2 model code, ASL code and JAVA adapter would be compatible and easily migrated over to the v9.2 SAM environment.  What do I need to consider in doing this migration?  Will the v7.2 Dynamic Model code compile on v9.2?  Will all the ASL code still work "as is"?  Or will it require a lot of changing? Anyone been through this sort of move here?  I would appreciate any info on any issues or problems with such a migration.

12 Posts

December 17th, 2013 10:00

Hi Christopher, okay, I have moved it to the Smarts Support Forum.  Hope it gets replies with advise on what to expect when doing this migration from SAM v7.2 to SAM v9.2.  (We never did go to SAM v8.x) and are just jumping straight over to SAM v9.2.  Hope it is not going to be a nightmare.

December 17th, 2013 10:00

Please consider moving this question as-is (no need to recreate) to the proper forum for maximum visibility.  Questions written to the users' own "Discussions" space don't get the same amount of attention and can go unanswered for a long time.

You can do so by selecting "Move" under ACTIONS along the upper-right.  Then search for and select: "Smarts Support Forum".

Smarts Support Forum

Storage Resource Management Support Forum

13 Posts

December 18th, 2013 15:00

Dynamic model - you need to recompile, the is stated in the document.

ASL - I am not aware of any issues according to my experience, but need to be careful with the installation path.

Java adapter - not quite sure, you need to check with others or the 9.2 java API document.

Hope this helps.

17 Posts

January 3rd, 2014 03:00

Unfortunately there is no simple answer to this question. In my experience there are usually a number of undocumented changes between Smarts versions, which are only discovered when one of your customisations stops working. The real key is testing. You need a proper test platform where you can test each of you customisations in isloation and then together (I cannot overstate how important this is, I have discovered numerous bugs in both my and EMC's code this way). How easy or difficult this is very much depends on how familier you are with all the customisations (i.e did you write them all, is there good documenation on customisations written by others).

Off the top of my head here are I few things I've hit over the years: -

* As noted by a previous poster, you will need to recompile your dynamic model, more output files are now generated and need to be copied to various different directories. I believe this is covered in the documentation.

* Some of my dynamic model failed to compile in 9.1 due to a change in the foundation code. For a workaround I have to compile using the compiler from 9.0, which then loads successfully in 9.1+.

* If you use the adapter platform check your code, especially around the DISCARD_TRAP variable.

* BIM has been stripped out of SAM to run as a seperate domain, this can cause some interesting timing problems especially in the SAM hook script.

12 Posts

February 1st, 2014 13:00

Hello again, Thanks to all that have replied with advise on my original question.  I have since been able to install the SAM v9.2 package on a Linux RHEL6 VMware server.  I have been able to successfully compile the dynamic model from our older version SAM v7.2 and it seems to start up okay.  But I have run into other issues that prevent me from fully testing out and evaluating the new system.  For starters, the EMC SAM v9.2 documentation mentioned that it requires JAVA 1.6.0_37 version to operate.  We have only Java and JDK version 1.6.0_71 build installed.  I assume that is okay (hopefully).

So far, most of the old java programs compiled and run okay on this new system.  However there is one main custom program we have SmNotify.java that has problems.  It first would not compile with a ClassNotFoiund error and I think I resolved that by updating my CLASSPATH statement to explicitly include a .jar file so that it compiles without errors.

Then it gave errors that a statement needed to be wrapped in a try() catch() block.  Which I did again and then it compiled clean.

However when I try to start the SmNotify.class program it throws errors again saying Class Not Found type of errors.

Here is the current error I get showing what class it is not finding (my CLASSPATH statements include all the jar file libraries that it successfully compiled with):

Exception in thread "main" java.lang.NoClassDefFoundError: com/emc/cmp/dmt/resources/SmErrorCode

        at SmNotify. (SmNotify.java:689)

        at SmNotify.main(SmNotify.java:539)

Caused by: java.lang.ClassNotFoundException: com.emc.cmp.dmt.resources.SmErrorCode

        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

Exception in thread "main" java.lang.NoClassDefFoundError: com/emc/cmp/dmt/resources/SmErrorCode

        at SmNotify. (SmNotify.java:689)

        at SmNotify.main(SmNotify.java:539)

Caused by: java.lang.ClassNotFoundException: com.emc.cmp.dmt.resources.SmErrorCode

        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

        ... 2 more

        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

        ... 2 more

Problems starting SmNotify instance 1.

I tried searching for what new EMC SMARTS SAM jar file contains this class: "com.emc.cmp.dmt.resources.SmErrorCode"  but cannot find any in the class paths.

Can someone tell me what's going on?  Why did it compile fine and not flag that as not found at compile time but at runtime it errors out like this?  I am pretty sure my CLASSPATH environment variable is set up to all the same jar file paths.

for referencing the SmNotify.java program errored line numbers in the above shown error message here is what statement(s) are on the two identified lines:

SmNotify.java line 539 has this statement:  SmNotify notifier = new SmNotify(local_domain);

SmNotify.java line 539 has this statement:  SmRemoteDomainManager remoteDM = new SmRemoteDomainManager();

These method calls are the same as they were for SAM v7.2 which compiled and ran with no problems.  But on SAM v9.2 now, they are flagged as having errors due to Class Not Found issues.  Where are the classes for them now?

12 Posts

February 1st, 2014 13:00

Hello, I installed the SMARTS SAM v9.2 pacakge and tried to run things.  Most of the ASL code seemed to work but I got some that failed with errors.  Here is one of them from an ASL script that is used to build a String Dictionary for doing IPaddress to Node name lookups.  The code worked fine on old SAM v7.2 environment but is throwing ASL error on SAM v9.2 environment as follows:

[January 31, 2014 10:26:45 PM GMT+00:00 +468ms] t@277837568 main
ASL-W-ERROR_RULE_SOURCE-While executing rule set '/opt/UltraNet/ASL/buildDictNodeIP2Name.asl'
ASL-ERROR_ACTION-While executing action at:
ASL-CALL_STACK_RULE-   RuleName: getIsoDate, Line: 112
ASL-CALL_STACK_RULE-   RuleName: log, Line: 88
ASL-ERROR_UNDEFINED_TABLE_KEY_ACCESS-Attempted to access undefined key 'uar' in table 'monthS3ToD02'
ASL-BAD_HASH_TABLE_KEY-The hash table key 'uar' was not found

31,-uar-Ja 2014 10:26:45 PM GMT+00:00,main,INF,NodeIP2Name table has been updated

The source code that is related to the above error message that I think is pertinent to show is as follows:

// table to convert 3 char month text to 2 digit string

monthS3ToD02 = table();

monthS3ToD02["Jan"] = "01";

monthS3ToD02["Feb"] = "02";

monthS3ToD02["Mar"] = "03";

monthS3ToD02["Apr"] = "04";

monthS3ToD02["May"] = "05";

monthS3ToD02["Jun"] = "06";

monthS3ToD02["Jul"] = "07";

monthS3ToD02["Aug"] = "08";

monthS3ToD02["Sep"] = "09";

monthS3ToD02["Oct"] = "10";

monthS3ToD02["Nov"] = "11";

monthS3ToD02["Dec"] = "12";

The function that the error occurs at is here (I cut and paste the program line number range of the flagged error msg, line 88 and line 112 are shown below):

     80 // send timestamped message to log w/severity and thread name

     81 log(

     82      s, // severity {DBG|INF|WRN|ERR|FTL}

     83      m  // message string

     84    )

     85 {

     86         tod:    getIsoDate()

     87

     88         do {    // ensure driver tag defined

     89                 if ( ! defined(THIS) ) {

     90                         THIS = ",".substring(this, 11, sizeOf(this)).",";

     91                 }

     92

     93                 // print all non-DBG. print DBG if enabled

     94                 if ( s != "DBG" || boolean(debugLog) ) {

     95                         print( tod.THIS.s.",".m );

     96                 }

     97         }

     98 }

     99

    100

    101 // return current time/date in standard ISO format (%Y-%m-%d %T)

    102 getIsoDate() {

    103         local _Y;

    104         local _d;

    105         local _m;

    106         local _T;

    107

    108         delim = "";

    109         input = string(time()); // input="31-Dec-2001 23:59:59"

    110         _d: rep(char,2)

    111             len(1)              // "-"

    112         _m: rep(char,3) do { _m = monthS3ToD02[_m]; }

    113             len(1)              // "-"

    114         _Y: rep(char,4)

    115             len(1)              // " "

    116         _T: rep(char)

    117             eol

    118         }

    119 do {

    120         return _Y."-"._m."-"._d." "._T;

    121         }

This is a routine that is just calculating and formating a date time stamp to output to the log.  Why does it have a problem now on SMARTS SAM v9.2 ?

12 Posts

February 1st, 2014 15:00

I think I found out the problem to my ASL script error.  It seems that the time() function is no longer returning the time string in the expected old format.

input = string(time()); // input="31-Dec-2001 23:59:59"

Instead it seems to be returning the date and time stamp in a different format and thus the keyword parsing routine is pulling out the wrong character fields now.  This when it tries to do the table lookup, it finds no such key match and thus throws the error I am seeing.  I will have to figure out the new format now and update the parsing of it.

12 Posts

February 2nd, 2014 16:00

Latest update on this Java ClassNotFound type of error at runtime:

I tried changing around the CLASSPATH to point to only the new jar files included with the installation of SAM V9.2 and recompiled and tried to run my SmNotify.class program again and now it shows a different class not found as follows:

Exception in thread "main" java.lang.NoClassDefFoundError: com/emc/cmp/dmt/resources/SmProperties

        at com.smarts.net.JI_Flow. (JI_Flow.java:440)

        at com.smarts.remote.SmRemoteDomainManager.attach(SmRemoteDomainManager.java:489)

        at com.smarts.remote.SmRemoteDomainManager.attach(SmRemoteDomainManager.java:427)

        at com.smarts.remote.SmRemoteBroker.attach(SmRemoteBroker.java:197)

        at SmNotify. (SmNotify.java:710)

        at SmNotify.main(SmNotify.java:547)

Caused by: java.lang.ClassNotFoundException: com.emc.cmp.dmt.resources.SmProperties

        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

        ... 6 more

Exception in thread "main" java.lang.NoClassDefFoundError: com/emc/cmp/dmt/resources/SmProperties

        at com.smarts.net.JI_Flow. (JI_Flow.java:440)

        at com.smarts.remote.SmRemoteDomainManager.attach(SmRemoteDomainManager.java:489)

        at com.smarts.remote.SmRemoteDomainManager.attach(SmRemoteDomainManager.java:427)

        at com.smarts.remote.SmRemoteBroker.attach(SmRemoteBroker.java:197)

        at SmNotify. (SmNotify.java:710)

        at SmNotify.main(SmNotify.java:547)

Caused by: java.lang.ClassNotFoundException: com.emc.cmp.dmt.resources.SmProperties

        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

        ... 6 more

Again I am using Java JDK version (on Linux RHEL6 system):

java version "1.6.0_71"

Java(TM) SE Runtime Environment (build 1.6.0_71-b12)

Java HotSpot(TM) 64-Bit Server VM (build 20.71-b01, mixed mode)

Where is the class named "com.emc.cmp.dmt.resources.SmProperties" to be found?  I searched all the given EMC jar files and could not find any mention of it.  The SmNotify.java lines of code that are given in the ERROR message above are calling the following methods:

Line 547                         SmNotify notifier = new SmNotify(local_domain);

Line 710                         broker.attach("BrokerNonsecure", "Nonsecure"); // Dynamic Model

The code is compiled successfully with no errors or warnings.  But it just does not run throwing these ClassNotFound type of errors even though all the CLASSPATH are the same as compile time.  Is there a conflict inside of the jar file packaging causing the Java Parent/Child Class Look Ups to be mismatched?

If it helps to show what import statements are in this program code, here is all what is imported:

import java.io.*;
import java.util.*;
import java.lang.*;
import java.sql.*;
import java.rmi.*;
import java.text.*;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;

import com.emc.cmp.dmt.exception.JI_ExError; // Added for SAM v9.2 01/31/2014.
import com.smarts.remote.SmRemoteDomainManager; // Added for SAM v9.2 02/02/2014.
import com.smarts.remote.SmRemoteInterfaceHandler;
import com.smarts.remote.SmRemoteBroker;
import com.smarts.remote.SmObserverEvent;
import com.smarts.remote.SmRemoteException;
import com.smarts.decs.DX_EventChoice;
import com.smarts.repos.MR_Choice;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.SQLException;

import javax.sql.DataSource;

import java.sql.PreparedStatement;

import java.sql.ResultSet;

import org.opennms.ultraview.MatrixUtils;

12 Posts

February 2nd, 2014 20:00

Where can I get a hold of the latest SAM Java API documentation that applies to SAM v9.2?  One that documents the current use of the methods used to attach and connect to a domain/broker, etc. I don't know why the old java statements that are currently in place throw errors on SAM v9.2.  Can someone provide me the url link to it.  I can't seem to find any searching for SAM Java API.

12 Posts

February 10th, 2014 07:00


Just wanted to update on the ASL code date and time stamp format issue on SAM v9.2 which was returning different than expected date and time string format than SAM v7.2.  This date time string format can be changed using some parameter settings in the runcmd_env.sh script.  After applying the parameters as follows I was able to revert the format back to the old legacy SAM v7.2 format.  The extra lines I added to the runcmd_env.sh script that fixed this format and also removes the extra long text added to output log filenames is as follows:

SM_DATETIME_FORMAT=SI_DAT_CUSTOM

SM_LOG_NAME_CUSTOM=TRUE

SM_SUBSCRIPTION_TRACE=0

12 Posts

February 10th, 2014 07:00

I just want to update this thread for my question on the SmNotify Class Not Found issue. It was solved by updating the "platform.jar" file for SAM v9.2 after it was discovered that I had an old SAM v7.2 version of the "platform.jar" file that got installed and over written the newer "platform.jar".  After recovering the correct new "platform.jar" file the Class Not Found error(s) went away at runtime.  So this particular case is resolved.

No Events found!

Top