7 Replies Latest reply on Sep 20, 2012 8:24 AM by Ashitosh Wagh

    I am trying to find the Java 7 installed on servers

    Rajeev Gupta

      Hello,

       

      I am trying to create a component template to find what version of Java is installed on the Servers.

       

      I have created a Component template and added Java as the Application. But, I am getting the attached error message when I click finish. I tried the same using the complete Java(TM) x update xx but still that is giving me same error message.

       

      Any other alternative by which I can check what Java version is on all the servers? Like a smart group? what would be the conditions?

      I am using BL 8.1 currently.

        • 1. Re: I am trying to find the Java 7 installed on servers
          Ashitosh Wagh

          Hi Rajeev_bl,

           

          you can simply write NSH script which check java version on targets.

           

          e.g java -version | grep 1.7

           

          and create NSH JOB using it and run on all targets.

           

          Or if you want to use Compliance add Same NSH script as Extended object in Template and create Rule

          using that which check return value from script.

          Create Compliance Job and execute on required targets.

           

          Hope this will solve your Problem.

           

           

          Thanks

          Ashitosh

          • 2. Re: I am trying to find the Java 7 installed on servers
            Rajeev Gupta

            Thanks Ashitosh. If I create a NSH script, how can i get the result? I dont want to use the Reporting console as it is having some connectivity issues.

             

            The other option given by you is not clear to me. Could you explain please..

            • 3. Re: I am trying to find the Java 7 installed on servers
              Soundappan Shanmugam

              Rajeev,

               

              Better create an extended object based on the command and then you can create a compliance report.

               

              ___

              Cheers…

              Soundappan Shanmugam

              HP:  +91 9711156098

              honto ni shiawase da

              • 4. Re: I am trying to find the Java 7 installed on servers
                Bill Robinson

                you should not be getting that error when saving a template.  even if he creates an EO for this, if he can't create a template that's going to be a problem so let's focus on that issue.

                 

                what version of bsa are you using?

                 

                are you using the exact same version of the console and the appserver?  eg 8.2.01.273 ?

                1 of 1 people found this helpful
                • 5. Re: I am trying to find the Java 7 installed on servers
                  Ashitosh Wagh

                  Hi rajeev_bl,

                   

                  1.Try to create blank template with template name without any part added and save template.

                  2. Add Environment variable /Environment/EnvVariables/JAVA_HOME part from Hardware Information section

                      and save template

                  3.Create Rule which checks Environment Variable:/Environment/EnvVariables/JAVA_HOME".Value contains jdk7(any version you want to check) and sve template.

                  4. Create Compliance Job with above Template and execute on number of targets you will get results for all targets with compliant and non compliant.

                   

                  Now, If you received error in step 1  then as Bill said you are having problem in template saving so let us know which version of RCP and Appserver your are using.

                  And if all steps are successful then your problem is solved.

                   

                  Mark answer correct if it solves your problem or let us know if you have any problem.

                   

                  Thanks

                  Ashitosh

                  • 6. Re: I am trying to find the Java 7 installed on servers
                    Rajeev Gupta

                    Hello,

                     

                    Thanks BIll for resolving the 1st issue related to my inability to create a component template. I upgraded my console and its working.

                     

                    Now, on the second issue. As told by Ashitosh, i created the Environment variable but I am not sure if it should fall under the Hardware information section. I tested the steps as Ashitosh but its not working. Also, should I check jre7 or jdk7.

                     

                    Any changes or updates on this? how can I check the Java 7 installation on the servers?

                    • 7. Re: I am trying to find the Java 7 installed on servers
                      Ashitosh Wagh

                      Hi rajeev_bl,

                       

                      For Windows Target Environment variable is present in Environment section of Hardware Information.

                      You can add Environment Variable JAVA_HOME and create Compliance Rule for that with condition

                       

                      Environment Variable:/Environment/EnvVariables/JAVA_HOME".Value contains jdk1.7

                       

                      I tried it and it worked perfectly all right.

                       

                      If you  checking non Windows targets (Unix Targets) then you need to check from filesystem section /usr/lib/Javaversion files existence or check on Java rpms from RPM section etc.

                       

                      e.g. Add Part from file system of  Directory  /usr/lib/java-1.7.0

                       

                      And create Rule for that with condition

                       

                      "Directory:/usr/lib/java-1.7.0"   exists

                       

                      Hope this solves your Problem.

                       

                      Thanks

                      Ashitosh

                      1 of 1 people found this helpful