Unable to establish a connection with IDM DB

Hello
I have a java code which updates user table in the staging table. His task in process adapter. Please help me find the error - I am not able to establish a connection with IDM DB. The error I get is 12/02/27 03:31:36 nameIDM of IT resources
DEBUG, February 27, 2012 03:31:36, 767, [XELLERATE. API], class/method: tcITResourceInstanceOperationsBean/findITResourceInstances entered.
DEBUG, February 27, 2012 03:31:36, 774, [XELLERATE. API], class/method: tcITResourceInstanceOperationsBean/findITResourceInstances to the left.
ERROR, February 27, 2012 03:31:36, 778, [COM ROSS. IAM. IOM. GENERATEUSERATTRIBUTE], could not initialize: Thor.API.Exceptions.tcAPIException: index of the line out of bounds


Here is the code:

package com.ross.iam.oim;

import java.sql.Statement;
import java.sql.Connection;
to import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
Import Thor.API.tcResultSet;
Import Thor.API.tcUtilityFactory;
Import Thor.API.Exceptions.tcAPIException;
Import Thor.API.Exceptions.tcColumnNotFoundException;
Import Thor.API.Exceptions.tcITResourceNotFoundException;
Import Thor.API.Operations.tcITResourceInstanceOperationsIntf;
Import Thor.API.Operations.tcUserOperationsIntf;
import com.thortech.util.logging.Logger;
import com.thortech.xl.dataaccess.tcDataProvider;


public class changeUsrEndDate {}
Private static final Logger log = Logger.getLogger (GenerateUserAttribute.class.getName ());
private tcUserOperationsIntf usrOps;
private tcITResourceInstanceOperationsIntf moITResIntf = null;
private String DBDatabaseName;
private String DBDriver;
private String DBUser;
private String DBPassword;
private String DBURL;
Connection con = null;
String itResourceName = null;

public changeUsrEndDate()
{
}

public changeUsrEndDate (dataProvider tcDataProvider, String itResourceName, String UserID, String Password, String DatabaseName, String URL, String Driver) bird Exception {}
try {}
String hashkey = null;
Dim hashvalue = null;
String itResourceName = null;
this.usrOps = ((tcUserOperationsIntf) tcUtilityFactory.getUtility (dataProvider, "Thor.API.Operations.tcUserOperationsIntf"));
this.moITResIntf = ((tcITResourceInstanceOperationsIntf) tcUtilityFactory.getUtility (dataProvider, "Thor.API.Operations.tcITResourceInstanceOperationsIntf"));
HashMap itResNameMap = new HashMap();

itResNameMap.put ("TI Resources.Name", itResourceName);
System.out.println ("Name of the resource IT" + itResourceName);
tcResultSet itResourceRes = (itResNameMap) this.moITResIntf.findITResourceInstances;
itResourceRes.goToRow (0);
long itResKey = itResourceRes.getLongValue ("TI Resources.Key");
System.out.println ("it resource key" + itResKey);
HashMap itResKeyValueMap = new HashMap();
tcResultSet itResKeyValue = (itResKey) this.moITResIntf.getITResourceInstanceParameters;
System.out.println ("Value of the IT resource" + itResKeyValue);
rowCount int = itResKeyValue.getRowCount ();
for (int j = 0; j < rowCount; j ++) {}
itResKeyValue.goToRow (j);
System.out.println ("row" + j);
hashkey = itResKeyValue.getStringValue ("IT Resource Type Definition.IT Type Parametr.Field resource name");
HashValue = itResKeyValue.getStringValue ("IT resources Type parameter Value.Value");
itResKeyValueMap.put (hashkey, hashvalue);
}

