Problem:

  • Product Name: VisiBroker for Java
  • Product Version: 8.0/8.5

When the VisiBroker for Java license properties are set programmatically in the Server.java code as shown:

java.util.Properties props = new java.util.Properties();
props.put( "borland.enterprise.licenseDir", "C:\\\\MicroFocus\\\\VisiBroker85\\\\var");
props.put( "borland.enterprise.licenseDefaultDir", "C:\\\\MicroFocus\\\\VisiBroker85\\\\license" ); 
props.put( "org.omg.CORBA.ORBClass", "com.inprise.vbroker.orb.ORB" );
props.put( "org.omg.CORBA.ORBSingletonClass", "com.inprise.vbroker.orb.ORBSingleton" );
props.put( "vbroker.agent.port", "14000" );
// ..... Set other vbroker properties .....

// Initialize the ORB.
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,props);


The following license error occurs when the Server is started using java directly (instead of using the vbj launcher):
Unable to locate or read license [Borland Enterprise Server License violation[1019]: License directory system property is not set.]

If the vbj launcher is used to start the Server, this error does not occur.

Resolution:

The license management module requires the license properties to be set in the System properties.
It does not accept the license properties that are put into a java.util.Properties and passed in to ORB.init().


To resolve the issue, set the license properties using the System.setProperty() API in Server.java as shown:

System.setProperty( "borland.enterprise.licenseDir", "C:\\\\MicroFocus\\\\VisiBroker85\\\\var" );
System.setProperty( "borland.enterprise.licenseDefaultDir", "C:\\\\MicroFocus\\\\VisiBroker85\\\\license" );

java.util.Properties props = new java.util.Properties();
props.put( "org.omg.CORBA.ORBClass", "com.inprise.vbroker.orb.ORB" );
props.put( "org.omg.CORBA.ORBSingletonClass", "com.inprise.vbroker.orb.ORBSingleton" );
props.put( "vbroker.agent.port", "14000" );
// ..... Set other vbroker properties .....

// Initialize the ORB.
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,props);


Note that if the vbj launcher is used to start the Server, then the license properties would have been set to the System properties by the launcher, so the error does not occur.