Link to home
Start Free TrialLog in
Avatar of reddy2388
reddy2388

asked on

Need help in jython script creation of cluster ,datasource creation ,virtualhost

HI  
i need help in jython script
to create cluster and datasource creation    
and the arguments should taken from the app.properties
clustername ="GoogleCluster"
JVMname1 ="GoogleJvm1"
JVMname2 ="Googlejvm2"
Sqlserver "true"
oracle ="false"
driverlocation "c:/ora/"
db2 ="false"
datasourcename "GoogleSQL"
JNDIname =""
username =""
passwrd =""
servername =""
portnumber =""
databsename =""
virtualhost ="googlehost"
Hostalias ="google.internal.com" @ port 80 and @port 443

f their are two datasources  it should configure two sources

i need experts help

Thanks
Maddy

Avatar of HonorGod
HonorGod
Flag of United States of America image

When you say "JVMname1" and "JVMname2", are these supposed to be the names of the cluster members?

I presume that you want your properties file to look kind of like what is shown above...

clustername ="GoogleCluster"
JVMname1 ="GoogleJvm1"
JVMname2 ="Googlejvm2"
Sqlserver "true"
oracle ="false"
driverlocation "c:/ora/"
db2 ="false"
datasourcename "GoogleSQL"
JNDIname =""
username =""
passwrd =""
servername =""
portnumber =""
databsename =""
virtualhost ="googlehost"
Hostalias ="google.internal.com" @ port 80 and @port 443

Open in new window

Shouldn't there be an "=" after "datasourcename" ?
What "Application Server" template should be used to create your cluster members?

By the way, you might want to take a look at this article:

http://www.ibm.com/developerworks/websphere/library/techarticles/1004_gibson/1004_gibson.html

It explains the need for either a template name, or an existing Application Server to be used to create the 1st cluster member.
Avatar of reddy2388
reddy2388

ASKER

yes those are the cluster members and  and we should have  = after the dataosurce name

well can you help me with the script  honourgod
certainly...  Unfortunately, they're calling for sever thunderstorms here, so I'm going to have to unplug my computer for awhile.  I probably won't be able to get back on this evening because of the size of the storm they are showing on the weather... :-(
with regard to wsadmin commands you might fin it useful:

cellID = AdminConfig.getid('/Cell:nameofCell01/')
print AdminConfig.create('ServerCluster', cellID, '[[name FINCL]]')
print AdminConfig.create('ServerCluster', cellID, '[[name INDSKCL]]')
print AdminConfig.create('ServerCluster', cellID, '[[name INDPLCL]]')
print AdminConfig.create('ServerCluster', cellID, '[[name CRCL]]')

print AdminConfig.listTemplates('Server')

serverTemplate="default(templates/servertypes/APPLICATION_SERVER/servers/default|server.xml#Server_1)"
<OR SOME OTHER Template>

print "Server template is: " + serverTemplate

print nodeID = AdminConfig.getid('/Cell:xfinwas1Cell01/Node:xfinwas1Node01/')

clusterID = AdminConfig.getid('/Cell:xfinwas1Cell01/ServerCluster:FINCL/')

print AdminConfig.createClusterMember(clusterID, nodeID, [['memberName',  'xfinwas1member1']], serverTemplate)

and so on with cluster members.

I'm no good in jython, but browsing and iterating attribute lists you can find in some python reference.

good luck
Have you taken a look into how you want the first cluster member to be created?

- Should an Application Server Template be used, or
- Should an existing Application Server be used?

> See the article referenced in http://#a32865872 (above), and specifically look for/at the createFirstClusterMember.py sample/example script that was provided.
Well Honor god  

can you two  more attributes int app.properties

like
cell name  ="Googleinternalcell01"
 nodename1 ="Googlenode01"
 nodename 2 ="Googlenode02"

well it should  create for the existing application and  also should be used for new one too

Thanks
Maddy







Maddy:

  I'm sorry, but I don't understand this "statement"...

> well it should  create for the existing application and  also should be used for new one too

  The cellName really doesn't matter, unless you want the script to check / verify that it currently exists.

  I presume that by having nodename1, this means that ClusterMember 1 should be created on this node.  Is this correct?  And having nodename2 means that ClusterMember2 should be created on it?

  Do you understand what I mean when I say that in order to create the first cluster member that we need either an ApplicationServer template, or an existing Application Server?

can you explain me

 in order to create the first cluster member that we need either an ApplicationServer template, or an existing Application Server?

iam confused on the "ApplicationServer template, or an existing Application Server"

Thanks
Maddy

Yes.

A Cluster may have zero, or more members.
The creation of the 1st cluster member is special because it defines the pattern that will be used for the creation of all subsequent cluster members.

There are 2 ways to create the 1st cluster member.
- You can take an existing, stand-alone (i.e., unmanaged) Application Server, and "convert" it into the 1st cluster member, or
- You can create the 1st cluster member using an existing Application Server "template".