DBDatabaseName = ((String) itResKeyValueMap.get ("DatabaseName"));
System.out.println ("DatabaseName" + DatabaseName);
DBDriver = ((String) itResKeyValueMap.get ("Driver"));
System.out.println ("Driver" + DBDriver);
DBUser = ((String) itResKeyValueMap.get ("UserID"));
System.out.println ("userid" + dbuser);
DBPassword = ((String) itResKeyValueMap.get ("Password"));
System.out.println ("password" + dbpassword);
DBURL = ((String) itResKeyValueMap.get ('URL'));
System.out.println ("URL" + DBURL);

}
catch (Exception e) {}
log. Error ("failed to initialize the:" + e);
}
}

public String usrRecords (String userEndDate, String ntLogonName) throws tcITResourceNotFoundException, tcAPIException
{
HashMap usrMap = new HashMap();
Statement stmt = null;
Instruction stmt1 = null;
ResultSet results = null;
ResultSet results 1 = null;
ResultSet 2 = null;
String result = null;
usrMap.put ("USR_END_DATE", userEndDate);
System.out.println ("end user date" + userEndDate);
usrMap.put ("USR_UDF_NTLOGON", ntLogonName);
System.out.println ("ntlogon username" + ntLogonName);
try {}
System.out.println ("before the get connection" + con);
con = getConnection().
System.out.println ("get connection" + con);
results = stmt.executeQuery ("select * from ud_co_extn_q where udf_extn_ntlogon ='" + ntLogonName + "' and udf_extn_extended IS NULL");
While (results.next ()) {}
System.out.println ("inside any block");
Results 1 = (stmt1) .executeQuery ("select USR_END_DATE from usr where udf_extn_ntlogon ='" + ntLogonName + "'");
2 = (stmt1) .executeQuery ("update ud_co_extn_q set udf_extn_extended =" + userEndDate + "where udf_extn_ntlogon ='" + ntLogonName + "'");
}
}
catch (SQLException to) {}
log. Error ("Exception occurred - SQL Exception:" + se.getMessage ());
se.printStackTrace ();
log. Debug ("cleanup of resources DB");
try {}
Results.Close ();
results2. Close();
If (stmt! = null)
stmt. Close();
If (this.con! = null)
This.con.Close ();
} catch (SQLException ex) {}
log. Error ("an error occurred during the cleanup of resources DB" + ex.getMessage ());
}
} return result;
}

Private connection getConnection () throws SQLException
{
Try
{
Class.forName (DBDriver) .newInstance ();
} catch (InstantiationException e) {}
} catch (IllegalAccessException e) {}
} catch (ClassNotFoundException e) {}
}

Connection con = (Connection) DriverManager.getConnection (DBURL, DBUser, DBPassword);
con.setAutoCommit (true);
return con;
}


}



Please suggest if anyone were facing a similar situation.


Thank you
Kalpana.

two things I noticed here

1. you don't have createStatement() call before executeQuery
2. you must use executeUpdate() instead of executeQuery()

use as below
Statement st = con.createStatement ();
ResultSet rs = st.executeUpdate (query);

IF you are using 10 g and am trying to update DB why not try below

dataSet tcDataSet = new tcDataSet();
dataProvider = getDataBase() tcDataProvider;
String oneTimeQuery = "SELECT count (*) AS the account OF UGP.
+ ' WHERE UPPER (UGP_NAME) =' "+ group +" ' ";
dataSet.setQuery (dataProvider, oneTimeQuery);
dataSet.executeQuery ();

Look below at the link to update the db in 10g
update in tcDataSet query

-nayan

Tags: Fusion Middleware

