EasyBeans
  1. EasyBeans
  2. EZB-172

Error during JRMP connection establishment when IIOP set as RMI

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EasyBeans 1.0 M6
    • Fix Version/s: EasyBeans 1.0 RC1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP Pro, Tomcat 6.0.13, JDK 1.5.0_12
    • Global Rank:
      1847

      Description

      I get socket read timeout when starting EasyBeans embedded in Tomcat. Apparently it tries to connect to JRMP naming service.
      IIOP is set as RMI. I have jacorb configured properly in my JDK (its libs in

      {JDK}

      /jre/lib/endorsed directory).

      orb.properties:
      org.omg.CORBA.ORBClass=org.jacorb.orb.ORB
      org.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton

      easybeans.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <easybeans xmlns="http://org.objectweb.easybeans.server">
      <!-- Define components that will be started at runtime -->
      <components>
      <!-- RMI/JRMP will be used as protocol layer -->
      <rmi>
      <protocol name="iiop" port="2000" hostname="localhost" />
      </rmi>

      <!-- Start a transaction service -->
      <tm />

      <!-- Start a JMS provider -->
      <jms port="16030" hostname="localhost" />

      <!-- Creates an embedded HSQLDB database -->
      <hsqldb port="9001" dbName="jdbc_1">
      <user name="easybeans" password="easybeans" />
      </hsqldb>
      <hsqldb port="9002" dbName="jdbc_2">
      <user name="easybeans" password="easybeans" />
      </hsqldb>

      <!-- Creates a JDBC pool with jdbc_1 JNDI name -->
      <jdbcpool jndiName="jdbc_1" username="easybeans"
      password="easybeans"
      url="jdbc:hsqldb:hsql://localhost:9001/jdbc_1"
      driver="org.hsqldb.jdbcDriver" />
      <!-- Creates a JDBC pool with jdbc_2 JNDI name -->
      <jdbcpool jndiName="jdbc_2" username="easybeans"
      password="easybeans"
      url="jdbc:hsqldb:hsql://localhost:9002/jdbc_2"
      driver="org.hsqldb.jdbcDriver" />

      <!-- Start smartclient server with a link to the rmi component-->
      <smart-server port="2503" rmi="#rmi" />
      </components>
      </easybeans>

      Tomcat log:
      2007-08-10 11:02:56 org.apache.catalina.core.AprLifecycleListener init
      INFO: Loaded Apache Tomcat Native library 1.1.10.
      2007-08-10 11:02:56 org.apache.catalina.core.AprLifecycleListener init
      INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
      2007-08-10 11:02:56 org.apache.coyote.http11.Http11AprProtocol init
      INFO: Initializing Coyote HTTP/1.1 on http-8080
      2007-08-10 11:02:56 org.apache.coyote.ajp.AjpAprProtocol init
      INFO: Initializing Coyote AJP/1.3 on ajp-8009
      2007-08-10 11:02:56 org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 739 ms
      2007-08-10 11:02:56 org.apache.catalina.core.StandardService start
      INFO: Starting service Catalina
      2007-08-10 11:02:56 org.apache.catalina.core.StandardEngine start
      INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
      10.08.07 11:02:57 (I) EasyBeansContextListener.contextInitialized : Detecting TOMCAT web container
      10.08.07 11:02:57 (I) EasyBeansContextListener.contextInitialized : Add deploy directory 'D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy'
      10.08.07 11:02:57 (I) PolicyProvider.init : Using EasyBeans policy provider 'org.objectweb.easybeans.security.jacc.provider.JPolicy'.
      10.08.07 11:02:57 (I) PolicyProvider.init : Using EasyBeans PolicyConfigurationFactory provider and EasyBeans Policy provider
      10.08.07 11:02:57 (I) Embedded.configure : Using directories '[D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy]' as deploy directories
      10.08.07 11:03:08 (I) TraceCarol.infoCarol : Name service for iiop is started on port 2000
      10.08.07 11:04:08 (S) StandardContext.listenerStart : Exception sending context initialized event to listener instance of class org.objectweb.easybeans.server.war.EasyBeansContextListener
      java.lang.IllegalStateException: Cannot start embedded EasyBeans server
      at org.objectweb.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:170)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
      at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: org.objectweb.easybeans.server.EmbeddedException: Cannot start components
      at org.objectweb.easybeans.server.Embedded.start(Embedded.java:207)
      at org.objectweb.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:168)
      ... 24 more
      Caused by: org.objectweb.easybeans.component.api.EZBComponentException: Cannot bind transaction factory
      at org.objectweb.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:96)
      at org.objectweb.easybeans.component.ComponentManager.startComponents(ComponentManager.java:199)
      at org.objectweb.easybeans.server.Embedded.start(Embedded.java:205)
      ... 25 more
      Caused by: javax.naming.NamingException: Cannot rebind object 'org.objectweb.jotm.TransactionFactoryImpl@d58939' with name 'TMFactory' :null [Root exception is javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
      java.net.SocketTimeoutException: Read timed out]]
      at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
      at org.objectweb.carol.jndi.spi.JacORBIIOPContext.rebind(JacORBIIOPContext.java:254)
      at org.objectweb.carol.jndi.spi.AbsContext.rebind(AbsContext.java:198)
      at javax.naming.InitialContext.rebind(InitialContext.java:367)
      at org.objectweb.carol.jndi.spi.MultiContext.rebind(MultiContext.java:171)
      at javax.naming.InitialContext.rebind(InitialContext.java:367)
      at org.objectweb.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:94)
      ... 27 more
      Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
      java.net.SocketTimeoutException: Read timed out]
      at com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:138)
      at javax.naming.InitialContext.rebind(InitialContext.java:371)
      at org.objectweb.carol.jndi.spi.AbsContext.rebind(AbsContext.java:188)
      at org.objectweb.carol.jndi.spi.JacORBIIOPContext.rebind(JacORBIIOPContext.java:251)
      ... 32 more
      Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
      java.net.SocketTimeoutException: Read timed out
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:273)
      at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
      at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
      at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
      at com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:136)
      ... 35 more
      Caused by: java.net.SocketTimeoutException: Read timed out
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:129)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
      at java.io.DataInputStream.readByte(DataInputStream.java:241)
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:215)
      ... 39 more
      10.08.07 11:04:08 (S) StandardContext.start : Error listenerStart
      10.08.07 11:04:08 (S) StandardContext.start : Context [/ow_easybeans] startup failed due to previous errors
      10.08.07 11:04:08 (I) EasyBeansContextListener.contextDestroyed : Stopping EasyBeans embedded server...
      10.08.07 11:04:08 (S) StandardContext.listenerStop : Exception sending context destroyed event to listener instance of class org.objectweb.easybeans.server.war.EasyBeansContextListener
      java.lang.IllegalStateException: Cannot stop the embedded server
      at org.objectweb.easybeans.server.war.EasyBeansContextListener.contextDestroyed(EasyBeansContextListener.java:188)
      at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3866)
      at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4500)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
      at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: org.objectweb.easybeans.server.EmbeddedException: Cannot stop the server as it is not started.
      at org.objectweb.easybeans.server.Embedded.stop(Embedded.java:327)
      at org.objectweb.easybeans.server.war.EasyBeansContextListener.contextDestroyed(EasyBeansContextListener.java:186)
      ... 25 more
      10.08.07 11:04:09 (I) ApplicationContext.log : ContextListener: contextInitialized()
      10.08.07 11:04:09 (I) ApplicationContext.log : SessionListener: contextInitialized()
      10.08.07 11:04:09 (I) Http11AprProtocol.start : Starting Coyote HTTP/1.1 on http-8080
      10.08.07 11:04:09 (I) AjpAprProtocol.start : Starting Coyote AJP/1.3 on ajp-8009
      10.08.07 11:04:09 (I) Catalina.start : Server startup in 72777 ms

      Am i doing something wrong? Is JRMP naming service obligatory to start EasyBeans? When i put IIOP and JRMP settings in easybeans.xml I get another error:

      easybeans.xml:
      ...
      <rmi>
      <protocol name="jrmp" port="1099" hostname="localhost" />
      <protocol name="iiop" port="2000" hostname="localhost" />
      </rmi>
      ...

      10.08.07 11:13:53 (I) TraceCarol.infoCarol : Name service for iiop is started on port 2000
      10.08.07 11:13:54 (I) TraceCarol.infoCarol : Name service for jrmp is started on port 1099
      10.08.07 11:13:54 (S) StandardContext.listenerStart : Exception sending context initialized event to listener instance of class org.objectweb.easybeans.server.war.EasyBeansContextListener
      java.lang.IllegalStateException: Cannot start embedded EasyBeans server
      at org.objectweb.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:170)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
      at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: org.objectweb.easybeans.server.EmbeddedException: Cannot start components
      at org.objectweb.easybeans.server.Embedded.start(Embedded.java:207)
      at org.objectweb.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:168)
      ... 24 more
      Caused by: org.objectweb.easybeans.component.api.EZBComponentException: Cannot create transaction factory
      at org.objectweb.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:89)
      at org.objectweb.easybeans.component.ComponentManager.startComponents(ComponentManager.java:199)
      at org.objectweb.easybeans.server.Embedded.start(Embedded.java:205)
      ... 25 more
      Caused by: java.rmi.server.ExportException: object already exported
      at sun.rmi.transport.ObjectTable.putTarget(ObjectTable.java:172)
      at sun.rmi.transport.Transport.exportObject(Transport.java:75)
      at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:196)
      at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
      at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
      at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:180)
      at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
      at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:220)
      at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.exportObject(PortableRemoteObject.java:103)
      at org.objectweb.carol.rmi.multi.JacORBPRODelegate.exportObject(JacORBPRODelegate.java:82)
      at org.objectweb.carol.rmi.multi.MultiPRODelegate.exportObject(MultiPRODelegate.java:90)
      at javax.rmi.PortableRemoteObject.exportObject(PortableRemoteObject.java:87)
      at javax.rmi.PortableRemoteObject.<init>(PortableRemoteObject.java:71)
      at org.objectweb.jotm.TransactionFactoryImpl.<init>(TransactionFactoryImpl.java:65)
      at org.objectweb.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:87)
      ... 27 more

        Activity

        Hide
        Florent Benoit
        added a comment -

        Paweł,

        A couple of day ago, I tested with the Carol InitialContext Factory and not the smart factory.
        Today, I test with Smart Factory and I notice an error with iiop (that I've fixed in the current SVN).

        I've tested on StatelessBean and EntityBean example of EasyBeans.

        I start Tomcat (6.0.14)/EasyBeans(current SVN Head) with the following system properties:
        export CATALINA_OPTS="-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -Dorg.omg.PortableInterceptor.ORBInitializerClass.standard_init=org.jacorb.orb.standardInterceptors.IORInterceptorInitializer"

        And with
        <rmi>
        <protocol name="iiop" url="iiop://localhost:2001" />
        </rmi>

        I use CATALINA_HOME/endorsed to add the JacORB jars.

        With the current SVN head, no need to add JOTM iiop stubs (they're already present).

        Then I modify the stateless client getInitialContext() method by :
        env.put(Context.INITIAL_CONTEXT_FACTORY, "org.ow2.easybeans.component.smartclient.spi.SmartContextFactory");
        env.put(Context.PROVIDER_URL, "smart://localhost:2503");

        It will use Smart Factory.

        Then I launch the client with the following lines :

        <target name="smartclient.run">
        <java fork="true" classname="$

        {client.main.class}

        ">
        <classpath path="conf" />
        <classpath path="lib/easybeans-component-smartclient-1.0.0-SNAPSHOT.jar" />
        <classpath path="$

        {client.dir}

        /$

        {client.name}

        .jar" />
        <sysproperty key="smart.debug" value="true" />
        <sysproperty key="smart.debug.verbose" value="true" />
        </java>
        </target>

        In the conf folder, I add a carol.properties file for IIOP with the following content

        $ more conf/carol.properties
        carol.protocols=iiop
        carol.iiop.url=iiop://localhost:2001

        And I launch : ant smartclient.run and I got :

        Buildfile: build.xml
        [unjar] Expanding: /tmp/tom/apache-tomcat-6.0.14/webapps/ow2-easybeans-war-hibernate.war into /tmp/tom/apache-tomcat-6.0.14/temp/classes.war

        smartclient.run:
        [java] Listening for transport dt_socket at address: 4142
        [java] Downloaded class 'org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory'.
        [java] Downloaded class 'org.objectweb.carol.util.configuration.TraceCarol'.
        ...
        [java] Calling helloWorld method...
        [java] Downloaded class 'org.ow2.easybeans.rpc.RPC'.
        ...
        [java] Add 1 + 2...
        [java] Sum = '3'.
        [java] Downloaded '63' classes, '1' resources for a total of '179184' bytes and it took '303' ms.

        BUILD SUCCESSFUL
        Total time: 6 seconds

        Then it uses the JDK iiop implementation (on client side) and it works fine

        In order to use JacORB on the client side, I could add
        <sysproperty key="org.omg.CORBA.ORBClass" value="org.jacorb.orb.ORB"/>
        <sysproperty key="org.omg.CORBA.ORBSingletonClass" value="org.jacorb.orb.ORBSingleton"/>
        <sysproperty key="org.omg.PortableInterceptor.ORBInitializerClass.standard_init" value="org.jacorb.orb.standardInterceptors.IORInterceptorInitializer"/>
        <sysproperty key="java.endorsed.dirs" value="/tmp/tom/apache-tomcat-6.0.14/endorsed/"/> -->

        To the java element inside the <java> element of the target. (also, in this case, more classes will be downloaded)

        On the server side, if the properties are not set, there are errors while trying to receive the Stubs.

        Regards,

        Florent

        Show
        Florent Benoit
        added a comment - Paweł, A couple of day ago, I tested with the Carol InitialContext Factory and not the smart factory. Today, I test with Smart Factory and I notice an error with iiop (that I've fixed in the current SVN). I've tested on StatelessBean and EntityBean example of EasyBeans. I start Tomcat (6.0.14)/EasyBeans(current SVN Head) with the following system properties: export CATALINA_OPTS="-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -Dorg.omg.PortableInterceptor.ORBInitializerClass.standard_init=org.jacorb.orb.standardInterceptors.IORInterceptorInitializer" And with <rmi> <protocol name="iiop" url="iiop://localhost:2001" /> </rmi> I use CATALINA_HOME/endorsed to add the JacORB jars. With the current SVN head, no need to add JOTM iiop stubs (they're already present). Then I modify the stateless client getInitialContext() method by : env.put(Context.INITIAL_CONTEXT_FACTORY, "org.ow2.easybeans.component.smartclient.spi.SmartContextFactory"); env.put(Context.PROVIDER_URL, "smart://localhost:2503"); It will use Smart Factory. Then I launch the client with the following lines : <target name="smartclient.run"> <java fork="true" classname="$ {client.main.class} "> <classpath path="conf" /> <classpath path="lib/easybeans-component-smartclient-1.0.0-SNAPSHOT.jar" /> <classpath path="$ {client.dir} /$ {client.name} .jar" /> <sysproperty key="smart.debug" value="true" /> <sysproperty key="smart.debug.verbose" value="true" /> </java> </target> In the conf folder, I add a carol.properties file for IIOP with the following content $ more conf/carol.properties carol.protocols=iiop carol.iiop.url=iiop://localhost:2001 And I launch : ant smartclient.run and I got : Buildfile: build.xml [unjar] Expanding: /tmp/tom/apache-tomcat-6.0.14/webapps/ow2-easybeans-war-hibernate.war into /tmp/tom/apache-tomcat-6.0.14/temp/classes.war smartclient.run: [java] Listening for transport dt_socket at address: 4142 [java] Downloaded class 'org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory'. [java] Downloaded class 'org.objectweb.carol.util.configuration.TraceCarol'. ... [java] Calling helloWorld method... [java] Downloaded class 'org.ow2.easybeans.rpc.RPC'. ... [java] Add 1 + 2... [java] Sum = '3'. [java] Downloaded '63' classes, '1' resources for a total of '179184' bytes and it took '303' ms. BUILD SUCCESSFUL Total time: 6 seconds Then it uses the JDK iiop implementation (on client side) and it works fine In order to use JacORB on the client side, I could add <sysproperty key="org.omg.CORBA.ORBClass" value="org.jacorb.orb.ORB"/> <sysproperty key="org.omg.CORBA.ORBSingletonClass" value="org.jacorb.orb.ORBSingleton"/> <sysproperty key="org.omg.PortableInterceptor.ORBInitializerClass.standard_init" value="org.jacorb.orb.standardInterceptors.IORInterceptorInitializer"/> <sysproperty key="java.endorsed.dirs" value="/tmp/tom/apache-tomcat-6.0.14/endorsed/"/> --> To the java element inside the <java> element of the target. (also, in this case, more classes will be downloaded) On the server side, if the properties are not set, there are errors while trying to receive the Stubs. Regards, Florent
        Hide
        Paweł Krupiński
        added a comment -

        Ok, it's working now.
        Carol.properties was needed for the SmartClient to work with iiop.
        Thanks a lot for your help and patience. Keep up the good work.
        A thought: maybe you should document the steps needed to start embedded EasyBeans with iiop, which is the only protocol required by the EJB3 specification.
        Another one: I still can't retrieve beans using com.sun.jndi.cosnaming.CNCtxFactory. I guess an additional layer sits on top of iiop name service. Smart client is enough for me, though it would really be swell if the name service was accessible through clear iiop without any additional mediators.
        And another: Is it really necessary for the iiop name service to be started in a separate process? If I want to kill the tomcat process manually (for example when I start the tomcat inside Eclipse - through Eclipse launch), I still have to kill the name service separately (and for this I have to enter Task Manager, because I don't see the process in Eclipse).

        Show
        Paweł Krupiński
        added a comment - Ok, it's working now. Carol.properties was needed for the SmartClient to work with iiop. Thanks a lot for your help and patience. Keep up the good work. A thought: maybe you should document the steps needed to start embedded EasyBeans with iiop, which is the only protocol required by the EJB3 specification. Another one: I still can't retrieve beans using com.sun.jndi.cosnaming.CNCtxFactory. I guess an additional layer sits on top of iiop name service. Smart client is enough for me, though it would really be swell if the name service was accessible through clear iiop without any additional mediators. And another: Is it really necessary for the iiop name service to be started in a separate process? If I want to kill the tomcat process manually (for example when I start the tomcat inside Eclipse - through Eclipse launch), I still have to kill the name service separately (and for this I have to enter Task Manager, because I don't see the process in Eclipse).
        Hide
        Guillaume Sauthier
        added a comment -

        Hi Pavel

        Yes, IIOP is the only protocol required by the Java EE specification. But almost all users prefers JRMP (faster and leaner) when they don't need interoperabililty with other AS.
        As we try to focus on the user needs, this is why some things may not work with IIOP.

        I'm quite sure that you could make something work directly by using the CosCtxFactory of sun, but you will need to provided in your client classpath a lot more libraries (JacORB + Stubs).
        SmartFactory is only a small layer to ease the client side execution.

        Concerning you last remark, I didn't have any answer and Florent is in vacation right now ...

        Show
        Guillaume Sauthier
        added a comment - Hi Pavel Yes, IIOP is the only protocol required by the Java EE specification. But almost all users prefers JRMP (faster and leaner) when they don't need interoperabililty with other AS. As we try to focus on the user needs, this is why some things may not work with IIOP. I'm quite sure that you could make something work directly by using the CosCtxFactory of sun, but you will need to provided in your client classpath a lot more libraries (JacORB + Stubs). SmartFactory is only a small layer to ease the client side execution. Concerning you last remark, I didn't have any answer and Florent is in vacation right now ...
        Hide
        Florent Benoit
        added a comment -

        Has been fixed and is available in 1.0RC1

        Show
        Florent Benoit
        added a comment - Has been fixed and is available in 1.0RC1
        Hide
        Loïc Albertin
        added a comment -

        Closing old resolved issues

        Show
        Loïc Albertin
        added a comment - Closing old resolved issues

          People

          • Assignee:
            Florent Benoit
            Reporter:
            Paweł Krupiński
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Issue deployment