I need "TestSessionHome" but get "CDRInputStream$1"
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
Hi zurdo,
I have the same problem!!!!!!!!!!
If you have solved it, could you give me any help?
Thanks,
Fil
Similar Messages
-
Iphone 3gs in recovery; needs restore; but gets error code
I have a new 3gs Iphone.
I installed the newest version of ITUNES- 9.something.
I start the SETUP IPHONE PROCESS.
I am told that I need to upgrade to new Iphone OS.
It takes 2 hours to download.
I get an error
I try to reconnect the iphone - GET MESSAGE that the phone is in recovery and needs to be restored.
I start restore - i get an error. I start again. It shows all the green bars as completed but then freezes. I restart the computer.
ITUNES tells me again that Iphone is in recovery and needs restore.
I start restore. I get a message: The Iphone could not be restored. An unknown error occured (14).
I don't know what to do.I have had this same problem, and you'll find out it will eventually work, but then after that your phone wont even start up and wont be able to connect to your computer! it's only allowing me to make Emergency Calls
This new update has really peeved me, i need my phone for work.
Try another computer, updating itunes, or different ports, restarting computer. Only thing i can think of sorry. -
My PC hard drive died and I have replaced it. Need to import the music on my classic iPod, but get a message that it's synced with another library (old hard drive). How do I import the music onto the new hard drive? Senuti (one respondent's suggestion) is just for macs. I have no old hard drive to copy to the new hard drive (another respondent's suggestion.)
See this older thread from another forum member Zevoneer on different ways to copy music from your iPod back to your PC.
https://discussions.apple.com/thread/2417169?start=0&tstart=0
B-rock -
I had the geek squad from bestbuy supposedly install iphoto 11 on my mac but it is not there and when i try to download it it say the app has been download by another user on this machine. What do i need to do get get this app on my system? If they could not do it right the first time I do not have much faith in their advice.
Assuming you've done a system wide search for it including the Applications folder and it's not there......
I think you will need to address this with them - did you pay them for the application? Or was your purchase price to include it? And the question(s) to ask them:
If the app store states that it has been downloaded, ask them where it is and which Apple ID they used. (the store keeps track of Apple IDs and machine IDs on everything you download).
I have absolutely no faith in their advice; however, in this case, it's not so much technical advice, but an answer to your questions: you paid for something and it appears not to be there. -
Upgraded to 5.4 when opening lightroom get a message "encountered an error when reading from its preview cache and need to quite" tried this several time but get the same error message. Says Lightroom will attempt to fix the problem the next time it launches but that is not happening. How do it fix this?
Delete the preview cache using your operating system. It is a folder whose name ends with Previews.LRDATA. Do not delete the Lightroom catalog, which ends with .LRCAT
-
2007 MacBook Pro, was shut down properly last PM. Today on startup, spins and spins but cannot get to log in screen. Held option key with restart and using disk utilities the mac HD showing needs repair, but cannot be repaired. Says save as many files as possible and reinstall software. Can't save files, can't get into them. Willing to reinstall without saving, but can't because only disk option for the reinstall showing is the repair disk, and it is showing as locked. What to do?
Sounds like the drive is starting to fail. Have you ever change the drive in that system? If not then it is time to think about doing that, the sooner the better.
-
I am trying to download the new Itunes but get a message saying I need 10.6 version and I only have 10.5. How do I download 10.6?
10.5 to 10.6 is not an update, it's an upgrade. http://support.apple.com/kb/HT1444
Buy 10.6: http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard -
I need help in getting my software options in CS5 Photoshop Student version. We have registered the product but don't have print preview or Adjust Auto Levels for example?
<moved from Downloading, Installing, Setting Up to Photoshop General Discussion>
-
sign in told my firefox is out of date. did try to do the upgrade but could not do
need help to get my sign in workingKathleen Beal/funstarling please respond in https://support.mozilla.org/en-US/questions/982953
-
I want to share files from iMac to MacBookPro. In "Sharing" setup I want to check "screen Sharing" but get the error message"Screen Sharing is currently being controlled by the Remote Management service." What do I need to FIX???
Care to share which OS you are using?
Have you read for possible solutions over in the "More Like This" thread over here?-----------------------> -
Installed Acrobat XI but getting message from a website that I need "a later version of PDF viewer to view full contents of this document". How to fix this?
THe message is misleading. Save the file to your desktop, even though all you see is the message. Then, open the saved file in Reader.
-
Trying to get icloud, installed snow leopard, now it says I need OSX, but my processor isn't right for it. Is this possible? Do I need to buy a nw computer? will I loose all my mobile me storage?
You will lose the entire contents of your iDisk whether or not you migrate to MobileMe as there is no equivalent in iCloud and MobileMe will be terminated at the end of June. You will need to download any data which you don't have on your Mac already.
Snow Leopard is not compliant with iCloud and most of the facilities will not work. You can migrate from MobileMe to iCloud at http://me.com/move even with Snow Leopard: when asked to confirm that your Mac is running Lion just lie and say 'yes'. Of course you won't be able to access iCloud directly from your Mac.
If you have MobileMe mail set up to collect mail from external POP accounts you should cancel this before migrating, or you may find it still working in iCloud (where it isn't supposed to) and with no way of stopping it.
This will be the situation with Snow Leopard when you have migrated:
Your email, calendars, and 'Find my iPhone' will be migrated to iCloud. Contacts and Bookmarks cannot be migrated from a Snow Leopard Mac.
Your iDisk, together with website hosting and Gallery, will continue to work as before until next June.
Syncing of Dashboard Widgets, Dock Items and Keychains between Macs, and Mail Accounts, Mail Rules, System Preferences, Signatures & Smart Mailboxes between Macs & iOS devices, will cease altogether.
You will be able to access email and calendars on the iCloud website at http://icloud.com provided your browser is reasonably up-to-date.
You will not be able to sync contacts or bookmarks from a pre-Lion Mac.
You will be able to enter the server settings for email manually in the Mail application and access your email.
You will not be able to sync your calendars directly.
Some people have been able to set up calendar syncing by using the method detailed here - this is an unsupported hack and may not be reliable, and may stop working at some future point.
There appears to be no method of syncing contacts (though Address Book on a Mac can be synced with Google or Yahoo address books - I don't know how reliable this is).
There are a couple of third-party solutions which may be of interest.
BusyCal is an iCal-like calendar application with extra facilities: it can sync with the iCloud Calendar while running on Leopard, Snow Leopard or Lion. A single user licence (two machines allowed) is $49.99.
Soho Organizer can sync Calendars and Contacts with iCloud on Leopard, Snow Leopard and Lion. A single user licence (multiple machines allowed) is $99.99. -
I'm trying to install windows 7 but getting a message that it can't be installed on bootcamp because it needs a partition formatted as NTFS. What to do?
Hello,
The Boot Camp Assistant application helps you create the Windows partition and restart your Mac ...
http://www.apple.com/support/bootcamp/ -
My mom and I both have iphone5 but when I send her messages they aren't blue but any other iphone I text is blue I need help to get that fixed
Both of you need to have iMessage activated, and both have to have active Internet connection for iMessage. Are you both using the same Apple ID? Are you using the phone number or Apple ID for messages?
-
I am having trouble printing I have a connection to my printer wirelessly but does not print out the correct page I want.When I do print I get a bunch of pages more than is needed and also get a code and symbols please help I am jammed at work
This can be the result of selecting the wrong driver. An older, unsupported laser printer will sometimes work with the generic Postscript driver.
Maybe you are looking for
-
Pre Database Insert / Update Validation
Hi, I have a maintenance view that allow user to insert / update. Let's say, z_my_table is my table key1 key2 field1 field2 field3 I want to validate whether field1, field2, field3 whether exist in my table before insert / update. However, due to som
-
Accessing Home Hub 4 with windows 8.1 and Internet...
Hello I can no longer access my home hub manager wirelessly running windows 8.1 and Internet Explorer 11 from my toshiba laptop by either typing in the IP address or by http://bthomehub.home/. I can still access it by either method from a laptop runn
-
Videos shot on my iphone are not showing up on my photostream on my ipad
-
Firefox sometimes does not end
14.7.2014 Firefox 30.0 (German version) under Win 8.1 Hello, Sometimes Firefox does not end properly. When Firefox is re-started I get a message saying Firefox is still running although about 10 minutes has passed between end and the re-start. Only b
-
Business Event Subscription Changes don't take immediate effect
Hi, it seems that whenever I make changes to my business event subscriptions the changes only take effect the next day. (Almost like there is some concurrent request running at night, or something bounced to make the changes) Does anybody know what n