java.net.MalformedURLException: no protocol: - RMICachePeer

868 views
Skip to first unread message

David Ames

unread,
Sep 22, 2014, 6:15:27 PM9/22/14
to ehcach...@googlegroups.com
  1. What version of Ehcache you are currently using; 2.6.0
  2. Paste the configuration for the Cache/CacheManager you have an issue with; (below)
  3. Add any name and version of other library or framework you use Ehcache with (e.g. Hibernate); Coldfusion 9.2
  4. Providing JDK and OS versions maybe useful as well.  1.6.0_29 on Win2k8 server

Hi there,

One of our servers has started giving the following exception on startup
Error message: Problem starting listener for RMICachePeer //192.168.7.142:40001/SSOSettingsCache. In
itial cause was RemoteException occurred in server thread; nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
        java.net.MalformedURLException: no protocol: -


Where 192.168.7.142 is an IP address for the server.

It looks like the protocol is missing.  I'm not sure where to add it in the config file.  

If I change cacheManagerPeerListenerFactory: properties to include an explicit hostname (localhost), we get the same problem with 
the address //localhost:40001/SSOSettingsCache


How can we fix this?

Thanks,
dave


---- Config file ----

<?xml version="1.0" encoding="UTF-8"?>
 xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
 maxBytesLocalHeap="4g"
 name="apac_verylarge"
>
<sizeOfPolicy maxDepth="99999999" maxDepthExceededBehavior="continue"/>

<!-- AF:
Multicast Group = 230.0.0.4
Servers in this group
GRAMPA
DIAMOND
-->


    <!--
    DA: The RMICacheManagerPeerProviderFactory is used for find other peers (cluster nodes) to replicate with.
    Peer discovery occurs via multicast - ie, each group of servers listen on a specific multicast group address.
    EG, the DefenceCluster will listen on one group address, the IMMI cluster will listen on another group address.
    These multicast addresses look like IPV4 addresses, and for our purposes we start them with 230.0.0.x.


    -->
    <cacheManagerPeerProviderFactory
     class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
     properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.4,
     multicastGroupPort=4446, timeToLive=32"
    />


    <!--
    DA: cacheManagerPeerListenerFactory allows us some insight into what's going on in the cache.  The monitor server may not exist, and this instance of the
    app manager will check for it every 30 seconds.  In production, we can start up a monitor server at and time to view whats in the cache for
    troubleshooting.

    memoryMeasurement=false  must ALWAYS ALWAYS ALWAYS be set. Otherwise we get perf problems.
   
    <cacheManagerPeerListenerFactory
    class="org.terracotta.ehcachedx.monitor.probe.ProbePeerListenerFactory"
    properties="monitorAddress=localhost, monitorPort=9889, memoryMeasurement=false"
    />


-->


    <!--
    DA: RMICacheManagerPeerListenerFactory is used for replication.
    -->
    <cacheManagerPeerListenerFactory
     class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
     properties="port=40001, socketTimeoutMillis=2000"
    />


    <defaultCache
     eternal="false"
     timeToIdleSeconds="600"
     timeToLiveSeconds="0"
     overflowToDisk="false"
     statistics="true"
    >
 <cacheEventListenerFactory
         class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
         properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=false, replicateUpdatesViaCopy=false, replicateRemovals=true"
        />
</defaultCache>



    <cache name="AutoGenerate"
     eternal="false"
     overflowToDisk="false"
     statistics="false"
    >
         <cacheEventListenerFactory
         class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
         properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=false, replicateUpdatesViaCopy=false, replicateRemovals=true"
        />
    </cache>


   
   <!-- Caches managed/wrapped with objectCache -->
<cache name="ConfigCommentCache"
eternal="false" 
timeToIdleSeconds="300" 
        timeToLiveSeconds="1200" 
overflowToDisk="false" 
statistics="true"
>
<cacheEventListenerFactory
        class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
        properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"
       />
</cache>
<cache name="ConstantsCache"
eternal="false" 
timeToIdleSeconds="1200" 
        timeToLiveSeconds="3600" 
overflowToDisk="false" 
statistics="true"
>
<cacheEventListenerFactory
        class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
        properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"
       />
