Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: EasyBeans 1.0 M6
-
Fix Version/s: EasyBeans 1.0 RC1
-
Component/s: None
-
- Description:
-
HideI 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 moreShowI 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
-
- Environment:
- Windows XP Pro, Tomcat 6.0.13, JDK 1.5.0_12
Activity
- All
- Comments
- History
- Activity
- Subversion Commits
- Builds
Hide
But shouldn't easybeans set JOTM to use iiop when I configure it as the rmi transport protocol?
I can add the jar to classpath but the JOTM still tries to connect to jrmp name service.
I can add the jar to classpath but the JOTM still tries to connect to jrmp name service.
Show
Paweł Krupiński added a comment - 10/Aug/07 2:22 PM But shouldn't easybeans set JOTM to use iiop when I configure it as the rmi transport protocol?
I can add the jar to classpath but the JOTM still tries to connect to jrmp name service.
Hide
The config should be :
<protocol name="iiop" url="iiop://localhost:2001" />
Else the URL computed is rmi:// <hostname> : <portNumber> (and RMI is not IIOP)
<protocol name="iiop" url="iiop://localhost:2001" />
Else the URL computed is rmi:// <hostname> : <portNumber> (and RMI is not IIOP)
Show
Florent BENOIT added a comment - 10/Aug/07 2:35 PM The config should be :
<protocol name="iiop" url="iiop://localhost:2001" />
Else the URL computed is rmi:// <hostname> : <portNumber> (and RMI is not IIOP)
Hide
Did that.
Now i got this:
2007-08-10 14:53:58 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded Apache Tomcat Native library 1.1.10.
2007-08-10 14:53:58 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2007-08-10 14:53:58 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2007-08-10 14:53:58 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
2007-08-10 14:53:58 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1194 ms
2007-08-10 14:53:58 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2007-08-10 14:53:58 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
10.08.07 14:53:59 (I) EasyBeansContextListener.contextInitialized : Detecting TOMCAT web container
10.08.07 14:53:59 (I) EasyBeansContextListener.contextInitialized : Add deploy directory 'D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy'
10.08.07 14:54:00 (I) PolicyProvider.init : Using EasyBeans policy provider 'org.objectweb.easybeans.security.jacc.provider.JPolicy'.
10.08.07 14:54:00 (I) PolicyProvider.init : Using EasyBeans PolicyConfigurationFactory provider and EasyBeans Policy provider
10.08.07 14:54:00 (I) Embedded.configure : Using directories '[D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy]' as deploy directories
10.08.07 14:54:10 (I) TraceCarol.infoCarol : Name service for iiop is started on port 2001
10.08.07 14:54:10 (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 build an instance of the class 'org.objectweb.carol.jndi.spi.JacORBIIOPContext' : COS Name Service not registered with ORB under the name 'NameService' [Root exception is javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:116)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.util.configuration.ProtocolConfigurationImpl.getInitialContext(ProtocolConfigurationImpl.java:145)
at org.objectweb.carol.jndi.spi.MultiContext.<init>(MultiContext.java:100)
at org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory.getInitialContext(MultiOrbInitialContextFactory.java:72)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.objectweb.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:94)
... 27 more
Caused by: javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:356)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
at org.objectweb.carol.jndi.spi.URLInitialContextFactory.getInitialContext(URLInitialContextFactory.java:51)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getClassArgs(AbsInitialContextFactory.java:147)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:114)
... 39 more
Caused by: org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0
at org.jacorb.orb.ORB.resolve_initial_references(ORB.java:1231)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
... 52 more
10.08.07 14:54:10 (S) StandardContext.start : Error listenerStart
10.08.07 14:54:10 (S) StandardContext.start : Context [/ow_easybeans] startup failed due to previous errors
10.08.07 14:54:10 (I) EasyBeansContextListener.contextDestroyed : Stopping EasyBeans embedded server...
10.08.07 14:54:10 (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 14:54:11 (I) ApplicationContext.log : ContextListener: contextInitialized()
10.08.07 14:54:11 (I) ApplicationContext.log : SessionListener: contextInitialized()
10.08.07 14:54:12 (I) Http11AprProtocol.start : Starting Coyote HTTP/1.1 on http-8080
10.08.07 14:54:12 (I) AjpAprProtocol.start : Starting Coyote AJP/1.3 on ajp-8009
10.08.07 14:54:12 (I) Catalina.start : Server startup in 13551 ms
It seems that the name service started by EasyBeans is accessible through corbaloc, but carol doesn't support corbaloc.
Now i got this:
2007-08-10 14:53:58 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded Apache Tomcat Native library 1.1.10.
2007-08-10 14:53:58 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2007-08-10 14:53:58 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2007-08-10 14:53:58 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
2007-08-10 14:53:58 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1194 ms
2007-08-10 14:53:58 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2007-08-10 14:53:58 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
10.08.07 14:53:59 (I) EasyBeansContextListener.contextInitialized : Detecting TOMCAT web container
10.08.07 14:53:59 (I) EasyBeansContextListener.contextInitialized : Add deploy directory 'D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy'
10.08.07 14:54:00 (I) PolicyProvider.init : Using EasyBeans policy provider 'org.objectweb.easybeans.security.jacc.provider.JPolicy'.
10.08.07 14:54:00 (I) PolicyProvider.init : Using EasyBeans PolicyConfigurationFactory provider and EasyBeans Policy provider
10.08.07 14:54:00 (I) Embedded.configure : Using directories '[D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy]' as deploy directories
10.08.07 14:54:10 (I) TraceCarol.infoCarol : Name service for iiop is started on port 2001
10.08.07 14:54:10 (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 build an instance of the class 'org.objectweb.carol.jndi.spi.JacORBIIOPContext' : COS Name Service not registered with ORB under the name 'NameService' [Root exception is javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:116)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.util.configuration.ProtocolConfigurationImpl.getInitialContext(ProtocolConfigurationImpl.java:145)
at org.objectweb.carol.jndi.spi.MultiContext.<init>(MultiContext.java:100)
at org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory.getInitialContext(MultiOrbInitialContextFactory.java:72)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.objectweb.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:94)
... 27 more
Caused by: javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:356)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
at org.objectweb.carol.jndi.spi.URLInitialContextFactory.getInitialContext(URLInitialContextFactory.java:51)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getClassArgs(AbsInitialContextFactory.java:147)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:114)
... 39 more
Caused by: org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0
at org.jacorb.orb.ORB.resolve_initial_references(ORB.java:1231)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
... 52 more
10.08.07 14:54:10 (S) StandardContext.start : Error listenerStart
10.08.07 14:54:10 (S) StandardContext.start : Context [/ow_easybeans] startup failed due to previous errors
10.08.07 14:54:10 (I) EasyBeansContextListener.contextDestroyed : Stopping EasyBeans embedded server...
10.08.07 14:54:10 (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 14:54:11 (I) ApplicationContext.log : ContextListener: contextInitialized()
10.08.07 14:54:11 (I) ApplicationContext.log : SessionListener: contextInitialized()
10.08.07 14:54:12 (I) Http11AprProtocol.start : Starting Coyote HTTP/1.1 on http-8080
10.08.07 14:54:12 (I) AjpAprProtocol.start : Starting Coyote AJP/1.3 on ajp-8009
10.08.07 14:54:12 (I) Catalina.start : Server startup in 13551 ms
It seems that the name service started by EasyBeans is accessible through corbaloc, but carol doesn't support corbaloc.
Show
Paweł Krupiński added a comment - 10/Aug/07 2:58 PM Did that.
Now i got this:
2007-08-10 14:53:58 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded Apache Tomcat Native library 1.1.10.
2007-08-10 14:53:58 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2007-08-10 14:53:58 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2007-08-10 14:53:58 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
2007-08-10 14:53:58 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1194 ms
2007-08-10 14:53:58 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2007-08-10 14:53:58 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
10.08.07 14:53:59 (I) EasyBeansContextListener.contextInitialized : Detecting TOMCAT web container
10.08.07 14:53:59 (I) EasyBeansContextListener.contextInitialized : Add deploy directory 'D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy'
10.08.07 14:54:00 (I) PolicyProvider.init : Using EasyBeans policy provider 'org.objectweb.easybeans.security.jacc.provider.JPolicy'.
10.08.07 14:54:00 (I) PolicyProvider.init : Using EasyBeans PolicyConfigurationFactory provider and EasyBeans Policy provider
10.08.07 14:54:00 (I) Embedded.configure : Using directories '[D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy]' as deploy directories
10.08.07 14:54:10 (I) TraceCarol.infoCarol : Name service for iiop is started on port 2001
10.08.07 14:54:10 (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 build an instance of the class 'org.objectweb.carol.jndi.spi.JacORBIIOPContext' : COS Name Service not registered with ORB under the name 'NameService' [Root exception is javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:116)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.util.configuration.ProtocolConfigurationImpl.getInitialContext(ProtocolConfigurationImpl.java:145)
at org.objectweb.carol.jndi.spi.MultiContext.<init>(MultiContext.java:100)
at org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory.getInitialContext(MultiOrbInitialContextFactory.java:72)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.objectweb.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:94)
... 27 more
Caused by: javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:356)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
at org.objectweb.carol.jndi.spi.URLInitialContextFactory.getInitialContext(URLInitialContextFactory.java:51)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getClassArgs(AbsInitialContextFactory.java:147)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:114)
... 39 more
Caused by: org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0
at org.jacorb.orb.ORB.resolve_initial_references(ORB.java:1231)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
... 52 more
10.08.07 14:54:10 (S) StandardContext.start : Error listenerStart
10.08.07 14:54:10 (S) StandardContext.start : Context [/ow_easybeans] startup failed due to previous errors
10.08.07 14:54:10 (I) EasyBeansContextListener.contextDestroyed : Stopping EasyBeans embedded server...
10.08.07 14:54:10 (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 14:54:11 (I) ApplicationContext.log : ContextListener: contextInitialized()
10.08.07 14:54:11 (I) ApplicationContext.log : SessionListener: contextInitialized()
10.08.07 14:54:12 (I) Http11AprProtocol.start : Starting Coyote HTTP/1.1 on http-8080
10.08.07 14:54:12 (I) AjpAprProtocol.start : Starting Coyote AJP/1.3 on ajp-8009
10.08.07 14:54:12 (I) Catalina.start : Server startup in 13551 ms
It seems that the name service started by EasyBeans is accessible through corbaloc, but carol doesn't support corbaloc.
Hide
Well, I need to investigate more the use of IIOP with Tomcat/EasyBeans
Carol is supporting corbaloc, we're using it in JOnAS application server.
Also EasyBeans inside JOnAS should run perfectly with iiop.
I will keep you informed on this iiop status in Tomcat/EasyBeans
Carol is supporting corbaloc, we're using it in JOnAS application server.
Also EasyBeans inside JOnAS should run perfectly with iiop.
I will keep you informed on this iiop status in Tomcat/EasyBeans
Show
Florent BENOIT added a comment - 10/Aug/07 5:57 PM Well, I need to investigate more the use of IIOP with Tomcat/EasyBeans
Carol is supporting corbaloc, we're using it in JOnAS application server.
Also EasyBeans inside JOnAS should run perfectly with iiop.
I will keep you informed on this iiop status in Tomcat/EasyBeans
Hide
Hi Pawel,
I've fixed the problem of the JMX connector started by EasyBeans when using IIOP inside Tomcat.
It will be available in the next nightly build : http://forge.objectweb.org/nightlybuilds/easybeans/ (2007.08.11) and it is available in the SVN repository (maven build)
In addition to use <protocol url="iiop://.....">
You have to add the following system properties to Tomcat
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"
You can also copy the JacORB jars to the Tomcat directory instead of the JDK
mkdir $CATALINA_HOME/endorsed
List of modules to copy :
$ ls endorsed/
avalon-framework-4.1.5.jar gnu-crypto-sasl-jdk1.4.jar idl.jar jacorb.jar logkit-1.2.jar
Regards,
Florent
I've fixed the problem of the JMX connector started by EasyBeans when using IIOP inside Tomcat.
It will be available in the next nightly build : http://forge.objectweb.org/nightlybuilds/easybeans/ (2007.08.11) and it is available in the SVN repository (maven build)
In addition to use <protocol url="iiop://.....">
You have to add the following system properties to Tomcat
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"
You can also copy the JacORB jars to the Tomcat directory instead of the JDK
mkdir $CATALINA_HOME/endorsed
List of modules to copy :
$ ls endorsed/
avalon-framework-4.1.5.jar gnu-crypto-sasl-jdk1.4.jar idl.jar jacorb.jar logkit-1.2.jar
Regards,
Florent
Show
Florent BENOIT added a comment - 11/Aug/07 8:25 PM Hi Pawel,
I've fixed the problem of the JMX connector started by EasyBeans when using IIOP inside Tomcat.
It will be available in the next nightly build : http://forge.objectweb.org/nightlybuilds/easybeans/ (2007.08.11) and it is available in the SVN repository (maven build)
In addition to use <protocol url="iiop://.....">
You have to add the following system properties to Tomcat
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"
You can also copy the JacORB jars to the Tomcat directory instead of the JDK
mkdir $CATALINA_HOME/endorsed
List of modules to copy :
$ ls endorsed/
avalon-framework-4.1.5.jar gnu-crypto-sasl-jdk1.4.jar idl.jar jacorb.jar logkit-1.2.jar
Regards,
Florent
Hide
I get the same error from nightly build and the one I compiled from trunk:
2007-08-12 09:51:25 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded Apache Tomcat Native library 1.1.10.
2007-08-12 09:51:25 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2007-08-12 09:51:26 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2007-08-12 09:51:27 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
2007-08-12 09:51:27 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1955 ms
2007-08-12 09:51:27 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2007-08-12 09:51:27 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
12.08.07 09:51:27 (S) StandardContext.listenerStart : Exception sending context initialized event to listener instance of class org.ow2.easybeans.server.war.EasyBeansContextListener
java.lang.IllegalStateException: Cannot create the embedded server
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:125)
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.ow2.easybeans.server.EmbeddedException: Cannot configure the embedded server
at org.ow2.easybeans.server.EmbeddedConfigurator.configure(EmbeddedConfigurator.java:112)
at org.ow2.easybeans.server.EmbeddedConfigurator.init(EmbeddedConfigurator.java:69)
at org.ow2.easybeans.server.EmbeddedConfigurator.create(EmbeddedConfigurator.java:81)
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:123)
... 24 more
Caused by: org.ow2.easybeans.xmlconfig.XMLConfigurationException: No mapping found for namespace 'http://org.objectweb.easybeans.server'.
at org.ow2.easybeans.xmlconfig.XMLConfiguration.getClassMapping(XMLConfiguration.java:318)
at org.ow2.easybeans.xmlconfig.XMLConfiguration.configure(XMLConfiguration.java:223)
at org.ow2.easybeans.xmlconfig.XMLConfiguration.configure(XMLConfiguration.java:117)
at org.ow2.easybeans.server.EmbeddedConfigurator.configure(EmbeddedConfigurator.java:110)
... 27 more
12.08.07 09:51:27 (S) StandardContext.start : Error listenerStart
12.08.07 09:51:27 (S) StandardContext.start : Context [/ow2-easybeans-hibernate-1.0.0-SNAPSHOT] startup failed due to previous errors
12.08.07 09:51:28 (I) ApplicationContext.log : ContextListener: contextInitialized()
12.08.07 09:51:28 (I) ApplicationContext.log : SessionListener: contextInitialized()
12.08.07 09:51:28 (I) Http11AprProtocol.start : Starting Coyote HTTP/1.1 on http-8080
12.08.07 09:51:28 (I) AjpAprProtocol.start : Starting Coyote AJP/1.3 on ajp-8009
12.08.07 09:51:28 (I) Catalina.start : Server startup in 1842 ms
If I remove the namespace declaration from configuration file, then EasyBeans crashes saying the default namespace is not supported.
My 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>
<protocol name="iiop" url="iiop://localhost:2001" />
</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>
2007-08-12 09:51:25 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded Apache Tomcat Native library 1.1.10.
2007-08-12 09:51:25 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2007-08-12 09:51:26 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2007-08-12 09:51:27 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
2007-08-12 09:51:27 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1955 ms
2007-08-12 09:51:27 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2007-08-12 09:51:27 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
12.08.07 09:51:27 (S) StandardContext.listenerStart : Exception sending context initialized event to listener instance of class org.ow2.easybeans.server.war.EasyBeansContextListener
java.lang.IllegalStateException: Cannot create the embedded server
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:125)
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.ow2.easybeans.server.EmbeddedException: Cannot configure the embedded server
at org.ow2.easybeans.server.EmbeddedConfigurator.configure(EmbeddedConfigurator.java:112)
at org.ow2.easybeans.server.EmbeddedConfigurator.init(EmbeddedConfigurator.java:69)
at org.ow2.easybeans.server.EmbeddedConfigurator.create(EmbeddedConfigurator.java:81)
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:123)
... 24 more
Caused by: org.ow2.easybeans.xmlconfig.XMLConfigurationException: No mapping found for namespace 'http://org.objectweb.easybeans.server'.
at org.ow2.easybeans.xmlconfig.XMLConfiguration.getClassMapping(XMLConfiguration.java:318)
at org.ow2.easybeans.xmlconfig.XMLConfiguration.configure(XMLConfiguration.java:223)
at org.ow2.easybeans.xmlconfig.XMLConfiguration.configure(XMLConfiguration.java:117)
at org.ow2.easybeans.server.EmbeddedConfigurator.configure(EmbeddedConfigurator.java:110)
... 27 more
12.08.07 09:51:27 (S) StandardContext.start : Error listenerStart
12.08.07 09:51:27 (S) StandardContext.start : Context [/ow2-easybeans-hibernate-1.0.0-SNAPSHOT] startup failed due to previous errors
12.08.07 09:51:28 (I) ApplicationContext.log : ContextListener: contextInitialized()
12.08.07 09:51:28 (I) ApplicationContext.log : SessionListener: contextInitialized()
12.08.07 09:51:28 (I) Http11AprProtocol.start : Starting Coyote HTTP/1.1 on http-8080
12.08.07 09:51:28 (I) AjpAprProtocol.start : Starting Coyote AJP/1.3 on ajp-8009
12.08.07 09:51:28 (I) Catalina.start : Server startup in 1842 ms
If I remove the namespace declaration from configuration file, then EasyBeans crashes saying the default namespace is not supported.
My 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>
<protocol name="iiop" url="iiop://localhost:2001" />
</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>
Show
Paweł Krupiński added a comment - 12/Aug/07 9:55 AM I get the same error from nightly build and the one I compiled from trunk:
2007-08-12 09:51:25 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded Apache Tomcat Native library 1.1.10.
2007-08-12 09:51:25 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2007-08-12 09:51:26 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2007-08-12 09:51:27 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
2007-08-12 09:51:27 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1955 ms
2007-08-12 09:51:27 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2007-08-12 09:51:27 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
12.08.07 09:51:27 (S) StandardContext.listenerStart : Exception sending context initialized event to listener instance of class org.ow2.easybeans.server.war.EasyBeansContextListener
java.lang.IllegalStateException: Cannot create the embedded server
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:125)
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.ow2.easybeans.server.EmbeddedException: Cannot configure the embedded server
at org.ow2.easybeans.server.EmbeddedConfigurator.configure(EmbeddedConfigurator.java:112)
at org.ow2.easybeans.server.EmbeddedConfigurator.init(EmbeddedConfigurator.java:69)
at org.ow2.easybeans.server.EmbeddedConfigurator.create(EmbeddedConfigurator.java:81)
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:123)
... 24 more
Caused by: org.ow2.easybeans.xmlconfig.XMLConfigurationException: No mapping found for namespace 'http://org.objectweb.easybeans.server'.
at org.ow2.easybeans.xmlconfig.XMLConfiguration.getClassMapping(XMLConfiguration.java:318)
at org.ow2.easybeans.xmlconfig.XMLConfiguration.configure(XMLConfiguration.java:223)
at org.ow2.easybeans.xmlconfig.XMLConfiguration.configure(XMLConfiguration.java:117)
at org.ow2.easybeans.server.EmbeddedConfigurator.configure(EmbeddedConfigurator.java:110)
... 27 more
12.08.07 09:51:27 (S) StandardContext.start : Error listenerStart
12.08.07 09:51:27 (S) StandardContext.start : Context [/ow2-easybeans-hibernate-1.0.0-SNAPSHOT] startup failed due to previous errors
12.08.07 09:51:28 (I) ApplicationContext.log : ContextListener: contextInitialized()
12.08.07 09:51:28 (I) ApplicationContext.log : SessionListener: contextInitialized()
12.08.07 09:51:28 (I) Http11AprProtocol.start : Starting Coyote HTTP/1.1 on http-8080
12.08.07 09:51:28 (I) AjpAprProtocol.start : Starting Coyote AJP/1.3 on ajp-8009
12.08.07 09:51:28 (I) Catalina.start : Server startup in 1842 ms
If I remove the namespace declaration from configuration file, then EasyBeans crashes saying the default namespace is not supported.
My 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>
<protocol name="iiop" url="iiop://localhost:2001" />
</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>
Hide
Paweł,
Due to the Objectwen renaming into OW2 (look at www.ow2.org), EasyBeans packages have been changed to map the new name (since the 1.0M6 version)
Then the root element of the XML file is now looking like:
<easybeans xmlns="http://org.ow2.easybeans.server">
and not <easybeans xmlns="http://org.objectweb.easybeans.server">
Regards,
Florent
Due to the Objectwen renaming into OW2 (look at www.ow2.org), EasyBeans packages have been changed to map the new name (since the 1.0M6 version)
Then the root element of the XML file is now looking like:
<easybeans xmlns="http://org.ow2.easybeans.server">
and not <easybeans xmlns="http://org.objectweb.easybeans.server">
Regards,
Florent
Show
Florent BENOIT added a comment - 12/Aug/07 12:39 PM Paweł,
Due to the Objectwen renaming into OW2 (look at www.ow2.org), EasyBeans packages have been changed to map the new name (since the 1.0M6 version)
Then the root element of the XML file is now looking like:
<easybeans xmlns="http://org.ow2.easybeans.server">
and not <easybeans xmlns="http://org.objectweb.easybeans.server">
Regards,
Florent
Hide
Did everything as you described. Below is an output of the trunk build.
Easybeans.xml as above except with the proper namespace.
I can't connect to the name service started by easybeans using com.sun.jndi.cosnaming.CNCtxFactory withe either iiop or corbaloc addresses.
2007-08-12 13:58:12 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded Apache Tomcat Native library 1.1.10.
2007-08-12 13:58:12 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2007-08-12 13:58:13 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2007-08-12 13:58:13 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
2007-08-12 13:58:13 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1001 ms
2007-08-12 13:58:13 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2007-08-12 13:58:13 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
12.08.07 13:58:13 (I) EasyBeansContextListener.contextInitialized : Detecting TOMCAT web container
12.08.07 13:58:13 (I) EasyBeansContextListener.contextInitialized : Add deploy directory 'D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy'
12.08.07 13:58:14 (I) PolicyProvider.init : Using EasyBeans policy provider 'org.ow2.easybeans.security.jacc.provider.JPolicy'.
12.08.07 13:58:14 (I) PolicyProvider.init : Using EasyBeans PolicyConfigurationFactory provider and EasyBeans Policy provider
12.08.07 13:58:14 (I) Embedded.configure : Using directories '[D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy]' as deploy directories
12.08.07 13:58:24 (I) TraceCarol.infoCarol : Name service for iiop is started on port 2001
12.08.07 13:58:24 (S) StandardContext.listenerStart : Exception sending context initialized event to listener instance of class org.ow2.easybeans.server.war.EasyBeansContextListener
java.lang.IllegalStateException: Cannot start embedded EasyBeans server
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:171)
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.ow2.easybeans.server.EmbeddedException: Cannot start components
at org.ow2.easybeans.server.Embedded.start(Embedded.java:207)
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:169)
... 24 more
Caused by: org.ow2.easybeans.component.api.EZBComponentException: Cannot bind transaction factory
at org.ow2.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:96)
at org.ow2.easybeans.component.ComponentManager.startComponents(ComponentManager.java:199)
at org.ow2.easybeans.server.Embedded.start(Embedded.java:205)
... 25 more
Caused by: javax.naming.NamingException: Cannot build an instance of the class 'org.objectweb.carol.jndi.spi.JacORBIIOPContext' : COS Name Service not registered with ORB under the name 'NameService' [Root exception is javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:116)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.util.configuration.ProtocolConfigurationImpl.getInitialContext(ProtocolConfigurationImpl.java:145)
at org.objectweb.carol.jndi.spi.MultiContext.<init>(MultiContext.java:100)
at org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory.getInitialContext(MultiOrbInitialContextFactory.java:72)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.ow2.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:94)
... 27 more
Caused by: javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:356)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
at org.objectweb.carol.jndi.spi.URLInitialContextFactory.getInitialContext(URLInitialContextFactory.java:51)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getClassArgs(AbsInitialContextFactory.java:147)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:114)
... 39 more
Caused by: org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0
at org.jacorb.orb.ORB.resolve_initial_references(ORB.java:1231)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
... 52 more
12.08.07 13:58:24 (S) StandardContext.start : Error listenerStart
12.08.07 13:58:24 (S) StandardContext.start : Context [/ow2_easybeans] startup failed due to previous errors
12.08.07 13:58:24 (I) EasyBeansContextListener.contextDestroyed : Stopping EasyBeans embedded server...
12.08.07 13:58:24 (S) StandardContext.listenerStop : Exception sending context destroyed event to listener instance of class org.ow2.easybeans.server.war.EasyBeansContextListener
java.lang.IllegalStateException: Cannot stop the embedded server
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextDestroyed(EasyBeansContextListener.java:189)
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.ow2.easybeans.server.EmbeddedException: Cannot stop the server as it is not started.
at org.ow2.easybeans.server.Embedded.stop(Embedded.java:329)
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextDestroyed(EasyBeansContextListener.java:187)
... 25 more
12.08.07 13:58:25 (I) ApplicationContext.log : ContextListener: contextInitialized()
12.08.07 13:58:25 (I) ApplicationContext.log : SessionListener: contextInitialized()
12.08.07 13:58:25 (I) Http11AprProtocol.start : Starting Coyote HTTP/1.1 on http-8080
12.08.07 13:58:25 (I) AjpAprProtocol.start : Starting Coyote AJP/1.3 on ajp-8009
12.08.07 13:58:25 (I) Catalina.start : Server startup in 12307 ms
Easybeans.xml as above except with the proper namespace.
I can't connect to the name service started by easybeans using com.sun.jndi.cosnaming.CNCtxFactory withe either iiop or corbaloc addresses.
2007-08-12 13:58:12 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded Apache Tomcat Native library 1.1.10.
2007-08-12 13:58:12 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2007-08-12 13:58:13 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2007-08-12 13:58:13 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
2007-08-12 13:58:13 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1001 ms
2007-08-12 13:58:13 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2007-08-12 13:58:13 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
12.08.07 13:58:13 (I) EasyBeansContextListener.contextInitialized : Detecting TOMCAT web container
12.08.07 13:58:13 (I) EasyBeansContextListener.contextInitialized : Add deploy directory 'D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy'
12.08.07 13:58:14 (I) PolicyProvider.init : Using EasyBeans policy provider 'org.ow2.easybeans.security.jacc.provider.JPolicy'.
12.08.07 13:58:14 (I) PolicyProvider.init : Using EasyBeans PolicyConfigurationFactory provider and EasyBeans Policy provider
12.08.07 13:58:14 (I) Embedded.configure : Using directories '[D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy]' as deploy directories
12.08.07 13:58:24 (I) TraceCarol.infoCarol : Name service for iiop is started on port 2001
12.08.07 13:58:24 (S) StandardContext.listenerStart : Exception sending context initialized event to listener instance of class org.ow2.easybeans.server.war.EasyBeansContextListener
java.lang.IllegalStateException: Cannot start embedded EasyBeans server
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:171)
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.ow2.easybeans.server.EmbeddedException: Cannot start components
at org.ow2.easybeans.server.Embedded.start(Embedded.java:207)
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:169)
... 24 more
Caused by: org.ow2.easybeans.component.api.EZBComponentException: Cannot bind transaction factory
at org.ow2.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:96)
at org.ow2.easybeans.component.ComponentManager.startComponents(ComponentManager.java:199)
at org.ow2.easybeans.server.Embedded.start(Embedded.java:205)
... 25 more
Caused by: javax.naming.NamingException: Cannot build an instance of the class 'org.objectweb.carol.jndi.spi.JacORBIIOPContext' : COS Name Service not registered with ORB under the name 'NameService' [Root exception is javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:116)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.util.configuration.ProtocolConfigurationImpl.getInitialContext(ProtocolConfigurationImpl.java:145)
at org.objectweb.carol.jndi.spi.MultiContext.<init>(MultiContext.java:100)
at org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory.getInitialContext(MultiOrbInitialContextFactory.java:72)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.ow2.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:94)
... 27 more
Caused by: javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:356)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
at org.objectweb.carol.jndi.spi.URLInitialContextFactory.getInitialContext(URLInitialContextFactory.java:51)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getClassArgs(AbsInitialContextFactory.java:147)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:114)
... 39 more
Caused by: org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0
at org.jacorb.orb.ORB.resolve_initial_references(ORB.java:1231)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
... 52 more
12.08.07 13:58:24 (S) StandardContext.start : Error listenerStart
12.08.07 13:58:24 (S) StandardContext.start : Context [/ow2_easybeans] startup failed due to previous errors
12.08.07 13:58:24 (I) EasyBeansContextListener.contextDestroyed : Stopping EasyBeans embedded server...
12.08.07 13:58:24 (S) StandardContext.listenerStop : Exception sending context destroyed event to listener instance of class org.ow2.easybeans.server.war.EasyBeansContextListener
java.lang.IllegalStateException: Cannot stop the embedded server
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextDestroyed(EasyBeansContextListener.java:189)
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.ow2.easybeans.server.EmbeddedException: Cannot stop the server as it is not started.
at org.ow2.easybeans.server.Embedded.stop(Embedded.java:329)
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextDestroyed(EasyBeansContextListener.java:187)
... 25 more
12.08.07 13:58:25 (I) ApplicationContext.log : ContextListener: contextInitialized()
12.08.07 13:58:25 (I) ApplicationContext.log : SessionListener: contextInitialized()
12.08.07 13:58:25 (I) Http11AprProtocol.start : Starting Coyote HTTP/1.1 on http-8080
12.08.07 13:58:25 (I) AjpAprProtocol.start : Starting Coyote AJP/1.3 on ajp-8009
12.08.07 13:58:25 (I) Catalina.start : Server startup in 12307 ms
Show
Paweł Krupiński added a comment - 12/Aug/07 2:24 PM Did everything as you described. Below is an output of the trunk build.
Easybeans.xml as above except with the proper namespace.
I can't connect to the name service started by easybeans using com.sun.jndi.cosnaming.CNCtxFactory withe either iiop or corbaloc addresses.
2007-08-12 13:58:12 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded Apache Tomcat Native library 1.1.10.
2007-08-12 13:58:12 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2007-08-12 13:58:13 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2007-08-12 13:58:13 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
2007-08-12 13:58:13 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1001 ms
2007-08-12 13:58:13 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2007-08-12 13:58:13 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
12.08.07 13:58:13 (I) EasyBeansContextListener.contextInitialized : Detecting TOMCAT web container
12.08.07 13:58:13 (I) EasyBeansContextListener.contextInitialized : Add deploy directory 'D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy'
12.08.07 13:58:14 (I) PolicyProvider.init : Using EasyBeans policy provider 'org.ow2.easybeans.security.jacc.provider.JPolicy'.
12.08.07 13:58:14 (I) PolicyProvider.init : Using EasyBeans PolicyConfigurationFactory provider and EasyBeans Policy provider
12.08.07 13:58:14 (I) Embedded.configure : Using directories '[D:\Programy\Java\Tomcat-6.0.13\easybeans-deploy]' as deploy directories
12.08.07 13:58:24 (I) TraceCarol.infoCarol : Name service for iiop is started on port 2001
12.08.07 13:58:24 (S) StandardContext.listenerStart : Exception sending context initialized event to listener instance of class org.ow2.easybeans.server.war.EasyBeansContextListener
java.lang.IllegalStateException: Cannot start embedded EasyBeans server
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:171)
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.ow2.easybeans.server.EmbeddedException: Cannot start components
at org.ow2.easybeans.server.Embedded.start(Embedded.java:207)
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:169)
... 24 more
Caused by: org.ow2.easybeans.component.api.EZBComponentException: Cannot bind transaction factory
at org.ow2.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:96)
at org.ow2.easybeans.component.ComponentManager.startComponents(ComponentManager.java:199)
at org.ow2.easybeans.server.Embedded.start(Embedded.java:205)
... 25 more
Caused by: javax.naming.NamingException: Cannot build an instance of the class 'org.objectweb.carol.jndi.spi.JacORBIIOPContext' : COS Name Service not registered with ORB under the name 'NameService' [Root exception is javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:116)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.util.configuration.ProtocolConfigurationImpl.getInitialContext(ProtocolConfigurationImpl.java:145)
at org.objectweb.carol.jndi.spi.MultiContext.<init>(MultiContext.java:100)
at org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory.getInitialContext(MultiOrbInitialContextFactory.java:72)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.ow2.easybeans.component.jotm.JOTMComponent.start(JOTMComponent.java:94)
... 27 more
Caused by: javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:356)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
at org.objectweb.carol.jndi.spi.URLInitialContextFactory.getInitialContext(URLInitialContextFactory.java:51)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getClassArgs(AbsInitialContextFactory.java:147)
at org.objectweb.carol.jndi.spi.AbsInitialContextFactory.getInitialContext(AbsInitialContextFactory.java:114)
... 39 more
Caused by: org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0
at org.jacorb.orb.ORB.resolve_initial_references(ORB.java:1231)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
... 52 more
12.08.07 13:58:24 (S) StandardContext.start : Error listenerStart
12.08.07 13:58:24 (S) StandardContext.start : Context [/ow2_easybeans] startup failed due to previous errors
12.08.07 13:58:24 (I) EasyBeansContextListener.contextDestroyed : Stopping EasyBeans embedded server...
12.08.07 13:58:24 (S) StandardContext.listenerStop : Exception sending context destroyed event to listener instance of class org.ow2.easybeans.server.war.EasyBeansContextListener
java.lang.IllegalStateException: Cannot stop the embedded server
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextDestroyed(EasyBeansContextListener.java:189)
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.ow2.easybeans.server.EmbeddedException: Cannot stop the server as it is not started.
at org.ow2.easybeans.server.Embedded.stop(Embedded.java:329)
at org.ow2.easybeans.server.war.EasyBeansContextListener.contextDestroyed(EasyBeansContextListener.java:187)
... 25 more
12.08.07 13:58:25 (I) ApplicationContext.log : ContextListener: contextInitialized()
12.08.07 13:58:25 (I) ApplicationContext.log : SessionListener: contextInitialized()
12.08.07 13:58:25 (I) Http11AprProtocol.start : Starting Coyote HTTP/1.1 on http-8080
12.08.07 13:58:25 (I) AjpAprProtocol.start : Starting Coyote AJP/1.3 on ajp-8009
12.08.07 13:58:25 (I) Catalina.start : Server startup in 12307 ms
Hide
Hello,
What is the version of JacORB that you're using ?
I've tested with this 2.2.3 patched version : (Version used by JOnAS AS)
http://maven.objectweb.org/maven2/org/jacorb/jacorb/2.2.3-jonas-patch-20060131/
Regards,
Florent
What is the version of JacORB that you're using ?
I've tested with this 2.2.3 patched version : (Version used by JOnAS AS)
http://maven.objectweb.org/maven2/org/jacorb/jacorb/2.2.3-jonas-patch-20060131/
Regards,
Florent
Show
Florent BENOIT added a comment - 12/Aug/07 2:31 PM Hello,
What is the version of JacORB that you're using ?
I've tested with this 2.2.3 patched version : (Version used by JOnAS AS)
http://maven.objectweb.org/maven2/org/jacorb/jacorb/2.2.3-jonas-patch-20060131/
Regards,
Florent
Hide
2.2.4.
Ok, the name service and EasyBeans starts with the patched jar.
Thank you very much for help with that.
I still can't access the beans from remote client though.
When I use EasyBeans' smart client (org.objectweb.easybeans.component.smartclient.spi.SmartContextFactory), I get this error on lookup method (packages and class names were changed for confidentiality reasons :)):
Exception in thread "main" java.lang.RuntimeException: javax.naming.NamingException: Cannot lookup object with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at Main.main(Main.java:137)
Caused by: javax.naming.NamingException: Cannot lookup object with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:212)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.objectweb.easybeans.component.smartclient.spi.SmartContext.lookup(SmartContext.java:405)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at Main.main(Main.java:110)
Caused by: javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:141)
at org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:140)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:201)
... 5 more
Caused by: java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.
at org.objectweb.carol.rmi.multi.JrmpPRODelegate.narrow(JrmpPRODelegate.java:138)
at org.objectweb.carol.rmi.multi.MultiPRODelegate.narrow(MultiPRODelegate.java:142)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:128)
... 7 more
I get ClassCastException when using com.sun.jndi.cosnaming.CNCtxFactory and narrowing the Reference object to the proper interface.
Ok, the name service and EasyBeans starts with the patched jar.
Thank you very much for help with that.
I still can't access the beans from remote client though.
When I use EasyBeans' smart client (org.objectweb.easybeans.component.smartclient.spi.SmartContextFactory), I get this error on lookup method (packages and class names were changed for confidentiality reasons :)):
Exception in thread "main" java.lang.RuntimeException: javax.naming.NamingException: Cannot lookup object with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at Main.main(Main.java:137)
Caused by: javax.naming.NamingException: Cannot lookup object with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:212)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.objectweb.easybeans.component.smartclient.spi.SmartContext.lookup(SmartContext.java:405)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at Main.main(Main.java:110)
Caused by: javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:141)
at org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:140)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:201)
... 5 more
Caused by: java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.
at org.objectweb.carol.rmi.multi.JrmpPRODelegate.narrow(JrmpPRODelegate.java:138)
at org.objectweb.carol.rmi.multi.MultiPRODelegate.narrow(MultiPRODelegate.java:142)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:128)
... 7 more
I get ClassCastException when using com.sun.jndi.cosnaming.CNCtxFactory and narrowing the Reference object to the proper interface.
Show
Paweł Krupiński added a comment - 13/Aug/07 10:13 AM 2.2.4.
Ok, the name service and EasyBeans starts with the patched jar.
Thank you very much for help with that.
I still can't access the beans from remote client though.
When I use EasyBeans' smart client (org.objectweb.easybeans.component.smartclient.spi.SmartContextFactory), I get this error on lookup method (packages and class names were changed for confidentiality reasons :)):
Exception in thread "main" java.lang.RuntimeException: javax.naming.NamingException: Cannot lookup object with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at Main.main(Main.java:137)
Caused by: javax.naming.NamingException: Cannot lookup object with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:212)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.objectweb.easybeans.component.smartclient.spi.SmartContext.lookup(SmartContext.java:405)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at Main.main(Main.java:110)
Caused by: javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F0F1515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'com.mypackage.server.MyBean_com.mypackage.MyInterface@Remote' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:141)
at org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:140)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:201)
... 5 more
Caused by: java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.
at org.objectweb.carol.rmi.multi.JrmpPRODelegate.narrow(JrmpPRODelegate.java:138)
at org.objectweb.carol.rmi.multi.MultiPRODelegate.narrow(MultiPRODelegate.java:142)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:128)
... 7 more
I get ClassCastException when using com.sun.jndi.cosnaming.CNCtxFactory and narrowing the Reference object to the proper interface.
Hide
Same when I lookup javax.transaction.UserTransaction:
Exception in thread "main" java.lang.RuntimeException: javax.naming.NamingException: Cannot lookup object with name 'javax.transaction.UserTransaction : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at Main.main(Main.java:139)
Caused by: javax.naming.NamingException: Cannot lookup object with name 'javax.transaction.UserTransaction : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:212)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.objectweb.easybeans.component.smartclient.spi.SmartContext.lookup(SmartContext.java:405)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at Main.main(Main.java:111)
Caused by: javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:141)
at org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:140)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:201)
... 5 more
Caused by: java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.
at org.objectweb.carol.rmi.multi.JrmpPRODelegate.narrow(JrmpPRODelegate.java:138)
at org.objectweb.carol.rmi.multi.MultiPRODelegate.narrow(MultiPRODelegate.java:142)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:128)
... 7 more
Exception in thread "main" java.lang.RuntimeException: javax.naming.NamingException: Cannot lookup object with name 'javax.transaction.UserTransaction : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at Main.main(Main.java:139)
Caused by: javax.naming.NamingException: Cannot lookup object with name 'javax.transaction.UserTransaction : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:212)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.objectweb.easybeans.component.smartclient.spi.SmartContext.lookup(SmartContext.java:405)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at Main.main(Main.java:111)
Caused by: javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:141)
at org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:140)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:201)
... 5 more
Caused by: java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.
at org.objectweb.carol.rmi.multi.JrmpPRODelegate.narrow(JrmpPRODelegate.java:138)
at org.objectweb.carol.rmi.multi.MultiPRODelegate.narrow(MultiPRODelegate.java:142)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:128)
... 7 more
Show
Paweł Krupiński added a comment - 13/Aug/07 10:22 AM Same when I lookup javax.transaction.UserTransaction:
Exception in thread "main" java.lang.RuntimeException: javax.naming.NamingException: Cannot lookup object with name 'javax.transaction.UserTransaction : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at Main.main(Main.java:139)
Caused by: javax.naming.NamingException: Cannot lookup object with name 'javax.transaction.UserTransaction : Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:212)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.objectweb.easybeans.component.smartclient.spi.SmartContext.lookup(SmartContext.java:405)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at Main.main(Main.java:111)
Caused by: javax.naming.NamingException: Cannot unwrap object 'IOR:0000000000000047524D493A6F72672E6F626A6563747765622E6361726F6C2E6A6E64692E7772617070696E672E52656D6F74655265666572656E63653A303030303030303030303030303030300000000000010000000000000070000102000000000C3136392E3235342E322E32000AA700000000001B7374616E64617264496D706C4E616D652F011515240500391A4B4800000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001' with name 'javax.transaction.UserTransaction' :Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'. [Root exception is java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.]
at org.objectweb.carol.rmi.exception.NamingExceptionHelper.create(NamingExceptionHelper.java:50)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:141)
at org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:140)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.lookup(JacORBIIOPContext.java:201)
... 5 more
Caused by: java.lang.ClassCastException: Cannot cast 'org.jacorb.orb.Reference' in 'org.objectweb.carol.jndi.wrapping.RemoteReference'.
at org.objectweb.carol.rmi.multi.JrmpPRODelegate.narrow(JrmpPRODelegate.java:138)
at org.objectweb.carol.rmi.multi.MultiPRODelegate.narrow(MultiPRODelegate.java:142)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at org.objectweb.carol.jndi.spi.JacORBIIOPContext.unwrapObject(JacORBIIOPContext.java:128)
... 7 more
Hide
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
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 - 13/Aug/07 3:15 PM 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
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).
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 - 14/Aug/07 10:23 PM 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
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 ...
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 - 16/Aug/07 10:09 AM 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 ...
EasyBeans is not providing iiop tie/stubs of JOTM.
You should add them to the existing libraries.
The iiop jar is provided in the following file : http://download.forge.objectweb.org/jotm/jotm-2.0.10.tgz
The name is jotm_iiop_stubs.jar
I didn't think that people will use IIOP in Tomcat/EasyBeans. This is why this jar is not included
Florent