How can i look up a TxDataSource bound in Weblogic JNDI

          HI,
          How can i look up a TxDataSource bound in weblogic JNDI. When i access it using
          javax.sql.XADataSourse ds = (XADataSourse)context.lookUp(jndiName)
          .it gives me classcast exception.
          and if i lookup it using javax.sql.DataSource like below
          javax.sql.DataSourse ds = (DataSourse)context.lookUp(jndiName)
          then while executing my sql on the connection object it throws some other excepiton
          like below
          java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected
          Exception - with nested exception:
          [weblogic.rjvm.PeerGoneException: ; nested exception is:
                  java.io.EOFException]
          at weblogic.jdbc.rmi.SerialStatement.executeQuery(SerialStatement.java:92)
          at TestTransactionMgr.main(TestTransactionMgr.java:46)
          How can i solve this problem.. Actually my application needs to handle distributed
          transactions so i need to implement XADataSource.
          can somebody help me iin this.
          Thanks & Regards
          Akhil Nagpla
          

          HI,
          How can i look up a TxDataSource bound in weblogic JNDI. When i access it using
          javax.sql.XADataSourse ds = (XADataSourse)context.lookUp(jndiName)
          .it gives me classcast exception.
          and if i lookup it using javax.sql.DataSource like below
          javax.sql.DataSourse ds = (DataSourse)context.lookUp(jndiName)
          then while executing my sql on the connection object it throws some other excepiton
          like below
          java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected
          Exception - with nested exception:
          [weblogic.rjvm.PeerGoneException: ; nested exception is:
                  java.io.EOFException]
          at weblogic.jdbc.rmi.SerialStatement.executeQuery(SerialStatement.java:92)
          at TestTransactionMgr.main(TestTransactionMgr.java:46)
          How can i solve this problem.. Actually my application needs to handle distributed
          transactions so i need to implement XADataSource.
          can somebody help me iin this.
          Thanks & Regards
          Akhil Nagpla
          

