Can't get Home inteface

Hi all! what about this:
I deployed a session bean TestSession in Sun's app server.
I made a client to test the bean, it runs outside of the app server
here the code:
package myjca.client;
import javax.naming.*;
import java.util.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import com.testing.session.*;
* @author zurdo1119
public class TestClient
     //Prints the context
     private static void printContext(Context contexto, String contextoS, int a)
                           throws NamingException
          int b;
          NameClassPair c;
          NamingEnumeration enum2;
          if (a == 0)
               enum2 = contexto.list(contexto.getNameInNamespace());
          else
               enum2 = contexto.list(contextoS);
          while (enum2.hasMore())
               b = a;
               while (b-- > 0)
                    System.out.print("--");
               c = (NameClassPair)enum2.next();
               System.out.println(c);
               if (c.getClassName().equals("javax.naming.Context"))
                    printContext(contexto, c.getName(), a + 1);
     //Connect to TestSession
     public static void testConn()
          InitialContext initCtx = null;
          Object obj = null;
          try
               initCtx = getInitialContext();
               printContext(initCtx, "", 0);
               TestSessionHome helloWorldHome =
                    (TestSessionHome)PortableRemoteObject.narrow(
                         initCtx.lookup("TestSession"),
                         TestSessionHome.class);
               TestSession helloWorld = helloWorldHome.create();
               helloWorld = helloWorldHome.create();
               String pepe = helloWorld.helloWorld();
               System.out.println("Pepe es: " + pepe);
          catch (Throwable ex)
               ex.printStackTrace();
     //Get context
     private static InitialContext getInitialContext() throws NamingException
          Hashtable env = new Hashtable();
          env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
          env.put(Context.PROVIDER_URL, "iiop://localhost:1050");
          return new InitialContext(env);
     public static void main(String[] args)
          testConn();
}Runing the client I get the context(the method "printContext" does it) and then a exception:
ServerObject:com.sun.corba.se.internal.iiop.CDRInputStream$1:
   com.sun.corba.se.internal.iiop.CDRInputStream$1:IOR:000000...
RemoteLogReader:com.sun.corba.se.internal.iiop.CDRInputStream$1:
   com.sun.corba.se.internal.iiop.CDRInputStream$1:IOR:000000...
TestSession:com.sun.corba.se.internal.iiop.CDRInputStream$1:
   com.sun.corba.se.internal.iiop.CDRInputStream$1:IOR:000000001...
java.lang.ClassCastException at
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unknown Source)
at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
at myjca.client.TestClient.testConn(TestClient.java:45)
at myjca.client.TestClient.main(TestClient.java:70).
This exception was caused by the narrow.
You can see that "TestSession" is there but as "CDRInputStream$1" and I need "TestSessionHome".
Whats wrong?
Thanks
Zurdo

I had a similar problem with my application and I was
given the next solution:
In your getInitialContext method try adding this
line:
env.put("dedicated.connection", "true");
I don't know if this will help cause i didn't try to
understand why it worked, but i hope soThanks but it doesn't work, I have migrated all to OC4J.
Thanks again.

