java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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>
    via by Colin Smiley,
  • 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>
    via by Colin Smiley,
  • Error: repeated Interface
    via GitHub by pherklotz
    ,
  • GitHub comment 286#221438063
    via GitHub by bjchambers
    ,
    • 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)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,