org.springframework.beans.factory.BeanCreationException

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.

  • Cannot start MarketDataStarter
    via by Tamas Jozsa,
  • Here is a snippet of my security config file showing my declaration of the JaasAuthenticationProvider: <b:bean id="jaasAuthenticationProvider" class="org.springframework.security.authentication.jaas.JaasAuthenticationProvider"> <b:property name="loginConfig" value="classpath:auth.conf" /> ... </b:bean> Here is the exception thrown when starting up the application: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaasAuthenticationProvider' defined in class path resource [applicationContext-security.xml]: Invocation of init method failed; nested exception is java.io.IOException: File resolution not supported for nested resource: ZipEntryHandler@30251001[path=application.ear/application-main-4.5.0.jar/auth.conf context=file:/C:/tools/jboss-5.1.0.GA/server/default/deploy/ real=file:/C:/tools/jboss-5.1.0.GA/server/default/deploy/application.ear/application-main-4.5.0.jar/auth.conf] at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:389) Digging through the Spring code, I found that the exception is being thrown from the getFile() method of VfsUtils, which is called from VfsResource.getFile(). Apparently under JBoss, the classpath resource is resolved to a VfsResource. The first line of the method JaasAuthenticationProvider.convertLoginConfigToUrl() calls loginConfig.getFile().getAboslutePath(). Looking at the code in VfsUtils, it appears that the version of the JBoss VFS used with JBoss 5 doesn't support the getFile() method, and throws the IOException noted above. Even if it weren't for this problem, the code in JaasAuthenticationProvider.convertLoginConfigToUrl() appears to assume that the loginConfig is a file in the file system. Any other type of resource looks as though it would not work. To test this theory, I wrote a subclass of JaasAuthenticationProvider, and replaced the convertLoginConfigToUrl method with the following code: private String convertLoginConfigToUrl() throws IOException { return getLoginConfig().getURL().toString(); } This solved my problem.
    via by Morley Howell,
  • Here is a snippet of my security config file showing my declaration of the JaasAuthenticationProvider: <b:bean id="jaasAuthenticationProvider" class="org.springframework.security.authentication.jaas.JaasAuthenticationProvider"> <b:property name="loginConfig" value="classpath:auth.conf" /> ... </b:bean> Here is the exception thrown when starting up the application: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaasAuthenticationProvider' defined in class path resource [applicationContext-security.xml]: Invocation of init method failed; nested exception is java.io.IOException: File resolution not supported for nested resource: ZipEntryHandler@30251001[path=application.ear/application-main-4.5.0.jar/auth.conf context=file:/C:/tools/jboss-5.1.0.GA/server/default/deploy/ real=file:/C:/tools/jboss-5.1.0.GA/server/default/deploy/application.ear/application-main-4.5.0.jar/auth.conf] at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:389) Digging through the Spring code, I found that the exception is being thrown from the getFile() method of VfsUtils, which is called from VfsResource.getFile(). Apparently under JBoss, the classpath resource is resolved to a VfsResource. The first line of the method JaasAuthenticationProvider.convertLoginConfigToUrl() calls loginConfig.getFile().getAboslutePath(). Looking at the code in VfsUtils, it appears that the version of the JBoss VFS used with JBoss 5 doesn't support the getFile() method, and throws the IOException noted above. Even if it weren't for this problem, the code in JaasAuthenticationProvider.convertLoginConfigToUrl() appears to assume that the loginConfig is a file in the file system. Any other type of resource looks as though it would not work. To test this theory, I wrote a subclass of JaasAuthenticationProvider, and replaced the convertLoginConfigToUrl method with the following code: private String convertLoginConfigToUrl() throws IOException { return getLoginConfig().getURL().toString(); } This solved my problem.
    via by Morley Howell,
  • OpenNMS / Mailing Lists
    via by Unknown author,
  • OpenNMS / Mailing Lists
    via by Unknown author,
  • OpenNMS / Mailing Lists
    via by Unknown author,
  • OpenNMS / Mailing Lists
    via by Unknown author,
    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'TransactionService' defined in class path resource [applicationContext-export-remoteServices.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: internal error: ObjID already in use**** at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:389)

    Users with the same issue

    rp
    1 times, last one,