Problem with ACS 4.2 Database replication

Greetings,
I am not able to replicate Database between two ACS SE 4.2. I am getting the following error:
Inbound database replication from ACS 'ACS_BEX_001' denied - shared secret mismatch.
The configuration apparently is ok. I am attaching the configuration from both ACS.

The solution posted by Nevin is correct, but I must add some explanations. I had the problem yesterday and I proceeded like Nevin told:
- I connected to the console and made a "show".
- The IP was the correct one, but as indicated I made a "set ip"
- The system asked for the new IP, showing the old one between brackets: ie "New IP [10.10.10.1]:"
- I pressed Intro, because the IP is correct.
- After confirming the IP, mask, gateway and DNS the system asked me to verify connectivity. I did it and was correct.
- The second time it asked to check connectivity I answered No. and nothing happened.
- We checked through the web but the "Self" IP was still 127.0.0.1.
- So I made the process again BUT this time I changed the the IP to another one. After finishing, (when I answered No to check connectivity) I saw that the system was stopping all ACS processes and starting then again.
- In the web page the "Self" IP was the new one.
- I made the process again changing the IP to the original one. This time also the system stopped and started all processes.
- In the web page the "Self" IP was correct.
- Now the replication worked correctly.
So the problem was that the system is "inteligent" and if it discover that you don't change the IP (even if you change the DNS), it doesn't reconfigure it. So you must change to another IP (even a dummy one) and the change again to the correct one.
I hope this can help to other people.

