My ignite cluster is deploy on 2 machines. Each machine has 4 ignite process. like:
$jps
30678 CommandLineStartup
30723 CommandLineStartup
52461 Jps
30698 CommandLineStartup
30681 CommandLineStartup
When there is little data in the ignite cluster, I can use IgniteDataStreamer to write data into the ignite cluster. But if there have been more than 200G data in the ignite cluster, I can't use IgniteDataStreamer to write more data into the cluster. The memory and disk space are both enough. and the CPU load average is 2.09. The client log is :
[17:04:00,407][INFO][main][IgniteKernal%grid_recmd] Daemon mode: off
[17:04:00,407][INFO][main][IgniteKernal%grid_recmd] OS: Linux
[17:04:00,407][INFO][main][IgniteKernal%grid_recmd] OS user: mqq
[17:04:00,408][INFO][main][IgniteKernal%grid_recmd] Language runtime: Java Platform API Specification ver. 1.7
[17:04:00,408][INFO][main][IgniteKernal%grid_recmd] VM information: Java(TM) SE Runtime Environment 1.7.0_72-b14 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 24.72-b04
[17:04:00,409][INFO][main][IgniteKernal%grid_recmd] VM total memory: 2.9GB
[17:04:00,409][INFO][main][IgniteKernal%grid_recmd] Remote Management [restart: off, REST: on, JMX (remote: off)]
[17:04:00,409][INFO][main][IgniteKernal%grid_recmd] IGNITE_HOME=/data1/home/igni1.5
[17:04:00,410][INFO][main][IgniteKernal%grid_recmd] VM arguments: [-Xms3g, -Xmx3g, -XX:-UseGCOverheadLimit, -XX:+AggressiveOpts, -XX:MaxPermSize=256m, -XX:+UseParNewGC, -XX:+UseConcMarkSweepGC, -XX:+UseTLAB, -DIGNITE_QUIET=false]
[17:04:00,418][INFO][main][IgniteKernal%grid_recmd] Configured caches ['ignite-marshaller-sys-cache', 'ignite-sys-cache', 'ignite-atomics-sys-cache', 'cache_recmd']
[17:04:00,422][INFO][main][IgniteKernal%grid_recmd] 3-rd party licenses can be found at: /data1/home/igni1.5/libs/licenses
[17:04:00,518][INFO][main][IgniteKernal%grid_recmd] Non-loopback local IPs: 10.0.0.1
[17:04:00,519][INFO][main][IgniteKernal%grid_recmd] Enabled local MACs: 9017ACC1492D
[17:04:00,530][INFO][main][IgnitePluginProcessor] Configured plugins:
[17:04:00,530][INFO][main][IgnitePluginProcessor] ^-- None
[17:04:00,530][INFO][main][IgnitePluginProcessor]
[17:04:00,574][WARNING][main][TcpCommunicationSpi] Failure detection timeout will be ignored (one of SPI parameters has been set explicitly)
[17:04:00,627][INFO][main][TcpCommunicationSpi] IPC shared memory server endpoint started [port=48104, tokDir=/data1/home/igni1.5/work/ipc/shmem/e052dc07-8992-4834-87fd-abf84c0f644a-14472]
[17:04:00,628][INFO][main][TcpCommunicationSpi] Successfully bound shared memory communication to TCP port [port=48104, locHost=0.0.0.0/0.0.0.0]
[17:04:00,652][INFO][main][TcpCommunicationSpi] Successfully bound to TCP port [port=47106, locHost=0.0.0.0/0.0.0.0]
[17:04:00,685][WARNING][main][NoopCheckpointSpi] Checkpoints are disabled (to enable configure any GridCheckpointSpi implementation)
[17:04:00,749][WARNING][main][GridCollisionManager] Collision resolution is disabled (all jobs will be activated upon arrival).
[17:04:00,755][WARNING][main][NoopSwapSpaceSpi] Swap space is disabled. To enable use FileSwapSpaceSpi.
[17:04:00,757][INFO][main][IgniteKernal%grid_recmd] Security status [authentication=off, tls/ssl=off]
[17:04:00,861][WARNING][main][GridCacheProcessor] Deployment mode for cache is not CONTINUOUS or SHARED (it is recommended that you change deployment mode and restart): ISOLATED
[17:04:01,040][INFO][main][GridTcpRestProtocol] Command protocol successfully started [name=TCP binary, host=0.0.0.0/0.0.0.0, port=11217]
[17:04:01,138][SEVERE][tcp-client-disco-msg-worker-#4%grid_recmd%][TcpDiscoverySpi] Exception on joining: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.openSocket(TcpDiscoverySpi.java:1266)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.openSocket(TcpDiscoverySpi.java:1241)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.sendJoinRequest(ClientImpl.java:579)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.joinTopology(ClientImpl.java:505)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.access$900(ClientImpl.java:118)
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.tryJoin(ClientImpl.java:1508)
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1327)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[17:04:01,139][SEVERE][tcp-client-disco-msg-worker-#4%grid_recmd%][TcpDiscoverySpi] Exception on joining: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.openSocket(TcpDiscoverySpi.java:1266)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.openSocket(TcpDiscoverySpi.java:1241)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.sendJoinRequest(ClientImpl.java:579)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.joinTopology(ClientImpl.java:505)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.access$900(ClientImpl.java:118)
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.tryJoin(ClientImpl.java:1508)
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1327)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[17:04:01,140][SEVERE][tcp-client-disco-msg-worker-#4%grid_recmd%][TcpDiscoverySpi] Exception on joining: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.openSocket(TcpDiscoverySpi.java:1266)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.openSocket(TcpDiscoverySpi.java:1241)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.sendJoinRequest(ClientImpl.java:579)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.joinTopology(ClientImpl.java:505)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.access$900(ClientImpl.java:118)
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.tryJoin(ClientImpl.java:1508)
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1327)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[17:04:01,141][SEVERE][tcp-client-disco-msg-worker-#4%grid_recmd%][TcpDiscoverySpi] Exception on joining: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.openSocket(TcpDiscoverySpi.java:1266)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.openSocket(TcpDiscoverySpi.java:1241)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.sendJoinRequest(ClientImpl.java:579)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.joinTopology(ClientImpl.java:505)
at org.apache.ignite.spi.discovery.tcp.ClientImpl.access$900(ClientImpl.java:118)
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.tryJoin(ClientImpl.java:1508)
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1327)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[17:05:01,179][SEVERE][main][IgniteKernal%grid_recmd] Failed to start manager: GridManagerAdapter [enabled=true, name=o.a.i.i.managers.discovery.GridDiscoveryManager]
class org.apache.ignite.IgniteCheckedException: Failed to start SPI: TcpDiscoverySpi [addrRslvr=null, sockTimeout=5000, ackTimeout=5000, reconCnt=10, maxAckTimeout=600000, forceSrvMode=false, clientReconnectDisabled=false]
at org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:258)
at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:660)
at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:929)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:815)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:714)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:584)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:554)
at org.apache.ignite.Ignition.start(Ignition.java:347)
at IgniteOnlineWriteTest.actPutBatchs(IgniteOnlineWriteTest.java:30)
at IgniteOnlineWriteTest.main(IgniteOnlineWriteTest.java:12)
Caused by: class org.apache.ignite.spi.IgniteSpiException: Join process timed out, did not receive response for join request (consider increasing 'joinTimeout' configuration property) [joinTimeout=60000, sock=Socket[addr=/10.0.0.1,port=47500,localport=35836]]
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1334)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[17:05:01,180][SEVERE][main][IgniteKernal%grid_recmd] Got exception while starting (will rollback startup routine).
class org.apache.ignite.IgniteCheckedException: Failed to start manager: GridManagerAdapter [enabled=true, name=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1510)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:929)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:815)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:714)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:584)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:554)
at org.apache.ignite.Ignition.start(Ignition.java:347)
at IgniteOnlineWriteTest.actPutBatchs(IgniteOnlineWriteTest.java:30)
at IgniteOnlineWriteTest.main(IgniteOnlineWriteTest.java:12)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start SPI: TcpDiscoverySpi [addrRslvr=null, sockTimeout=5000, ackTimeout=5000, reconCnt=10, maxAckTimeout=600000, forceSrvMode=false, clientReconnectDisabled=false]
at org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:258)
at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:660)
at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
... 12 more
Caused by: class org.apache.ignite.spi.IgniteSpiException: Join process timed out, did not receive response for join request (consider increasing 'joinTimeout' configuration property) [joinTimeout=60000, sock=Socket[addr=/10.0.0.1,port=47500,localport=35836]]
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1334)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[17:05:01,193][INFO][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
[17:05:01,201][WARNING][grid-nio-worker-0-#58%grid_recmd%][TcpCommunicationSpi] Local node is not started or fully initialized [isStopping=true]
[17:05:01,201][WARNING][grid-nio-worker-1-#59%grid_recmd%][TcpCommunicationSpi] Local node is not started or fully initialized [isStopping=true]
[17:05:01,843][SEVERE][tcp-client-disco-sock-reader-#3%grid_recmd%][TcpDiscoverySpi] Failed to read message [sock=Socket[addr=/10.0.0.1,port=47500,localport=35836], locNodeId=e052dc07-8992-4834-87fd-abf84c0f644a, rmtNodeId=198bc1a5-1b1d-4b65-bccb-b2eb5ad1ec9b]
class org.apache.ignite.IgniteCheckedException: Failed to deserialize object with given class loader: sun.misc.Launcher$AppClassLoader#3415ddf5
at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal(JdkMarshaller.java:105)
at org.apache.ignite.spi.discovery.tcp.ClientImpl$SocketReader.body(ClientImpl.java:888)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
Caused by: java.io.IOException: Stream closed.
at java.net.AbstractPlainSocketImpl.available(AbstractPlainSocketImpl.java:458)
at java.net.SocketInputStream.available(SocketInputStream.java:245)
at java.io.BufferedInputStream.read(BufferedInputStream.java:342)
at org.apache.ignite.marshaller.jdk.JdkMarshallerInputStreamWrapper.read(JdkMarshallerInputStreamWrapper.java:53)
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2310)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2323)
at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(ObjectInputStream.java:3063)
at java.io.ObjectInputStream$BlockDataInputStream.readUTF(ObjectInputStream.java:2864)
at java.io.ObjectInputStream.readString(ObjectInputStream.java:1638)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1341)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.apache.ignite.internal.util.IgniteUtils.readMap(IgniteUtils.java:4890)
at org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode.readExternal(TcpDiscoveryNode.java:559)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1837)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at java.util.ArrayList.readObject(ArrayList.java:771)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at java.util.TreeMap.buildFromSorted(TreeMap.java:3302)
at java.util.TreeMap.readObject(TreeMap.java:3234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal(JdkMarshaller.java:102)
... 2 more
[17:05:01,845][SEVERE][tcp-client-disco-sock-reader-#3%grid_recmd%][TcpDiscoverySpi] Connection failed [sock=Socket[addr=/10.0.0.1,port=47500,localport=35836], locNodeId=e052dc07-8992-4834-87fd-abf84c0f644a]
java.io.IOException: Stream closed.
at java.net.AbstractPlainSocketImpl.available(AbstractPlainSocketImpl.java:458)
at java.net.SocketInputStream.available(SocketInputStream.java:245)
at java.io.BufferedInputStream.read(BufferedInputStream.java:342)
at org.apache.ignite.marshaller.jdk.JdkMarshallerInputStreamWrapper.read(JdkMarshallerInputStreamWrapper.java:53)
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2310)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2323)
at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(ObjectInputStream.java:3063)
at java.io.ObjectInputStream$BlockDataInputStream.readUTF(ObjectInputStream.java:2864)
at java.io.ObjectInputStream.readString(ObjectInputStream.java:1638)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1341)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.apache.ignite.internal.util.IgniteUtils.readMap(IgniteUtils.java:4890)
at org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode.readExternal(TcpDiscoveryNode.java:559)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1837)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at java.util.ArrayList.readObject(ArrayList.java:771)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at java.util.TreeMap.buildFromSorted(TreeMap.java:3302)
at java.util.TreeMap.readObject(TreeMap.java:3234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal(JdkMarshaller.java:102)
at org.apache.ignite.spi.discovery.tcp.ClientImpl$SocketReader.body(ClientImpl.java:888)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[17:05:01,876][INFO][main][IgniteKernal%grid_recmd]
>>> +---------------------------------------------------------------------------------------+
>>> Ignite ver. 1.5.0-final#20151229-sha1:f1f8cda2f3f62231f42a59951bf34c39577c1bec stopped OK
>>> +---------------------------------------------------------------------------------------+
>>> Grid name: grid_recmd
>>> Grid uptime: 00:01:02:580
class org.apache.ignite.IgniteException: Failed to start manager: GridManagerAdapter [enabled=true, name=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:882)
at org.apache.ignite.Ignition.start(Ignition.java:350)
at IgniteOnlineWriteTest.actPutBatchs(IgniteOnlineWriteTest.java:30)
at IgniteOnlineWriteTest.main(IgniteOnlineWriteTest.java:12)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start manager: GridManagerAdapter [enabled=true, name=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1510)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:929)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:815)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:714)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:584)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:554)
at org.apache.ignite.Ignition.start(Ignition.java:347)
... 2 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start SPI: TcpDiscoverySpi [addrRslvr=null, sockTimeout=5000, ackTimeout=5000, reconCnt=10, maxAckTimeout=600000, forceSrvMode=false, clientReconnectDisabled=false]
at org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:258)
at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:660)
at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
... 12 more
Caused by: class org.apache.ignite.spi.IgniteSpiException: Join process timed out, did not receive response for join request (consider increasing 'joinTimeout' configuration property) [joinTimeout=60000, sock=Socket[addr=/10.0.0.1,port=47500,localport=35836]]
at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1334)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
the ignite process's JVM_OPTS is :
export JVM_OPTS="-Xms5g -Xmx5g -Xmn2g -server -XX:-UseGCOverheadLimit -XX:+AggressiveOpts -XX:MaxPermSize=256m -XX:+UseP
arNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB"
the srv.xml is
<bean id="cacheA" class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="cache_recmd"/>
<property name="cacheMode" value="PARTITIONED"/><!-- partition -->
<property name="affinity">
<bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
<property name="hashIdResolver" >
<bean class="org.apache.ignite.cache.affinity.AffinityNodeAddressHashResolver"/>
</property>
<property name="partitions" value="280" />
</bean>
</property>
<property name="backups" value="0"/>
<property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="atomicWriteOrderMode" value="PRIMARY"/>
<property name="memoryMode" value="ONHEAP_TIERED"/><!-- memory tire -->
<property name="startSize" value="#{30 * 1024 * 1024}"/>
<property name="offHeapMaxMemory" value="#{512 * 1024 * 1024}"/>
<property name="swapEnabled" value="true"/>
<property name="evictionPolicy">
<bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
<property name="maxMemorySize" value="#{1024 * 1024 * 1024}"/>
</bean>
</property>
<property name="rebalanceMode" value="ASYNC"/>
<property name="rebalanceBatchSize" value="#{1024 * 1024}"/>
<property name="rebalanceThrottle" value="100"/>
</bean>
<bean id="igniA" class="org.apache.ignite.configuration.IgniteConfiguration" scope="singleton">
<property name="gridName" value="grid_recmd"/>
<property name="clientMode" value="false"/>
<property name="metricsLogFrequency" value="0"/><!-- 0 means disable metrics log -->
<property name="deploymentMode" value="ISOLATED"/>
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="localPort" value="47500"/>
<property name="localPortRange" value="20"/>
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="shared" value="true"/>
<property name="addresses">
<list>
<value>10.0.0.1:47500..47520</value>
<value>10.0.0.2:47500..47520</value>
</list>
</property>
</bean>
</property>
<property name="joinTimeout" value="60000"/>
</bean>
</property>
<property name="communicationSpi">
<bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
<property name="socketWriteTimeout" value="30000"/>
<property name="connectTimeout" value="50000"/>
</bean>
</property>
<property name="failureDetectionTimeout" value="60000"/>
<property name="swapSpaceSpi">
<bean class="org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi">
<property name="baseDirectory" value="/data1/home/igni1.5/my/swp"/>
</bean>
</property>
<property name="cacheConfiguration">
<list>
<ref bean="cacheA"/>
</list>
</property>
<property name="includeEventTypes">
<list>
</list>
</property>
</bean>
In proxy i have this to send to rabbitMQ:
<property name="messageType" value="text/xml" scope="default"/>
<property name="contentType" value="text/xml" scope="default"/>
<property name="rabbitmq.attributes.app.id"
value="RMIS"
scope="axis2"
type="STRING"/>
<property name="rabbitmq.attributes.type"
value="BRANCH"
scope="axis2"
type="STRING"/>
<property name="rabbitmq.attributes.user.id"
value="RMIS"
scope="axis2"
type="STRING"/>
<property name="MESSAGE_ID" expression="get-property('MessageID')"/>
<script language="js">var messageID = mc.getProperty('MESSAGE_ID').substring(9,45);
mc.setProperty("RABBIT_MESSAGE_ID", messageID);</script>
<property name="rabbitmq.attributes.custom.message.id"
expression="get-property('RABBIT_MESSAGE_ID')"
scope="axis2"/>
<clone continueParent="true">
<target sequence="writeToFile"/>
</clone>
<send>
<endpoint key="rabbit"/>
</send>
in ENDPOINT:
<endpoint xmlns="http://ws.apache.org/ns/synapse" name="rabbit">
<address uri="rabbitmq://writeToQueue?rabbitmq.server.host.name=localhost&rabbitmq.server.port=5672&rabbitmq.server.user.name=guest&rabbitmq.server.password=guest&rabbitmq.queue.name=queque" format="soap11">
<suspendOnFailure>
<progressionFactor>1.0</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
<retryDelay>3000</retryDelay>
</markForSuspension>
<timeout>
<responseAction>fault</responseAction>
</timeout>
</address>
</endpoint>
but I catch an error, when i send it to rabbitMQ Server:
TID[-1234] [ESB] [2016-06-03 16:32:06,479] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error during sending message out
org.apache.axis2.transport.rabbitmq.RabbitMQMessage.(RabbitMQMessage.java:43)
org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendOverAMQP(RabbitMQSender.java:84)
org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendMessage(RabbitMQSender.java:72)
org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185)
org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167)
org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:542)
org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:79)
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:461)
org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:372)
org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:55)
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:105)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185)
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:395)
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
The log in WSO2 ESB there:
And i don't understand, why can not contact with rabbitMQ. In rabbitMQ also, i don't catch any error.
ERROR_DETAIL : org.apache.synapse.SynapseException: Unexpected error during sending message out at org.apache.synapse.core.axis2.Axis2Sender.handleException(Axis2Sender.java:247) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:91) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:461) at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:372) at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65) at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:105) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149) at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:395) at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at org.apache.axis2.transport.rabbitmq.RabbitMQMessage.<init>(RabbitMQMessage.java:43) at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendOverAMQP(RabbitMQSender.java:84) at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendMessage(RabbitMQSender.java:72) at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:542) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:79) ... 15 more
new stackTrace:
`[2016-06-27 17:07:00,380] ERROR - Axis2Sender Unexpected error during sending message out
java.lang.IllegalStateException: Invalid configuration: 'routingKey' must be non-null.
at com.rabbitmq.client.impl.AMQImpl$Basic$Publish.(AMQImpl.java:2278)
at com.rabbitmq.client.AMQP$Basic$Publish$Builder.build(AMQP.java:1219)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:647)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:630)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:621)
at org.apache.axis2.transport.rabbitmq.RabbitMQMessageSender.send(RabbitMQMessageSender.java:252)
at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendOverAMQP(RabbitMQSender.java:85)
at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendMessage(RabbitMQSender.java:72)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:542)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:79)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:461)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:372)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:55)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:105)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:395)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[2016-06-27 17:07:00,386] WARN - FaultHandler ERROR_CODE : 0
[2016-06-27 17:07:00,386] WARN - FaultHandler ERROR_MESSAGE : Unexpected error during sending message out
[2016-06-27 17:07:00,387] WARN - FaultHandler ERROR_DETAIL : org.apache.synapse.SynapseException: Unexpected error during sending message out
at org.apache.synapse.core.axis2.Axis2Sender.handleException(Axis2Sender.java:247)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:91)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:461)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:372)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:55)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:105)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:395)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Invalid configuration: 'routingKey' must be non-null.
at com.rabbitmq.client.impl.AMQImpl$Basic$Publish.(AMQImpl.java:2278)
at com.rabbitmq.client.AMQP$Basic$Publish$Builder.build(AMQP.java:1219)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:647)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:630)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:621)
at org.apache.axis2.transport.rabbitmq.RabbitMQMessageSender.send(RabbitMQMessageSender.java:252)
at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendOverAMQP(RabbitMQSender.java:85)
at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendMessage(RabbitMQSender.java:72)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:542)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:79)
... 16 more
[2016-06-27 17:07:00,388] WARN - FaultHandler ERROR_EXCEPTION : org.apache.synapse.SynapseException: Unexpected error during sending message out
[2016-06-27 17:07:00,388] WARN - FaultHandler FaultHandler : Endpoint [rabbit]
[2016-06-27 17:07:00,388] WARN - EndpointContext Endpoint : rabbit will be marked SUSPENDED as it failed`
Add following properties to insequence of Proxy.
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
Then your configurations should be like follow:
<property name="messageType" value="text/xml" scope="default"/>
<property name="contentType" value="text/xml" scope="default"/>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
<property name="rabbitmq.attributes.app.id"
value="RMIS"
scope="axis2"
type="STRING"/>
<property name="rabbitmq.attributes.type"
value="BRANCH"
scope="axis2"
type="STRING"/>
<property name="rabbitmq.attributes.user.id"
value="RMIS"
scope="axis2"
type="STRING"/>
<property name="MESSAGE_ID" expression="get-property('MessageID')"/>
<script language="js">var messageID = mc.getProperty('MESSAGE_ID').substring(9,45);
mc.setProperty("RABBIT_MESSAGE_ID", messageID);</script>
<property name="rabbitmq.attributes.custom.message.id"
expression="get-property('RABBIT_MESSAGE_ID')"
scope="axis2"/>
<clone continueParent="true">
<target sequence="writeToFile"/>
</clone>
<send>
<endpoint key="rabbit"/>
</send>
According to new stackTrace, it is mention about "'routingKey' must be non-null."
Please add "rabbitmq.exchange.name" parameter and relevant value for that.
Ex:
<endpoint>
<address
uri="rabbitmq:/AMQPProxy?rabbitmq.server.host.name=192.168.0.3&rabbitmq.server.port=5672&rabbitmq.server.user.name=user&rabbitmq.server.password=abc123&rabbitmq.queue.name=queue2&rabbitmq.exchange.name=exchange2"/>
</endpoint>
If you need further clarification, please refer WSO2 docs: https://docs.wso2.com/display/ESB490/RabbitMQ+AMQP+Transport
First,please let me aplogize my english is not good. because I'm Japanese.
I ask,error of JAX-RS project.
I import a sample of the following sites:
http://www.opentone.co.jp/news/release/article04/article0403.html
but i can't be executed that project.
I think "Starting the context failed due to previous errors: Critical" is prime importance.
How they could be solved What if?
And if possible the above sites Please try to import to eclipse the project actually.
You can download the "添付のファイル" from the attached.Near the bottom of the page it.
It is over, thank you.
this is web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>Archetype Created Web Application</display-name>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/applicationContext.xml</param-value>
</context-param>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
this is stack trace
9 23, 2014 5:18:07 午後 org.apache.catalina.core.StandardContext listenerStart
重大: クラス org.springframework.web.context.ContextLoaderListener のリスナインスタンスにコンテキスト初期化イベントを送信中の例外です
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [jp.sample.jaxrs.service.HelloResource] for bean with name 'helloResource' defined in file [C:\Users\omiz12032\workspace3\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jax-rs\WEB-INF\classes\jp\sample\jaxrs\service\HelloResource.class]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: jp/sample/jaxrs/service/HelloResource : Unsupported major.minor version 52.0 (unable to load class jp.sample.jaxrs.service.HelloResource)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1264)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:896)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:566)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.UnsupportedClassVersionError: jp/sample/jaxrs/service/HelloResource : Unsupported major.minor version 52.0 (unable to load class jp.sample.jaxrs.service.HelloResource)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2858)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1282)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1253)
... 24 more
9 23, 2014 5:18:07 午後 org.apache.catalina.core.StandardContext start
重大: Error listenerStart
9 23, 2014 5:18:07 午後 org.apache.catalina.core.StandardContext start
重大: 以前のエラーのためにコンテキストの起動が失敗しました [/jax-rs]
9 23, 2014 5:18:07 午後 org.apache.catalina.core.ApplicationContext log
情報: Closing Spring root WebApplicationContext
9 23, 2014 5:18:07 午後 org.apache.coyote.http11.Http11Protocol start
情報: Coyote HTTP/1.1を http-8080 で起動します
9 23, 2014 5:18:07 午後 org.apache.jk.common.ChannelSocket init
情報: JK: ajp13 listening on /0.0.0.0:8009
9 23, 2014 5:18:07 午後 org.apache.jk.server.JkMain start
情報: Jk running ID=0 time=0/21 config=null
9 23, 2014 5:18:07 午後 org.apache.catalina.startup.Catalina start
情報: Server startup in 4681 ms
anf this is applicationContext.xml.Those for registering a web service
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<context:component-scan base-package="jp.sample.jaxrs" />
<jaxrs:server id="jaxrsservice" address="/">
<jaxrs:serviceBeans>
<ref bean="helloResource" />
</jaxrs:serviceBeans>
</jaxrs:server>
<jaxrs:server id="itemorderresource" address="/">
<jaxrs:serviceBeans>
<ref bean="itemOrderResource" />
</jaxrs:serviceBeans>
</jaxrs:server>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/jaxrs" />
<property name="username" value="jaxrs" />
<property name="password" value="jaxrs" />
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configLocation" value="classpath:mybatis-config.xml" />
<property name="mapperLocations" value="classpath:mybatis/**/*.xml" />
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
</beans>
Caused by: java.lang.UnsupportedClassVersionError: jp/sample/jaxrs/service/HelloResource : Unsupported major.minor version 52.0 (unable to load class jp.sample.jaxrs.service.HelloResource)
Basically it means that you compiled your classes with newer JDK than is your server (probably in development environment you have 1.8 and in tomcat server you have 1.7).
Try switching Java compiler level to lower version in development environment.
While trying to use WSO2 Identity Server with OpenLDAP after following the steps on:
http://wso2.org/project/solutions/identity/3.2.3/docs/user-core/admin_guide.html#LDAP
I get this message, when trying to authenticate:
TID: [0] [WSO2 Identity Server] [2012-07-30 13:30:34,088] WARN {org.wso2.carbon.core.services.authentication.AuthenticationAdmin} - None active tenant trying to sign in.example.com {org.wso2.carbon.core.services.authentication.AuthenticationAdmin}
TID: [0] [WSO2 Identity Server] [2012-07-30 13:30:34,088] ERROR {org.wso2.carbon.core.services.authentication.AuthenticationAdmin} - Your account is not active. Please activate your account first. {org.wso2.carbon.core.services.authentication.AuthenticationAdmin}
org.wso2.carbon.core.common.AuthenticationException: Your account is not active. Please activate your account first.
at org.wso2.carbon.core.services.authentication.AuthenticationAdmin.login(AuthenticationAdmin.java:79)
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:597)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:199)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.wso2.carbon.server.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:154)
at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:254)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:396)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:356)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1534)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
TID: [] [WSO2 Identity Server] [2012-07-30 13:30:34,100] ERROR {org.wso2.carbon.authenticator.proxy.AuthenticationAdminClient} - Error occurred while logging in {org.wso2.carbon.authenticator.proxy.AuthenticationAdminClient}
org.apache.axis2.AxisFault: Your account is not active. Please activate your account first.
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at org.wso2.carbon.authenticator.stub.AuthenticationAdminStub.login(AuthenticationAdminStub.java:659)
at org.wso2.carbon.authenticator.proxy.AuthenticationAdminClient.login(AuthenticationAdminClient.java:64)
at org.wso2.carbon.ui.DefaultCarbonAuthenticator.authenticate(DefaultCarbonAuthenticator.java:142)
at org.wso2.carbon.ui.DefaultCarbonAuthenticator.authenticate(DefaultCarbonAuthenticator.java:85)
at org.wso2.carbon.ui.CarbonSecuredHttpContext.handleSecurity(CarbonSecuredHttpContext.java:387)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:86)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.wso2.carbon.server.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:154)
at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:254)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:396)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:356)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1534)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
TID: [] [WSO2 Identity Server] [2012-07-30 13:30:34,105] ERROR {org.wso2.carbon.ui.CarbonSecuredHttpContext} - error occurred while login {org.wso2.carbon.ui.CarbonSecuredHttpContext}
org.wso2.carbon.core.common.AuthenticationException: Exception occured
at org.wso2.carbon.ui.DefaultCarbonAuthenticator.authenticate(DefaultCarbonAuthenticator.java:87)
at org.wso2.carbon.ui.CarbonSecuredHttpContext.handleSecurity(CarbonSecuredHttpContext.java:387)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:86)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.wso2.carbon.server.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:154)
at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:254)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:396)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:356)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1534)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.axis2.AxisFault: Exception occured
at org.wso2.carbon.ui.DefaultCarbonAuthenticator.authenticate(DefaultCarbonAuthenticator.java:150)
at org.wso2.carbon.ui.DefaultCarbonAuthenticator.authenticate(DefaultCarbonAuthenticator.java:85)
... 25 more
Caused by: org.wso2.carbon.core.common.AuthenticationException: org.apache.axis2.AxisFault: Your account is not active. Please activate your account first.
at org.wso2.carbon.authenticator.proxy.AuthenticationAdminClient.login(AuthenticationAdminClient.java:70)
at org.wso2.carbon.ui.DefaultCarbonAuthenticator.authenticate(DefaultCarbonAuthenticator.java:142)
... 26 more
Caused by: org.apache.axis2.AxisFault: Your account is not active. Please activate your account first.
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at org.wso2.carbon.authenticator.stub.AuthenticationAdminStub.login(AuthenticationAdminStub.java:659)
at org.wso2.carbon.authenticator.proxy.AuthenticationAdminClient.login(AuthenticationAdminClient.java:64)
... 27 more
My user-mgt.xml is:
<UserManager>
<Realm>
<Configuration>
<AdminRole>admin</AdminRole>
<AdminUser>
<UserName>admin#example.com</UserName>
<Password>admin</Password>
</AdminUser>
<EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->
<ReadOnly>true</ReadOnly>
<MaxUserNameListLength>500</MaxUserNameListLength>
<Property name="url">jdbc:h2:repository/database/WSO2CARBON_DB</Property>
<Property name="userName">wso2carbon</Property>
<Property name="password">wso2carbon</Property>
<Property name="driverName">org.h2.Driver</Property>
<Property name="maxActive">50</Property>
<Property name="maxWait">60000</Property>
<Property name="minIdle">5</Property>
</Configuration>
<UserStoreManager class="org.wso2.carbon.user.core.ldap.LDAPUserStoreManager">
<Property name="ReadOnly">true</Property>
<Property name="MaxUserNameListLength">100</Property>
<Property name="ConnectionURL">ldap://192.168.81.128:389</Property>
<Property name="ConnectionName">uid=admin#example.com,ou=users,dc=maxcrc,dc=com</Property>
<Property name="ConnectionPassword">admin</Property>
<Property name="UserSearchBase">ou=users,dc=maxcrc,dc=com</Property>
<Property name="UserNameListFilter">(objectClass=person)</Property>
<Property name="UserNameAttribute">uid</Property>
<Property name="ReadLDAPGroups">false</Property>
<Property name="GroupSearchBase">ou=system,dc=maxcrc,dc=com</Property>
<Property name="GroupSearchFilter">(objectClass=groupOfNames)</Property>
<Property name="GroupNameAttribute">cn</Property>
<Property name="MembershipAttribute">member</Property>
</UserStoreManager>
<AuthorizationManager class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager"></AuthorizationManager>
</Realm>
</UserManager>
Can you give any suggestions as to where the error might be?
The only user on my OpenLDAP installation is admin#example.com with password admin
Since you are trying to connect to the OpenLDAP in read only mode use the LDAPUserStoreManager instead the ApacheDSUserStoreManager. When you do the configurations do not comment out or remove configuration elements, cause that would would cause for NULL POINTER EXCEPTIONS.
I'm trying to take a WAR, which deploys and runs fine on Tomcat, and deploy it on Glassfish. The initial error message in Glassfish is:
com.sun.enterprise.deployment.backend.IASDeploymentException:
Deployment Error -- The
persistence-context-ref-name
[org.nhindirect.config.store.dao.impl.AnchorDaoImpl/entityManager]
in module
[C:\Sun\AppServer\domains\domain1\applications\j2ee-modules\config-service]
resolves to a persistence unit called
[config-store] which is of type
RESOURCE_LOCAL. Only persistence units
with transaction type JTA can be used
as a container managed entity manager.
Please verify your application.
The WAR does not have a persistence.xml in its META-INF folder. However, there is a JAR under WEB-INF\lib that itself contains a persistence.xml. The following are its contents:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="config-store" transaction-type="RESOURCE_LOCAL">
<properties>
<property name="hibernate.hbm2ddl.auto" value="validate" />
</properties>
</persistence-unit>
</persistence>
So here's my question: is it possible to run a WAR configured for RESOURCE_LOCAL on Glassfish, or must I reconfigure the WAR for JTA?
I've investigated the first option by making the following changes to the WAR's web.xml:
Changed version="2.5" to version="2.4"
Changed xmlns="http://java.sun.com/xml/ns/javaee"
to
xmlns="http://java.sun.com/xml/ns/j2ee"
Changed xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
to
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
After these changes, the WAR seemed to deploy successfully, however, I could not access its WSDL and the following error was found in the Glassfish log:
Exception sending context initialized
event to listener instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0'
defined in ServletContext resource
[/WEB-INF/beans.xml]: Initialization
of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
'entityManagerFactory' defined in
ServletContext resource
[/WEB-INF/beans.xml]: Invocation of
init method failed; nested exception
is java.lang.NoClassDefFoundError:
javassist/bytecode/ClassFile at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at
java.security.AccessController.doPrivileged(Native
Method) at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
at
org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:596)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:365)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4655)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5364)
at
com.sun.enterprise.web.WebModule.start(WebModule.java:345)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:986)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:970)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704)
at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1649)
at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1254)
at
com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182)
at
com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1005)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
at
com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
at
com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231)
at
com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
at
com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:609)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:653)
at
com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:773)
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:597)
at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:390)
at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:373)
at
com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at
sun.reflect.GeneratedMethodAccessor13.invoke(Unknown
Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source) at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at
com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:170)
at
com.sun.enterprise.deployment.client.DeploymentClientUtils.startApplication(DeploymentClientUtils.java:159)
at
com.sun.enterprise.deployment.client.DeployAction.run(DeployAction.java:538)
at
java.lang.Thread.run(Thread.java:619)
Caused by:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
'entityManagerFactory' defined in
ServletContext resource
[/WEB-INF/beans.xml]: Invocation of
init method failed; nested exception
is java.lang.NoClassDefFoundError:
javassist/bytecode/ClassFile at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at
java.security.AccessController.doPrivileged(Native
Method) at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
at
org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:270)
at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:122)
at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.(PersistenceExceptionTranslationInterceptor.java:78)
at
org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.(PersistenceExceptionTranslationAdvisor.java:70)
at
org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:97)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1326)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
... 56 more Caused by:
java.lang.NoClassDefFoundError:
javassist/bytecode/ClassFile at
org.hibernate.ejb.packaging.AbstractJarVisitor.checkAnnotationMatching(AbstractJarVisitor.java:236)
at
org.hibernate.ejb.packaging.AbstractJarVisitor.executeJavaElementFilter(AbstractJarVisitor.java:202)
at
org.hibernate.ejb.packaging.AbstractJarVisitor.addElement(AbstractJarVisitor.java:163)
at
org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:100)
at
org.hibernate.ejb.packaging.AbstractJarVisitor.getMatchingEntries(AbstractJarVisitor.java:139)
at
org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:287)
at
org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:614)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:360)
at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
at
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 73 more
Part of the above error message complains about javassist. This seems strange because the following section is in the WAR's pom.xml
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
If helpful, here are the contents of the WAR's beans.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"
default-autowire="byName">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<context:annotation-config />
<context:component-scan base-package="org.nhindirect.config" />
<tx:annotation-driven transaction-manager="transactionManager" />
<jaxws:endpoint id="configurationService"
address="/ConfigurationService" >
<jaxws:implementor>
<bean id="configurationServiceImpl"
class="org.nhindirect.config.service.impl.ConfigurationServiceImpl">
<property name="domainSvc" ref="domainSvc"/>
<property name="addressSvc" ref="addressSvc"/>
<property name="anchorSvc" ref="anchorSvc"/>
<property name="certSvc" ref="certSvc"/>
<property name="settingSvc" ref="settingSvc"/>
<property name="DNSSvc" ref="dnsSvc"/>
</bean>
</jaxws:implementor>
</jaxws:endpoint>
<!-- <jaxws:endpoint id="addressService" implementor="org.nhindirect.config.service.ws.AddressServiceWS"
address="/AddressService" /> -->
<!-- Service Implementations -->
<bean id="domainSvc" class="org.nhindirect.config.service.impl.DomainServiceImpl">
<property name="dao" ref="domainDao"/>
</bean>
<bean id="addressSvc" class="org.nhindirect.config.service.impl.AddressServiceImpl">
<property name="dao" ref="addressDao"/>
</bean>
<bean id="anchorSvc" class="org.nhindirect.config.service.impl.AnchorServiceImpl">
<property name="dao" ref="anchorDao"/>
</bean>
<bean id="certSvc" class="org.nhindirect.config.service.impl.CertificateServiceImpl">
<property name="dao" ref="certificateDao"/>
</bean>
<bean id="settingSvc" class="org.nhindirect.config.service.impl.SettingServiceImpl">
<property name="dao" ref="settingDao"/>
</bean>
<bean id="dnsSvc" class="org.nhindirect.config.service.impl.DNSServiceImpl">
<property name="dao" ref="dnsDao"/>
</bean>
<!-- DAO's -->
<bean id="domainDao" class="org.nhindirect.config.store.dao.impl.DomainDaoImpl"/>
<bean id="addressDao" class="org.nhindirect.config.store.dao.impl.AddressDaoImpl"/>
<bean id="anchorDao" class="org.nhindirect.config.store.dao.impl.AnchorDaoImpl" />
<bean id="certificateDao" class="org.nhindirect.config.store.dao.impl.CertificateDaoImpl"/>
<bean id="settingDao" class="org.nhindirect.config.store.dao.impl.SettingDaoImpl"/>
<bean id="dnsDao" class="org.nhindirect.config.store.dao.impl.DNSDaoImpl"/>
<!-- Exception translation bean post processor -->
<bean
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
<!-- SWAP THIS JPA IMPLEMENTATION WITH THE APPROPROATE DB CONFIGURATION
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="generateDdl" value="true" />
<property name="databasePlatform" value="org.hibernate.dialect.PostgreSQLDialect" />
</bean>
</property>
<property name="persistenceUnitName" value="config-store" />
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="org.postgresql.Driver" />
<property name="url" value="jdbc:postgresql:nhindconfig" />
<property name="username" value="nhind" />
<property name="password" value="nhind" />
</bean>
-->
<!-- EMBEDDED DERBY JPA CONFIGURATION FOR A WORKING OUT OF THE BOX CONFIGURATION WITH NO PREREQUISITES OF
SETTING UP AN EXTERNAL DATABASE. REMOVE THIS SECTION AND REPLACE WITH READ JPA CONFIGURATION (SEE
ABOVE SECTION) FOR PRODUCTION -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="generateDdl" value="true" />
<!-- <property name="databasePlatform" value="org.hibernate.dialect.PostgreSQLDialect" /> -->
<property name="databasePlatform" value="org.hibernate.dialect.DerbyDialect" />
</bean>
</property>
<property name="dataSource" ref="dataSource"/>
<property name="persistenceUnitName" value="config-store" />
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="url" value="jdbc:derby:nhindconfig;create=true" />
<property name="username" value="nhind" />
<property name="password" value="nhind" />
</bean>
<!-- END DERBY JPA CONFIGURATION -->
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" />
</beans>
Sorry if I've provided too much information. I'm new to JPA and wasn't sure what would and wouldn't be helpful to anyone.
Thank you in advance.
Somewhere in your code you're probably injecting an EntityManager using code that looks something like this:
#PersistanceContext // Requires JTA
EntityManager em;
In this situation, you're asking the container (Glassfish itself, to create and manage the EntityManager for you. Glassfish being clusterable, attempts to protect you from accidentally making a transaction across multiple servers that is not truly ACID, but requiring you to use a JTA-transaction (which is sharable between multiple clustered servers).
If you know for sure you are NEVER going to cluster your glassfish container for this application, you can safely keep using RESOURCE_LOCAL transactions, however, you cannot have Glassfish manage that EntityManager for you. You can have Glassfish manage an EntityManagerFactory though.
#PersistanceUnit // Does NOT require JTA
EntityManagerFactory factory;
This is safe to use for persistance units that are RESOURCE_LOCAL. You just need to request an EntityManager from the factory using factory.createEntityManager().
Now your EntityManager is application-managed, not container-managed. So Glassfish will assume that you will handle transaction isolation in a cluster.