I got this error when i deployed OIM SPML webservice. And i was able to resolve this by appending the JBOSS_CLASSPATH with E:\jboss-4.0.2\client\commons-discovery.jar;E:\oim\jboss-4.2.3.GA-jdk6\client\commons-logging.jar; in the jboss run.bat.
Monday, January 24, 2011
Friday, December 10, 2010
Updating the Scheduled task attribute in OIM
public void updateSchedulerTimeStamp(String currentTime)
{
String methodName = "updateSchedulerTimeStamp";
// logger.setMethodStartLog(sClassName, s1);
String s2 = "Enterprise User Target Recon";
try
{
HashMap hashmap = new HashMap();
hashmap.put("Task Scheduler.Name", s2);
tcSchedulerOperationsIntf tcSchOper = (tcSchedulerOperationsIntf) getUtility("Thor.API.Operations.tcSchedulerOperationsIntf");
tcResultSet tcresultset = tcSchOper.findScheduleTasks(hashmap);
if(tcresultset != null && tcresultset.getRowCount() > 0)
{
logger.debug(className, methodName, "UPDATE TIME STAMP---->Result set has values");
tcresultset.goToRow(0);
long l = tcresultset.getLongValue("Task Scheduler.Key");
logger.debug(className, methodName, "UPDATE TIME STAMP---->Result set has values");
String s3 = String.valueOf(l);
//Task Scheduler.Task Attributes.Key logger.debug(className, methodName, "UPDATE TIME STAMP----->Task Scheduler key"+s3);
hashmap.clear();
hashmap.put("Task Scheduler.Key", s3);
hashmap.put("Task Scheduler.Task Attributes.Name", "LastRunDate");
logger.debug(className, methodName, "UPDATE TIME STAMP-----> HashMap is "+hashmap);
tcResultSet tcresultset1 = tcSchOper.findScheduleTaskAttributes(hashmap);
if(tcresultset1 != null && tcresultset1.getRowCount()>0){
tcresultset1.goToRow(0);
long l1 = tcresultset1.getLongValue("Task Scheduler.Task Attributes.Key");
logger.debug(className, methodName, "UPDATE TIME STAMP----->Task Scheduler Attribute key "+l1);
hashmap.put("Task Scheduler.Task Attributes.Value", currentTime);
logger.debug(className, methodName, "UPDATE TIME STAMP----->Current Time is "+currentTime);
tcSchOper.updateScheduleTaskAttribute(l, l1, hashmap);
}
else{
logger.debug(className, methodName, "UPDATE TIME STAMP----->Could not find any values for the scheduler attributes");
}
}
}
catch(tcAPIException tcapiexception)
{
logger.error(className, methodName, tcapiexception.getMessage());
logger.setStackTrace(tcapiexception, className, methodName, tcapiexception.getMessage());
}
catch(tcColumnNotFoundException tccolumnnotfoundexception)
{
logger.error(className, methodName, tccolumnnotfoundexception.getMessage());
logger.setStackTrace(tccolumnnotfoundexception, className, methodName, tccolumnnotfoundexception.getMessage());
}
catch(tcScheduledTaskNotFoundException tcscheduledtasknotfoundexception)
{
logger.error(className, methodName, tcscheduledtasknotfoundexception.getMessage());
logger.setStackTrace(tcscheduledtasknotfoundexception, className, methodName, tcscheduledtasknotfoundexception.getMessage());
}
catch(tcNoSuchTaskAttributeException tcnosuchtaskattributeexception)
{
logger.error(className, methodName, tcnosuchtaskattributeexception.getMessage());
logger.setStackTrace(tcnosuchtaskattributeexception, className, methodName, tcnosuchtaskattributeexception.getMessage());
}
logger.setMethodFinishLog(className, methodName);
}
Tuesday, December 7, 2010
Creating an Event Handler in OIM
- Copy the following code into a java file and then export it to the OIM-HOME\xellerate\evenhandler folder.
- Now open the Development Tools -> Business Rule Definition -> Event Handler Manager in the design console.
- Create a new Event Handler and specify:
Event Handler Name: tcGenerateRandomPassword - In the package name give the package in which the class is present.
- Select the pre-insert checkbox and then save the event handler.
- Now Goto Development Tools -> Business Rule Definition -> Data Object Manager
- Search for "Users" and add the event handler to the Pre-Insert list.
- Save it.
import java.util.Random;
import com.thortech.xl.dataobj.tcDataSet;
import com.thortech.xl.util.logging.LoggerMessages; import com.thortech.xl.util.logging.LoggerModules;
import com.thortech.util.logging.Logger;
public class tcGenerateRandomPassword extends com.thortech.xl.client.events.tcBaseEvent
{
public tcGenerateRandomPassword()
{
setEventName("Generating a random password for a User.");
}
protected void implementation() throws Exception
{
if (getDataObject().isDeleting())
{
return;
}
if (getDataObject().isUpdating())
{
return;
}
String randomPassword = getRandomPassword();
getDataObject().setString("usr_password",randomPassword);
System.out.println("The Random Password generated is -----" +randomPassword);
return;
}
private String getRandomPassword()
{
StringBuffer buffer = new StringBuffer();
Random random = new Random();
for ( int i = 0; i < 10; i++ ) {
buffer.append(((char)
('a'+random.nextInt(20))));
}
return buffer.toString();
}
}
Wednesday, December 1, 2010
Setup Eclipse Environment for OIM API debugging
- OIM Design Console must be installed. This setup uses the files installed by the OIM Design Console.
- Add the Design Console JAR files to Eclipse:
- Select your project, then select Windows -> Preferences (Eclipse -> Properties on a Mac).
- Select Java, Build Path, User Libraries from the menu items on the left.
- Click the New button, and enter a library name (OIM API Library), then click OK.
- Click the Add Jars button, navigate to the "lib" directory where your OIM Design Console is installed (OIMDesignHome/xlclient/lib), and select all the jar files. It is left as an exorcise to set the javadoc location -- these might be located somewhere in OIMDesignHome/documentation/SDK/javadocs. If you find them, please update this page.
- Add the User Library created in 2 to your Eclipses project:
- Select your project, then select Project -> Properties.
- Select Java Build Path from the menu items on the left.
- Select the Libraries tab.
- Click on the Add Library button, select User Library from the list, then Next.
- Select OIM API Library from the list, then click Finish.
- Add the files in the Design Consoles "ext" directory to the class path, and set the VM Arguments:
- Select your project, then select Project -> Properties.
- Select Run/Debug Settings form the menu items on the left.
- If a launch configuration has not already been setup for your project, click on the New button and select Java Application as the type. Otherwise, select your configuration and press the Edit button.
- On the Main tab, ensure that your Main class is set to the correct class file.
- On the Arguments tab, enter the following:
-DXL.HomeDir=. -Djava.security.policy=config/xl.policy -Djava.security.auth.login.config=config/auth.conf -Dlog4j.configuration=config/log.properties
- Change the working directory to OIMDesignHome/xlclient.
- On the JRE tab, make sure that a 1.4.2 JVM is selected. Otherwise you run the risk of using features not available to OIM.
- On the Classpath tab, select User Entries, then click on the Add External JARs button.
- Navigate to OIMDesignHome/xlclient/ext and select all the JAR files.
- Eclipse is now configured to run and debug your code that uses the OIM API.
Wednesday, November 24, 2010
Assigning Group Entitlements
The Group Entitlements form is displayed in the User Management folder. You use it
to create and move forms, and to designate the forms and folders that members of a
user group can access through the Explorer.
To designate forms and folders to user groups by using the Group Entitlements form:
1. In the Explorer, double-click Group Entitlements.
The User Group Information page is displayed.
2. In the Group Name field, enter the name of the user group.
3. Click Assign.
The User Form Assignment lookup table is displayed.
4. From the lookup table, select the user form for this user group.
Use the arrow buttons to either add or delete from the Assigned Forms list.
5. Click OK.
The newly added user forms are listed in a Group Entitlements table. The Group
Entitlements Table displays all available user groups. This table shows the name of
the user form and the type. In the Group Entitlements table, there are two types,
javaform and folder. A javaform is a Java-based, graphical interface. A folder is a
container of one or many javaforms.
to create and move forms, and to designate the forms and folders that members of a
user group can access through the Explorer.
To designate forms and folders to user groups by using the Group Entitlements form:
1. In the Explorer, double-click Group Entitlements.
The User Group Information page is displayed.
2. In the Group Name field, enter the name of the user group.
3. Click Assign.
The User Form Assignment lookup table is displayed.
4. From the lookup table, select the user form for this user group.
Use the arrow buttons to either add or delete from the Assigned Forms list.
5. Click OK.
The newly added user forms are listed in a Group Entitlements table. The Group
Entitlements Table displays all available user groups. This table shows the name of
the user form and the type. In the Group Entitlements table, there are two types,
javaform and folder. A javaform is a Java-based, graphical interface. A folder is a
container of one or many javaforms.
Subscribe to:
Posts (Atom)