java.lang.IllegalArgumentException: interface org.springframework.osgi.service.importer.ImportedOsgiServiceProxy is not visible from class loader

Spring JIRA | Colin Smiley | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When using Spring OSGi 1.2 with Knopflerfish 2.3.2 dependency injection fails with the following exception (the code works with Knopflerfish 2.2.0): SpringOsgiExtenderThread-4 WARN [org.springframework.beans.factory.support.DefaultListableBeanFactory] - FactoryBean threw exception from getObjectType, despite the contract saying that it should return null if the type of its object cannot be determined yet java.lang.IllegalArgumentException: interface org.springframework.osgi.service.importer.ImportedOsgiServiceProxy is not visible from class loader at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353) at org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean.getObjectType(OsgiServiceProxyFactoryBean.java:147) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBean(FactoryBeanRegistrySupport.java:55) at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:419) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:223) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:424) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1100(AbstractDelegatedExecutionApplicationContext.java:69) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:331) at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136) at java.lang.Thread.run(Thread.java:619) You can replicate the problem in the Spring simple-service sample code by adding the following to the SimpleServiceBundleTest.java: private MyService myService; public MyService getMyService() { return myService; } public void setMyService(MyService myService) { this.myService = myService; } public void testSimpleServiceInjected() { waitOnContextCreation("org.springframework.osgi.samples.simpleservice"); assertEquals("simple service at your service", myService.stringValue()); } protected String[] getConfigLocations() { return new String[] {"META-INF/spring/simpleservice-osgi-ref.xml"}; } And creating a src/test/resources/META-INF/spring/simpleservice-osgi-ref.xml containing: <?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:osgi="http://www.springframework.org/schema/osgi" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd"> <!-- Export the simpleService bean (defined in a separate config file in this case) as an OSGi service --> <osgi:reference id="simpleServiceOsgi" interface="org.springframework.osgi.samples.simpleservice.MyService" /> </beans>

    Spring JIRA | 8 years ago | Colin Smiley
    java.lang.IllegalArgumentException: interface org.springframework.osgi.service.importer.ImportedOsgiServiceProxy is not visible from class loader
  2. 0

    When using Spring OSGi 1.2 with Knopflerfish 2.3.2 dependency injection fails with the following exception (the code works with Knopflerfish 2.2.0): SpringOsgiExtenderThread-4 WARN [org.springframework.beans.factory.support.DefaultListableBeanFactory] - FactoryBean threw exception from getObjectType, despite the contract saying that it should return null if the type of its object cannot be determined yet java.lang.IllegalArgumentException: interface org.springframework.osgi.service.importer.ImportedOsgiServiceProxy is not visible from class loader at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353) at org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean.getObjectType(OsgiServiceProxyFactoryBean.java:147) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBean(FactoryBeanRegistrySupport.java:55) at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:419) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:223) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:424) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1100(AbstractDelegatedExecutionApplicationContext.java:69) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:331) at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136) at java.lang.Thread.run(Thread.java:619) You can replicate the problem in the Spring simple-service sample code by adding the following to the SimpleServiceBundleTest.java: private MyService myService; public MyService getMyService() { return myService; } public void setMyService(MyService myService) { this.myService = myService; } public void testSimpleServiceInjected() { waitOnContextCreation("org.springframework.osgi.samples.simpleservice"); assertEquals("simple service at your service", myService.stringValue()); } protected String[] getConfigLocations() { return new String[] {"META-INF/spring/simpleservice-osgi-ref.xml"}; } And creating a src/test/resources/META-INF/spring/simpleservice-osgi-ref.xml containing: <?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:osgi="http://www.springframework.org/schema/osgi" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd"> <!-- Export the simpleService bean (defined in a separate config file in this case) as an OSGi service --> <osgi:reference id="simpleServiceOsgi" interface="org.springframework.osgi.samples.simpleservice.MyService" /> </beans>

    Spring JIRA | 8 years ago | Colin Smiley
    java.lang.IllegalArgumentException: interface org.springframework.osgi.service.importer.ImportedOsgiServiceProxy is not visible from class loader
  3. 0

    How to configure JBoss 7.1.1 with hibernate 4.1 and Envers 4.1?

    Stack Overflow | 5 years ago | Lukasz Zuchowski
    java.lang.IllegalArgumentException: interface org.hibernate.annotations.Columns is not visible from class loader
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [jboss-user] [EJB/JBoss] - interface javax.ejb.EJBLocalObject is not visible from class - javierdac - org.jboss.lists.jboss-user - MarkMail

    markmail.org | 1 year ago
    java.lang.IllegalArgumentException: interface javax.ejb.EJBLocalObject is not vi sible from class loader
  6. 0

    NetBeans Forums - not visible from class loader exception

    netbeans.org | 1 year ago
    java.lang.IllegalArgumentException: interface com.caucho.burlap.io.BurlapRemoteObject is not visible from class loader

    3 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. java.lang.IllegalArgumentException

      interface org.springframework.osgi.service.importer.ImportedOsgiServiceProxy is not visible from class loader

      at java.lang.reflect.Proxy.getProxyClass()
    2. Java RT
      Proxy.getProxyClass
      1. java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
      1 frame
    3. Spring OSGi Core
      OsgiServiceProxyFactoryBean.getObjectType
      1. org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean.getObjectType(OsgiServiceProxyFactoryBean.java:147)
      1 frame
    4. Spring Beans
      DefaultListableBeanFactory.getBeanNamesForType
      1. org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBean(FactoryBeanRegistrySupport.java:55)
      2. org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:419)
      3. org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:223)
      3 frames
    5. Spring OSGi Core
      AbstractDelegatedExecutionApplicationContext.completeRefresh
      1. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:424)
      2. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1100(AbstractDelegatedExecutionApplicationContext.java:69)
      3. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:331)
      4. org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
      5. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
      5 frames
    6. org.springframework.osgi
      DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run
      1. org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
      1 frame
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame