java.net.MalformedURLException: invalid character, '#', in URL name

View: New views
2 Messages — Rating Filter:   Alert me  

java.net.MalformedURLException: invalid character, '#', in URL name

by Ray Auge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We recently upgraded to ehcache 1.5.0 and are now getting this error on starting with cluster config:


SEVERE: Servlet  threw load() exception
java.net.MalformedURLException: invalid character, '#', in URL name: //192.168.0.249:37042/com.liferay.portal.kernel.dao.orm.FinderCache#com.liferay.portal.model.Company
	at java.rmi.Naming.parseURL(Naming.java:222)
	at java.rmi.Naming.rebind(Naming.java:154)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.bind(RMICacheManagerPeerListener.java:230)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:511)
	at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:156)
	at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:720)
	at net.sf.ehcache.CacheManager.addCache(CacheManager.java:697)
	at net.sf.ehcache.CacheManager.addCache(CacheManager.java:634)
	at com.liferay.portal.cache.EhcachePortalCacheManager.getCache(EhcachePortalCacheManager.java:75)
	at com.liferay.portal.cache.MultiVMPoolImpl.getCache(MultiVMPoolImpl.java:61)
        ...

Anyone ever seen this before?

Ray


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
ehcache-list mailing list
ehcache-list@...
https://lists.sourceforge.net/lists/listinfo/ehcache-list

Re: java.net.MalformedURLException: invalid character, '#', in URL name

by gregluck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ray

# is definitely an illegal character in Naming.java

From the URL javadoc:

       The syntax of URL is defined by RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax, amended by RFC 2732: Format for Literal IPv6 Addresses in URLs. The Literal IPv6 address format also supports scope_ids. The syntax and usage of scope_ids is described here.

A URL may have appended to it a "fragment", also known as a "ref" or a "reference". The fragment is indicated by the sharp sign character "#" followed by more characters. For example,

       http://java.sun.com/index.html#chapter1
Now, the issue is being caused by the use of #. I don't think anything should have changed between versions of ehcache, because this is JDK code.

The fix is in your app is to avoid #. The ehcache fix would be to escape illegal characters. Let me know what you think.

On 18/02/2009, at 1:29 AM, Ray Auge wrote:

We recently upgraded to ehcache 1.5.0 and are now getting this error on starting with cluster config:


SEVERE: Servlet  threw load() exception
java.net.MalformedURLException: invalid character, '#', in URL name: //192.168.0.249:37042/com.liferay.portal.kernel.dao.orm.FinderCache#com.liferay.portal.model.Company
	at java.rmi.Naming.parseURL(Naming.java:222)
	at java.rmi.Naming.rebind(Naming.java:154)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.bind(RMICacheManagerPeerListener.java:230)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:511)
	at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:156)
	at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:720)
	at net.sf.ehcache.CacheManager.addCache(CacheManager.java:697)
	at net.sf.ehcache.CacheManager.addCache(CacheManager.java:634)
	at com.liferay.portal.cache.EhcachePortalCacheManager.getCache(EhcachePortalCacheManager.java:75)
	at com.liferay.portal.cache.MultiVMPoolImpl.getCache(MultiVMPoolImpl.java:61)
        ...

Anyone ever seen this before?

Ray

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com_______________________________________________
ehcache-list mailing list
ehcache-list@...
https://lists.sourceforge.net/lists/listinfo/ehcache-list


------------------------------------------------------------------------------

_______________________________________________
ehcache-list mailing list
ehcache-list@...
https://lists.sourceforge.net/lists/listinfo/ehcache-list