Similar Messages

  • I am facing a Problem with reading images from database

    Hi everybody..
    any help will be most appreciated, I am facing problem with reading images from database. I am pasting my code... 
                    string connect = "datasource = localhost; port = 3306; username = root; password = ;"; 
                    MySqlConnection conn = new MySqlConnection(connect); // creating connecting string
                    MySqlCommand sda = new MySqlCommand(@"select * from management.add_products ", conn); //creating query
                    MySqlDataReader reader; 
                    try
                        conn.Open(); // Opening Connection
                        reader = sda.ExecuteReader(); // Executing my Query..
                        while (reader.Read())
                            byte[] imgg = (byte[])(reader["Picture"]);
                            if (imgg == null)
                                pc1.Image = null;
                            else
                                MemoryStream mstream = new MemoryStream(imgg);
                                pc1.Image = System.Drawing.Image.FromStream(mstream);
    It says Parameter not Valid... i am reading all the images from database

    I agree with Viorel. You are getting the error because the format of the data is incorrect probably because the data was modify. It may not be the reading of the database the is incorrect, but the application that wrote the data into the database. You need
    to compare the imgg array data with the data before it was written to the database to see if the data matches.  I usually start by comparing the number of bytes which is easier to check then compare the actual to isolate which function is changing the
    byte count.
    An image is binary data.  The standard VS methods for reading and writing data (usually stream classes) default to ASCII encoding which will corrupt binary data.  The solution usually is to use UTF8 encoding instead of the default ascii encoding. 
    Ascii encoding with stream often aligns the data and adds extra null bytes to the end of the data which can produce these type errors.
    jdweng

  • ACS 4.2 Database replication issue

    Hello Experts,
    Hope you are all doing well. I need your help in ACS database replication, I want to do replication between ACS servers. The issue i am facing is that there is no error in ACS replication log. It just says outbound replication started. and sits there no other error message is shown. I can successfully telnet secondary server's destination port 2000. But when i hit the replication button from primary server, i do not observe any hit count on my ASA ACL on which i allowed tcp 2000 for destination secondary server.I also checked my syslog server if there is any traffic denied between these 2 ACS servers but found nothing. I also did wireshark captures on the interfaces but no traffic is initiated when i press replicate now button. Initially i thought its a machine issue, but same behavior is shown when i swapped primary----to secondary. There are other applications running on both the servers which requires JAVA. Like Cisco IME etc. Can it be JAVA issue? Please help me out. i am using Release 4.2(0) Build 124 on both servers.Attached below is the Replication LOG snapshot,
    Regards,
    Rizwan.

    https://supportforums.cisco.com/discussion/11382366/problems-witch-acs-42-replication
    https://supportforums.cisco.com/discussion/11363046/replication-problem-acs-ver-42

  • Installation problem with NW'04 SR1: database connection failed

    Hi all,
    while installing NW '04 SR1 on Windows Server 2003 SP1 and MS SQL Server 2000 SP4 I ran into an error related to the database connection. While performing the step "Load Java Database content" SAPinst crashes with the message
    com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
    The connection to the SLQ Server with e.g. the Query Analyzer is OK. I had a problem with this installation setup before (have a look at the corresponding <a href="https://forums.sdn.sap.com/thread.jspa?threadID=338638&tstart=0">thread</a> ), the JDBC drivers where missing on the installation master but after copying them in the right direction the installation went on with no problem up to this point...
    Has anybody an idea what could have happened here? Is this maybe a problem connected to the one I recently had
    Below I attached the sapinst.log and jload.log with more detailed messages.
    sapinst.log ###########
    INFO 2007-03-12 22:06:24
    Working directory changed to C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_~1\ONE_HOST.
    INFO 2007-03-12 22:06:24
    Output of D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log' is written to the logfile C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_~1\ONE_HOST/jload.java.log.
    WARNING 2007-03-12 22:06:26
    Execution of the command "D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log'" finished with return code 1. Output:
    java version "1.4.2_13"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_13-b06)
    Java HotSpot(TM) Client VM (build 1.4.2_13-b06, mixed mode)
    12.03.2007 22:06:25 com.sap.inst.jload.Jload main
    INFO: Jload -sec WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key -dataDir S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP -job C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML -log C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log
    12.03.2007 22:06:26 com.sap.inst.jload.Jload main
    SCHWERWIEGEND: couldn't connect to DB
    com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
    ERROR 2007-03-12 22:06:26
    CJS-20065  Execution of JLoad tool 'D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log'' aborts with returncode 1. Check 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log' and 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.java.log' for more information.
    jload.log ###########
    12.03.07 22:06 com.sap.inst.jload.Jload main
    INFO: Jload -sec WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key -dataDir S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP -job C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML -log C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log
    12.03.07 22:06 com.sap.inst.jload.Jload main
    SEVERE: couldn't connect to DB
    com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
    Best regards,
    Bernd

    Hello Kairat,
    Please follow the below mentioned guide to install it.
    Check all the parameters to set and run pre requisite checker before starting installation.
    Keep in mind that before starting any SAP installation you should always run prerequisite checker.
    https://websmp205.sap-ag.de/instguides --> SAP Netweaver -->SAP Netweaver 7.0 -- > Installations --> EHP2
    Regards,
    Amit Barnawal

  • Problem with online split backup, database oracle

    Hello,
    we use for backup our SAP system online split backup, our database is almost 3TB big. Backup is functional but sometimes (4x-5x per month) backup fail with error bellow. If i understant this problem correctly brbackup lost connection to oracle after split disk system and cant stop backup mode in database and backup failed. How can i solve this problem? Exist some parameter for brbackup for reconnect to db when brbackup lost connection? Thanks for your help!
    BR0051I BRBACKUP 7.00 (25)
    BR0262I Enter database user name[/password]:
    BR0055I Start of database backup: bebnhrzd.anf 2009-09-22 14.52.25
    BR0484I BRBACKUP log file: /oracle/BP1/sapbackup/bebnhrzd.anf
    BR0351I Restoring /oracle/BP1/sapbackup/cntrlBP1.dbf
    BR0355I from /oracle/BP1/sapbackup/cntrlBP1.dbf ...
    BR0280I BRBACKUP time stamp: 2009-09-22 14.53.10
    BR0319I Control file copy created: /oracle/BP1/sapbackup/cntrlBP1.dbf 21676032
    BR0280I BRBACKUP time stamp: 2009-09-22 14.53.13
    BR0315I 'Alter database begin backup' successful
    BR0280I BRBACKUP time stamp: 2009-09-22 14.53.14
    BR0295I Splitting mirror disks...
    BR0280I BRBACKUP time stamp: 2009-09-22 16.07.43
    BR0296I Split of mirror disks successful
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0301E SQL error -3135 at location BrBackAlter-3, SQL statement:
    '/* BRBACKUP */ ALTER DATABASE END BACKUP'
    ORA-03135: connection lost contact
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0318E 'Alter database end backup' failed
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0301E SQL error -3114 at location BrBackAlter-3, SQL statement:
    '/* BRBACKUP */ ALTER DATABASE END BACKUP'
    ORA-03114: not connected to ORACLE
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0318E 'Alter database end backup' failed
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0301W SQL error -3114 at location BrbDbLogClose-1, SQL statement:
    'UPDATE SAP_SDBAH SET RC = '0005', ENDE = '20090922161744', OBJ = ' ', LINE = '#  224     0     0     81358       7817759352        0                0  ALL          online_split    util_file        -
    7.00 (25)' WHERE BEG = '20090922145225' AND FUNCT = 'anf' AND SYSID = 'BP1''
    ORA-03114: not connected to ORACLE
    BR0326W Update of database log header failed
    BR0056I End of database backup: bebnhrzd.anf 2009-09-22 16.17.44
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0054I BRBACKUP terminated with errors
    Backup utility finished with returncode 5
    Backup FAILED

    Hello,
    in note 534729 is nothing about ORA-03135: connection lost contact only error ORA-03114 which refer to the note 335199 and in this note in nothing about ORA-03114 I want to say two things: this two oracle errors (ORA-03135 and ORA-03114) are not in alertSID.log on db server or in syslog on backup server. This error are only reported from brbackup which is running on backup server which is "client side". We don't have problem with connection from work processes on all instances to db server, we have only problem with brbackup which lost connection after split disk system. How i say this problem occurs only sometimes.  I was tested network connection from backup server to db server via niping a this is result:
    (root@hytti) #./niping -c -H kiuru -B 30000
    Sat Sep 26 14:10:58 2009
    connect to server o.k.
    send and receive 10 messages (len 30000)
    times -
    avg      7305 usecs
    max     46234 usecs
    min      2168 usecs
    bw    8020.50 kb/sec
    excluding max and min:
    av2      3081 usecs
    bw2  19013.91 kb/sec
    do you have any idea?? Thanks!

  • Problem with Cisco Bars after Database Republish ("Could not find Cisco Unified database on this server")

    OS Version: 2000.4.3a
    OS Service Release: 2000.4.5bSR21
    OS Upgrade: 2000.4.5a
    Bars Version: 4.0.15000
    CUCM Version: 4.2(3)sr4b
    During the upgrade process of our CUCM 4.2(3) to version CUCM 4.2(3)sr4b the database replication between our 2 servers (1x pub, 1x sub) failed. After fixing this via dbhelper tool (everthing´s green and smiling again) service seemed to be ok.
    But now Cisco Bars does not work anymore. The backup process of the publisher fails with "Error=[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL-Server connection." So it looks like some kind of database setting for bars  is misconfigured after the republishing process.
    Yesterday I tried to reinstall BARS (now in the newest version 4.0.150000), but the same error message occured. Now I get the message "Could not find Cisco Unified database on this server" when I try to configure the Backup source within BARS.
    Curiously the backup of our second CCM (sub) works as expected (but without CDR and TFTP Data). The "BackAdmin" User exists and is not locked (and wasn´t changed manually at all).
    I am runnig out of ideas... :-(
    Any hint or idea on how to fix this is kindly appreciated
    best regards
    Michael

    Mike,
    I don't have anything definitive here but I am wondering if there is a discrepency between the database names.  In SQL Enterprise Manager, you can go to the Publisher and see what the current database name is.  It will be the one being replicated and will take the form of CCM0300 or CCM0301 or CCM0302.  You should see more than one.  Anyway, take note of the name.
    Then on the Publisher launch regedit and go to HKLM\Software\Cisco Systems, Inc.\DBL\
    Look at the values for DBConnection0 and DBConnection1.
    It will be something like DSN=CiscoCallManager;Server=;DATABASE=;Trusted_Connection=yes
    Does the in the DSN match what you expect?
    Also, going to back to SQL Enterprise Manager, check out the permissions on the database (Right Click->Properties, go to Permissions tab).
    Another thing to check if you think it is permissions related is the AdminUtility.exe (c:\program files\cisco\bin\).  This can be used to resync system account passwords.
    TBH, I am just shooting in the dark here but these are things I would check.
    Regards,
    Bill

  • Problem with applications and accessing database

    Hi
    I have a serious problem with my applications.I was trying to change "users"'s folder icon so I changed the setting in information.I don'y know what I did but It made these problems:
    many of applications does not open for example
    itunes-->The folder "iTunes" is on a locked disk or you do not have permission...
    picasa alerts me with a database error
    yahoo messenger just pops up once and doesn't open.
    firefox the same problem
    net monitor alerts with a database problem.
    evernote same problem
    all of my address book is erased.
    I think somehow I removed the db files or I changed the permission and the programs can not access to their db files.

    don't know the last thing I have done was trying to change the icon and after that I found out about the problem.Maybe sth else caused the problem . anyway I copied all of my files to a new user and I removed the user with problems & everything is ok here.thank u all.

  • Problems with uploading file to database using FND_GFM

    Hi
    I'm having some problems uploading files to the database in apps 11.5.9
    As various sources/documents tell me, using the standard FND_GFM / FND_FILE_UPLOAD packages of APPS should transfer an uploaded file into the FND_LOBS table, but some reason it doesn't work. I copied and altered the FND_GFM.upload_confirm function to try and figure out why it doesn;t work and it looks like the file to be uploaded does not appear in the defined table (FND_LOBS_DOCUMENT).
    The following DAD is defined (with hidden password and servername to prevent abuse ;)):
    [DAD_oes_s]
    connect_string = oes_s
    password = ****
    username = APPS
    default_page = fnd_web.ping
    document_table = APPS.fnd_lobs_document
    document_path = docs
    document_proc =
    upload_as_long_raw =
    upload_as_blob = *
    reuse = Yes
    connmax = 10
    pathalias = fndgfm
    pathaliasproc = fnd_gfm.dispatch
    enablesso = No
    cgi_env_list=SERVER_NAME=***,REQUEST_PROTOCOL=http,SERVER_P
    ORT=***,HOST=***
    input_filtering = Yes
    stateful=STATELESS_RESET
    And I'm using the following code to generate the upload-file page
    CREATE OR REPLACE PROCEDURE XX_ITRIS_HelloWorld AS--(file IN VARCHAR2) AS
         access_id_v varchar2(1000);
         BEGIN
              htp.htmlOpen;
              htp.bodyOpen;
              htp.formOpen('http://***/pls/oes_s/fnd_file_upload.uploadcompletemessage', 'GET', null, 'multipart/form-data');
              htp.formFile('file');
              access_id_v := fnd_gfm.authorize(null);
              htp.formHidden('access_id', access_id_v);
              htp.formSubmit();
              htp.formClose;
              htp.line;
              htp.bodyClose;
              htp.htmlClose;
         END XX_ITRIS_HelloWorld;
    Can anybody point out what is going wrong?

    You said you are uploading XML file whereas in the TSQL you have assign as text file i.e @SourceFile = 'test.txt'. Are you sure that you are copying XML file ? What is the size of the source file "test.txt" ? I am sure it is 0 KB. That is what you
    have found in FTP site.
    Regards, RSingh

  • Any problem with a single MySQL database used on more than one site?

    I have a set of multiple sites hosted separately I'm working on. I'd like to set up a PHP/MySQL database on one site, and be able to pull data from it for completely separate sites. Seems like it shouldn't be a problem. Are there any problems with doing this I need to be aware of?

    I've set up databases on three different hosts, and in all cases I could access the databases from outside the domain of the site itslef.  GoDaddy is one of them, they used to restrict it, but now they give you the option when setting up a new database on your account.

  • ACS 4.2 to ACS 5.4 database replication

    Hello All,
    I would like to know if its possible setup database replication from Cisco ACS 4.2 server to ACS 5.4 server ?
    Thanks in advance
    Mohsin Saleem

    Unfortunately, database replication (trigger update) cannot be performed as it requires both the ACS boxes to run same code.
    If you meant migration then yes that can be done.
    Migrating from ACS 4.x to ACS 5.4
    http://www.cisco.com/en/US/docs/net_mgmt/cisco_secure_access_control_system/5.4/user/guide/migrate.html
    Jatin Katyal
    - Do rate helpful posts -

  • AD Link Problem with ACS 5.2

         Hello at all,
    we have a Problem with a ACS 5.2. We have installed the Software on a VMware. The Machine ist running without Problems.
    Now i would like connect to our AD. The connection is o.k but i can not see any Groups when i make a search.
    I get a failure Message in the CLI:
    *** glibc detected *** corrupted double-linked list: 0x43b77858 ***
    Did anyone know this Message?
    Thanks for help.

    Hi Erick,
    thanks for your Answer.
    I can solve this Problem. I have Installed the ACS Version 5.2 but without the new Patch.
    With this Patch i can connect to the AD and can see all Groups.
    regards
    Andreas

  • Problem with ACS Server

    Good morning;
    I hope this is the right forum so here it goes. I have an ACS server v4 that keep hanging. If I try to restart the server (CSAuth), the service hangs and the only thing I can do is restart the server. Is there something I can do to fix this or troubleshoot it better?
    Thanks

    Good morning,
    I have the same problem with an ACS 3.3.3 that occasionally restarts CSAuth for a configured function to proceed, but the service keep hanging.
    Have you find any solution?
    Thanks

  • Swing Applet in JSP: problem with fetching data from database

    i am facing a problem while fetching data from database using Swing Applet plugged in a JSP page.
    // necessary import statements
    public class NewJApplet extends javax.swing.JApplet {
    private JLabel jlblNewTitle;
    private Vector vec;
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    NewJApplet inst = new NewJApplet();
    frame.getContentPane().add(inst);
    ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
    frame.pack();
    frame.setVisible(true);
    public NewJApplet() {
    super();
    initGUI();
    private void initGUI() {
    try {
    this.setSize(542, 701);
    this.getContentPane().setLayout(null);
    jlblTitle = new JLabel();
    this.getContentPane().add(jlblTitle);
    jlblTitle.setText("TITLE");
    jlblTitle.setBounds(197, 16, 117, 30);
    jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
    jlblNewTitle = new JLabel();
    this.getContentPane().add(jlblNewTitle);
    Vector vecTemp = getDBDatum(); // data fetched fm DB r stored here.
    jlblNewTitle.setText(vecTemp.get(1).toString());
    jlblNewTitle.setBounds(350, 16, 117, 30);
    jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));
    } catch (Exception e) {
    e.printStackTrace();
    }//end of initGUI()
    private Vector getDBDatum() {
    // fetches datum from oracle database and stores it in a vector
    return lvecData;
    }//end of getDBDatum()
    }//end of class
    in index.jsp page i have included the following code for calling this applet:
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
    width="600" height="300">
    <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>
    if i view it in using AppletViewer it runs perfectly and display the data in JLabel. (ie, both jlblTitle and jlblNewTitle).(ie, DATA FETCHES FROM db AND DISPLAYS PROPERLY)
    BUT IF I CLICK ON INDEX.JSP, ONLY jlblTitle APPEARS. jlblnNewTitle WILL BE BLANK(this label name is supposed to fetch from database)
    EVERY THING IS DISPAYING PROPERLY EXCEPT DATA FROM DATABASE!!!
    i signed the applet as follows :
    grant {
    permission java.security.AllPermission;
    Can any body help me to figure out the problem?

    This is the Swing Applet java code
    import java.awt.Dimension;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Vector;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.JScrollPane;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTree;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.SwingConstants;
    public class HaiApplet extends javax.swing.JApplet {
         private JLabel     jlblTitle;
         private JLabel     jlblNewTitle;
         private Vector     vec;
         * main method to display this
         * JApplet inside a new JFrame.
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              NewJApplet inst = new NewJApplet();
              frame.getContentPane().add(inst);
              ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
              frame.pack();
              frame.setVisible(true);
         public HaiApplet() {
              super();
              initGUI();
         private void initGUI() {
              try {               
                   this.setSize(542, 701);
                   this.getContentPane().setLayout(null);
                        jlblTitle = new JLabel();
                        this.getContentPane().add(jlblTitle);
                        jlblTitle.setText("OMMS");
                        jlblTitle.setBounds(197, 16, 117, 30);
                        jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
                        jlblTitle.setHorizontalAlignment(SwingConstants.CENTER);
                        jlblTitle.setForeground(new java.awt.Color(0,128,192));
                        jlblNewTitle = new JLabel();
                        this.getContentPane().add(jlblNewTitle);
                        Vector vecTemp = getDBDatum();
                        jlblNewTitle.setText(vecTemp.get(1).toString());
                        jlblNewTitle.setBounds(350, 16, 117, 30);
                        jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));     
              } catch (Exception e) {
                   e.printStackTrace();
         }//end of initGUI()
         private Vector getDBDatum() {
              Vector lvecData = new Vector(10,5);
              Connection lcon = null;
              Statement lstmt = null;
              ResultSet lrsResults = null;
              String lstrSQL = null;
              String lstrOut = null;
              try {
                   OmmsDBConnect db = new OmmsDBConnect();
                   lcon = db.connectDb();
                   lstmt = lcon.createStatement(lrsResults.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   lstrSQL = "select DT_ID from P_DATATABLES";
                   lrsResults = lstmt.executeQuery(lstrSQL);        
                   int i = 0;
                   lrsResults.last();
                   int length = lrsResults.getRow();
                   System.out.println(length);
                   lrsResults.beforeFirst();
                   int recCount = 0;
                   while (lrsResults.next()) {
                        recCount++;
                        lvecData.addElement(new String(lrsResults.getString("DT_ID")));
                   //     System.out.println("ID :  " + lrsResults.getString(1));
                        i++;
                   }System.out.println("here 3 out fm while");
              catch(SQLException e) {
                   System.out.print("SQLException: ");
                   System.out.println(e.getMessage());
              catch(Exception ex) {
                   lstrOut = "Exception Occured " + ex.getMessage();
              finally {
                   try {
                        lrsResults.close();
                        lstmt.close();
                        lcon.close();
                        System.out.println("[DONE]");
                   catch(Exception e) {
                        System.out.println(e);
             }//end of finally
              return lvecData;
         }//end of getDBDatum()
    }//end of classOfcourse the above code compiles and runs well. in Applet Viewer
    I plugged the above Swing Applet in a JSP page index.jsp
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
                   width="600" height="300">
         <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>Every thing is working fine in AppletViewer...But if i view this in any browser, then only the jlblTitle is displaying. jlblNewTitle is not displaying(this label name is actually fetching from thedatabase)
    can any body help me regarding this matter.? Thx in Advance.

  • Urgent: Problems with connecting to a database

    I have problems with getting a connection to both Oracle and Access.
    For Access I added the .jar files in my classpath.
    For Oracle I don't know which files I should add to the classpath.
    Here's the code:
    To connect with Access:
    public class AccessDatabase extends JFrame {
         private Connection conn;
         private Statement stmt;
         public AccessDatabase() throws SQLException,IOException{          
         DriverManager.registerDriver(new easysoft.sql.jobDriver());
         System.out.println("Connecting...");
    conn= DriverManager.getConnection ("jdbc:odbc:easysoft:db1");
         System.out.println("Connected");          
              stmt=conn.createStatement();
         ResultSet r=stmt.executeQuery("select name,adress from Tabel1");
         while(r.next()){
              String a=r.getString("name");
              String b=r.getString("adress");
              System.out.println(a+""+b);
    and for Oracle:
    public class AccessDatabase extends JFrame {
    private Connection conn;
    private Statement stmt;
    public AccessDatabase() throws SQLException,IOException{          
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    System.out.println("Connecting...");
    conn= DriverManager.getConnection ("jdbc:odbc:easysoft:db1");
    System.out.println("Connected");          
    stmt=conn.createStatement();
    ResultSet r=stmt.executeQuery("select name,adress from Tabel1");
    while(r.next()){
              String a=r.getString("name");
              String b=r.getString("adress");
              System.out.println(a+""+b);
         }}}     

    For getting connection from oracle you need to do 2 things.
    1-- As said earlier put classes12.zip in classpath
    2. For getting connection use as below ---
    instead of --conn= DriverManager.getConnection ("jdbc:odbc:easysoft:db1");
    Use thin driver ---
    conn = DriverManager.getConnection (jdbc:oracle:thin:@servername:portno , UserName,Password);
    replace servername UserName,Password in code you will get the connection.
    Thanks
    Rakesh

  • Tacacs+ problem with ACS 5.2

    I am new with ACS server 5.2 can someone please help me before I bang my head on the wall. I have configured the ACS server 5.2 but still cannot authenticate users. The router can ping the ACS server. With debugging I got the following error message:
    Switch#
    6d07h: TAC+: Using default tacacs server-group "tacacs+" list.
    6d07h: TAC+: Opening TCP/IP to 110.7.111.8/49 timeout=5
    6d07h: TAC+: TCP/IP open to 110.7.111.8/49 failed -- Connection timed out; remote host not responding
    6d07h: TAC+: Opening TCP/IP to 110.7.111.7/49 timeout=5
    6d07h: TAC+: TCP/IP open to 110.7.111.7/49 failed -- Connection timed out; remote host not responding
    6d07h: TAC+: send AUTHEN/START packet ver=192 id=3004581909
    6d07h: TAC+: Using default tacacs server-group "tacacs+" list.
    6d07h: TAC+: Opening TCP/IP to 110.7.111.8/49 timeout=5
    6d07h: TAC+: TCP/IP open to 110.7.111.8/49 failed -- Connection timed out; remote host not responding
    6d07h: TAC+: Opening TCP/IP to 110.7.111.7/49 timeout=5
    6d07h: TAC+: TCP/IP open to 110.7.111.7/49 failed -- Connection timed out; remote host not responding
    Your kind help will be highly appreciated.

    Did you add the switch as AAA client in ACS box? Make sure you use the correct switch IP when adding it in ACS.
    YOu can go to "monitoring and Report" on ACS to check the log to see what happened.

Maybe you are looking for