Similar Messages

  • How to look up a TxDataSource bound in weblogic JNDI

    HI,
    How can i look up a TxDataSource bound in weblogic JNDI. When i access it using
    javax.sql.XADataSourse ds = (XADataSourse)context.lookUp(jndiName)
    ..it gives me classcast exception.
    and if i lookup it using javax.sql.DataSource like below
    javax.sql.DataSourse ds = (DataSourse)context.lookUp(jndiName)
    then while executing my sql on the connection object it throws some other excepiton
    like below
    java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception:
    [weblogic.rjvm.PeerGoneException: ; nested exception is:
    java.io.EOFException]
    at weblogic.jdbc.rmi.SerialStatement.executeQuery(SerialStatement.java:92)
    at TestTransactionMgr.main(TestTransactionMgr.java:46)
    How can i solve this problem.. Actually my application needs to handle distributed transactions so i need to implement XADataSource.
    can somebody help me iin this.
    Thanks & Regards
    Akhil Nagpla

    Hi Akhil did u get the solution for distributed database /
    I am also working on same but i dint get the solution yet. Please if u have any solution for the same do mail me to [email protected] and [email protected]
    here goes my problem !
    we have 2 oracle databases.
    I am using Stateless EJB and container managed transaction !
    And inside a ejb method i am getting 2 different connection from 2 different datasources ok !
    Since am using container managed transaction it starts transaction automatically when the method begins,
    and the transaction ends when the method exit out ok !
    Now i insert into 2 databases and when the method exits it gives an error listed below !
    i am using NON emulated datasource with class name "com.evermindsql.DriverManagerDataSource"
    and looking up this datasource in the EJB with name specified in location attribute of datasource !
    "com.evermind.server.rmi.OrionRemoteExcepttion: Transaction was rolled back: javax.transaction.SystemException: could not commit: error code 29540- for additional error code check the oracle log file"
    For distributed database we configured DBLINK also !
    If u can give more info regarding DBlink it will be better ! Even after we set DBlink we are getting error !
    Please tell us how to configure the database !
    Oracle 9iAS
    Oracle 9i DB
    regards
    Sreenath.V

  • ClassCastException while looking up RMI objects bound to weblogic.JNDI under WLS 6.1

    We deploy a servlet (in a single .war archive) establishing a RMI connection to
    an external Java object bound into weblogic JNDI (WLS 6.1).
    We get a ClassCastException on invoking JNDI lookup:
    Servlet failed with Exception>
    java.lang.ClassCastException: $Proxy67
         at com.thyssenkrupp.tks.tnt.admin.rmi.ClientServlet.init(ClientServlet.java:81)
         at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
         at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
         at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:366)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:240)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2390)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1959)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Curiously we don't observe these problems when we include all the classes of the
    remote application in the classpath of the WebLogic Server. Actually we want to
    avoid including external classes in weblogic.classpath for (hot) deployment reasons.
    It also seems that problems don't occur when accessing the remote object from
    an independent client application.
    We expect this to be a classloader conflict within WLS 6.1
    Does anybody know a solution to our problems?
    Thanks for suggestions
    Andreas Koerner

    There was a similar bug that was supposedly fixed in WL 6.1 SP 2. I had
    filed a bug on this myself, and was given a patch for SP1, you should be
    able to ask for the patch for CR060416.
    Peter Mularien
    Deploy Solutions, Inc.
    Andreas Koerner wrote:
    >
    We deploy a servlet (in a single .war archive) establishing a RMI connection to
    an external Java object bound into weblogic JNDI (WLS 6.1).
    We get a ClassCastException on invoking JNDI lookup:
    Servlet failed with Exception>
    java.lang.ClassCastException: $Proxy67
    at com.thyssenkrupp.tks.tnt.admin.rmi.ClientServlet.init(ClientServlet.java:81)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
    at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:366)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:240)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2390)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1959)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Curiously we don't observe these problems when we include all the classes of the
    remote application in the classpath of the WebLogic Server. Actually we want to
    avoid including external classes in weblogic.classpath for (hot) deployment reasons.
    It also seems that problems don't occur when accessing the remote object from
    an independent client application.
    We expect this to be a classloader conflict within WLS 6.1
    Does anybody know a solution to our problems?
    Thanks for suggestions
    Andreas Koerner

  • I got bulks of videos in my ipad 2, how can i look at my videos in list display? or make the fonts in my movie gallery smaller?

    I got bulks of videos in my ipad 2, how can i look at my videos in list display? It's hard for me to look through my gallery with grid display..
    any ideas?

    There is no list display option. If there were such an option, it would likely be available within the Videos app.

  • How can i look up a EJB residing in different machine from client side?

    hai ,
    How can i look up a EJB residing in different machine from client side?
    this is my code...........i don't know what should i use as Initial Context Factory...................i am using a sun appserver 8............
    package com.parx.lms.lmsdelegate;
    import com.parx.lms.exception.LMSException;
    import javax.naming.Context;
    import javax .ejb.CreateException;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.rmi.PortableRemoteObject;
    import java.rmi.RemoteException;
    import com.parx.lms.controller.*;
    import com.parx.lms.vo.UserVo;
    import com.parx.lms.exception.BusinessException;
    import java.util.Hashtable;
    import java.lang.*;
    public class LmsDelegate{
    private final static String JNDI_NAME="LmsBean";
    private static String url="http://localhost:4848";
    public static Lms lms = null;
    public void getController() throws CreateException,
    NamingException,RemoteException{
    if(lms == null){
    Hashtable h=new Hashtable();
    h.put(Context.INITIAL_CONTEXT_FACTORY," ********what should i use here???????*************************");
    h.put(Context.PROVIDER_URL,url);
    System.out.println("Before Loading Context in Delegate");
    Context ctx=new InitialContext(h);
    System.out.println("Loaded Context in Delegate");
    Object obj=ctx.lookup(JNDI_NAME);
    System.out.println("Loaded Object in Delegate");
    System.out.println("Before Loading Home in Delegate");
    LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
    System.out.println("Loaded Home in Delegate");
    lms = home.create();
    System.out.println("Loaded remote in Delegate");
    public void addUserDelegate(UserVo vo) throws BusinessException{
    try{
    getController();
    System.out.println("Before calling the addUser of Session");
    lms.addUser(vo);
    }catch(CreateException e){
    System.out.println("Create Exception in Delegate due to--->"+e);
    e.printStackTrace();
    throw new BusinessException(e);
    }catch(NamingException e){
    System.out.println("Naming Exception in Delegate due to--->"+e);
    e.printStackTrace();
    throw new BusinessException(e);
    catch(RemoteException e){
    System.out.println("Remote Exception in Delegate due to--->"+e);
    e.printStackTrace();
    throw new BusinessException(e);
    }catch(LMSException e){
    System.out.println("duplicate user name--->"+e);
    e.printStackTrace();
    throw new BusinessException(e);
    pls help me..........

    h.put(Context.INITIAL_CONTEXT_FACTORY," ********what should i use here???????*************************")
    Each app server provides their own jndi factory class. For ex for weblogic it is weblogic.jndi.WLInitialContextFactory. SInce you are using sun app server, check if there are any examples to find out or the docs.
    private static String url="http://localhost:4848
    Since the client is in a different machine the localhost is not going to work here. provide the url or the machine name of the system in which ur sunapp server is running. In addition u will need to have the stubs of the remote interfaces in ur client machine.

  • HT201303 how can I look up the answer to my security questions for Apps?

    I want to buy apps , but I forgot the answer to my security questions, How can I look up the answer or set it up again?

    If you have a rescue email address set up on your account then you can try going to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address set up then go to Express Lane  and select 'iTunes' from the list of 'products' in the middle of the screen.
    Then select 'iTunes Store', and on the next screen select 'Account Management'
    Next choose 'iTunes Store Account Security' and fill in that you'd like your security questions/answers reset.
    You should get an email reply within, I think, about 24 to 48 hours (and check your Spam folder as well as your Inbox)

  • How can I look at old text messages

    How can I look at old text messages that I haven't deleted my phone just won't load to let me go up that far.?

    As Ann said, it does depend on your phone.  One third party app that works on many phones (especially older models, but not all phones) is BitPim ( http://www.bitpim.org/ ) but it can potentially harm/brick your phone if you don't know what you are doing - use it with caution.  I have used it successfully to get texts and photos off an old flip phone that was deactivated and had no sd card.
    Newer smartphones can download apps that will give you the ability to print out texts.

  • When I look up the creation date for files on my Macbook I get the date and month in brackets, but not the year.  Why is this and how can I look up the year?

    When I look up the creation date for files on my Macbook (using "get info", or the information window in Iphoto) I get the date and month in brackets, but not the year.  Why is this and how can I look up the year? 

    Does the Date Modified column in a window set to List view show the date correctly, or does it also display it incorrectly?
    To add additional columns to a Finder (folder) window, with that window open and active open the View Options for it. You can do that by pressing Command-J or by selecting View Options from the View menu in the main menubar.

  • How can i look to see what is on icloud i would like to manage whats on it

    how can i look to see what is on icloud i would like to manage it. Erase things on there to make more room??

    Settings > iCloud > Storage & Backup > Manage Storage. Select your device. Each app should have an on/off switch, so you can choose which apps' data will be included in the next backup.

  • How can i look up my apple id without the email address associated with it

    I do not know the email address associated with my apple id. How can i look up my apple id with out it

    You need an non-Apple email address to set up an Apple ID.
    Yuu can get a Gmail account heee. It is free
    https://support.google.com/mail/answer/56256?hl=en

  • How can I list all the domains configured for Weblogic Servers?

    How can I list all the domains configured for Weblogic Servers?
    I saw a note, which says the following:
    "WebLogic Server does not support multi-domain interaction using either the Administration Console, the weblogic.Admin utility, or WebLogic Ant tasks. This restriction does not, however, explicitly preclude a user written Java application from accessing multiple domains simultaneously."
    In my case, I just want to list all the domains, is that possible by using any scripts?
    Thanks
    AJ

    If you use WLS Node Manager and the Config Wizard was used to create the domains, then the list of domains should be in a location like this:
    <MIDDLEWARE_HOME>\wlserver_10.3\common\nodemanager\nodemanager.domains
    Enterprise Manager Grid Control also has support for multi-domain management of WLS in a console.

  • How can i locate the resource file in the weblogic?

    hello
    in struts, i can leave some parameter in a resource file (such as "Application.properties")outside of my code,and get them in the "Action" class by the "getResource" method.
    in my data access tier,i still want to use such a machanism but i can't use the "getResource()" method,for example,there is a ConnectionPool class,i want to read some parameters from a resource file ("param.properties") that is under the same directory as the ConnectionPool class,the following is the code snippet:
    public static void init(DataSource ds){
    myself=new ConnectionPool(ds);
    java.util.Properties prop=new java.util.Properties();
    try{
    java.io.FileInputStream fin=new java.io.FileInputStream("./param.properties");
    prop.load(fin);
    }catch(Exception e){
    e.printStackTrace();
    System.out.println(prop.get("help.create"));
    the "ConnectionPool" class is in the "com.jhtop.task.forum.db.util" package,the "param.properties" is in the same package (com.jhtop.task.forum.db.util),
    but when i execute the program,it tell me that it can't find the file.if i use the absolute path,it works.
    i wonder how can i locate the file path in the weblogic,or what's my current path,or how may i setup my work directory?
    in tomcat,my current directory is bin directory,how about weblogic?
    who can help me?thank you!

    My english is bad and I'm not sure I've well understood your problem.
    How have you created your file ?
    Why do you put it in such a directory and not an other ?

  • How can I look up DataSource from one EJB to the other EJB?

    Image that, I have 3 databases:
    DB1
    DB2
    DB3,
    And then, 03 DataSources is deployed in DS EJB, named DataSource1, DataSource2, DataSource3.
    In the other App EJB, I have Connection Management function, as follows:
    public Connection getConnection(databaseKey) {
    if (databaseKey.equals("DB1")){
    connection = remote.lookup("DataSource1");
    }else if (databaseKey.equals("DB2")){
    connection = remote.lookup("DataSource2");
    }else if (databaseKey.equals("DB3")){
    connection = remote.lookup("DataSource3");
    return connection;
    How can I access DataSource 1,2,3 from the other EJB? How to config EJB server for that?
    Thanks in advance!
    Now, I have the other App EJB. Some class will require one of the above DataSource from DS EJB through function getConnection(databaseKey){}

    I strongle suggest you to use a ServiceLocator for this . It will be very easy to identify.Go to the sun home page and look for a servicelocator pattern.You can even directly use that code for you.

  • Creative Zen MicroPhoto: How can I look at the Playli

    Hi!
    I have a small question about my new Zen MicroPhoto: While I hear music I often add new songs, lots of songs. So I can read "playing 3 of 42" or something else. How can I take a look on the songs which are following? I want to see the acti've playlist, so that I can see "Ah, three songs later there will be song "blablabla".
    Is this possible somehow?
    Thanks!Message Edited by san_salvador on 04-4-2006 04:4 PM

    san_salvador,
    When you're at the Now Playing screen, tap the scroll pad again and it should show you the list.
    Jason

  • I am trying to view pdfs but when i click on them lots and lots of tabs keep appearing at the top i've had 1000s,how can i stop this and how can i look at pdfs

    I received an email from my power supplier,in it I must click on bill to view,it downloads and asks if I want to open it with internet explorer or something else,so I click on firefox.All it does is keeps opening loads and loads of tabs across the top,I've tried to close them at the last count I had managed to close over 1000 tabs but still cannot see my bill.my wife had the same she tried to open pdfs and got the same problem.So how can we view without problems files we receive in emails etc,and how do I get rid off this tab multipling itself? Thanks

    hi thanks for that info,but I tried the first help email I received and that one did the trick.Tahanks again for your in put.

Maybe you are looking for

  • Output of the concurrent program in PDF - Reg

    Hi All, I have a requirement wherein i have to get the output of the concurrent program as a pdf file. I'm using the report file (.rdf) as the executable. When I'm giving the output as PDF in program definition, it errors out. The report is very comp

  • MDD / ATI 9800 Pro - LCD TV connection

    I'm thinking. I would like to connect the MDD (with 9800 Pro) to a LCD TV. The 9800 has an available 15Pin out (VGA?) and the TV has a VGA in. Looking for thoughts on this. Thinking the MDD would be my video library and serve up our collection. Beyon

  • IPHONE email attachments Dont Show up on PC's

    I have been using macs for over 20 years now; love them. One problem I experience is when I get an email I can see it fine on my phone. If I fwd to a PC computer, they cannot see the attachment pics etc. It's not on one particular machine, but multip

  • Windows virtual machine on a Mac mini

    Can the Fusion drive in a Mac mini be partitioned to run a Windows7 virtual machine?

  • Can i use 32 bit windows 7 for boot camp?

    I recently purchased a 15 inch mbp retina display and wanted to use boot camp to install windows 7 on it. I accidentally purchased 32 bit instead of 64 bit.  will this still work?