Here is a list of the APPLICATION_SERVER templates that exists in my V 7.0 environment:
wsadmin>for server in AdminConfig.listTemplates( 'Server' ).splitlines() :
wsadmin>  if server.find( 'APPLICATION_SERVER' ) > -1 :
wsadmin>    print server
wsadmin>
DeveloperServer(templates/servertypes/APPLICATION_SERVER/servers/DeveloperServer|server.xml#Server_1126128294924)
default(templates/servertypes/APPLICATION_SERVER/servers/default|server.xml#Server_1)
defaultZOS(templates/servertypes/APPLICATION_SERVER/servers/defaultZOS|server.xml#Server_1)
defaultZOS_5X(templates/servertypes/APPLICATION_SERVER/servers/defaultZOS_5X|server.xml#Server_1114121052389)
defaultZOS_60X(templates/servertypes/APPLICATION_SERVER/servers/defaultZOS_60X|server.xml#Server_1)
defaultZOS_61X(templates/servertypes/APPLICATION_SERVER/servers/defaultZOS_61X|server.xml#Server_1)
default_5X(templates/servertypes/APPLICATION_SERVER/servers/default_5X|server.xml#Server_1113587886048)
default_60X(templates/servertypes/APPLICATION_SERVER/servers/default_60X|server.xml#Server_1)
default_61X(templates/servertypes/APPLICATION_SERVER/servers/default_61X|server.xml#Server_1)
wsadmin>

Open in new window

In most instances, you are going to choose the "default" template (i.e., the 2nd in the list.

However, there may be reasons, or circumstances that guide you to choose a different template.

What is a template?  It is kind of like a stencil, or pattern, that identifies the "default values" that should be used to create the kind of object that you want.  In this case, we are talking about creating an Application Server, and more specifically, a cluster member.

Does that make sense?
If you choose to use an existing Application Server, instead of a template, then the "default settings" will be taken from the existing configuration values in the existing Application Server, instead of from the template.

Hopefully this helps.
yes honor god it helped lot

well i need to create the   cluster member with default template

can you Help me with the script

Thanks
Maddy

Yes.

Checking something... one moment please.
I hope that you realize just how non-trivial this task is...

Here's a start...

It uses the contents of the properties file (note the changed format) to create the specified cluster and cluster members...


CreateClusterMembers.py.txt
my.prop.txt
Drat.  I just realized that I had left the "save" commented out..

Changes lines 243 & 244 from this:

#   AdminConfig.save();
    AdminConfig.reset();


To this:

    AdminConfig.save();
#   AdminConfig.reset();
It's amazing what one thinks about while walking the dog... ;-)
Drat, I see that you can/should also comment out line 15:

import WAuJ_utilities as WAuJ;

should be:

# import WAuJ_utilities as WAuJ;
With those, and a few other corrections...
CreateClusterMembers.py.txt
thanks for the update let me check and get back to you i was away from my home since three days
Please be aware that I have only put in the stuff to create the cluster & members.
I haven't done anything with JAAS, or DataSources.

I wanted to get your feedback.

I hope you had a good weekend.
HI

i tested iam getting below error

C:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin>wsadmin -lang jython -f %(cmdName
)s.py C:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin\my.props
WASX7209I: Connected to process "dmgr" on node HostpCellManager01 using SOAP con
nector;  The type of process is: DeploymentManager
WASX7017E: Exception received while running file "\IBM\WebSphere\AppServer\profi
les\Dmgr01\bin\my.props"; exception information: com.ibm.bsf.BSFException: excep
tion from Jython:
Traceback (innermost last):
  (no code object) at line 0
  File "<string>", line 2
        nodeName.1     = Googlenode01
                ^

Thanks
Maddy
What is this supposed to be?

%(cmdName)s.py

You must be reading the comment, instead of the command output... ;-)

If you execute it like this:

wsadmin -lang jython -f CreateClusterMembers.py

You will see the output formatted nicely...
thanks honor god  it worked perfectly for the the creation on cluster

can you please provide same for the datasource and virtual host creation

Thanks
Maddy

ok, I'm reading chapters 12 & 13 of http://www.ibmpressbooks.com/bookstore/product.asp?isbn=9780137009527 to see if the properties file contains all of the necessary items.
did you find any thing in the book  ?

any progress in the script

Thanks
Maddy
 
Yeah, sorry for the delay.  Family issues have been consuming me.  If I don't finish it tonight, I should be able to do it by noon (Eastern US) tomorrow.
NP  I understand   hope every things goes well
see sample script file for creating datasource
createDB2Datasource.txt
sigh... AdminRAM.... Thanks for your attempts to help, but

1. This isn't in Jython, it's in Jacl
2. It doesn't use the required properties file
3. We realize that the example comes from:

http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/rdat_scriptool.html

reddy2388:

  Sorry for the delay.  I hope to finish writing, and testing the code soon.
Here's something ... Let's see how it works...  testing is needed.
CreateStuffFromPropFile.py.txt
Oh, I've made some changes to the properties file format.

How did you see the values that I put under "Unused" being used?
#-------------------------------------------------
# For Environment verification
#-------------------------------------------------
cellName       = ragweedCell02

#-------------------------------------------------
# For Cluster & Member creation:
#-------------------------------------------------
clusterName    = Cluster2
nodeName.1     = ragweedNode03
JVMname.1      = Member3
nodeName.2     = ragdollNode04
JVMname.2      = Member4

#-------------------------------------------------
# For JAASAuthData:
#-------------------------------------------------
aliasName      = ** new **
username       = 
password       = 

#-------------------------------------------------
# For JDBCProvider:
#-------------------------------------------------
classpath      = <optional>
impClassName   = <required>
JDBCname       = <required>
serverName     = <required>

#-------------------------------------------------
# For DataSource
#-------------------------------------------------
DataSourceName = <required>
JNDIname       = 

#-------------------------------------------------
# Unused
#-------------------------------------------------
db2            = false
Sqlserver      = true
oracle         = false

driverlocation = c:/ora/
databsename    = 

portnumber     = 
virtualhost    = googlehost
Hostalias      = google.internal.com @ 80 @ 443

Open in new window

well if you can change it to DS prop   [ DATA source properties ]

let me check the  code

Better...  But the "save" at the end is currently commented out.


CreateStuffFromPropFile.py.txt
I'm sorry.  But I don't understand the comment in http://#a32936705

Please explain.

C:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin>wsadmin -lang jython -f CreateStu
ffFromPropFile.py c:\properties\my1.prop
WASX7209I: Connected to process "dmgr" on node HostpCellManager01 using SOAP con
nector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are
 available as arguments that are stored in the argv variable: "[c:\properties\my
1.prop]"
New cluster    created: Cluster2
New member     created: Member3
New member     created: Member4
New alias      created: googleuser

Error: Specified server "Hostp" doesn't exist
WASX7309W: No "save" was performed before the script "CreateStuffFromPropFile.py
" exited; configuration changes will not be saved.


well its creating the cluster perfectly but for the  datasource its  throwing the error

and also for  you earlier statment  

"I'm sorry.  But I don't understand the comment in http://#a32936705"

i click on the link its not working

Thanks
Maddy
hm, I must have got the format wrong.  Sorry.

https://www.experts-exchange.com/questions/26219904/Need-help-in-jython-script-creation-of-cluster-datasource-creation-virtualhost.html?anchorAnswerId=32936705#a32936705

> Error: Specified server "Hostp" doesn't exist

  Means exactly what it says.  Is "Hostp" supposed to exist, or be created, or what?

i can ping hostp  

C:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin>ping hostp

Pinging Hostp.my.com [16.1.1.2] with 32 bytes of data:

Reply from 16.1.1.2: bytes=32 time<1ms TTL=128
Reply from 16.1.1.2: bytes=32 time<1ms TTL=128
Reply from 16.1.1.2: bytes=32 time<1ms TTL=128
Reply from 16.1.1.2: bytes=32 time<1ms TTL=128

Ping statistics for 16.1.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
but, not "Application Server" named "hostp" currently exists in the configuration.

I ask again..

Is an Application Server named "hostp" supposed to exist, be created, or what?

From your Deployment Manager:
- Open a command prompt
- "cd" to the AppServer directory
  Windows:
  > cd /d D:\IBM\WebSphere\AppServer\bin
  Unix type systems:
  # cd /opt/IBM/WebSphere/AppServer/bin
- start the wsadmin tool:
  Windows:
  > wsadmin -lang jython -c "print AdminConfig.list( 'Server' )"
  Unix type systems:
  # ./wsadmin.sh -lang jython -c print AdminConfig.list( 'Server' )"

  The Deployment Manager "should" be the default profile, if it isn't, then you'll have to add "-profileName Dmgr01" to the wsadmin command line where "Dmgr01" is the name of your Deployment Manager profile name.


#-------------------------------------------------
# For Environment verification
#-------------------------------------------------
cellName       = HostpCell01

#-------------------------------------------------
# For Cluster & Member creation:
#-------------------------------------------------
clusterName    = Cluster2
nodeName.1     = HostpNode01
JVMname.1      = Member3
nodeName.2     = HostqNode01
JVMname.2      = Member4

#-------------------------------------------------
# For JAASAuthData:
#-------------------------------------------------
aliasName      = googleuser
username       = google
password       = google

#-------------------------------------------------
# For JDBCProvider:
#-------------------------------------------------
classpath      = <optional>
impClassName   = googleclass
JDBCname       = googlejdbc
serverName     = Hostp

#-------------------------------------------------
# For DataSource
#-------------------------------------------------
DataSourceName = google
JNDIname       = googlejndi

#-------------------------------------------------
# Unused
#-------------------------------------------------
db2            = false
Sqlserver      = true
oracle         = false

driverlocation = c:/ora/
databsename    =

portnumber     =
virtualhost    = googlehost
Hostalias      = google.internal.com @ 80 @ 443


the above is the  my.prop file
i have attached the my.prop  in that you can see that i have given the database server name  hostp  where we are getting the error
the error is not on the application server creation error  

correct me if iam  wrong  

> application server creation ?!?

The error is in this section:

#-------------------------------------------------
# For JDBCProvider:
#-------------------------------------------------
classpath      = <optional>
impClassName   = googleclass
JDBCname       = googlejdbc
serverName     = Hostp

The code looks to see if a JDBCProvider exists on the Application Server named <serverName> (i.e., "Hostp").  It first does a lookup for an Application Server named "Hostp", and stops when it doesn't find one with this name...

By the way, remove the <optional>, leaving:

classpath    =

Does this make sense?
iam confused  

 normally in our environment  we get the

JNDI name .servername,portnumber,database name,username and passowrd  

we will configure under the cluster
 
my idea is to if the for DB2 value is true and Sql server the value is  true   and oracle is false

then it should configure  the Db2 and Sql server  

and the values shuld be in the my.prop  file  

can you explain more about your solution





When you say that

"normally in our environment  we get the

JNDI name .servername,portnumber,database name,username and password"

Where, and how, is this configuration performed?
On the Administration console?
Where?
What steps do you use to get there?

> my idea is to if the for DB2 value is true and Sql server the value is  true   and oracle is false, then it should configure  the Db2 and Sql server

Oh!  I didn't understand how you wanted these parameters used.
This helps, but my understanding of how to use this information is incomplete.
Can you provide more details of what you would normally do to

- configure the DB/2 server
- configure the SQL server

Thanks!
i use console   to configure the datasource  

i use standered procedure to configure  datasource

i will send you full details  by the end of the day
Wonderful.  Thanks for your help with this.
HI sorry took long time

was busy dealing with issues  


well here is the steps involved in creating the datasource

scope:cells:HostpCell01:clusters:Sessioncluster  
Datasourcename : Google
JNDI name      :jdbc/google
Database type  :Sqlserver
Provider type  :WebSphere embedded COnnectJDBC driver for MS SQL Server
Implementation type :Connectionpool datasource
Name               :WebSphere embedded ConnectJDBC driver for MS SQL Server
Databasename:
Servername  :
portnumber  :



and the script


AdminTask.createJDBCProvider('[-scope Cluster=Sessioncluster -databaseType "SQL Server" -providerType "WebSphere embedded ConnectJDBC driver for MS SQL Server" -implementationType "Connection pool data source" -name "WebSphere embedded ConnectJDBC driver for MS SQL Server" -description "IBM WebSphere Connect JDBC driver for MS SQL Server." -classpath ${WAS_LIBS_DIR}/sqlserver.jar;${WAS_LIBS_DIR}/base.jar;${WAS_LIBS_DIR}/util.jar;${WAS_LIBS_DIR}/spy.jar -nativePath ]')
AdminTask.createDatasource('"WebSphere embedded ConnectJDBC driver for MS SQL Server(cells/HostpCell01/clusters/Sessioncluster|resources.xml#JDBCProvider_1276386953625)"', '[-name Sessions1 -jndiName jdbc/Sessions1 -dataStoreHelperClassName com.ibm.websphere.rsadapter.WSConnectJDBCDataStoreHelper -componentManagedAuthenticationAlias -configureResourceProperties [[databaseName java.lang.String Sessions] [serverName java.lang.String hostt] [portNumber java.lang.Integer 1433]]]')  


I want the same  for the oracle  and DB2  

if in the my.prop  if they are enabled to true

thanks for you help


Thanks
Maddy
Thank you so much.  I understand completely.  I have been swamped myself.
I don't think I'll be able to get to it tonight, but I hope to get to it tomorrow morning, first thing!
OK NP thanks for your help
Thanks for this question.  It's forcing me to explore an area with which I have not worked much...

I'm making some progress.
I've been working on this (on and off) all day.  More work is required.

Still trying to figure out the best way to handle things.

It appears that we either have to only use AdminTask to create both the JDBCProvider and the DataSource, or AdminConfig.  We can't really mix them (without a bunch of additional work).
ok  cool hope this time we get good luck on the code  
Is the JDBCProvider always going to be associated with the newly created cluster?
yes  well my idea of this script  if we get any new request   to create the application

i would  include all the details in the my.prop  and  run the script  
That's not what I was asking.

In the first part, we create a cluster, now we're creating a JDBCProvider and DataSource(s).

Is the JDBCProvider always going to be scoped to the newly created Cluster?
Yes  it is going to scoped to new  cluster  
hi  

Are you struck @some point

let me know  if you need any info

Thanks
Maddy
Ah, I missed your update.  Thanks.  I hope to continue with this today.
making progress.  However, I do have meetings today that will take me away from this throughout the day.  I hope to have an update by end of day.  I'm sorry for the delay, but life intrudes.
ok, I'm trying to figure out a statement that you made above:

> my idea is to if the for DB2 value is true and Sql server the value is true and oracle is false
> then it should configure  the Db2 and Sql server

A DataSource is used to configure a connection to a specific kind of database using a particuar JDBCProvider.

Please define for each DB type (i.e., DB2, Oracle, SQLserver) the properties that should be used for each DB connection.

Thanks
well for the SQLserver here are the properties

well here is the steps involved in creating the datasource

scope:cells:HostpCell01:clusters:Sessioncluster  
Datasourcename : GoogleSQL
JNDI name      :jdbc/googleSQL
Database type  :Sqlserver
Provider type  :WebSphere embedded COnnectJDBC driver for MS SQL Server
Implementation type :Connectionpool datasource
Name               :WebSphere embedded ConnectJDBC driver for MS SQL Server
Databasename:
Servername  :
portnumber  :

And for oracle

well here is the steps involved in creating the datasource

scope:cells:HostpCell01:clusters:Sessioncluster  
Datasourcename : GoogleOracle
JNDI name      :jdbc/googleOracle
Database type  :ORacle
Provider type  :Oracle
Implementation type :Connectionpool datasource
driver location   :c:/ora/jdbc14.jar
Databasename:
Servername  :
portnumber  :

oracle connection string  :jdbc:oracle://<servername>:portnumber


and for DB2


Options  Values
Scope  cells:HostpCell01:clusters:Sessioncluster  
Data source name  sessions  
JNDI name  jdbc/sessions  
Component-managed authentication alias  (none)  
JDBC provider name  DB2 Universal JDBC Driver Provider  
Description  Non-XA DB2 Universal JDBC Driver-compliant Provider. Datasources created under this provider support only 1-phase commit processing except in the case where driver type 2 is used under WAS z/OS. On WAS z/OS, driver type 2 uses RRS and supports 2-phase commit processing  
Class path  ${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar ${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar ${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cisuz.jar  
${DB2UNIVERSAL_JDBC_DRIVER_PATH}  d:/DB2  
${UNIVERSAL_JDBC_DRIVER_PATH}  null  
Native path  ${DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH}  
${DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH}  d:/DB2  
Implementation class name  com.ibm.db2.jcc.DB2ConnectionPoolDataSource  
Database name  googleDB2  
Driver type  4  
Server name  IMGOOGLE  
Port number  50000  
Use this data source in container managed persistence (CMP)  true



sorry for the late reply  was involved in some trouble shooting the issues
Thanks for the detailed response!

Let me see what I can do to incorporate this information into the script.
Since you want to be able to define multiple dataSources in the properties file, I may have to add database type identification with, or as part of the property so that it is obvious to which database a property applies.

For example, there are 3 different Datasourcename properties. We need to be able to identify the appropriate DataSource for each Datasourcename.

Hopefully this makes sense.
yes it makes sense  
How does this look as a property file format?

For each database type ( DB/2, SQL Server, Oracle ), there are a group of properties with the same "prefix" (e.g., "db2.", "SQLserver.", "Oracle.")

If the main property (i.e., "db2", "SQLserver", "Oracle") has a value of "true", the associated section of the property file values will be used to define the JDBCProvider and DataSource.

How does that sound?
#-------------------------------------------------
# For DB/2
#-------------------------------------------------
db2                = true

#-------------------------------------------------
# For DB/2 - JDBCProvider
#-------------------------------------------------
db2.classpath      = ${DERBY_JDBC_DRIVER_PATH}/derby.jar
db2.implClassName  = org.apache.derby.jdbc.EmbeddedXADataSource
db2.JDBCname       = my DB2 JDBC Provider
db2.nodeName       = 
db2.serverName     = server1

#-------------------------------------------------
# For DB/2 - DataSource
#-------------------------------------------------
db2.DataSourceName = db2DSN
db2.JNDIname       =

Open in new window

This sounds good   i like the concept    so we are almost near to the completion
hi honor god

any updates


Not yet, sorry.  I had to take my son to the hospital Friday, and we've had a busy weekend going back and forth between the house and the hospital.  I Hope to make some progress today.
This needs testing...

I have to really investigate the creation of JDBCProviders and DataSources for each of the different database types...
'''
Command: %(cmdName)s\n
Purpose: wsadmin administrative script used to create a cluster, and members
         using information from a user specified properties file.\n
  Usage: wsadmin -lang jython -f %(cmdName)s.py <fileName>\n
  Where: fileName = The fully qualified path to a properties file\n
Example: ./wsadmin.sh -lang jython -f %(cmdName)s.py /temp/my.props
         wsadmin -lang jython -f %(cmdName)s.py c:\\properties\\my.props
'''

from   java.util import Properties;
from   java.io   import FileInputStream;
import sys;
import os.path;

#---------------------------------------------------------------------
# Name: PropertiesFromFile
# Role: Create a class for loading a Java style properties file
#---------------------------------------------------------------------
class PropertiesFromFile :

  #-------------------------------------------------------------------
  # Name: __init__()
  # Role: Constructor
  #-------------------------------------------------------------------
  def __init__ ( self, propertyFilename ):
    self.properties = Properties();
    try :
      inputStream   = FileInputStream( propertyFilename );
      self.properties.load( inputStream );
      inputStream.close();
    except :
      Type, value = sys.exc_info()[ :2 ];
      Type, value = str( Type ), str( value );
      print 'Error: %s\nValue: %s' % ( Type, value );

  #-------------------------------------------------------------------
  # Name: getProperty()
  # Role: Getter method for an individual property
  #-------------------------------------------------------------------
  def getProperty( self, propertyName, defaultValue = None ) :
    if defaultValue :
      result = self.properties.getProperty( propertyName, defaultValue );
    else :
      result = self.properties.getProperty( propertyName );
    return result;

  #-------------------------------------------------------------------
  # Name: getProperties()
  # Role: Getter method to return a dictionary of all property values.
  #-------------------------------------------------------------------
  def getProperties( self ) :
    result = {};
    enum = self.properties.propertyNames();
    while enum.hasMoreElements() :
      name = enum.nextElement();
      result[ name ] = self.properties.getProperty( name );
    return result;

  #-------------------------------------------------------------------
  # Name: getNumberedProperties()
  # Role: Getter method to return a list of the numbered property
  #       values that have the specified prefix
  #-------------------------------------------------------------------
  def getNumberedProperties( self, prefix ) :
    result = [];
    contents = self.getProperties();
    index = 1;
    while contents.has_key( '%s.%d' % ( prefix, index ) ) :
      result.append( contents[ '%s.%d' % ( prefix, index ) ] );
      index += 1;
    return result;

  #-------------------------------------------------------------------
  # Name: getPrefixedProperties()
  # Role: Getter method to return a dictionary of the property values
  #       that have the specified (delimited) prefix.
  # e.g.: To obtain all properties that start with "db2.*" one might
  #       use something like:
  #
  #       props    = PropertiesFromFile( 'myProperties.prop' );
  #       db2Props = props.getPrefixedProperties( 'db2' )
  #
  # Note: The prefix is separated from the suffix by a delimiter which
  #       defaults to '.' (which can be set to '' if necessary)
  #     - The prefix + delimiter combination is case sensitive
  #     - The prefix + delimiter is removed from the dictionary index
  #-------------------------------------------------------------------
  def getPrefixedProperties( self, prefix, delimiter = None ) :
    if not delimiter :
      delimiter = '.';
    start = prefix + delimiter;   # Build actual prefix outside the loop
    pLen  = len( start );         # Length of actual prefix
    result = {};                  # Dictionary to be returned
    props = self.getProperties(); # Current properties dictionary
    for name in props.keys() :   # For each existing property...
      if name.startswith( start ) :
        result[ name[ pLen: ] ] = props[ name ];
    return result;


#---------------------------------------------------------------------
#   Name: canConfigure()
#   Role: Verify that we can successfully access the AdminConfig
#         scripting object.
# Return: 1 == true  == AdminConfig scripting object is available
#         0 == false (otherwise)
#---------------------------------------------------------------------
def canConfigure() :
  try :
    s = AdminConfig.list( 'Server' )
    result = 1;
  except :
    result = 0;
  return result;


#------------------------------------------------------------------------
#   Name: getJAASByAlias()
#   Role: Get the list of JAASAuthData configIDs matching the given alias
#   Note: An alias may, or may not have a nodeName prefix, so the test
#         for a "matching" alias allows both qualified, and unqualified
#         aliases.
# Return: A list of "matching" aliases.
#------------------------------------------------------------------------
def getJAASByAlias( alias ) :
  'Return a list of all JAASAuthData configIDs matching the given alias'
  return [ j for j in AdminConfig.list( 'JAASAuthData' ).splitlines() if AdminConfig.showAttribute( j, 'alias' ).endswith( alias ) ];


#------------------------------------------------------------------------
#   Name: getObjectsByName()
#   Role: Get the list of object configIDs for the specified Type, and
#         having the given name
# Return: A list of "matching" configIDs.
#------------------------------------------------------------------------
def getObjectsByName( Type, name, scope = None ) :
  'Return a list of configIDs for all objects of the given type and having the given name'
  return [ o for o in AdminConfig.list( Type, scope ).splitlines() if AdminConfig.showAttribute( o, 'name' ) == name ];


#---------------------------------------------------------------------
#   Name: isLocalMode()
#   Role: Check to see if we are connected to an Application Server
# Return: 1 == true  == Connection exists
#         0 == false (otherwise)
#---------------------------------------------------------------------
def isLocalMode() :
  try :
    h = AdminControl.getHost()
    result = 0;
  except :
    result = 1;
  return result;


#---------------------------------------------------------------------
# Name: createProvider()
# Role: Configure the JDBCProvider using the specified dictionary values
# Note: pDict  = Dictionary containing name/value pairs
#       parent = ConfigID that defines the targeted scope
#       prefix = dictionay key prefix used to identify this property subset
#---------------------------------------------------------------------
def createProvider( pDict, parent, prefix ) :
  providerName = pDict.get( 'JDBCname' , None );        # Required
  implClass    = pDict.get( 'implClassName', None );    # Required
  classpath    = pDict.get( 'classpath', None );        # Optional
  if not providerName :
    print '\nError: Required property "%s.JDBCname" missing, or undefined.' % prefix;
    sys.exit();

  if not implClass :
    print '\nError: Required property "%s.implClassName" missing, or undefined.' % prefix;
    sys.exit();
  
  providers = getObjectsByName( 'JDBCProvider', providerName );
  numProviders = len( providers );
# print 'numProviders:', numProviders;
  if numProviders > 1 :
    print '\nError: Ambiguous "%s.JDBCname" matches %d providers.' % ( prefix, numProviders );
    jdbcP = None;
  elif numProviders == 1 :
    jdbcP = providers[ 0 ];
    print '### Verify %s.JDBCProvider information ### ?' % prefix;
    print 'Configuration details about %s.JDBCProvider "%s":' % ( prefix, providerName );
    print AdminConfig.show( jdbcP );
#   sys.exit();
  else :                     # Create the specified JDBCProvider entry
    try :
      attr  = [ item for item in [ 'name', providerName ], [ 'implementationClassName', implClass ], [ 'classpath', classpath ] if item[ 1 ] ];
      jdbcP = AdminConfig.create( 'JDBCProvider', parent, attr );
      print 'New Provider   created:', providerName;      
    except :
      errmsg = str( sys.exc_info()[ 1 ] );
      pos = errmsg.rfind( 'ADMG' );
      if pos > -1 :
        errmsg = errmsg[ pos: ];
      print '\nError: Error creating %s.JDBCProvider "%s"\n        %s' % ( prefix, providerName, errmsg );
      jdbcP = None;
  return jdbcP;


#---------------------------------------------------------------------
# Name: createDS()
# Role: Configure the DataSource using the specified dictionary values
# Note: pDict  = Dictionary containing name/value pairs
#       parent = ConfigID that defines the targeted scope
#       prefix = dictionay key prefix used to identify this property subset
#---------------------------------------------------------------------
def createDS( pDict, parent, prefix ) :
  #-------------------------------------------------------------------
  # If parent is None, we're done...
  #-------------------------------------------------------------------
  if parent :
    #-------------------------------------------------------------------
    # Find and replace, or create, the necessary DataSource
    #-------------------------------------------------------------------
    dsn  = pDict.get( 'DataSourceName', None );      # Required
    jndi = pDict.get( 'JNDIname'      , None );      # Optional

    dss = getObjectsByName( 'DataSource', dsn );
    numDS = len( dss );
    if numDS > 1 :
      print '  Error: Ambiguous "%s.DataSourceName" matches %d DataSources.' % ( prefix, numDS );
      ds = None;
    elif numProviders == 1 :
      ds = dss[ 0 ];
      print '### Verify %s.DataSource information ### ?' % prefix;
      print 'Configuration details about %s.DataSource "%s":' % ( prefix, dsn );
      print AdminConfig.show( ds );
#     sys.exit();
    else :                     # Create the specified DataSource entry
      try :
        attr = [ item for item in [ [ 'name', dsn ], [ 'jndiName', jndi ] ] if item[ 1 ] ];
        ds = AdminConfig.create( 'DataSource', jdbcP, attr );
        print 'New DataSource created:', dsn;
      except :
        errmsg = str( sys.exc_info()[ 1 ] );
        pos = errmsg.rfind( 'ADMG' );
        if pos > -1 :
          errmsg = errmsg[ pos: ];
        print 'Error: Error creating %s.DataSource "%s"\n       %s' % ( prefix, dsn, errmsg );
        ds = None;
  else :
    ds = None;
  return ds;


#---------------------------------------------------------------------
# Name: createPandDS()
# Role: Configure the appropriate JDBCProvider & DataSource
# Note: pDict  = Dictionary containing name/value pairs
#       parent = ConfigID that defines the targeted scope
#       prefix = String used to identify properties to be used
#---------------------------------------------------------------------
def createPandDS( pDict, parent, prefix ) :
  props    = pDict.getPrefixedProperties( prefix );
  provider = createProvider( props, parent, prefix ) :
  return createDS( props, provider, prefix ) :


#---------------------------------------------------------------------
# Name: main()
# Role: Perform the actual script action 
#---------------------------------------------------------------------
def main() :
  #-------------------------------------------------------------------
  # How many user specified parameters / arguments where provided?
  #-------------------------------------------------------------------
  argc = len( sys.argv );
  if argc != 1 :
    print '  Error: Missing required parameter - fileName';
    Usage();

  #-------------------------------------------------------------------
  # Is it a valid filename?
  #-------------------------------------------------------------------
  fileName = sys.argv[ 0 ];
  if not os.path.isfile( fileName ) :
    print '  Error: Invalid input file: %s' % fileName;
    Usage();

  #-------------------------------------------------------------------
  # Load the properties from the specified file as a dictionary.
  #-------------------------------------------------------------------
  props    = PropertiesFromFile( fileName );
  propDict = props.getProperties();

  #-------------------------------------------------------------------
  # Can we access the AdminConfig scripting object?
  #-------------------------------------------------------------------
  if not canConfigure() :
    print '  Error: AdminConfig scripting object unavailable.';
    Usage();

  #-------------------------------------------------------------------
  # Are we connected to a Deployment Manager?
  #-------------------------------------------------------------------
  if not isLocalMode() :
    cell = AdminControl.getCell();
    node = AdminControl.getNode();
    bean = AdminControl.completeObjectName( 'cell=%(cell)s,node=%(node)s,type=Server,*' % locals() );
    Type = AdminControl.getAttribute( bean, 'processType' );
    if Type != 'DeploymentManager' :
      print '  Error: Connection must be to a DeploymentManager, not a(n)', Type;
      Usage();
  else :
    numNodes = len( AdminConfig.list( 'Node' ).splitlines() );
    if numNodes < 2 :
      print '  Error: Multiple nodes must exist in the configuration, but only %d do' % numNodes;
      Usage();

  #-------------------------------------------------------------------
  # We are either in localMode, or we're connected to a DM
  #-------------------------------------------------------------------
  # Let's start checking some properties...
  #-------------------------------------------------------------------
  cellName = AdminConfig.list( 'Server' ).splitlines()[ 0 ].split( '/', 2 )[ 1 ];
  propName = propDict.get( 'cellName', '' );
  if propName != '' and propName != cellName :
    print '\nError: Unexpected cellName.  Actual = "%s"  Expected = "%s"' % ( cellName, propDict[ 'cellName' ] );
    Usage();

  #-------------------------------------------------------------------
  # Required parameter: clusterName
  #-------------------------------------------------------------------
  clusterName = propDict.get( 'clusterName', '' );
  if clusterName == '' :
    print '\nError: Required property "clusterName" missing, or undefined.'
    Usage();

  #-------------------------------------------------------------------
  # Is this an existing cluster, or do we need to create a new one?
  #-------------------------------------------------------------------
  found = 0;
  for clusterID in AdminConfig.list( 'ServerCluster' ).splitlines() :
    if clusterID.startswith( clusterName + '(' ) :
      found = 1;
      print 'Using existing cluster: ' + clusterName;
      break;
  
  #-------------------------------------------------------------------
  # We need to (try) to create a new, empty cluster
  #-------------------------------------------------------------------
  if not found :
    try :
      clusterID = AdminTask.createCluster( '[-clusterConfig [-clusterName %s ] ]' % clusterName );
      print 'New cluster    created: ' + clusterName;
    except :
      print '\nError: AdminTask.createCluster() failed.\n\n' + str( sys.exc_info()[ 1 ] );
      sys.exit();

  #-------------------------------------------------------------------
  # Verify that the default ApplicationServer template exists
  #-------------------------------------------------------------------
  if not len( [ t for t in AdminConfig.listTemplates( 'Server', 'APPLICATION_SERVER' ).splitlines() if t.startswith( 'default(' ) ] ) :
    print 'Error: "default" Application Server template not found.'
    sys.exit();

  #-------------------------------------------------------------------
  # members and nodes are lists of ClusterMembers and the nodes on
  # which they should be created:
  # members[ 0 ] should be created on nodes[ 0 ]
  #-------------------------------------------------------------------
  members = props.getNumberedProperties( 'JVMname' );
  nodes   = props.getNumberedProperties( 'nodeName' );
  if len( members ) != len( nodes ) :
    print 'Error: mismatched entries.  There are %d "JVMname" and %d "nodeName" properties' % ( len( members ), len( nodes ) );
    sys.exit();

  #-------------------------------------------------------------------
  # How many cluster members currently exist?
  # We need to know because for the 1st member of a cluster, the
  # -templateName attribute must be supplied.
  #-------------------------------------------------------------------  
  numMembers = len( AdminConfig.list( 'ClusterMember', clusterID ).splitlines() );

  #-------------------------------------------------------------------
  # Create the new members
  #-------------------------------------------------------------------
  for i in range( len( members ) ) :
    memberName, nodeName = members[ i ], nodes[ i ];
    if numMembers + i :
      first = '';
    else :
      first = '-firstMember [-templateName default]';
    mbrCfg  = '-memberConfig [-memberNode %s -memberName %s]' % ( nodeName, memberName );
    options = '[-clusterName %s %s %s]' % ( clusterName, mbrCfg, first );
    try :
#     print 'AdminTask.createClusterMember( %s )' % options;
      AdminTask.createClusterMember( options );
      print 'New member     created:', memberName;
    except :
      errmsg = str( sys.exc_info()[ 1 ] );
      if errmsg.rfind( 'ADMG' ) > -1 :
        errmsg = errmsg[ errmsg.rfind( 'ADMG' ): ];
      print 'Error creating Member %s - %s' % ( memberName, errmsg );
      sys.exit();

  #-------------------------------------------------------------------
  # Check for JAASAuthData related properties...
  #-------------------------------------------------------------------
  aliasName = propDict.get( 'aliasName', '' );
  if aliasName == '' :
    print '\nError: Required property "aliasName" missing, or undefined.';
    Usage();

  #-------------------------------------------------------------------
  # How many aliases match the specified value?
  #-------------------------------------------------------------------
  username = propDict.get( 'username', '' );
  password = propDict.get( 'password', '' );
  security = AdminConfig.list( 'Security' );  # Singleton security object
  aliasIDs = getJAASByAlias( aliasName );
  numAlias = len( aliasIDs );
  if numAlias > 1 :
    print '\nError: Ambiguous "aliasName" matches %d aliases.' % numAlias;
    sys.exit();
  elif numAlias == 1 :
    alias = aliasIDs[ 0 ];
    print 'Configuration details about alias "%s":' % aliasName;
    print AdminConfig.show( alias );
    print '### Verify JAASAlias ### ?'
#   sys.exit();
  else :                     # Create the specified JAASAuthData entry
    if ( username == '' ) or ( password == '' ) :
      print '\nError: "username" and "password" are required to create alias "%s".' % aliasName;
      sys.exit();
    else :
      try :
#       print 'create JAASAuthData alias "%s"  userId "%s"  password "%s"' % ( aliasName, username, password );
        alias = AdminConfig.create( 'JAASAuthData', security, [ [ 'alias', aliasName ], [ 'userId', username ], [ 'password', password ] ] )
        print 'New alias      created:', aliasName;
      except :
        errmsg = str( sys.exc_info()[ 1 ] );
        print '\nError: Unable to create JAASAuthData with alias "%s"\n       %s' % ( aliasName, errmsg );
        sys.exit();

  #-------------------------------------------------------------------
  # Locate the specified Application Server [which must be unique]
  #-------------------------------------------------------------------
  serverName = propDict.get( 'serverName', '' );
  nodeName   = propDict.get( 'nodeName', None );
  if not serverName :
    print '\nError: The required "serverName" property, is missing, or undefined.'
    sys.exit();

  if nodeName :
    node = AdminConfig.getid( '/Node:%s/' % nodeName );
  else :
    node = None;
  servers = getObjectsByName( 'Server', serverName, node );
  numServer = len( servers );
  if numServer > 1 :
    print '\nError: Ambiguous "serverName" matches %d entries.' % numServer;
    sys.exit();
  elif numServer == 1 :
    server = servers[ 0 ];
  else :
    print "\nError: Specified server \"%s\" doesn't exist" % serverName;
    sys.exit();

  #-------------------------------------------------------------------
  # What kinds of  JDBCProvider and DataSources need to be created?
  #-------------------------------------------------------------------
  for dbType in [ 'db2', 'SQLserver', 'oracle' ]:
    if propDict.get( dbType, 'false' ).lower() == 'true' :
      createPandDS( propDict, clusterID, dbType );

  #-------------------------------------------------------------------
  # Have changes been made?  If so, save them.
  #-------------------------------------------------------------------
  if AdminConfig.queryChanges() :
#   print 'Saving configuration changes';
#   AdminConfig.save();
    print 'Discarding configuration changes.'
    AdminConfig.reset();
  else :
    print 'No configuration changes have been made.';


#---------------------------------------------------------------------
# Name: showAsDict
# Role: Convert result of AdminConfig.show( configID ) to a dictionary
# From: WebSphere Application Server Administration using Jython
#   By: Robert A. (Bob) Gibson [rag], Arthur Kevin McGrath, Noel J. Bergman
# ISBN: 0-137-00952-6
#---------------------------------------------------------------------
def showAsDict( configId ) :
  'showAsDict( configId ) - Return a dictionary of the AdminConfig.show( configID ) result.'
  result = {};
  try :
    #-----------------------------------------------------------------
    # The result of the AdminConfig.show() should be a string
    # containing many lines.  Each line of which starts and ends
    # with brackets.  The "name" portion should be separated from the
    # associated value by a space.
    #-----------------------------------------------------------------
    for item in AdminConfig.show( configId ).splitlines() :
      if ( item[ 0 ] == '[' ) and ( item[ -1 ] == ']' ) :
        ( key, value ) = item[ 1:-1 ].split( ' ', 1 );
        if ( value[ 0 ] == '"' ) and ( value[ -1 ] == '"' ) :
          value = value[ 1:-1 ];
        result[ key ] = value;
  except NameError, e :
    print 'Name not found: ' + str( e );
  except :
    kind, value = sys.exc_info()[ :2 ];
    print 'Exception  type: ' + str( kind );
    print 'Exception value: ' + str( value );
  return result;


#---------------------------------------------------------------------
# Name: Usage()
# Role: Display script usage information, and terminate the script.
#---------------------------------------------------------------------
def Usage( cmdName = None ) :
  if not cmdName :
    cmdName = 'CreateStuffFromPropertiesFile';
  print __doc__ % locals();
  sys.exit();


#---------------------------------------------------------------------
# Name: <none>
# Role: verify that script was executed, not imported.
#---------------------------------------------------------------------
if ( __name__ == '__main__' ) or ( __name__ == 'main' ) :
  main();
else :
  print '  Error: This script must be executed, not imported.';
  Usage( __name__ );

Open in new window

Wow

let me test on my testing server  

thanks for  co-operation  and effort on this  
can you send me the property file  which you have used
something like this...

I know that it's not yet complete, but we are much closer...
#-------------------------------------------------
# For Environment verification
#-------------------------------------------------
cellName       = 

#-------------------------------------------------
# For Cluster & Member creation:
#-------------------------------------------------
clusterName    = Cluster2
nodeName.1     = myNode01
JVMname.1      = Member3
nodeName.2     = otherNode02
JVMname.2      = Member4

#-------------------------------------------------
# For JAASAuthData:
#-------------------------------------------------
aliasName      = newAlias
username       = myUserName
password       = password

#-------------------------------------------------
# Unused, at least not yet...
#-------------------------------------------------
portnumber     = 
virtualhost    = googlehost
Hostalias      = google.internal.com @ 80 @ 443
driverlocation = c:/ora/
databsename    = 

#-------------------------------------------------
# For DataBase types
#-------------------------------------------------
db2            = true
SQLserver      = false
oracle         = false

#-------------------------------------------------
# For DB2 JDBCProvider:
#-------------------------------------------------
db2.classpath      = 
db2.implClassName  = 
db2.JDBCname       = my DB2 JDBC Provider
db2.nodeName       = myNode01
db2.serverName     = server1

#-------------------------------------------------
# For DB2 DataSource
#-------------------------------------------------
db2.DataSourceName = myDSN
db2.JNDIname       = 

#-------------------------------------------------
# For SQL Server JDBCProvider:
#-------------------------------------------------
SQLserver.classpath      = 
SQLserver.implClassName  = 
SQLserver.JDBCname       = my SQL Server JDBC Provider
SQLserver.nodeName       = myNode01
SQLserver.serverName     = server1

#-------------------------------------------------
# For SQL Server DataSource
#-------------------------------------------------
SQLserver.DataSourceName = myDSN
SQLserver.JNDIname       = 

#-------------------------------------------------
# For Oracle JDBCProvider:
#-------------------------------------------------
oracle.classpath      = 
oracle.implClassName  = 
oracle.JDBCname       = my SQL Server JDBC Provider
oracle.nodeName       = myNode01
oracle.serverName     = server1

#-------------------------------------------------
# For Oracle Server DataSource
#-------------------------------------------------
oracle.DataSourceName = myDSN
oracle.JNDIname       =

Open in new window

HI  

Iam getting the following error


C:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin>wsadmin -lang jython -f CreateStu
ffFromPropFile1.py c:\properties\my2.prop
WASX7209I: Connected to process "dmgr" on node HostpCellManager01 using SOAP con
nector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are
 available as arguments that are stored in the argv variable: "[c:\properties\my
2.prop]"
WASX7017E: Exception received while running file "CreateStuffFromPropFile1.py";
exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  (no code object) at line 0
  File "<string>", line 258
          provider = createProvider( props, parent, prefix ) :
                                                             ^
SyntaxError: invalid syntax


hi

any idea on these errors  ?

Thanks
Maddy
I'm sorry, I didn't see your earlier update.  Let me see what I can do.

I got my son home from the hospital, and that is consuming quite a bit of my time though, so I can't promise a quick turn-around.  Hopefully this will be quite soon and I can resolve these issues.  

Sorry...
SOLUTION
Avatar of HonorGod
HonorGod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
NP let me check  
C:\IBM\WebSphere\AppServer\profiles\AppSrv01\bin>wsadmin -lang jython -f CreateS
tuffFromPropFile1.py c:\properties\my1.prop
WASX7209I: Connected to process "dmgr" on node HostpCellManager01 using SOAP con
nector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are
 available as arguments that are stored in the argv variable: "[c:\properties\my
1.prop]"
New cluster    created: Cluster2
New member     created: Member3
New member     created: Member4
New alias      created: googleuser

Error: Specified server "16.1.1.2" doesn't exist
WASX7309W: No "save" was performed before the script "CreateStuffFromPropFile1.p
y" exited; configuration changes will not be saved.



iam getting the above error


C:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin>ping 16.1.1.2

Pinging 16.1.1.2 with 32 bytes of data:

Reply from 16.1.1.2: bytes=32 time<1ms TTL=128
Reply from 16.1.1.2: bytes=32 time<1ms TTL=128
Reply from 16.1.1.2: bytes=32 time<1ms TTL=128
Reply from 16.1.1.2: bytes=32 time<1ms TTL=128

Ping statistics for 16.1.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms  

Honor god any  update on the error iam getting
I apologize.  I forgot that this was still open.

Can you provide the input file that was used?

That is: c:\properties\my1.prop
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial