Sun V210 Server - No Power on Front, Yellow on Power Supply

This morning the server shut off.
There is no power to the front of the server at all, no lights.
On the back, where the power is connected, the light is yellow.
If I unplug the power, wait, plug it back in, it turns Green, but then after a few moments, turns yellow again.
Is this a bad power supply?

Yes, the power supply needs to be replaced.

Similar Messages

  • Removal of Processor in a V210 Server

    Hello Folks,
    Our current V210 server has 2 processors and in order to minimize Oracle costs I'd like to either disable one processor or remove it, and make our current server the backup server. Is disabling or removing easier? If I'll need to remove it then does Sun's service plan require a licensed technician to do it or do they allow a regular user to do it?
    Thanks!

    Just switch it off. We had to do this in a previous company, too, when we discovered that we had licensing issues.
    As you already pointed out, there's no technician required for this.
    Cheers,
    Erick Ramirez
    Melbourne, Australia

  • SUN 280R Server

    Hi Guys,
    I know that thius is not the forum for Sun but I've got a problem with the sun 280R Server that has our Oracle 10g database. When I switch the server on, It does switch on because there's a green light but there's also an orange light with a spanner. What can I do? Please assist this is the production server and no one can assist.
    Thanx.

    NPD wrote:
    so there's no troubleshooting I can try maybe because we've go no maintanance agreements
    Thanx.I do not have one of these servers, but by performing a couple of Google searches I was eventually able to find the owner's guide for the server and the service manual. The documentation states that the light color is amber, rather than orange - so that might explain part of the problem in searching for an answer.
    The owner's guide:
    http://dlc.sun.com/pdf/806-4806-10/806-4806-10.pdf
    PDF page 38 (page 10 in the page footer) states that a fan failure could cause the amber light to turn on, a power supply has failed, or another problem has happened (RAM or CPU failure?).
    PDF page 223 (page 195 in the page footer) states how to quickly see if the amber light means a power supply failure. There are apparently amber lights on the back of the server next to each of the power supplies - if one of those amber lights is lit, the hot swap power supply needs to be replaced.
    The service manual:
    http://dlc.sun.com/pdf/806-4807-10/806-4807-10.pdf
    PDF page 189 (page 163 in the page footer) indicates how to isolate the failed component.
    You might try unplugging the server from the electric power for 1 minute, then plugging it back in, to test if it was just a temporary "power good" problem report from the power supplies. If that does not fix the problem, see if one of the power supplies is showing an amber light. If not, verify that the three internal fans are functioning.
    Good luck.
    Charles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Postfix querying Sun Directory Server

    Hi,
    We are using 2 Postfix MTA (Front-End) that relay incoming mails to a Sun Messaging Server (Backend).
    We would like to relay to our protected domains only mails that have a valid user.
    So we want to query Directory Server about the 3 mail attributes we are using (mail, mailAlternateAddress, mailEquivalmentAddress) like this:
    query_filter = (|(mail=%s)(mailalternateaddress=%s)(mailequivalentaddress=%s))
    I would like to know if we need to install and configure openldap client or if the SUN LDAP client will be able to be used by Postfix ?
    Best regards.
    José

    As long as postfix talks ldapv3, it should be fine. It used to work at my previous firm, postfix and iDS 5.1. Other customers also run MTAs against dsee 6. So My opinion is it should work. Just make sure you have an eq index for mailequivalentaddress attribute as it's not on by default (other two are there by default)

  • Reg: Sun V880 Server

    Hello,
    Recently I got an old Sun V880 server. I don't know the root password. I connected a network cable to Serial port in RSC card and other end I connected to cross over 9 pin connector ( Sun Part No. 530-3100-01 ).
    When I start the server and connect using putty as well as Hyperterminal, I get the below message.
    Memory Cells Test, PASSED.
    Data CACHE Test
    Verify D-CACHE Performance Increase
    D-CACHE Performance Increase I-CACHE Disabled
    D-CACHE Performance Increase I-CACHE Enabled
    Verify D-CACHE Memory
    Data CACHE Test, PASSED.
    Main Sectors FLASH CRC Test
    Main Sectors FLASH CRC Test, PASSED.
    Load the RSC, then run the VxDiags
    RSC version 2.2 ()
    Full VxDiag Tests
    PCF8591 THERMISTOR TEST
    PCF8591 THERMISTOR TEST, PASSED
    BASIC TOD TEST
    Read the TOD Clock: SAT JAN 01 00:00:13 2000
    Wait, 1 - 3 seconds
    Read the TOD Clock: SAT JAN 01 00:00:15 2000
    BASIC TOD TEST, PASSED
    ETHERNET CPU LOOPBACK TEST
    50 BYTE PACKET - a 0 in field of 1's. Attaching network interface cpm0... d
    one.
    50 BYTE PACKET - a 1 in field of 0's.
    900 BYTE PACKET - pseudo-random data.
    ETHERNET CPU LOOPBACK TEST, PASSED
    MODEM PRESENT TEST
    Verify Modem is present
    MODEM PRESENT TEST, PASSED
    MODEM INIT and REGISTER TEST
    Check for VALID PCMCIA Address
    MODEM Register Test
    MODEM INIT and REGISTER TEST, PASSED
    MODEM TUPLES TEST
    Read TUPLES Data
    Verify TUPLES Data
    MODEM TUPLES TEST, PASSED
    Full VxDiag Tests - PASSED
    Status summary - Status = 7FFF
    VxDiag - - PASSED
    POST - - PASSED
    LOOPBACK - - PASSED
    BATTERY - - PASSED
    I2C - - PASSED
    EPROM - - PASSED
    FRU PROM - - PASSED
    ETHERNET - - PASSED
    MODEM - - PASSED
    MAIN CRC - - PASSED
    BOOT CRC - - PASSED
    TTYD - - PASSED
    TTYC - - PASSED
    MEMORY - - PASSED
    MPC860 - - PASSED
    Please login:
    Please login:
    I don't know the username and password, I tried using Ctrl + Break to get OK prompt and there is no response. If I enter username and password continuously four times the system hangs. Then I have to remove the RSC card and short the battery and after that I get the same message.
    Can someone help me to make it work this server?
    Regards
    George

    Hi George,
    It's probable that the output-device and input-device OBP variables are set to rsc-console. That is the reason why you are not getting anything on console while connected to Serial Port A/B (25 pins).
    First thing you need to do is reset RSC password. As Michael mentioned you can do this from Solaris OS by invoking 'scadm' command. To get the console from Serial Port A/B (25 pins) I would suggest to physically remove RSC card from host. This will redirect input and output device to ttya. Connect to Serial Port A/B (RSC card removed) and power on the server. You should get output from console (POST, OK prompt and booting Solaris if Solaris is installed and auto-boot OBP variable is set to true).
    If Solaris is not installed then you can simply proceed with installation of new OS (please choose full installation). After installation please put back in the RSC card and use 'scadm' to reset password of the RSC (please consult scadm manual pages).
    When password reset procedure will finish successfully, connect the console cable to RSC serial port, log in with username and password and change OBP variables 'input-device' and 'output-device' to rsc-console.
    After all of the above you will be able to use RSC to control your host remotely (power off / power on / remote console / environmental status and more).
    Regards,
    Tom

  • How do I use Sun Web Server 7.0u1 reverse proxy to change public URLs?

    Some of our installations use the Sun Web Server 7.0 (update 1, usually)
    for hosting some of the public resource and reverse-proxying other parts
    of the URI namespace from other backend servers (content, application
    and other types of servers).
    So far every type of backend server served a unique part of the namespace
    and there was no collision of names, and the backend resources were
    published in a one-to-one manner. That is, a backend resource like, say,
    http://appserver:8080/content/page.html would be published in the internet
    as http://www.publicsite.com/content/page.html
    I was recently asked to research whether we can rename some parts of
    the public URI namespace, to publish some or all resources as, say,
    http://www.publicsite.com/data/page.html while using the same backend
    resources.
    Another quest, possibly related in solution, was to make a tidy url for the
    first page the user opens of the site. That is, in the current solution when
    a visitor types the url "www.publicsite.com" in his or her browser, our web
    server returns an HTTP-302 redirect to the actual first page URL, so the
    browser sends a second request (and changes the URL in its location bar).
    One customer said that it is not "tidy". They don't want the URL to change
    right upon first rendering the page. They want the root page to be rendered
    instantly i the first HTTP request.
    So far I found that I can't solve these problems. I believe these problems
    share a solution because it relies on ability to control the actual URI strings
    requested by Sun Web Server from backend servers.
    Some details follow, now:
    It seems that the reverse proxy (Service fn="service-passthrough") takes
    only the $uri value which was originally requested by the browser. I didn't
    yet manage to override this value while processing a request, not even if
    I "restart" a request. Turning the error log up to "finest" I see that even
    when making the "service-passthrough" operation, the Sun Web Server
    still remembers that the request was for "/test" (in my test case below);
    it does indeed ask the backend server for an URI "/test" and that fails.
    [04/Mar/2009:21:45:34] finest (25095) www.publicsite.com: for host xx.xx.xx.83
    trying to GET /content/MainPage.html while trying to GET /test, func_exec reports:
    fn="service-passthrough" rewrite-host="true" rewrite-location="true"
    servers="http://10.16.2.127:8080" Directive="Service" DaemonPool="2b1348"
    returned 0 (REQ_PROCEED)My obj.conf file currently has simple clauses like this:
    # this causes /content/* to be taken from another (backend) server
    NameTrans fn="assign-name" from="/content" name="content-test" nostat="/content"
    # this causes requests to site root to be HTTP-redirected to a certain page URI
    <If $uri =~ '^/$'>
        NameTrans fn="redirect"
            url="http://www.publicsite.com/content/MainPage.html"
    </If>
    <Object name="content-test">
    ### This maps http://public/content/* to http://10.16.2.127:8080/content/*
    ### Somehow the desired solution should instead map http://public/data/* to http://10.16.2.127:8080/content/*
        Service fn="service-passthrough" rewrite-host="true" rewrite-location="true" servers="http://10.16.2.127:8080"
        Service fn="set-variable" set-srvhdrs="host=www.publicsite.com:80"
    </Object>
    I have also tried "restart"ing the request like this:
        NameTrans fn="restart" uri="/data"or desperately trying to set the new request uri like this:
        Service fn="set-variable"  uri="/magnoliaPublic/Main.html"Thanks for any ideas (including a statement whether this can be done at all
    in some version of Sun Web Server 7.0 or its opensourced siblings) ;)
    //Jim

    Some of our installations use the Sun Web Server 7.0 (update 1, usually)please plan on installing the latest service pack - 7.0 Update 4. these updates addresses potentially critical bug fixes.
    I was recently asked to research whether we can rename some parts of
    the public URI namespace, to publish some or all resources as, say,
    http://www.publicsite.com/data/page.html while using the same backend
    resources.> now, if all the resources are under say /data, then how will you know which pages need to be sent to which back end resources. i guess, you probably meant to check for /data/page.html should go to <back-end>/content/page.html
    yes, you could do something like
    - edit your corresponding obj.conf (<hostname>-obj.conf or obj.conf depending on your configuration)
    <Object name=¨default¨>
    <If $uri = ¨/page/¨>
    #move this nametrans SAF (for map directive - which is for reverse proxy within <if> clause)
    NameTrans.. fn=map
    </If
    </Object>
    and you could do https-<hostname>/bin/reconfig (dynamic reconfiguration) to check out if this is what you wanted. also, you might want to move config/server.xml <log-level> to finest and do your configuration . this way, you would get enough information on what is going on within your server logs.
    finally,when you are satisfied, you might have to run the following command to make your manual change into admin config repository.
    <install-root>/bin/wadm pull-config user=admin config=<hostname> <hostname>
    <install-root>/bin/wadm deploy-config --user=admin <hostname>
    you might want to check out this for more info on how you could use <if> else condition to handle your requirement.
    http://docs.sun.com/app/docs/doc/820-6599/gdaer?a=view
    finally, you might want to refer to this doc - which explains on ws7 request processing overview. this should provide you with some pointers as to what these different directives mean
    http://docs.sun.com/app/docs/doc/820-6599/gbysz?a=view
    >
    One customer said that it is not "tidy". They don't want the URL to change
    right upon first rendering the page. They want the root page to be rendered
    instantly i the first HTTP request.
    please check out the rewrite / restart SAF. this should help you.
    http://docs.sun.com/app/docs/doc/820-6599/gdada?a=view
    pl. understand that - like with more web servers - ordering of directives is very important within obj.conf. so, you might want to make sure that you verify the obj.conf directive ordering is what you want it to do..
    It seems that the reverse proxy (Service fn="service-passthrough") takes
    only the $uri value which was originally requested by the browser. I didn't
    yet manage to override this value while processing a request, not even if
    I "restart" a request. Turning the error log up to "finest" I see that even
    when making the "service-passthrough" operation, the Sun Web Server
    still remembers that the request was for "/test" (in my test case below);
    it does indeed ask the backend server for an URI "/test" and that fails.
    now, you are in the totally wrong direction. web server 7 includes a highly integrated reverse proxy solution compared to 6.1. unlike 6.1, you don´t have to download a separate plugin . however, you will need to manually migrate your 6.1 based reverse proxy settings into 7.0. please check out this blog link on how to set up a reverse proxy
    http://blogs.sun.com/amit/entry/setting_up_a_reverse_proxy
    feel free to post to us if you need any futher help
    you are probably better off - starting fresh
    - install ws7u4
    - use gui or CLI to create a reverse proxy and map one on one - say content
    http://docs.sun.com/app/docs/doc/820-6601/create-reverse-proxy-1?a=view
    if you don´t plan on using ws7 integrated web container (ability to process jsp/servlet), then you could disable java support as well. this should reduce your server memory footprint
    <install-root>/bin/wadm disable-java user=admin config=<hostname>
    <install-root>/bin/wadm create-reverse-proxy user=admin uri-prefix=/content server=<http://your back end server/ config=<hostname> --vs=<hostname>
    <install-root>/bin/wadm deploy-config --user=admin <hostname>
    now, you can check out the regular express processing and <if> syntax from our docs and try it out within <https-<hostname>/config/<hostname>-obj.conf> file and restart the server. pl. note that once you disable java, ws7 admin server creates <vs>-obj.conf and you need to edit this file and not default obj.conf for your changes to be read by server.
    >
    I have also tried "restart"ing the request like this:
    NameTrans fn="restart" uri="/data"
    ordering is very important here... you need to do this some thing like
    <Object name=default>
    <If not $restarted>
    NameTrans fn=restart uri from=/¨ uri=/foo.
    </If>

  • JBoss 4 to Sun Application Server...where to start

    Hi there...
    I'm charged with making sure my company's product, which has mostly been running on JBoss, works w/ Sun Application Server.
    I've been trying to use the Migration Tool with poor results...I know some of it is because it's for JBoss 3 and not 4....
    giving it the entire .EAR for our product tells me that it doesn't handle webservices...diving into the EAR's JAR containing our services and removing webservices.xml gives the same result of various permutations of putting in source code / xml leads , namely it runs and then freezes with
    DefaultValidationEventHandler: [FATAL_ERROR]: Premature end of file.
    Location:
    DefaultValidationEventHandler: [ERROR]: Unexpected element {}:ejb-local-ref
    Location:
    back on the console I launched the UI from
    To possibly oversimplify, I copied out some of the most relevant .xml we have,
    ejb-jar.xml
    jboss.xml
    jbosscmp-jdbc.xml
    jboss-web.xml
    web.xml
    and put them in a single directory...now the Migration tool runs, leaves most of the files unchanged, and for our ejb-jar.xml it fails, and says
    Unknown error.
    EjbJar is Null
    Admittedly our ejb-jar.xml is handcrafted and maybe suspect, but still.
    So I guess right now I'm not too optimistic about this tool.
    Some of the problem is my understanding of what all goes in an EAR in terms of DD is weak. I'm trying to smarten up, but haven't found a good description of "these are the typical DD files for Sun Application Server", with examples or precise descriptions of the contents...and the migration tool doesn't get to the point where it's making some of the files i expected based on
    http://java.sun.com/j2ee/tools/migration/doc/JBOSS3.0_S1AS7.html
    (for example sun-cmp-mappings.xml doesn't appear anywhere in the AppServer\docs directory... )
    Any pointers or advice appreciated...

    There is an article, while it is for Application Server 7, it still could be useful:
    http://developers.sun.com/prodtech/javatools/jsenterprise/reference/docs/jse7/jse7_jboss_plugin.html

  • Using Sun Web Server 6.1 from the IDE

    Using JSE 8 with Sun Web Server 6.1 set as the target container, I have a SUNWS61deployment.xml file created.
    That didn't exist in JSE 7. Is it WS 6.1 SP4 or SP5 -related ?
    I also have ws61-sun-web.xml with a simple <sun-web-app/> tag (empty deployment descriptor).
    What should this file contain? Is it a replacement for sun-web.xml?
    Do I still need sun-web.xml? Its DTD declaration sounds like Sun
    App Server 7 (http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-1.dtd)
    So you have plans to make "Sun Resources" (pools, JNDI resources, ...) created in the IDE be registerable directly in the Web Server just like it's possible with the sun app server?
    How safe is it to use JSE 8 with an older Web Server Service Pack (say 6.1SP1)?

    SUNWS61deployment.xml is created bythe IDE to be used internally and not to be used by the developer. This file wouldn't be sent to webserver after deployment.
    The ws61-sun-web.xml is sun-web.xml only and yes it is same as it is in Appserver7 as the webcontainer for both Webserver6.1 and Appserver7 are same. After deployment to webserver, ws61-sun-web.xml is renamed to Webserver as sun-web.xml by the IDE. When opened the developer can edit in the XML editor.
    The reason for having it as ws61-sun-web.xml in IDE is to avoid the clash between sun-web.xml of Appserver8.1 which is J2EE1.4 based whereas Webserver6.1 Web container is J2EE1.3 based.
    It should be okay to use any service pack of Webserver6.1 with JSE8
    Hope this helps

  • How to do auto URL redirect in sun web server ?

    Hi, i need to do auto url redirect in my sun web server. Currently i'm setup some rules for the reverse proxy in obj.conf file and the syntax looks like:
    <Object name="reverse-proxy-/test">
    <If $internal and $uri =~ "index.html">
    NameTrans fn="redirect" from="/" uri="/examples/abc.html"
    </If>
    Route fn="set-origin-server" server="http://localhost:8989"
    </Object>
    The situation is:
    1) When users browse "*http://localhost/examples/abc.html*" it will redirect to abc.html
    2) When users browse "*http://localhost/test*" it will redirect to the localhost admin GUI (http://localhost:8989/admingui/admingui/serverTaskGeneral)
    My desire output should be whenever users browse the "*http://localhost/test*" , it will redirect to abc.html page.
    the syntax might be wrong. So, anyone knows how to fix this? I'm keep trying but nothing worked. Please help me.

    Moderator action: Moved from Servers General Discussion.
    db

  • Need help with URL Redirect in Sun Web Server 7 u5

    All I am trying to do is redirect to a static URL and for the life of me I can not get it to behave the way I would expect. I am new to Sun Web Server so I am just trying to use the Admin Console to set this up.
    Here is what I'm trying to do:
    Redirect from - http://www.oldsite.com/store/store.html?store_id=2154
    To - http://www.newsite.com/Stores/StoreFront.aspx?StoreId=2154
    Here's what I tried in the console.
    Added a new URL Redirect
    Set the Source to be Condition and set it to: '^/store_id=2154$' (quotes included)
    Then set the Target to: http://www.newsite.com/Stores/StoreFront.aspx?StoreId=2154
    Then for the URL Type I checked Fixed URL
    When I tested with: http://www.oldsite.com/store/store.html?store_id=2154 it did redirect as desired
    BUT
    When I tested with: "http://www.oldsite.com/store/store.html?store_id=5555" it too got redirected to the Target and I can't figure out how this second URL can satisfy the condition to get redirected.
    Any help is most appreciated.

    thanks for choosing sun web server 7
    it is simpler if you just edit the configuration files manually
    cd <ws7-install-root>/https-<hostname>/config/
    edit obj.conf or <hostname>-obj.conf (if there is one for you depending on your configuration so that it look something like)
    <Object name="default">
    AuthTrans..
    #add the folllowing line here
    <If defined $query>
    <If $urlhost =~ "/oldsite.com" and
    $uri =~ "/store/store.html" and
    $query =~ "store_id=2154" >
    NameTrans fn="redirect" from="/" http://www.newsite.com/Stores/StoreFront.aspx?StoreId=2154
    </If>
    </If>
    ..rest of the existing obj.conf. continues
    NameTrans...
    now, you can either do <ws7-install-root>/https-<hostname>/bin/reconfig -> to reload your configuration without any server downtime or <ws7-install-root>/https-<hostname>/bin/restart -> to restart the server
    if it did work out for your, you will need to run the following so that admin server is aware of what you just did
    <ws7-install-root>/bin/wadm pull-config user=admin config=<hostname> <hostname.domainname>
    hope this helps

  • Sun Directory Server 5.2 installation problem on AIX 5.2

    Hi,
    Am newbie to sun ds5.2 and I got stuck during installation for last 2 days. Could you pls guide to resolve this issue. Please error msg below
    Checking disk space...
    The following items for the product Directory Server will be installed:
    Product: Directory Server
    Location: /Sun/mps
    Space Required: 141.70 MB
    Sun ONE Directory Suite
    Sun ONE Directory Server
    Sun ONE Directory Console Support
    Sun ONE Administration Services
    Sun ONE Administration Server
    Sun ONE Administration Console
    Sun ONE Server Console
    Sun ONE Server Console Core
    Java Runtime Environment
    Sun ONE Server Basic Libraries
    Ready to Install
    1. Install Now
    2. Start Over
    3. Exit Installation
    What would you like to do [1] {"<" goes back, "!" exits}? 1
    Installing Directory Server
    |-1%--------------25%-----------------50%-----------------75%--------------100%|
    [slapd-bmpdev4]: starting up server ...
    error:server:The server could not be started due to invalid command syntax or
    operating system resource limits.
    system_errno:2
    Configuration of the Directory Server failed.
    Warning creating dbswitch.conf
    Warning creating ssusers.conf
    Error Directory Server configuration failure
    Checking connection to the Configuration Directory Server... failed.
    The Admininistration Server cannot be configured.
    Error Administration Server configuration failure
    Error Configuration of the server(s) failed.
    Installation Details:
    Product Result More Information
    1. Directory Server Partially Installed. Refer to "Details..." for more
    information. Available
    2. Done
    Enter the number corresponding to the desired selection for more
    information, or enter 2 to continue [2] {"!" exits}: 2
    thanks
    Bala

    You are correct. Dir 5.2 is not certified for AIX 5.2. It does install though. Like a previous reponse stated. Check the permissions for the user you are installing with and the file system you are installing to. Make certain you have enough disk space. My install took 150 MB of disk space. Finally, Dir 5.2 creates the file "/var/adm/sw/productregistry" during install. If you do not have permissions to /var/adm/sw, you may have troubles.
    Tim
    Computer Systems Engineer
    Komatsu Canada Limited

  • Replace Quotes, Connection Pooling, and Sun Web Server with MySQL, Oracle

    This is code I use to insert data into my MySQL and Oracle databases.
    I takes care of quotes and shows use of context, i.e. when you use Sun Web Server's
    ConnectionPooling. This code works. Feel free to reply if you have questions on how to set up connection pooling using Sun Web Server 6.1SP - it took quite a long time to learn and I couldn't find much information throughout the web, so I hope this helps...
    This is not a question and I am not looking for an answer, but please post comments or suggestions.
    dailysun
    This is in one class where I have a hashtable containing the
    column name / value pairs that I want to enter into my table.
    This class simply creates the SQL string from the values in the
    hashtable. It then passes that hashtable including the database
    name to a class which executes that sql statement (second code
    portion).
    /* Insert data into sf_parts. Create the column strings from
             * the provided hash table. Be sure to parse out hash elements which
             * are used for the createTemplate process
            StringBuffer values = new StringBuffer();
            StringBuffer fields = new StringBuffer();
            Enumeration keys = fieldHash.keys();
            while(keys.hasMoreElements()){
                Object currentKey = keys.nextElement();
                    String fieldValue = (String) fieldHash.get(currentKey);
                    if(values.length() >0){
                        values.append(",");
                    values.append("'"+fieldValue.replaceAll("'","''")+"'"); // Takes care of quotes and various other special characters!
                    if(fields.length() >0){
                        fields.append(",");
                    fields.append(currentKey);
            sql = "INSERT INTO myTable (" + fields.toString() + ") VALUES (" + values.toString() + ");";
            String insertResult = caq.getInsertDelete(sql,"myDatabaseName"); // your database name is defined in web.xml and sun-web.xml when you use Sun Web Server's Connection Pooling.
            returnValue += "<br><br><b>Rows inserted into table(myTable): </b>" + insertResult + "<br>\n";
            And, like I describe above, this method executes the sql statement.
         * Takes care of insert, update and delete requests.
         * Must have set both dbName as well as the sql String.
         * Will return number of rows affected as String.
         * @return String Number of rows affected
         * @exception SQLException
         * @exception Exception
        public String getInsertDelete() {
            checkData(); // this simply checks if the variables dbName and sql are not empty ;-)
            InitialContext initContext = null;
            int rv = 0;
            try{
                // Get connection from configured pool
                initContext = new InitialContext();
                source = (DataSource) initContext.lookup("java:comp/env/jdbc/" + dbName); // I have this set up in web.xml and sun-web.xml (I use Sun Web Server 6.1SP which does connection pooling for me)
                conn = source.getConnection();
                if(conn != null){
                    stmt = conn.createStatement();
                    rv = stmt.executeUpdate(sql);
            }catch (SQLException e){
                // do something
            }catch (Exception e){
                // do something
            }finally{
                try{
                    stmt.close();
                }catch(Exception e){
                    // do something
                try{
                    conn.close();
                }catch(Exception e){
                    // do something
                try{
                    initContext.close();
                }catch(Exception e){
                    // do something
            return rv+"";
        }  

    This is code I use to insert data into my MySQL and
    Oracle databases.
    I takes care of quotes and shows use of context, i.e.
    when you use Sun Web Server's
    ConnectionPooling. This code works. Feel free to
    reply if you have questions on how to set up
    connection pooling using Sun Web Server 6.1SP - it
    took quite a long time to learn and I couldn't find
    much information throughout the web, so I hope this
    helps...
    This is not a question and I am not looking for an
    answer, but please post comments or suggestions.Using prepared statements would mean that you wouldn't have to worry about quotes.
    You should be closing the result set.
    You are handling all fields as strings. That won't work with time fields and might not work for numeric fields.
    Presumably most of your variables are member variables. They should be local variables because that is the scope of the usage.
    You must do something with the exceptions.
    Hashtables although convienent mean that problems with usage can only be resolved at run time rather than compile time.

  • How to configure oracle thin drivers for SUN APPLICATION SERVER

    hi all,
    I am working with EJB with oracle as back-end. I wants to know how to configure oracle thin drivers for the SUN APPLICATION SERVER. Please explain me breifly.
    Advanced thanks to all the replies.
    with regards,
    /kumaraswamy.n

    Kumaraswamy,
    Did you try searching the Internet? Here are the results of my Internet search:
    http://tinyurl.com/zo4gk
    And one of the first hits in the list was this:
    Deploying to a Sun Java System Application Server
    Good Luck,
    Avi.

  • How can I call a Stateless-EJB3  from MBeans in Sun Application Server 9.1?

    Hi,
    I have some jobs running as Timer-Service-EJB in Sun Application Server 9.1. The Timer will be startet by a Lifecycle-Modul and it works fine.
    I have also some MBeans running in the same App-Server which should start or stop the Timer-Services by invoking dedicated methods
    in the Timer-Service-EJB.
    InitialContext ctx = new InitialContext();
    MyJob job = (MyJob) ctx.lookup("ejb/MyJob");
    job.startTimer();But I get the following error;
    javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.enterprise.naming.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory]
    ..... Why is it impossible to get an reference of the SerialInitContextFactory? The appserv-rt.jar is in the classpath of the Appserver ( installdir/lib ).
    Following the Sun Application Server 9.1 Developer Guide, I tried to copy the dependent classes (including appserv-rt.jar ) into domain-dir/lib.
    But I got the same error.
    Any ideas?
    Thanks,
    Stefan

    Hi Santanu,
    You need to write SoapHandler in order to pass username and pwd. You will need 2 classes namely HeaderHandlerResolver & SoapHandler. This is how i do in in my JAX-WS clients. I generate stubs and then attach handler to webserviceinterface
    PFA HeaderHandlerResolver.java and SoapHandler.java you would attach soap handler something like this in your code i have never done this via ADF so not sure.
    HeaderHandlerResolver soapHandlerResolver = new HeaderHandlerResolver();
    docInfo.setHandlerResolver(soapHandlerResolver);
    In SoapHandler class you will mention username and pwd like this
    soapMessageContext.put(BindingProvider.USERNAME_PROPERTY,"username");
    soapMessageContext.put(BindingProvider.PASSWORD_PROPERTY,"pwd");
    Regards,
    Amol Gavali

  • Login issue after upgrading sun app server 8.1 to 9.0

    Hi, I recently upgraded sun application server from 8.1 to 9.0. Now when I go to my web application in my browser and try to login, its giving me an error.
    System Messages We're sorry but we are unable to log you in at this time...
    Error: Error in allocating a connection. Cause: Connection could not be allocated because: Access denied for user ''@'localhost' (using password: YES)
    Any ideas where to start?

    try to uninstall all of it and install again..
    take care of your files.. backup everything

Maybe you are looking for

  • Inserting a new view  in place of already existed once

    Hai folks, In Ic Webclient on crm 5.0 system i got an issue In <b>identify customer</b> View set i have removed the view of <b>regestered product</b> and want to insert a  view <b>bupaLongTexts</b> there(in that deleted area) I am able to remove the

  • Weird Issue : Difference in HTML/excel output and pdf/rtf output--Urgent

    Hi There, I am facing a weird issue. I created one rtf template. When I preview the o/p in rtf or pdf, everything comes up as expected. When I preview the same in html or excel, few rows come up as bold though they were not supposed to. What could be

  • Update notification shows there are updates but when I click on the update option it shows a blank screen

    The update option on the app store shows a notification that I have 'n' numbers of updates but when I click on the update option it only shows a blank screen. Even after updating the apps individually from the purchased option, the update option stil

  • Broken Charger In iBook

    The other i realized that my charger got stuck inside of my iBook g3 and i was wondering what is the specific name or serial number for the charging port (the thing you place your charger into) and on average how much would it be to fix it and to buy

  • Another version of this product is already installed

    Hi Experts, I need to test a scenario on my PC in SAP 2007 SP00 PL44.  I previously had 2007 SP01 PL06 installed, which I have fully uninstalled. When trying to reinstall 2007, I am getting the following error message: Another version of this product