I have developed a sample JMS program based on topics and I'm using tcp connector for JMS communication between JMS client and JMS server.I just want to know how JMS messages will pass over the firewall with the help of JProxy? Basically I want to know what are the changes with respect to JProxy I need to do in my application to make this work?
Hy,
I have downloaded trial version of JProxy in order to test it in my J2ee application under Jboss
I culdn't have an initial context with this sample code:
/* JBoss without JProxy */
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfac s.NamingContextFactory");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jn .interfaces");
System.out.println("Initial context :" + env );
InitialContext context0 = new InitialContext(env);
/* JProxy */
Hashtable env2 = new Hashtable();
env2.put(Context.INITIAL_CONTEXT_FACTORY, "com.jproxy.proxy NamingContextFactory");
env2.put(Context.PROVIDER_URL, hostUrl);
System.out.println("Initial context :" + env2 );
InitialContext context1 = new InitialContext(env2);
I don't understand why i get this "unexpected EOF" message?
Could you help?
Here the stack trace:
Initial context :{java.naming.factory.initial=org.jnp.interfa es.NamingContextFactory, java.naming.factory.url.pkgs=org.jbo s.naming:org.jnp.interfaces}
Initial context :{java.naming.provider.url=http://localhost:8 , java.naming.factory.initial=com.jproxy.proxy.NamingContextF ctory}
java.io.IOException: unexpected EOF
at com.jproxy.proxy.SystemProperties.getRemoteResource(Syste Properties.java:296)
at com.jproxy.proxy.SystemProperties.getRemoteResource(Syste Properties.java:268)
at com.jproxy.proxy.SystemProperties.loadMetaProperties(Syst mProperties.java:140)
at com.jproxy.proxy.SystemProperties.loadProperties(SystemPr perties.java:190)
at com.jproxy.proxy.SystemProperties.<<init>>(SystemProperties java:21)
at com.jproxy.proxy.SystemProperties.getInstance(SystemPrope ties.java:119)
at com.jproxy.proxy.NamingContextFactory.createTunnelInitial roperties(NamingContextFactory.java:114)
at com.jproxy.proxy.NamingContextFactory.getInitialContext(N mingContextFactory.java:67)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<<init>>(Unknown Source)
at arcad.app.ACCustomer.testJProxy(ACCustomer.java:358)
at arcad.app.ACCustomer.main(ACCustomer.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[JProxy][DEBUG][NamingContextFactory]: Properties: {}
[JProxy][DEBUG][NamingContextFactory]: getInitialContext: server url: http://localhost:80
[JProxy][DEBUG][Tunnel, init]
[JProxy][ERROR][NamingContextFactory]: Error during getInitialContext: server url: http://localhost:80 [HTTPTunne , invoke, client]:
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at com.jproxy.proxy.Helper.serializeObject(Helper.java:537)
at com.jproxy.proxy.servlet.HTTPTunnel.invoke2(HTTPTunnel.ja a:332)
at com.jproxy.proxy.servlet.HTTPTunnel.invoke(HTTPTunnel.jav :155)
at com.jproxy.proxy.Tunnel.invokeRequest(Tunnel.java:218)
at com.jproxy.proxy.Tunnel.newInstance(Tunnel.java:262)
at com.jproxy.proxy.NamingContextFactory.getTunnelInitialCon ext(NamingContextFactory.java:158)
at com.jproxy.proxy.NamingContextFactory.getInitialContext(N mingContextFactory.java:77)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<<init>>(Unknown Source)
at arcad.app.ACCustomer.testJProxy(ACCustomer.java:358)
at arcad.app.ACCustomer.main(ACCustomer.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[JProxy][ERROR]com.jproxy.proxy.TunnelException: [HTTPTunnel, invoke, client]:
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at com.jproxy.proxy.Helper.serializeObject(Helper.java:537)
at com.jproxy.proxy.servlet.HTTPTunnel.invoke2(HTTPTunnel.ja a:332)
at com.jproxy.proxy.servlet.HTTPTunnel.invoke(HTTPTunnel.jav :155)
at com.jproxy.proxy.Tunnel.invokeRequest(Tunnel.java:218)
at com.jproxy.proxy.Tunnel.newInstance(Tunnel.java:262)
at com.jproxy.proxy.NamingContextFactory.getTunnelInitialCon ext(NamingContextFactory.java:158)
at com.jproxy.proxy.NamingContextFactory.getInitialContext(N mingContextFactory.java:77)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<<init>>(Unknown Source)
at arcad.app.ACCustomer.testJProxy(ACCustomer.java:358)
at arcad.app.ACCustomer.main(ACCustomer.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at com.jproxy.proxy.servlet.HTTPTunnel.invoke(HTTPTunnel.jav :170)
at com.jproxy.proxy.Tunnel.invokeRequest(Tunnel.java:218)
at com.jproxy.proxy.Tunnel.newInstance(Tunnel.java:262)
at com.jproxy.proxy.NamingContextFactory.getTunnelInitialCon ext(NamingContextFactory.java:158)
at com.jproxy.proxy.NamingContextFactory.getInitialContext(N mingContextFactory.java:77)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<<init>>(Unknown Source)
at arcad.app.ACCustomer.testJProxy(ACCustomer.java:358)
at arcad.app.ACCustomer.main(ACCustomer.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
04-09-2007 10:33:49:676 Exception :javax.naming.NamingExcepti n: Could not obtain InitialContext for URL: http://localhost: 0 Last error: [HTTPTunnel, invoke, client]:
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at com.jproxy.proxy.Helper.serializeObject(Helper.java:537)
at com.jproxy.proxy.servlet.HTTPTunnel.invoke2(HTTPTunnel.ja a:332)
at com.jproxy.proxy.servlet.HTTPTunnel.invoke(HTTPTunnel.jav :155)
at com.jproxy.proxy.Tunnel.invokeRequest(Tunnel.java:218)
at com.jproxy.proxy.Tunnel.newInstance(Tunnel.java:262)
at com.jproxy.proxy.NamingContextFactory.getTunnelInitialCon ext(NamingContextFactory.java:158)
at com.jproxy.proxy.NamingContextFactory.getInitialContext(N mingContextFactory.java:77)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<<init>>(Unknown Source)
at arcad.app.ACCustomer.testJProxy(ACCustomer.java:358)
at arcad.app.ACCustomer.main(ACCustomer.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
javax.naming.NamingException: Could not obtain InitialContext for URL: http://localhost:80 Last error: [HTTPTunnel, invoke, client]:
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at com.jproxy.proxy.Helper.serializeObject(Helper.java:537)
at com.jproxy.proxy.servlet.HTTPTunnel.invoke2(HTTPTunnel.ja a:332)
at com.jproxy.proxy.servlet.HTTPTunnel.invoke(HTTPTunnel.jav :155)
at com.jproxy.proxy.Tunnel.invokeRequest(Tunnel.java:218)
at com.jproxy.proxy.Tunnel.newInstance(Tunnel.java:262)
at com.jproxy.proxy.NamingContextFactory.getTunnelInitialCon ext(NamingContextFactory.java:158)
at com.jproxy.proxy.NamingContextFactory.getInitialContext(N mingContextFactory.java:77)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<<init>>(Unknown Source)
at arcad.app.ACCustomer.testJProxy(ACCustomer.java:358)
at arcad.app.ACCustomer.main(ACCustomer.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at com.jproxy.proxy.NamingContextFactory.getInitialContext(N mingContextFactory.java:83)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<<init>>(Unknown Source)
at arcad.app.ACCustomer.testJProxy(ACCustomer.java:358)
at arcad.app.ACCustomer.main(ACCustomer.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Hi.
We are using JProxy 2.1.050723 in configuration:
Apache(1.3/2.0) + mod_jk + jboss4.0.2 + jetty + jproxy
Under J2SE (build Blackdown-1.4.2-03)
From time to time such an error appears :
************************************************************* *********************************
ERROR "JProxy" "Invocator, invoke, server, unexpected error": SessionId:1147283325121 RequestId:470 Type:METHO\D ObjId:1147861939927 Method:getPackage(java.lang.Integer) Arg0:java.lang.Integer Proxy:DYNAMIC Direct:false^M
java.lang.Exception: [Invocator, invoke, server, object not found]: SessionId:1147283325121 RequestId:470 Type:METHOD ObjId\:1147861939927 Method:getPackage(java.lang.Integer) Arg0:java.lang.Integer Proxy:DYNAMIC Direct:false
at com.jproxy.proxy.Invocator.invoke(Invocator.java:4 6)
at com.jproxy.proxy.Invocator.call(Invocator.java:222
at com.jproxy.proxy.Invocator.invokeOne(Invocator.jav :182)
at com.jproxy.proxy.Invocator.invokeAll(Invocator.jav :127)
at com.jproxy.proxy.servlet.TunnelServlet.doGet(Tunne Servlet.java:145)
at com.jproxy.proxy.servlet.TunnelServlet.doPost(Tunn lServlet.java:179)
at javax.servlet.http.HttpServlet.service(HttpServlet java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet java:810)
at org.mortbay.jetty.servlet.ServletHolder.handle(Ser letHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler$Ca hedChain.doFilter(WebApplicationHandler.java:830)
at org.mortbay.jetty.servlet.jsr77.Jsr77Filter.doFilt r(Jsr77Filter.java:77)
at org.mortbay.jetty.servlet.WebApplicationHandler$Ca hedChain.doFilter(WebApplicationHandler.java:821)
at org.mortbay.jetty.servlet.WebApplicationHandler.di patch(WebApplicationHandler.java:471)
at org.mortbay.jetty.servlet.ServletHandler.handle(Se vletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.ja a:1530)
at org.mortbay.jetty.servlet.WebApplicationContext.ha dle(WebApplicationContext.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.ja a:1482)
at org.mortbay.http.HttpServer.service(HttpServer.jav :909)
at org.jboss.jetty.Jetty.service(Jetty.java:456)
at org.mortbay.http.HttpConnection.service(HttpConnec ion.java:816)
at org.mortbay.http.ajp.AJP13Connection.handleNext(AJ 13Connection.java:288)
at org.mortbay.http.HttpConnection.handle(HttpConnect on.java:833)
at org.mortbay.http.ajp.AJP13Listener.handleConnectio (AJP13Listener.java:212)
at org.mortbay.util.ThreadedServer.handle(ThreadedSer er.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadP ol.java:534)
************************************************************* *********************************
In this particular StackTrace Method is getPackage(...), but it happens also for others methods.
I have no idea why it happens. May be you could come up with something.
Thx in advance.
Best regards,
Oleksandr Maslov
________________________________________
Niilo Mäky Institute
P.O. Box 35
40014 University of Jyväskylä
Finland
ph. +358142604578
mob. +358442893896
________________________________________
Please help! I didn't manage to run the EJB JProxy performanc test on SUN Appserver 8.1. I tried different configurations already. Has anyone managed to get this working on the Sun Appserver?
This is the start message of the JProxy application; the error message follows.
[#|2006-03-16T17:43:56.847+0100|INFO|sun-appserver-pe8.1_02|j vax.enterprise.system.stream.out|_ThreadID=11;|[JProxy][INFO] TunnelServlet, doGet] bytecode stubs for context "proxyservle " will be here: C:\Sun\AppServer\domains\domain1\applications j2ee-apps\proxy\proxyservlet_war\|#]
[#|2006-03-16T17:44:46.238+0100|WARNING|sun-appserver-pe8.1_0 |javax.enterprise.resource.corba._CORBA_.rpc.protocol|_Thread D=12;|"IOP00710220: (INTERNAL) Error in GIOP magic"
org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 220 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.giop agicError(ORBUtilSystemException.java:4210)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.giop agicError(ORBUtilSystemException.java:4224)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase readGIOPHeader(MessageBase.java:163)
at com.sun.corba.ee.impl.transport.CorbaContactInfoBase.crea eMessageMediator(CorbaContactInfoBase.java:153)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorIm l.createMessageMediator(SocketOrChannelAcceptorImpl.java:517)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnection mpl.readBits(SocketOrChannelConnectionImpl.java:328)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnection mpl.handleEvent(SocketOrChannelConnectionImpl.java:1171)
at com.sun.corba.ee.impl.transport.SelectorImpl.run(Selector mpl.java:275)
Sorry for few posts, but it was not possible to post it because of HEADER PATTERN (some how server filtered it out).
Hi.
We are using JProxy 2.1.050723 in configuration:
Apache(1.3/2.0) + mod_jk + jboss4.0.2 + jetty + jproxy.
From time to time there is an Exception on the server:
************************************************************* **********************************
Exception in thread "Thread-37" com.jproxy.proxy.TunnelExcept on: [HTTPTunnel, invoke, client]:
java.io.IOException: [Helper] Pattern: "JPROXY" "HEADER" not found. Stream corrupted.
at com.jproxy.proxy.Helper.findPattern(Helper.java:817)
at com.jproxy.proxy.Helper.decodeHeader(Helper.java:373)
at com.jproxy.proxy.Helper.deserializeObject(Helper.java:401
at com.jproxy.proxy.servlet.HTTPTunnel.invoke(HTTPTunnel.jav :377)
at com.jproxy.proxy.servlet.HTTPTunnel.invoke(HTTPTunnel.jav :149)
at com.jproxy.proxy.Tunnel.invokeRequest(Tunnel.java:517)
at com.jproxy.proxy.Tunnel.invokeMethod(Tunnel.java:700)
at com.jproxy.proxy.TunnelInvocationHandler.invokeMethod(Tun elInvocationHandler.java:232)
at com.jproxy.proxy.TunnelInvocationHandler.invoke(TunnelInv cationHandler.java:169)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin MethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.jproxy.proxy.StubHelper.invoke(StubHelper.java:52)
at com.jproxy.proxy.DynamicProxyInvocationHandler.invoke(Dyn micProxyInvocationHandler.java:55)
...
************************************************************* **********************************
Can not Understand why.
Best regards,
Oleksandr Maslov
I've modified your test program to the following:
public class HelloClient {
public static void main(String args[]) throws NamingExceptio {
Context ctx = null;
try {
ctx = getInitialContext();
final Object homeObject = ctx
.lookup("cell/nodes/MNJE3Node01/servers/server1/"
+ AdministrationServiceHome.JNDI_NAME);
AdministrationServiceHome home = (AdministrationServiceHom ) PortableRemoteObject
.narrow(homeObject, AdministrationServiceHome.class);
AdministrationService result = home.create();
result.clearCache();
} catch (Exception e) {
System.out.println("ERROR : " + e);
e.printStackTrace(System.out);
} finally {
if (ctx != null)
ctx.close();
}
}
private static Context getInitialContext() throws Exception {
System
.setProperty(
"javax.net.ssl.keyStore",
"C:\\Program Files\\IBM\\Rational\\SDP\\6.0\\runtimes\\ ase_v6\\profiles\\default\\etc\\DummyClientKeyFile.jks");
System
.setProperty(
"javax.net.ssl.trustStore",
"C:\\Program Files\\IBM\\Rational\\SDP\\6.0\\runtimes\\ ase_v6\\profiles\\default\\etc\\DummyClientTrustFile.jks");
System.setProperty("javax.net.ssl.keyStorePassword", "WebAS");
HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
public boolean verify(String urlHostname, SSLSession certHostname) {
// eat any cert for this test
return true;
}
});
Hashtable env = System.getProperties();
// the property "com.jproxy.proxy.initial" may be specified in
// proxy.properties or inline here:
// env.put("com.jproxy.proxy.initial",
// "com.sun.jndi.cosnaming.CNCtxFactory");
// env.put("com.jproxy.proxy.provider.url",
// "corbaloc:iiop:localhost:2809/NameService");
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.jproxy.proxy.NamingContextFactory");
env.put(Context.PROVIDER_URL, "https://localhost:9443");
return new InitialContext(env);
}
}
When running this program, the following output is logged:
[JProxy][INFO][HTTPTunnel]: Sun SSL is available.
ERROR : java.lang.ClassCastException
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject. arrow(PortableRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObjec .java:134)
at security.HelloClient.main(HelloClient.java:27)
I've tried without the narrow (direct cast to home interface) and that also resulted in a ClassCastException.
When inspecting the object that my lookup gives, I can see it's a proxy class having interfaceNames=[javax.ejb.EJBHo e, org.omg.CORBA.Object, java.rmi.Remote] so it seems I have a EJB home as expected.
I'm planning on running JProxy on an internet facing web server.
What are the supported methods of securing the servlet, so only authorised users can access it?
I've considered client side certificates, but that's they're too fiddley to implement. I've also considered basic-auth, but it's not suitable for my situation. Ideally I would like to use form based authentication.
What do you suggest?
We have run into several re-occuring issues where we modify and deploy any EJB, then JProxy is obviously attempt to reference the out of date vesion of the same EJB the next time we run our applet. Sometimes this is manifested as JProxy "Can't find object" or "Can't find method" exceptions. I have copied to the end of this mnessage the latest occurance from Tomcat's log (an serialization mismatch).
We are running an applet from inside a web appilcation. (Browser is IE 6, java plugin is JRE 1.5_06). The applet uses RMI to directly reference EJBs hosted in a spearate JBoss (4.0.1sp1) server. JProxy war file is deployed to a separate Tomcat (5.0.28) instance. In our development env, all of the applet, JBoss, and Tomcat instances are running on the same machine. However, for the production env, JBoss and Tomcat will run on separate machines.
We set the JNP Provider URL and PROXY SERVLET PROVIDER URL dynamically at applet init time. The result values for an applet running on a development machine are:
JNP Provider URL: localhost:8280 (points to Tomcat)
PROXY SERVLET PROVIDER URL: jnp://localhost:1099 (jnp at Jboss EJB server)
Tomcat log:
[JProxy][ERROR][Invocator]: declared exception:
[JProxy][ERROR]java.lang.reflect.UndeclaredThrowableException
at $Proxy22.getLandmarks(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodA cessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin MethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.jproxy.proxy.DefaultServerInvocationInterceptor.invok (DefaultServerInvocationInterceptor.java:26)
at com.jproxy.proxy.Invocator.invoke(Invocator.java:496)
at com.jproxy.proxy.Invocator.call(Invocator.java:222)
at com.jproxy.proxy.Invocator.invokeOne(Invocator.java:182)
at com.jproxy.proxy.Invocator.invokeAll(Invocator.java:127)
at com.jproxy.proxy.servlet.TunnelServlet.doGet(TunnelServle .java:145)
at com.jproxy.proxy.servlet.TunnelServlet.doPost(TunnelServl t.java:179)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:7 9)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:8 2)
at org.apache.catalina.core.ApplicationFilterChain.internalD Filter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter( pplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(Stan ardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext( tandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(Standard ipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInter al(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(Stan ardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext( tandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(Standard ipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(Standar HostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext( tandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorR portValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext( tandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(Standard ipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(Stand rdEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext( tandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(Standard ipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBa e.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAda ter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Pr cessor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionH ndler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpE dpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.io.InvalidClassException: com.terion.fleetvie .app.general.typedefinitions.TypeDefinitionImpl; local class incompatible: stream classdesc serialVersionUID = -6707119593061664789, local class serialVersionUID = 6537966224489638303
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass. ava:463)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStr am.java:1521)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream java:1435)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStr am.java:1521)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputS ream.java:1626)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.j va:1274)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputSt eam.java:1845)
at java.io.ObjectInputStream.readSerialData(ObjectInputStrea .java:1769)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputS ream.java:1646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.j va:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.ja a:324)
at java.util.ArrayList.readObject(ArrayList.java:547)
at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin MethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamCl ss.java:838)
at java.io.ObjectInputStream.readSerialData(ObjectInputStrea .java:1746)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputS ream.java:1646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.j va:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.ja a:324)
at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.inv ke(JRMPInvokerProxy.java:119)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(Inv kerInterceptor.java:163)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInt rceptor.java:103)
at org.jboss.proxy.TransactionInterceptor.invoke(Transaction nterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterc ptor.java:55)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(St telessSessionInterceptor.java:97)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.ja a:91)
... 38 more
It would be nice to have a listener for connection loss, so that when the callback tunnel fails to connect for 30 or 60 or some configured length of time, a method gets called indicating failure to connect to the server.
Conversely, it would be nice to have an explicit "disconnect" from server call, so that we don't try to re-use any objects of anything when the client logs out. In the current system, once a client has logged in, even if they log out, but the applet continues to run, the connection are maintained, and object references are kept. That causes a problem when the server crashes and is restarted, as we can't re-login again, and we get lots of error messages.
Thanks,
Bill
I have a standalone java client accessing a CORBA Server which is running behind a firewall. This firewall uses Network Address Translation (NAT).
The server sends its internal address to client and because of that my client is not able to access CORBA Server from outside network. Since the IIOP protocol contains IP address in package body, the firewall is not able to translate the internal ip address. Do you think JPROXY is a solution to this problem?
I have spent days solving this problem. Any help is appreciated.