Lookup problem for Standalone Websphere application.  What to do?

Hi friends. This is my first discussion. Coming to the topic, I have created a Data Source (DB2) in WebSphere. JNDI name has been configured. I have done the Standalone application and got over. The question is how to LOOKUP JNDI name for the StandAlone application and how to ACCESS?
The program is as follows(code snippet):
class DBConnect4 {
     public static void main(String[] args) throws NamingException, SQLException {
          Properties props = new Properties();
          props.put(Context.INITIAL_CONTEXT_FACTORY,
                    "com.ibm.websphere.naming.WsnInitialContextFactory");
          /*props.put(Context.INITIAL_CONTEXT_FACTORY,
           "com.sun.jndi.cosnaming.CNCtxFactory");*/
// --------------------the problem occurs here------------------------------------
// --------------------at props.put(Context.PROVIDER_URL,"iiop://............
          props.put(Context.PROVIDER_URL, "iiop://172.23.99.88:9064");//172.23.99.88
          System.out.println("The Connection is" + props);
          try {
               InitialContext initContext = new InitialContext(props);
               Object obj = initContext.lookup("jdbc/myDataSource");
               DataSource ds = (DataSource) obj;
               Connection connection = ds.getConnection("db2admin", "Syntel123$");
               System.out.println("Connection estblished");I have configured everything, instead I am getting the following error:
The Connection is{java.naming.provider.url=iiop://172.23.99.88:9064, java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory}
The Exception is:Failed to initialize the ORB
javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException: com.sun.corba.se.impl.orb.ORBImpl]
     at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:318)
     at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:392)
     at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:117)
     at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:712)
     at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:171)
     at javax.naming.InitialContext.lookup(Unknown Source)
     at src.DBConnect4.main(DBConnect4.java:27)
Caused by: java.lang.ClassCastException: com.sun.corba.se.impl.orb.ORBImpl
     at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:86)
     at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
     at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
     at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
     at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
     at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:309)
     ... 6 more

hi, I get the same exception in a completely different context. Could you solve your problem?
Regards,
guschra
Message was edited by:
guschra