</cache>
<cache name="CPJobsList"  
eternal="false" 
timeToIdleSeconds="300" 
        timeToLiveSeconds="1200" 
overflowToDisk="false" 
statistics="true"
>
<cacheEventListenerFactory
        class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
        properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"
       />
</cache>
<cache name="FormEngineCache"
    maxBytesLocalHeap="50%"
eternal="false" 
timeToIdleSeconds="300" 
        timeToLiveSeconds="1200" 
overflowToDisk="false" 
statistics="true"
>
<cacheEventListenerFactory
        class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
        properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"
       />
</cache>
<cache name="HelpArticleCache"
eternal="false" 
timeToIdleSeconds="300" 
        timeToLiveSeconds="1200" 
overflowToDisk="false" 
statistics="true"
>
<cacheEventListenerFactory
        class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
        properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"
       />
</cache>


<cache name="ProcessCache"
    maxBytesLocalHeap="30%"
eternal="false" 
timeToIdleSeconds="300" 
        timeToLiveSeconds="1200" 
overflowToDisk="false" 
statistics="true"
>
<cacheEventListenerFactory
        class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
        properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"
       />
</cache>
<cache name="SSOSettingsCache"
eternal="false" 
timeToIdleSeconds="1200" 
        timeToLiveSeconds="3600" 
overflowToDisk="false" 
statistics="true"
>
<cacheEventListenerFactory
        class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
        properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"
       />
</cache>
<cache name="CaptionsCache"
eternal="false" 
timeToIdleSeconds="1200" 
timeToLiveSeconds="3600" 
overflowToDisk="false" 
statistics="true"
>
<cacheEventListenerFactory
        class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
        properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"
       />
</cache>
<cache name="EntityCaptionCache"
eternal="false" 
timeToIdleSeconds="1200" 
timeToLiveSeconds="3600" 
overflowToDisk="false" 
statistics="true"
>
<cacheEventListenerFactory
        class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
        properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"
       />

</cache>
</ehcache>



Alex Snaps

unread,
Sep 24, 2014, 9:12:29 AM9/24/14
to ehcach...@googlegroups.com
Not quite sure where this // is coming from. 
Could you provide the complete stacktrace? 

David Ames

unread,
Oct 1, 2014, 5:10:34 PM10/1/14
to ehcach...@googlegroups.com
Hi Alex,

Here is the complete stracktrace (well, as close as we can get to one with coldfusion).

dave


java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at coldfusion.runtime.java.JavaProxy.CreateObject(JavaProxy.java:166)
	at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:80)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
	at cftestEhCache12ecfm1531963702.runPage(D:\JO3\utilsWWWRoot\dev\testEhCache1.cfm:5)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
	at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
	at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:366)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
	at coldfusion.CfmServlet.service(CfmServlet.java:201)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
	at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:97)
	at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:472)
	at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:312)
	at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:192)
	at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:507)
	at com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
	at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:79)
	at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:53)
	at com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:41)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java)
	at jrun.servlet.FilterChain.service(FilterChain.java:101)
	at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
	at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
	at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
	at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
	at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
	at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
	at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
	at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
	at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //192.168.7.142:40001/HelpArticleCache. Initial cause was RemoteException occurred in server thread; nested exception is: 
	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.net.MalformedURLException: no protocol: -
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:538)
	at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:159)
	at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1342)
	at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:750)
	at net.sf.ehcache.CacheManager.doInit(CacheManager.java:451)
	at net.sf.ehcache.CacheManager.init(CacheManager.java:374)
	at net.sf.ehcache.CacheManager.<init>(CacheManager.java:282)
	... 56 more
Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.net.MalformedURLException: no protocol: -
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:400)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:248)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	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)
	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
	at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
	at java.rmi.Naming.rebind(Naming.java:160)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.bind(RMICacheManagerPeerListener.java:234)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:536)
	... 62 more
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.net.MalformedURLException: no protocol: -
	at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:390)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:248)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	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: java.net.MalformedURLException: no protocol: -
	at java.net.URL.<init>(URL.java:567)
	at java.net.URL.<init>(URL.java:464)
	at java.net.URL.<init>(URL.java:413)
	at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:749)
	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:145)
	at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
	at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
	at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
	... 12 more
Reply all
Reply to author
Forward
0 new messages