You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Antony Hutchison (Created) (JIRA)" <ji...@apache.org> on 2011/10/04 12:46:33 UTC

[jira] [Created] (FELIX-3146) Using Ehcache with Felix gives an IOException

Using Ehcache with Felix gives an IOException
---------------------------------------------

                 Key: FELIX-3146
                 URL: https://issues.apache.org/jira/browse/FELIX-3146
             Project: Felix
          Issue Type: Bug
          Components: Main
    Affects Versions: framework-4.0.0
         Environment: Win7, JDK 1.6_20
            Reporter: Antony Hutchison


Deploying a bundle which uses Ehcache internally gives java.io.IOException: FakeURLStreamHandler can not be used.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3146) Using Ehcache with Felix gives an IOException

Posted by "Antony Hutchison (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120008#comment-13120008 ] 

Antony Hutchison commented on FELIX-3146:
-----------------------------------------

More information: I'm using felix-framework.4.0.0 bin as downloaded from the website. The only other ticket that seems relevant is FELIX-224, but this is four years old and doesn't seem to be related. I'll upload source / binaries when I figure out how to - they are over 10mb in size.
                
> Using Ehcache with Felix gives an IOException
> ---------------------------------------------
>
>                 Key: FELIX-3146
>                 URL: https://issues.apache.org/jira/browse/FELIX-3146
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-4.0.0
>         Environment: Win7, JDK 1.6_20
>            Reporter: Antony Hutchison
>
> Deploying a bundle which uses Ehcache internally gives java.io.IOException: FakeURLStreamHandler can not be used.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3146) Using Ehcache with Felix gives an IOException

Posted by "Holger Hoffstätte (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120037#comment-13120037 ] 

Holger Hoffstätte commented on FELIX-3146:
------------------------------------------

This won't work. IIRC the EHCache-Terracotta jar has its own bundled dependencies and tries funny things to load classes from bundled jars all by itself.

                
> Using Ehcache with Felix gives an IOException
> ---------------------------------------------
>
>                 Key: FELIX-3146
>                 URL: https://issues.apache.org/jira/browse/FELIX-3146
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-4.0.0
>         Environment: Win7, JDK 1.6_20
>            Reporter: Antony Hutchison
>
> Deploying a bundle which uses Ehcache internally gives java.io.IOException: FakeURLStreamHandler can not be used.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (FELIX-3146) Using Ehcache with Felix gives an IOException

Posted by "Antony Hutchison (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120015#comment-13120015 ] 

Antony Hutchison commented on FELIX-3146:
-----------------------------------------

Files relating to this are available here: https://public.me.com/antonyhutchison 

I've uploaded a .zip with the felix framework and the bundle deployed. Starting this as above will yield the IOException. 

The code is also included as a .zip separately. This was created in CQ5; I've not tried to build it otherwise. Not that it does anything - this code just initialises Ehcache. If you want it as a CQ5 package let me know.

Thanks,
Antony
                
> Using Ehcache with Felix gives an IOException
> ---------------------------------------------
>
>                 Key: FELIX-3146
>                 URL: https://issues.apache.org/jira/browse/FELIX-3146
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-4.0.0
>         Environment: Win7, JDK 1.6_20
>            Reporter: Antony Hutchison
>
> Deploying a bundle which uses Ehcache internally gives java.io.IOException: FakeURLStreamHandler can not be used.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3146) Using Ehcache with Felix gives an IOException

Posted by "Antony Hutchison (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120052#comment-13120052 ] 

Antony Hutchison commented on FELIX-3146:
-----------------------------------------

Yes it doesn't work. It appears to be using some sort of hack for Equinox, but it was suggested that I raise an issue here and on the Terracotta JIRA system too : https://jira.terracotta.org/jira/browse/CDV-1547 

I hope the ticket information will help others who hit this problem, and that the files are useful to either the Felix team or the Ehcache developers in finding a viable solution. 
                
> Using Ehcache with Felix gives an IOException
> ---------------------------------------------
>
>                 Key: FELIX-3146
>                 URL: https://issues.apache.org/jira/browse/FELIX-3146
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-4.0.0
>         Environment: Win7, JDK 1.6_20
>            Reporter: Antony Hutchison
>
> Deploying a bundle which uses Ehcache internally gives java.io.IOException: FakeURLStreamHandler can not be used.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3146) Using Ehcache with Felix gives an IOException

Posted by "Antony Hutchison (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120006#comment-13120006 ] 

Antony Hutchison commented on FELIX-3146:
-----------------------------------------

I get this response when starting Felix with the bundle deployed:


D:\felix-framework-4.0.0>java -jar bin\felix.jar
____________________________
Welcome to Apache Felix Gogo

g! SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.StandaloneTerracottaClusteredInstanceFactory. Initial cause was null
        at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:109)
        at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:178)
        at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:199)
        at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:151)
        at net.sf.ehcache.CacheManager.init(CacheManager.java:345)
        at net.sf.ehcache.CacheManager.<init>(CacheManager.java:300)
        at antonyh.poc.ehcache.Activator.start(Activator.java:28)
        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:641)
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:1977)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1895)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
        at net.sf.ehcache.terracotta.StandaloneTerracottaClusteredInstanceFactory.<init>(StandaloneTerracottaClusteredInstanceFactory.java:37)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:92)
        ... 12 more
Caused by: java.lang.RuntimeException: java.io.IOException: FakeURLStreamHandler can not be used!
        at org.terracotta.express.ClientFactoryImpl.<init>(ClientFactoryImpl.java:112)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance0(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at org.terracotta.express.Util.getImplInstance(Util.java:11)
        at org.terracotta.express.ClientFactory.<clinit>(ClientFactory.java:12)
        ... 18 more
Caused by: java.io.IOException: FakeURLStreamHandler can not be used!
        at org.apache.felix.framework.FakeURLStreamHandler.openConnection(FakeURLStreamHandler.java:39)
        at java.net.URL.openConnection(Unknown Source)
        at java.net.URL.openStream(Unknown Source)
        at org.terracotta.express.ClientFactoryImpl.<init>(ClientFactoryImpl.java:81)
        ... 26 more

g!
g! gosh: stopping framework

D:\felix-framework-4.0.0>

                
> Using Ehcache with Felix gives an IOException
> ---------------------------------------------
>
>                 Key: FELIX-3146
>                 URL: https://issues.apache.org/jira/browse/FELIX-3146
>             Project: Felix
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: framework-4.0.0
>         Environment: Win7, JDK 1.6_20
>            Reporter: Antony Hutchison
>
> Deploying a bundle which uses Ehcache internally gives java.io.IOException: FakeURLStreamHandler can not be used.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira