Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Nasir Mkhan

+ Follow
since May 13, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nasir Mkhan

Thanks James for your reply. We are using GF 2.1.1.

I did removed appserv-deployment-client.jar and appserv-ext.jar from shared/lib but it gave me "ClassNotFoundException for com.sun.logging.LogDomains" which I see in appserv-deployment-client.jar. I added that jar back and then got "ClassNotFoundException:$HowToRun" and that class is in appserv-ext.jar. So, when I add that back, I get the original exception posted before.


I am trying to call remote EJB on glassfish from tomcat 5.5. I am using JDK 1.6. I copied following glassfish jar files to tomcat/shared/lib directory
1 - appserv-rt.jar
2 - appserv-deployment-client.jar
3 - appserv-ext.jar
4 - javaee.jar

Using following cod to call EJB

Properties props = new Properties();
props.setProperty("org.omg.CORBA.ORBInitialHost", "test-server");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");

InitialContext ctx = new InitialContext(props);
TestEJB bean = (TestEJB) ctx.lookup("com.mycode.TestEJB");

I could not figure out why I am getting following exception

java.lang.RuntimeException: java.lang.ClassCastException: cannot be cast to
at com.sun.enterprise.util.ORBManager.initORB(
at com.sun.enterprise.util.ORBManager.getORB(
at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(
at javax.naming.spi.NamingManager.getInitialContext(
at javax.naming.InitialContext.getDefaultInitCtx(
at javax.naming.InitialContext.init(
at javax.naming.InitialContext.<init>(
at com.ibi.jsp.util.event.AdminToolManager.runClearning(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.myfaces.el.MethodBindingImpl.invoke(
at org.apache.myfaces.application.ActionListenerImpl.processAction(
at javax.faces.component.UICommand.broadcast(
at javax.faces.component.UIViewRoot._broadcastForPhase(
at javax.faces.component.UIViewRoot.processApplication(
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(
at javax.faces.webapp.FacesServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at com.ibi.jsp.util.filters.SessionFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11AprProcessor.process(
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(
Caused by: java.lang.ClassCastException: cannot be cast to
at com.sun.enterprise.iiop.ClientConnectionInterceptor.send_request(
at com.sun.enterprise.util.ORBManager.initORB(

Please help as I could not find even a single thread on google that anyone reported such problem.

Does any one had problem with uploading files (under 20MB) using IE 6. I am using tomahawt extension filter to upload files. IE6 does nothing after being busy uplaoding file for couple of mins. Same code works fine in fireFox and IE 7.

Please respond if anyone has any idea about this.

10 years ago

I have been using ExtensionsFilter in one of the application for uploading files under 20MB. Recently, I replaced RI with myfaces1.1.5 implementation and also upgraded the tomahawk1.1.3 to 1.1.6. Filter 'org.apache.myfaces.webapp.filter.ExtensionsFilter' is set in my web.xml file with 25m i.e. MB of maxFileSize.
Now the strange part comes. It's working properly if i upload files under 1MB but for the file over 1MB when i hit upload button, browser gives up right away and does nothing. It does not even go to server. I mean none of the perperty is being set and valueChangeListener method also not being called.

Is there anthing outside the scope of the application that's cause of this problem, I mean e.g. anything related to tomcat server settings? Please anyone guide me on this?

10 years ago
Hello all,
I am trying to test this client-server socket communication on stand-alone pc,client program successfully connects to server but empty stream found on client.Plz tell me what is the problem?
Client Program:
InetAddress adress=InetAddress.getLocalHost();
Socket client=new Socket(address,80);
InputStream in=client.getInputStream();
InputStreamReader in2=new InputStreamReader(in);
Server Program:
ServerSocket server=new ServerSocket(80);
Socket connection=server.accept();
System.out.println("Client is connected");
OutputStreamWriter out=new OutputStreamWriter (connection.getOutputStream());
Thanks in any way.
Yes Jason, This apication is running in intranet.In some cases on same machine.I will be thankful to you if you solve this problem.
Nasir khan
16 years ago
Hello All,
Can anyone plz tell me, how to send a page to printer(on server side) for printing from jsp file.And if it is html page then either source code or its disply will be print.
Thanks in any case.
Nasir khan
16 years ago
Hello to all.
I am using the HelloWorld example of RMI with jdk1.2.2 and jdk1.3 on same machine.The registry and HelloServer runs in jdk1.2.2 and the client runs in jdk1.3 but it gives connectException & IllegalArgumentException.Plz tell me the code for Naming.rebind(?) and Naming.lookup(?) in HelloServer and HelloCLient repectively.I will be thankful.
Nasir Khan...
16 years ago
Plz tell me which ver of tomcat i should use for the preparation
of SCWCD Exam. because it must support jsp1.2 and servlets2.3.
Nasir Khan..
Hi All,
I am confuse on that what is the difference b/w distributed applications and client-server applications because in distributed applications too one object is reguesting(acting as client) and other object is responding(as server).Also with RMI we build distributed applications or client-server applications?
Plz put me outofthis confusion.Thanks to all.
Abdul Nasir Khan
16 years ago
Thanks sunder.I mean to say that does unix support every type of chat application(Http,Socket etc.), because i heard that unix cause some problem for chat application.
16 years ago
Hello to all.I want couple of Q's to ask.
1.Is IIS support JSP?
2.Is UNIX support chat application?if not, why?
I hope for the answers soon.Thanks
16 years ago
Hello to all.My problem is that i am using four frames means four html files in one html file.On the right frame,i am using <form> with two textboxes for id and password for sending to jsp file.I want three action on the click of submit button
1.Values of textboxes should be send to jsp file.
2.In response, the html file in right frame should be change to another html file.
3.The html file in left frame should be change to another file.
I tried my best but only two out of three actions is to be happen i.e the data send and html change in that frame from which the data is send or html files change with other html files but the data does not send.
Plz give me the solution how to do it.

[This message has been edited by Abdul Nasir (edited August 03, 2001).]
16 years ago
Thanks Tim! you said that make sure that the sensitve pages aren't cached. If the page has a form, this will usually cause the browser complain.How to do it i.e not to cache the page.But Tim, when we logout from any account the back button allow any one to see private pages if the brower is not closed.Is there any way to handle this problem.If we do these pages not cached then it will be the problem for the right user too if she want to see the previous pages that r not cached.
[This message has been edited by Abdul Nasir (edited July 25, 2001).]
16 years ago