Similar Questions

  • WARNING: Unable to update the preferences of the user has failed to establish a connection with the server of history. Service could be down. Please try again later.

    Error when you try to import

    WARNING: Unable to update the preferences of the user

    Cannot establish a connection with the server of history. Service could be down. Please try again later.

    Can you please try again? Please let us know if you still experience this issue.

  • The Bluetooth device in the iMac screen must be certified for IFM establishes a connection with the iPhone?

    I'm trying to establish a connection between my iPhone and my iMac. The Bluetooth device in the iMac screen must be certified for IFM establishes a connection with the iPhone?

    This connectivity is not supported (except to attach them). What you trying to do?

    Barry

  • When you try to activate Windows I get an error: Code 45123 could not establish a connection with the activation server.

    the error number is 45123 and said "we could not establish a connection with the activation server." Please give me an answer to this error and try to solve it! If you want I can send you my product key to activate it, but I think it's better on email not here because there are a lot of... the pirates who have access to this site! provide me with an email address and I'll send you my product key and try to activate it and then give me the id I need to enter the activation window! Thank you!

    I solved this problem! Thanks for the help!

  • System will not be activated. Receive the error message "system could not establish a connection with the activation server.

    Activation.

    My OS system has been altered, so I formatted and installed new, but can not activate. I have this installation id 348020-631951-163976-154093-556113-629786-940105-229483-661432, I need confirmation id because my system could not establish a connection with the activation server

    How to activate Windows XP
    http://support.Microsoft.com/kb/307890/en-us

    See the section titled: "how to activate Windows XP by phone.
    Also, make sure that you do not confuse the product key numbers and letters
    (number 8 for the letter B, etc.)

    How to contact a Microsoft Product Activation Center:
    http://support.Microsoft.com/default.aspx/KB/950929/en=us

    Microsoft Activation centers worldwide telephone numbers:
    http://www.Microsoft.com/licensing/existing-customers/activation-centers.aspx
    (This site is for activating Volume License, but if you call, they will help you)

    The phone number is not working:
    Microsoft Wordwide contacts: http://www.microsoft.com/worldwide/default.aspx

    Once Windows activated / Genuine Advantage Notifications:
    http://www.Microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=afd45b36-3d77-4259-801c-d31a9a90cdcf
    (This tool will confirm that the copy of Windows installed on your PC is genuine and authorized)

    J W Stuart: Http://www.pagestart.com

  • Establish a connection with the server

    Hello

    Read the docs and came across two ways to establish a connection with the server of a customer.

    ' (1) easy login:-sqlplus hr@\"//mymachine.mydomain:port/MYDB\.
    (2) name of network service:-sqlplus hr@MYDB.

    While establishing a connection to a server, we use sql * net services (if not jdbc or odbc), which should be present at the server end and the customer. So what is the fundamental difference between the mechanisms of above two connections?




    Thank you and best regards,
    Saidi.

    See http://www.orafaq.com/wiki/EZCONNECT.

    The difference is described in the first line.

    ----------
    Sybrand Bakker
    Senior Oracle DBA

  • Firefox and safari... can not establish a connection with the server of http sites

    Hi I have a mcbook pro loaded with OSX X Yosemite 10.10.3. For some time on safari and firefox I can access https sites only and get an error message "Unable to connect", then then specifically line "Firefox can't establish a connection to the server www.seek.co.nz.

    On the same network, I have an iMac OSX X Yosemite 10.10.5 running and can access http sites that my laptop will not. I compared the network settings and they are identical, I disabled the extension and erased the caches, but always without success. Any siggestions?

    Hello. Take a look at this article, maybe this will help you. OS X Yosemite: If you can't connect to the Internet

  • Unable to make the connection with oracle (database sqlserver) non-oracle

    We are unable to connect with the database of sql server after you have created the dblink to the oracle server.

    tnsping everything works very well between the oracle and SQL Server for database, database

    Please provide us with the solution for this problem.

    The problem is that the HS_FDS_CONNECT_INFO in theinit .ora bridge was not properly configured.

    Using the format-

    HS_FDS_CONNECT_INFO =//.

    has permits the connection works.

  • Essbase Studio Error (1021001): could not establish a connection with SQL data

    Hello.

    I try to deploy a cube Essbase Studio but I get the error: "* Error (1021001): could not establish connection to the SQL database server."

    My environment is Linux 5, Oracle 11 g and EMP 11.1.1.2. Database Oracle and Essbase has been installed with different users. The .bash_profile to hypadmin user (i.e. install Essbase) I put the following variables

    ORACLE_BASE=/U01/app/OracleDB/product/11.1.0
    ORACLE_HOME = $ORACLE_BASE/db_1
    LD_LIBRARY_PATH = / usr/X11R6/lib: $ORACLE_HOME/lib: $LD_LIBRARY_PATH
    ORACLE_HOSTNAME = DevBi.sigfe2
    PATH = $ORACLE_HOME/bin: $ORACLE_HOME/jdk/bin: $ORACLE_HOME/bin: / sbin: $ORACLE_HOME/opmn/bin: $PATH
    ORACLE_SID = orcl
    JAVA_HOME=/U01/app/InstallFiles/JDK1.5.0_19


    In my pc (windows xp), I can open the Essbase Studio console, the connection to the Oracle server, get the tables and create a minischema of measures and hierarchies (I can see the preview of hierarchies). I also can create cubes with EAS and can connect with MAXSHELL to essbase.

    When I try to deploy the cube of Essbaes Studio there get the error ' Error (1021001): failed to establish connection to SQL Database Server.

    The Essbase Studio log file says:

    + 12: 40:16 24/07/09 (admin-1) NEWS beginning hierarchical creation in the database "5.4.0.41:1423.POC_ESS. POC_ESS1 '... +»
    + 12: 40:16 24/07/09 (admin-1) FINA signed on Essbase by CSS token "5.4.0.41:1423" successfully... +.
    + 12: 40:16 24/07/09 (admin-1) building INFO Start dimension 'DM_CIUDADES'... +.
    + 12: 40:16 24/07/09 (admin-1) MAS FINA start creating rule file... +.
    + 12: 40:16 24/07/09 (admin-1) INFO SQL statement was created and implemented rule /home/hypadmin/hyperion/products/Essbase/EssbaseStudio/Server/./ess_japihome/data/DM_CIU.rul"+ file «»
    + 12: 40:16 24/07/09 INFO (admin-1) the query is "SELECT (CONCAT ("reg_", CAST (cp_105." ((ID_REGIONPADRE' AS VARCHAR2 (1000))) as 'REGION_PADRE', (CONCAT ("reg_", CAST (cp_105. (("' Be ' AS VARCHAR2 (1000))) as 'REGION_HIJO', cp_105. "' DE_REGION ' as 'REGION_HIJO. Defaults to"GO"POC ". "" Cp_105 ORDER BY DM_REGIONES_ESS3 cp_105. "" CSA DE_NIVEL ', cp_105. "" CSA ID_REGIONPADRE ', cp_105. "' BE ' ASC ' + '.
    + 12: INFO file 40:16 24/07/09 (admin-1) rule has been created and saved as "/home/hypadmin/hyperion/products/Essbase/EssbaseStudio/Server/./ess_japihome/data/DM_CIU.rul"+ ".
    + 12: 40:16 24/07/09 (admin-1) FINA Essbase starts to add members to DM_CIUDADES dimensioin based on the rules file. +
    + 12: 40:16 24/07/09 (admin-1) ADVERTENCIA (1021001): error al set conexion con el servidor SQL databases. Check out el registro for more information. +
    + 12: 40:16 24/07/09 (admin-1) ADVERTENCIA essbaseDriver.FailedToBuildDimensionException +.
    + 12: unexpected exception SERIOUS cubes from 24/07/09 (admin-1) 40:16 + EssbaseExport to be deployed
    -Exception-
    com.hyperion.cp.datasources.export.essbase.EssbaseDriverException: could not deploy Essbase cube
    ....


    Thank you for everyone who has an idea to help me solve this problem.

    A.S.

    Hello

    If you type database SID lowercase, try entering ITO uppercase. Strange, but my colleagues and I encounter this behavior several times.

  • I get error message "Unable to establish internet connection" when I try and run updates.

    I have no problem connecting with other programs.

    solved the problem myself.

    the answer was in the list of "services".
  • I am able to connect to the internet with internet explorer, but when I try to connect through mozilla firefox it says "it is impossible to establish a connection with the server." why? "

    I can establish an internet connection via internet explore using a router at home, but whenever I try to connect using firefox, it said that it is impossible to connect.

    One possible cause is security software (firewall) that blocks or limits Firefox without you informing on this subject, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox in the list of permissions in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container.

    See Server not found - the problems of connection and Configure the firewall so that Firefox can access the Internet and http://kb.mozillazine.org/Firewalls

  • Cannot establish a connection with SQL Developer

    I'm trying to use SQL Developer 1.5.1 build HAND-5440 on laptop Vista Home Premium x 64 mi. When I go again and try to create a new connection: nothing happens. No Panel opens up or anything. I have the last jdk installed. I downloaded developer sql several times without making any progress. Am I missing something? I should clarify that I did not run install everything, I just run the sqldeveloper.exe.

    Thank you
    JD

    Published by: JuanDiego Prudot on 15-ene-2009 08:19

    Last thing I can think is a problem with your locale. Add these +\sqldeveloper\bin\sqldeveloper.conf+ to force America:

    AddVMOption - Duser.language = in
    AddVMOption - Duser.country = US

    Espero your ayuda.
    K.

  • The Windows Security Center Service was unable to establish even queries with WMI to third-party antivirus monitor, anti-spyware and firewall.

    Original title: do I have to re - install Windows 7?

    Today, I opened the Action Center and noticed that Panda Internet Security reported he was off, when it wasn't.  I checked the administrative events and one of the errors was: Security Windows Service Center could be same queries WMI to monitor third party antivirus, antispyware and firewall.  I've got Panda IS 2012 running, which is a very good program.

    I just spent a good hourzs little addressing a Panda technicina, who, after a lot of faffing autour, told me that I either set up a new profile, or I re - install Windows, I don't want to do, because I could lose the system restore facilities, (I had to ask Microsoft to help me address the issue of the restoration of the system because it did not work).  The problem with the Security Center Windows Service dates back to August 10, 2011.

    Anyone know what I'd do, which involves having to uninstall and reinstall Windows?

    Kind regards

    Emma D

    Hello

    1. which parameter is used to install Panda antivirus?

    2 did you use typical or custom?

    If you use Panda IS 2012 as an anti-virus, then Windows Security Center may have disabled the native Windows Firewall, that does send a real-time alert. You can try shooting the alert and check.

    Disable security Messages and other system Notifications in Windows 7

    http://TechNet.Microsoft.com/en-us/magazine/dd492018.aspx?LC=1033

    Important: Select the security settings, once you have done to solve the problem.

    You can also check the parameters of Panda IS 2012 to allow the automatic update and other necessary parameters.

    To try to update manually, follow these steps:

    un) right-click on the icon of Panda Global Protection 2012 on the taskbar

    (b) in the menu that appears, click Update to start the process

  • HP Deskjet 1050 (J410 series): unable to establish two way connection printer

    Hello

    My printer is connected to my laptop via a USB port and provides ink level readings. It will not print any documents or test pages and when I try to align/clean ink cartridges a message "Unable to establish two track with device connection".

    Can someone advise me on how to solve this problem as soon as possible? Thank you!

    Hello @West__44,

    I would like to help you today to correct the problems of two-way communication that you encounter when using the USB connected HP Deskjet 1050 all-in-One printer on your computer Windows 8.1. Because you get this error via a USB cable connection there are likely a driver or software conflicts between your HP Deskjet and your Windows computer. Can I please you follow the steps below to resolve this issue.

    • Please, unplug your USB cable from your printer and your computer before you continue.

    Step 1: Remove the driver:

    For the purposes of troubleshooting, it is essential that we have a clean slate to work with. Therefore, I will be having remove you all traces of your HP Deskjet from your computer in Windows before you run the hotfix.

    1. Open the screen, Start by selecting the Windows icon at the bottom left of your computer screen or by selecting the Windows key bottom left of your keyboard, to the right of the Ctrl key.
    2. On the start screen, type programs and features. Click on programs and features to start.
    3. Under the window programs and features will populate a list of the programs installed on your computer. Please scroll through the list and select your Printer HP Deskjet. Click Uninstall.
    4. Please follow the prompts on the screen to complete the uninstallation. Once the uninstall is complete, proceed to the next step.

    Step 2: Remove temporary files:

    1. Open the screen, Start by selecting the Windows icon at the bottom left of your computer screen or by selecting the Windows key bottom left of your keyboard, to the right of the Ctrl key.
    2. On the start screen, type run. Click on Run to launch the run dialogue box.
    3. In the run box type %temp% , and then click OK
    4. When the Temp folder opens, select Ctrl + A at the same time on your keyboard. Everything in this folder will highlight now.
    5. Select the "delete" button on your keyboard. The Temp folder contains the temporary internet files. None of the actual files or folders on your computer will be affected by deleting Temp files. A Temp file should you will automatically get the pop up to 'jump' this point.
    6. Close the Temp folder when it is empty
    7. Right-click the recycling bin on your desktop and select empty recycling bin. Please proceed to the next step.

    Step 3: Install the device:

    1. Please click here to download the package full feature software and driver for your HP Deskjet printer.
    2. Once the download is complete, follow the prompts on the screen to install your printer
    3. Do not connect the USB cable until the installation program invites you to
    4. On your laptop, please make sure that the USB cable is plugged directly from the back of your printer to the laptop. Avoid USB Extenders and home stations as they can cause conflicts of USB communication.

    Once the installation is completed successfully, please test print to confirm that the problem has been resolved.

    Please reply to this message with the result of your troubleshooting. Thanks for joining the Forums from HP Support. I can't wait to hear strings attached good luck!

  • No connection with the router

    After doing a scan of normal viruses with avast anti-virus suddenly my network card started going crazy. I have had no connection to my router. When I checked my network connection there was nothing... no ip without dns server addresses nothing. Also no packets were sent or received. I have a toshiba tecra S2 and I reinstalled my card three times already everytime with the latest network drivers. It #s also no problem not related to my router because the two other home pc only works very well.
    hope you can help me

    Hello

    you said that you already reinstalled the NIC. And it did not work.
    So, I have a small suggestion for you:
    To test if your card is not working properly, download "UBCD4WIN Live CD" (Live - very easy to use Windows XP CD from the XP CD) and burn it to a CD.

    www.UBCD4Win.com

    After that starts with it and try to establish a connection with your laptop to your router. If you get a connection, then something in your BONES is broken and I suggest you do a system
    recovery.
    If no connection is given, try a Biosupdate and replace the network cable.

    If nothing will work, bring your machine to an ASP (Authorized Service Partner) for repair or at least a material balance.

    Good luck &
    Welcome them

Maybe you are looking for

  • GS108Tv2... inaccessible

    Brought a new GS108Tv2. Wired it upward, the packages has been happening very well, jumped on my SRX210H of Juniper (my DHCP server) and I saw the IP assigned by DHCP. Entered the thin device. Change the device name, password, and it has given a stat

  • T440 giving Fan Error

    I have a T440 which gives a fan error message and then stops immediately. And of course it just went out of warranty last month! Ideas like how to fix?

  • HP Laserjet 3030 scan is no longer in PDF since running Windows 7

    Given that I've been running Windows 7, my HP Laserjet 3030 will scan is no longer as pdf - just bmp, jpeg, png & tiff.  I am owner of Adobe Acrobat.  How can I scan to PDF?

  • Movie Maker in Vista is only to watch boxes 4 green and purple

    Original title: my career in game - NEED HELP from WINDOWS MOVIE MAKERI have windows developer and I love using it and is very useful, BUT recently im trying to make my bmx video edit and going to use it to try to get offered and took at least 6 hour

  • Get the error code 0 x 80070002 in WIndows Vista, try to run back to the top

    Have tried to back up my files on many occasions since February 2010, without success. Following the Protocol described by Windows twice just a waste of time to really frustrated! Would really spend and use the computer to assist me in my efforts tha