Similar Messages

  • I can't get home sharing to turn on on my computers. I have a PC running windows XP that has a large library on it that I want to access from a newer windows 7 PC. I have turned home sharing on in both, same apple ID. I just will not come up. Any ideas?

    I can't get home sharing to turn on on my computers. I have a PC running windows XP that has a large library on it that I want to access from a newer windows 7 PC. I have turned home sharing on in both, same apple ID. I just will not come up. Any ideas?

    Ugh, disregard.. it magically started working -_-

  • HT4352 How can I get Home Sharing turned on my Apple TV if I have lost my remote control and my remote apps on my ipad and iphone can not get access to my apple tv, only my itunes.

    How can I get Home Sharing turned on my Apple TV if I have lost my remote control and my remote apps on my ipad and iphone can not get access to my apple tv, only my itunes.

    You can't, you will need to get a new remote.

  • Can't get Home Sharing to work with ATV, v7.0.3 and iTunes 12.1.0.50

    I can't get Home Sharing to work. I'm looking at my MacBook screen and iTunes says Home Sharing is On. On Apple TV, it says Turn On Home Sharing in iTunes. Both are using the same Apple ID and password (signed out and signed back in manually on both). I have tried the following: Signing out of and into Home Sharing on Apple TV and iTunes, closing iTunes and restarting the MacBook, restarting and restoring Apple TV to factory settings, restarting my router, all possible iterations of the aforementioned. Nothing seems to work. Also tried renaming my computer in preferences/sharing.
    Any new ideas?
    Using ATV3 software v7.0.3
    iTunes software v12.1.0.50
    MacBook software OS X Yosemite v10.10.2

    Only have one network; wireless. On it's own, the MacBook can use wifi to surf the net and Apple TV can watch movie previews from Apple via wifi.
    It did work about two months ago. I haven't used it since then for home sharing but have used the Apple TV on its own.
    I read the Troubleshooting page on Apple Support. It involves turning various things on and off, which I did

  • My App Store is frozen I can't get Home Deport off the screen

    I can't get Home Deport to get off my page and close down

    Try reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • HT3819 can't get home sharing to work

    can;t get home sharing to work with itunes

    A guide to iPad Home Sharing
    http://ipad.about.com/od/iPad_Guide/ss/Guide-To-iPad-And-iTunes-Home-Sharing.htm

  • Can't get home sharing to work on one of my computers

    Can't get the home sharing to work on one of my computers

    Try powering down all the PCs, then restarting them and itunes.
    It worked for this person:
    +shut everything down, start up again, and make sure that iTunes is open on both computers.+
    http://news.cnet.com/8301-13526_3-10348912-27.html

  • Can't get home sharing to work

    So I got a 4th generation ipod touch and want to get it to connect to my atv2, but when I put in my apple id and password it says "unable to connect to home sharing" I used the same apple id on it as I did on my macbook pro and my atv2, which both connected with each other just fine, and I just can't get it to work. Any suggestions??

    I just got my Apple TV home and was experiencing the same issue. I have gone to Preferences/Sharing and turned on the Home Sharing option. My MacBook Pro wasn't showing up in the 'Computers' menu on the Apple TV.
    However, there's a 'Turn on Home Sharing' option under the 'Advanced' menu of iTunes that has done the trick. When you select this option it will prompt you for your Apple ID and password. Once entered everything worked fine. See http://support.apple.com/kb/HT4352
    I don't know whether I'm just telling you something that you already know but this worked for me.

  • How can I get home videos onto my iPad to import into imovie

    Trying to get home movies off my PC onto IPad to send to iMovie.   I can get them to Movies app but can't get them into the camera roll?  Please advise...
    Thanks,

    It's a little complicated but you can use this how-to:
    http://howto.cnet.com/8301-11310_39-20003364-285/how-to-get-home-movies-onto-the -ipad/

  • How can I get Home Sharing working on my MacBook Pro?

    I've been trying to get Home Sharing and iCloud working on my MacBook Pro for a couple weeks now. It doesn't work whenever I try. iCloud is no where to be found.

    The following article(s) may help you.
    Troubleshooting Homesharing
    Troubleshooting WiFi Networks

  • Can login now, but can't get home

    I successfully managed to get my LDAP server to authenticate users logon.
    However, it does not seem to bind to their home directory... when the users try to click on their "home" folder:
    "The volume for 'username' cannot be found"
    Any aliases that the user created prior don't work either. Users can however, use AFP to get to their home folders (but programs such as iPhoto still won't work without home being accessible)
    Can anyone shed some light on this? (need any more info?)

    Good Day Jose,
    Checked on that (sorry for the late reply).
    In WGM, "Network Mount" the Option "Enable network mount of share point" is clicked. and set to /LDAPv3/127.0.0.1
    and set to "User Home Directory"
    and set to mount via AFP
    When the user clicks on "home" they get the error: "The volume for "username" cannot be found"
    When the user clicks on "Desktop" they get the error: "The volume for "Desktop" cannot be found"
    I'm guessing that there is a mapping problem somewhere. I've tried removing the icons from the side menu bar in finder only to see them return when logon again.

  • Zire 21 - Can't get home addresses to handheld;default is Work

    Home Contact addresses don't get synced to my handheld. I read this in Palm Help:
    "Select the Primary Contact    Select which contact information displays on your handheld in the Contacts View pane. Choose the contact label from the Select the Primary Contact pop-up menu."   Sounds simple, but I don't find a "Contacts View" pane, nor a "Select..." option. 
    Post relates to: Zire 21

    Only have one network; wireless. On it's own, the MacBook can use wifi to surf the net and Apple TV can watch movie previews from Apple via wifi.
    It did work about two months ago. I haven't used it since then for home sharing but have used the Apple TV on its own.
    I read the Troubleshooting page on Apple Support. It involves turning various things on and off, which I did

  • Can not get home share to work even after a session with Apple genius in store..!!!!

    I'm using ipad2, iPhone 4s and iTunes is running on my HP laptop. All three have home share turn on and are signed in as they should. The iPad and iPhone show my iTunes account but there is nothing behind it. I spent ten minutes with the Apple genius in store and he checked all the settings were correct, which they were. My two apple devices are finding the account ok as the library name appears in the shared file.
    I have followed a link the genius sent me to fully uninstall iTunes and then re-install the latest version from scratch. This has made no change at all apart from taking me three hours to back up my account incase it was whipped.
    I'm out of ideas, can anyone suggest we're I'm going wrong..???

    I received a complaint that my last post was not so clear and I have updated this post here.
    I have now configured Thunderbird and after help with setting up by my provider Yahoo/ Xtra. Thank you for your telephone help of 3 hours from Philippines today Yahoo/ Xtra. It all works fine now with Thunderbird.
    I now receive and can send E-mails from and for all 10 sub accounts.Today I received an Apple survey message to valuate my experiences.The case number that was given and is not solved at all is
    136901000 The very good Apple technicians name is SHIVARAM.It is not his fault that the issue could not be solved.A shame the Apple survey indicated there would not be any follow up of the issue.!!! I just had to phone again!!!
    It shows the arrogance that has entered the Apple organization.
    Imagine how many people are loosing time with this issue in my case about 2 days!!! Just after installation of a product they call Snow Leopard I payed 59 $ for !!! It should actually have been called Slow Leopard ! only one letter different.!!! Just as my computer only one program failing!!!
    Apple version 4.0 E-mail Program.See how they are going to fix this!!!!
    So New Zealand needs to talk to India-Phillipines-to get his 59$ purchased program working.!
    Ridicules 6 hours now yes it is all for free 0800 numbers .Still.!!! In Europe companies let the clients pay!!
    Clogz14

  • Can't get home sharing to connect?

    m trying to get my Aple TV up and running. I finally got it to connect to the wifi network, but now it won't connect to the homesharing in iTunes. I have created the account, the password is right but it can't "find" that home sharing. What do i do

    Welcome to the Apple community.
    For the avoidance of doubt, have you enabled home sharing in the advanced menu of iTunes, using your iTunes ID and password. Have you also enabled home sharing on the Apple TV from settings > computers using the same ID and password.

  • I can't get home sharing to work on one of our computers

    I am trying to transfer my boyfriends library to my itunes and can not make it work. We are both on the same version of itunes and window computers. When we both log in and turn on share, my library shows on his computer and I can transfer stuff from mine to his. On my computer, once I turn on share and click done, the sharing option does not show on the left side tool bar and I can not do anything with it at all. I have authorized the computer, checked preferences, etc.
    Any thoughts on how to fix this??
    Thanks!

    iTunes- Setting up Home Sharing on your computer
    Setting up Home Sharing for Apple TV (2nd and 3rd generation)
    Troubleshooting Home Sharing
    Understanding Home Sharing

Maybe you are looking for

  • Since installing the latest update I can no longer get on my wifi network

    Help! Since installing the latest update I can no longer access wifi.

  • PDF mail attachments are shown as question mark instead of preview or icon.

    When I receive a mail with PDF attachment, I can see paper clip on the header of mail. This is fine. However, Apple Mail does not show as preview or icon. I can see only a box with border and a question mark sign "?" in the middle. If I click the "?"

  • CRM_ORDER_MAINTAIN not working as RFC

    Hi , we need to change the msg partner for a support desk msg from webdynpro application.for that we are creating a custom RFC function module, Contains the below coding  , CRM_ORDER_MAINTAIN CRM_ORDER_SAVE BAPI_TRANSACTION_COMMIT It is successfully

  • IWeb Publishing Issues

    Don't get me wrong fellow Apple gurus....but why am I always having issues utililizing Apple goods. It would be a PERFECT WORLD if the whole world was all about the fruit......BUT THEY'RE NOT. The iWeb 3.0.3 update DID fix alot of previous issues but

  • Aperture and Red Eye Removal

    Is there a way to reduce the size of the white eye after removing red eye from one's photos?  Aperture does a good job of removing the red eye area but leaves a rather large white shining ring for the iris in my photos.  How do I reduce the size of t