net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //172.26.184.60:3344/sessionIdCache. Initial c ause was no such object in table

Coderanch | Jacques Karels | 9 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Error during CacheManager initialization for distributed ehcache implementation

    Coderanch | 9 years ago | Jacques Karels
    net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //172.26.184.60:3344/sessionIdCache. Initial c ause was no such object in table
  2. 0

    Re:Need help on EHCache

    Terracotta | 6 years ago | smedukon
    java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub (no security manager: RMI class loader disabled)
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    EhCache rmi replication issue in WebLogic cluster

    Stack Overflow | 3 years ago | Ahsan Shah
    java.rmi.AccessException: Registry.Registry.rebind disallowed; origin /x.x.x.x is non-local host
  5. 0

    Hello, we use Ehcache as 2nd level Hibernate cache only, having RMI replication enabled with all the following ports statically set: - net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory multicastGroupPort - net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory port remoteObjectPort However the last one (remoteObjectPort) causes troubles when application is restarted without restarting the whole application server. I noticed that when ehcache starts it creates sockets for all those configured ports and when it's stopped but the application server left running all these sockets remain open. When it's started again then, with the first two mentioned ports there appears to be no problem, but for remoteObjectPort we get the followin exception: Caused by: javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not instantiate cache implementation at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:737) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127) 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) ... 143 more Caused by: org.hibernate.HibernateException: Could not instantiate cache implementation at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:64) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:214) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730) ... 148 more Caused by: org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer null. Initial cause was Port already in use: 41103; nested exception is: java.net.BindException: Address already in use at net.sf.ehcache.hibernate.EhCacheProvider.buildCache(EhCacheProvider.java:96) at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:61) ... 152 more Caused by: net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer null. Initial cause was Port already in use: 41103; nested exception is: java.net.BindException: Address already in use at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:529) at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:157) at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:708) at net.sf.ehcache.CacheManager.addCache(CacheManager.java:685) at net.sf.ehcache.CacheManager.addCache(CacheManager.java:643) at net.sf.ehcache.hibernate.EhCacheProvider.buildCache(EhCacheProvider.java:90) ... 153 more Caused by: java.rmi.server.ExportException: Port already in use: 41103; nested exception is: java.net.BindException: Address already in use at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:284) at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:219) at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:398) at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:131) at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:195) at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:306) at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:269) at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:168) at net.sf.ehcache.distribution.RMICachePeer.<init>(RMICachePeer.java:65) at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:525) ... 158 more Caused by: java.net.BindException: Address already in use at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:417) at java.net.ServerSocket.bind(ServerSocket.java:342) at java.net.ServerSocket.<init>(ServerSocket.java:208) at java.net.ServerSocket.<init>(ServerSocket.java:120) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:46) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:350) at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:638) at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:272) ... 167 more So it tried to create the same socket again and thus fails. Simple workaround is to not specify the static value for remoteObjectPort so that it another socket is open, however this could lead to many sockets left open after series ot application restarts and also disallows the use of static port in there.

    Terracotta Project Issue Tracker | 8 years ago | Petr H
    java.net.BindException: Address already in use

  1. odd 280 times, last 3 days ago
7 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. net.sf.ehcache.CacheException

    Problem starting listener for RMICachePeer //172.26.184.60:3344/sessionIdCache. Initial c ause was no such object in table

    at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded()
  2. Ehcache
    CacheManager.<init>
    1. net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:513)
    2. net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:156)
    3. net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:720)
    4. net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:368)
    5. net.sf.ehcache.CacheManager.init(CacheManager.java:235)
    6. net.sf.ehcache.CacheManager.<init>(CacheManager.java:213)
    6 frames