Similar Messages

  • Policy Agent 2.1 for IBM WebSphere Application Server 5.0 can't install

    I install Policy Agent 2.1 for IBM WebSphere Application Server 5.0
    But Can't install success
    resone:
    Base Installation completed Successfully
    WebSphere 5.0 Agent ClassPath : C:/Sun/IdentityServer/j2ee_agents/lib/am_sdk.jar;C:/Sun/IdentityServer/j2ee_agents/lib/am_services.jar;C:/Sun/IdentityServer/j2ee_agents/lib/am_sso_provider.jar;C:/Sun/IdentityServer/j2ee_agents/lib/am_logging.jar;C:/Sun/IdentityServer/j2ee_agents/config/F__Program Files_WebSphere_AppServer_config_cells_tmbsp103_nodes_tmbsp103_servers_server1;C:/Sun/IdentityServer/j2ee_agents/locale
    WebSphere 5.0 Agent Boot ClassPath : C:/Sun/IdentityServer/j2ee_agents/lib/jdk_logging.jar
    WebSphere 5.0 Agent JVM options : -Damconfig=AMAgent -Dmax_conn_pool=10 -Dmin_conn_pool=1 -Dcom.iplanet.coreservices.configpath=C:/Sun/IdentityServer/j2ee_agents/config/F__Program Files_WebSphere_AppServer_config_cells_tmbsp103_nodes_tmbsp103_servers_server1/ums -Djava.util.logging.manager=com.sun.identity.log.LogManager -Djava.util.logging.config.file=C:/Sun/IdentityServer/j2ee_agents/config/F__Program Files_WebSphere_AppServer_config_cells_tmbsp103_nodes_tmbsp103_servers_server1/AMAgent.properties -Djava.protocol.handler.pkgs=com.ibm.net.ssl.internal.www.protocol -Dws.ext.dirs=C:/Sun/IdentityServer/j2ee_agents/lib
    The server.policy file was configured successfully.
    Global Security Settings Configured Successfully.
    sas.client.props file Configuration FAILED.
    soap.client.props file Configuration FAILED.
    sas.client.props /soap.client.props two file how to Configuration ??

    From your description, since the agent installs file with a different JRE, I would suspect it has something to do with the availability of JCE provider in the first JRE. By default, WebSphere's JRE is equipped with IBM JCE provider which is what the agent uses to encrypt the necessary
    information. If this provider is not configured correctly it could result in the error that you are seeing. Please check the WebSphere installation and make sure that the JRE used by it has the necessary IBM JCE provider configured. The java.security file for this should contain something like:
    security.provider.1=sun.security.provider.Sun
    security.provider.2=com.ibm.crypto.provider.IBMJCE
    security.provider.3=com.ibm.jsse.IBMJSSEProvider
    security.provider.4=com.ibm.security.cert.IBMCertPath
    security.provider.5=com.ibm.crypto.pkcs11.provider.IBMPKCS11
    Also, make sure that when you are installing the agent you specify the Java Home as prompted by the agent to point to the location where this JRE is installed. Typically this is under WebSphere/AppServer/java directory. HTH, Jerry

  • Theme for standalone WDJ application

    Dear Experts,
    We are on SAP Portal 7.4, and we have developed a WDJ application using NWDS 7.31.
    I have a requirement where I will like to use the Portal theme SAP_CORBU to the standalone webdynpro application.
    I have tried using the application parameter sap-cssurl=http://<MyHost>:50000/irj/portalapps/com.sap.portal.themes.lafservice/themes/portal/sap_corbu
    But this does not work.
    I have also tried whether this method works for other themes like sap_chrome or not.
    It does not work.
    Request you to please suggest.
    Warm Regards,
    Upendra Agrawal

    SAP_CORBU is supported only if you use Unified Rendering Lightspeed. Set iView parameter Stylesheet to ls and check Supply Portal Stylesheet. See below for how the pre EHP5 Who's Who Web Dynpro Java application looks like with SAP_CORBU. As always you should use SAP_CORBU only with applications that support it. In case of custom application, you will have to adhere to known restrictions with SAP_CORBU. See SAP notes 1681286 and 1852400 for details.

  • For standalone java applications Applet is better or Frame is better?

    Hi Every body,
    Iam new to java standalone application developement.As per my knowledge both Applet aswell as Frame concept can be used to develop java
    standalone applications, if Iam right. My application need menus, drop down menus and it also need to connect to backend database.So which is better?
    So please some body guide me.
    Thanks in Advance
    Basavaraj M

    A JFrame not a frame will be most apropriate because that just what it supposed to be used for but u can consider a JApplet if u want to incorporate it into a web application.
    Sq2000

  • Database design problem for multiple language application

    Hi All,
    We are working on a travelling portal and for a traveling portal its content and details are the heart.we are planning to have it in multiple locale so this means we need to handle the dynamic data for each locale.
    currently we have following tables
    Destination
    Transport
    Places of Interests
    user comments etc.
    each table contains a lot of fields like
    Name
    ShortDescription
    LongDescription
    and many other fields which can contains a lot of data and we need to handle data in locale specific way.
    i am not sure how best we can design an application to handle this case,one thing came to my mind is like putting extra column for each locale in each table but that means for a new locale things needs to be changed from database to code level and that is not good at all.
    Since each table contains a lot of columns which can contain data eligible for internationalization so my question is what might be the best way to handle this case
    After doing some analysis and some goggling one approach that came to my mind is as below..
    i am planning to create a translation table for each table,like for destination i have the following design
    table languages
    -- uuid (varchar)
    -- language_id(varchar)
    -- name (varchar)
    table Destination
    --uuid (varchar)
    other fields which are not part of internationalization.
    table Destination_translation
    -- id (int)
    -- destination_id (int)
    -- language_id (int)
    -- name (text)
    -- description(text)
    Any valuable suggestion for above mentioned approach are most welcome...

    This approach sounds reasonable - it is the same approach used by Oracle Applications (Oracle ERP software). It de-normalizes information into two tables for every key object - one contains information that is not language sensitive and the other contains information that is language sensitive. The two tables are joined by a common internal id. Views are then created for each language that join these tables based on the common id and the language id column in the second table.
    HTH
    Srini

  • Problem creating standalone exe application

    I am trying to create a stand-alone application, ie, .exe file for a rather large program. The program includes several "instr" libraries, including "TD2024", "AGN6700", "AGILENT 6700", and several others. When I try to build, or look at the "general preview" I'm getting errors which indicate conflicts and also errors due to files called "tree.vi" in several of the libraries. My application also includes configuration and header files. My question is when trying to create the .exe should I include the entire "instr.lib", or only those files in the individual instrument library which I need? Also how do I resolve conflicts due to VIs in the file with the same names. For example "AGILENT 34970" and "AGILENT_E364X_Series" both contain a file called "initialize.vi". I'm fairly new and I've only created simple .exe files
    Solved!
    Go to Solution.

    Hi chuck72352,
    you can call vi's dynamically if you open a reference to it with the "Open Vi Reference" function.
    I'm not sure which ini and txt file you mean, but the Exename.ini will be created automatically with every start of the exe, if the ini is not present in the same folder.
    Mike

  • Firefox 5 having problem for Juniper Secure Application manager 7.0

    Hi
    I am using ie 9 win 7 before with jre 1.6 64bit that is working fine for JSAM 7.0 and i can able to login vpns...but when i switched to firefox 5 and try to open vpn web client to start JSAM, every time JSAM 7.0 client setup is opening and not allowing to go further and not able to start services.

    i resolved myself by updating java 1.6 plugins...Now JSAM is working fine.
    Thanks...

  • My firefox keep crashing despite resetting. Can you trace the problem for me to see what causing the crash

    <pre><nowiki>bp-3f4bb08d-89f6-43ab-a93e-6f1ed2140314 14/03/2014 12:43
    9806af78-801a-40f5-a6de-9f68ab5f14d6 13/03/2014 15:01
    bp-ee689087-5526-4abb-8912-5e4e32140313 13/03/2014 13:31
    bp-b078ef78-f5e1-4a34-9d8a-797fd2140313 13/03/2014 12:39
    bp-310a31d5-50e2-4853-ad42-4d7232140309 10/03/2014 02:27
    </nowiki></pre>

    There are a lot of Avast (9.0.2013.292) files showing the the modules list of the crash report, so you may want to check the settings there and make sure to update to the latest version.
    Boot the computer in Windows Safe Mode with network support (press F8 on the boot screen) as a test to see if this helps.

  • What should be done in certmap.conf for 2-way SSL support from a standalone Java application to an SSL enabled LDAP Server

    To support certficate based client authentication using 2-way SSL from a standalone java application which uses JNDI and JSSE1.0.2 to connect to an SSL enabled LDAP Server how do we configure the certmap.conf?Is there any additional setup required at the LDAP Server side apart from enablinf SSL with the option"Required Client Authentication" enabled.The 2 way SSL handshake goes through but the access log file (After configuring the certmap.conf for the issuer DN of the client certficate etc..)shows SSL failed to LDAP DN?But inspite of this access log error the Java client does get an SSL Connection object with which it is able to connect to the LDAP.IS the certmap.conf file being looked up by the LDAP Server at all?

    have you out.flush() and out.close() before you call connection.getInputStream()?

  • Problem while deploying ADF application to standalone WLS server

    Hi,
    I am facing a problem while deploying ADF application to standalone WLS Server.
    Following is the error message that I am getting.
    [07:24:03 PM] ----  Deployment started.  ----
    [07:24:03 PM] Target platform is  (Weblogic 10.3).
    [07:24:07 PM] Retrieving existing application information
    [07:24:08 PM] Running dependency analysis...
    [07:24:08 PM] Building...
    [07:24:13 PM] Deploying 2 profiles...
    [07:24:14 PM] Wrote Web Application Module to D:\WorkSpace3\DashboardUi\deploy\Dashboard.war
    [07:24:14 PM] Wrote Enterprise Application Module to D:\WorkSpace3\deploy\Dashboard.ear
    [07:24:14 PM] Deploying Application...
    [07:24:22 PM] [Deployer:149191]Operation 'deploy' on application 'Dashboard' is initializing on 'msDevServer1'
    [07:24:27 PM] [Deployer:149193]Operation 'deploy' on application 'Dashboard' has failed on 'msDevServer1'
    [07:24:27 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application Dashboard on msDevServer1.: .
    [07:24:27 PM] Weblogic Server Exception: weblogic.application.ModuleException:
    [07:24:27 PM] Caused by: weblogic.common.ResourceException: DataSource DashboardDb already exists
    [07:24:27 PM]   See server logs or server console for more details.
    [07:24:27 PM] weblogic.application.ModuleException:
    [07:24:27 PM] ####  Deployment incomplete.  ####
    [07:24:27 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)Any suggestion how to fix this.
    Thanks
    Ajay

    I logged into console and browsed to 'Home >Summary of JDBC Data Sources' but not able to locate DashboardDb. Please let me know where to find DashboardDB on wls console.
    Also, please let me know how to configure the app to not to auto-deploy JDBC data sources

  • I have not been able to open up Lightroom on my computer for over a year now. Whenever I double click on it, this comes up - can anyone help? Problem signature:   Problem Event Name:APPCRASH   Application Name:lightroom.exe   Application Version:3.4.1.10

    I have not been able to open up Lightroom on my computer for over a year now. Whenever I double click on it, this comes up - can anyone help? Problem signature:   Problem Event Name:APPCRASH   Application Name:lightroom.exe   Application Version:3.4.1.10

    First thing to try is the latest version of Lightroom (currently 5.6). If it don't crash, then problem solved - upgrade.
    If Lr5 won't run on your machine, then Lr4 instead.
    If both Lr5 and Lr4 crash on your machine, then at least you know it's a not a Lightroom version problem but something wonked in your system.
    If you can't figure out how to resolve the crash on the system you have, then it's time for a new system (or try another converter/editor app).
    PS - A few things to try:
    * After re-installing new version, if that doesn't fix it, then get rid of all Lightroom-related data files (rename them so they can be restored), in case problem is in Lr data file.
    * Remove all non-essential hardware in case problem is hardware/driver.
    * Startup up machine with minimal software services.
    * If still no go, consider updating driver software, including mainboard drivers and/or bios firmware if need be.
    * Of course run all the system hardware and software diagnostics you can - problem could be failing disk or ram..
    * Check system event logs for any clues.
    If you don't know how to do some of these things - ask.
    Do not say "you've tried everything" unless you want a lecture - there is most definitely something you haven't tried. It's like when you can't find your car keys - you haven't looked everywhere -  there is somewhere you haven't looked!
    PS - Has Lightroom EVER worked on your machine? what's changed since then..
    Good luck,
    Rob

  • Context lookup problem in iplanet application server 6.0 sp3?

    Hi all,
    I am writing codes in the following enviornment, iplanet application server 6.0 sp3 with iplanet web server 4.1 sp7 in Window 2000.
    When I tried to login to the system, error occured when i try to lookup context for my session bean.
    The error message is as follows:
    login_process.jsp: Home / Remote Error:String index out of range: -7
    [10/Apr/2002 18:09:10:5] error: Exception: SERVLET-execution_failed: Error in ex
    ecuting servlet JSPRunnerSticky: java.util.EmptyStackException
    Exception Stack Trace:
    java.util.EmptyStackException
    at java.util.Stack.peek(Stack.java:86)
    at java.util.Stack.pop(Stack.java:68)
    at com.netscape.server.deployment.AppComponentDescriptorUtil.popCurrentAppComponent(Unknown Source)
    at com.netscape.server.servlet.servletrunner.AppInfo.popWebAppDescriptor(Unknown Source)
    at com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown Source)
    at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    could anyone suggest a method to solve the problem?
    Thx very much!

    There is a major security breach in authenticating
    iPlanet Web Server 6.0 SP3 and SP4 using Sun ONE
    Directory Server. Using a valid user id, any
    password except null string would allow user access
    the restricted resources. iPlanet Web Server 6.0 SP5
    and 4.1 SP12 worked fine with similar configuration.Did you get an answer for this?
    We are having the exact same problems with our iPlanet Web server 6.0 SP3.
    thank you.

  • What design aids for large-scale application (using LV6i) exist?

    I have a large-scale application that includes analog and digital I/O, motion control, multiple temperature readings, Ethernet communication, RS-232, DDE and ActiveX controls for communicating with other commercial software. We have to improve the system performance and ease the pain of maintaining and upgrading. What aids are there for large-scale application design and development?

    This doesn't exactly count as development "tools" but I can send you copies of three papers that I found when I was just getting started with LV. They can show you how to think about your problem--and that is really the hardest (and most important) part.
    Contact me directly and I'll email them to you. The archive is to large to post.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Requirements for running SOA 11g on Websphere Application Server

    Hello All,
    Could somebody please provide me with the requirements needed to run SOA 11g applications on Websphere Application Server(WAS) like what version of WAS is required etc.
    Thanks

    The latest release of SOA Suite 11g 11.1.1.4.0 (PS3) is certified on Oracle Weblogic Server and IBM WebSphere Server. Please refer certification related information here -
    http://www.oracle.com/technetwork/middleware/ias/downloads/fusion-certification-100350.html
    Release 11.1.1.1.x to release 11.1.1.3.x are supported on Oracle Weblogic Server only.
    OAS 10g is not a supported application server for 11g Soa Suite.
    Regards,
    Anuj

  • How to lookup EJBs deployed in OC4J from a standalone client application

    Hello all,
    I am trying to lookup an EJB deployed in OC4J 10.1.3 from a standalone client application using the following code:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791");
    env.put(Context.SECURITY_PRINCIPAL, "jazn.com/test");
    env.put(Context.SECURITY_CREDENTIALS, "test");
    Context context = new InitialContext(env);
    Object ref = context.lookup("ejb/Dispatch");
    I get the following error:
    javax.naming.NameNotFoundException: ejb/Dispatch not found
         at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
    For the lookup string I've also tried:
    "java:comp/env/ejb/Dispatch" and "Dispatch"
    For the Context.PROVIDER_URL property I've also tried:
    opmn:ormi://localhost:6003:instance
    The result is always the same.
    I appreciate if someone could help me with this?
    Thanks,
    Georgi

    Georgi,
    Your question has been discussed many times on this forum. Search the forum archives for "RMIInitialContextFactory".
    The PROVIDER_URL needs to include the name of the deployed application that your EJB is part of, for example:
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791/MyApp");The lookup name has to be the value of the "ejb-name" element in your "ejb-jar.xml" descriptor file.
    Your SECURITY_PRINCIPAL value looks strange to me. Personally, I use "principals" (and not JAZN), so I modified the "application.xml" file (in the "j2ee/home/config" subdirectory) to use "principals". Look for the following comment in that file:
    &lt;!-- Comment out the jazn element to use principals.
          When both jazn and principals are present jazn is used  --&gt;Good Luck,
    Avi.
    Message was edited by:
    Avi Abrami

Maybe you are looking for