java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/SYSTEMi/Systemi/webapp/WEB-INF/lib/ms-bcm-ecp-intg.jar

Hibernate JIRA | pushpak | 2 years ago
  1. 0

    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'msQmsFlowDownOrgVDaoHome': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ecpEntityManager' defined in URL [jar:file:/C:/SYSTEMi/Systemi/webapp/WEB-INF/lib/ms-bcm-ecp-intg.jar!/spring-config/ecp/applicationContext-ecp-config.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/SYSTEMi/Systemi/webapp/WEB-INF/lib/ms-bcm-ecp-intg.jar at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:342) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ecpEntityManager' defined in URL [jar:file:/C:/SYSTEMi/Systemi/webapp/WEB-INF/lib/ms-bcm-ecp-intg.jar!/spring-config/ecp/applicationContext-ecp-config.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/SYSTEMi/Systemi/webapp/WEB-INF/lib/ms-bcm-ecp-intg.jar at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.orm.jpa.EntityManagerFactoryUtils.findEntityManagerFactory(EntityManagerFactoryUtils.java:99) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:511) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:493) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:657) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:630) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:150) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:339) ... 28 more Caused by: java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/SYSTEMi/Systemi/webapp/WEB-INF/lib/ms-bcm-ecp-intg.jar at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:854) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:596) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:268) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) ... 42 more Caused by: org.hibernate.AssertionFailure: Cannot read files twice on NativeScanner at org.hibernate.ejb.packaging.NativeScanner.getFilesInJar(NativeScanner.java:166) at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:503) at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:851) ... 48 more

    Hibernate JIRA | 2 years ago | pushpak
    java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/SYSTEMi/Systemi/webapp/WEB-INF/lib/ms-bcm-ecp-intg.jar
  2. 0

    The "Find-the-entities-yourself"-Feature doesn't work with OC4J, since walking over the jar fails. This is similar to #174, but the problem is not in JarVisitor, but in org.jboss.util.file.ArchiveBrowser.getBrowser: When deploying to OC4J, the Jar URLs start with "code-source" instead of "file" (See PU root URL below for example). Hence the Archive-Browser throws a RuntimeException. Solution should be similar as in #174. 2007-04-01 22:13:38,390 DEBUG Ejb3Configuration - Processing PersistenceUnitInfo [ name: MyService persistence provider classname: org.hibernate.ejb.HibernatePersistence classloader: mis_client.web.mis_client:0.0.0 Temporary classloader: org.springframework.instrument.classloading.SimpleThrowawayClassLoader@106ef07 excludeUnlistedClasses: false JTA datasource: null Non JTA datasource: org.springframework.jdbc.datasource.DriverManagerDataSource@36eb76 Transaction type: RESOURCE_LOCAL PU root URL: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/ Jar files URLs [] Managed classes names [] Mapping files names [] Properties [] java.lang.RuntimeException: error trying to scan <jar-file>: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/ at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:635) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126) ... Caused by: java.lang.RuntimeException: Archive browser cannot handle protocol: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/ at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:93) Regards, Roman

    Hibernate JIRA | 10 years ago | Roman Legat
    java.lang.RuntimeException: error trying to scan <jar-file>: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
  3. 0

    [EJB-283] Ejb3Configuration can't read Jar file OC4J - Hibernate JIRA

    atlassian.net | 7 months ago
    java.lang.RuntimeException: error trying to scan <jar-file>: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [EJB-283] Ejb3Configuration can't read Jar file OC4J - Hibernate JIRA

    atlassian.net | 1 year ago
    java.lang.RuntimeException: error trying to scan <jar-file>: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
  6. 0

    The "Find-the-entities-yourself"-Feature doesn't work with OC4J, since walking over the jar fails. This is similar to #174, but the problem is not in JarVisitor, but in org.jboss.util.file.ArchiveBrowser.getBrowser: When deploying to OC4J, the Jar URLs start with "code-source" instead of "file" (See PU root URL below for example). Hence the Archive-Browser throws a RuntimeException. Solution should be similar as in #174. 2007-04-01 22:13:38,390 DEBUG Ejb3Configuration - Processing PersistenceUnitInfo [ name: MyService persistence provider classname: org.hibernate.ejb.HibernatePersistence classloader: mis_client.web.mis_client:0.0.0 Temporary classloader: org.springframework.instrument.classloading.SimpleThrowawayClassLoader@106ef07 excludeUnlistedClasses: false JTA datasource: null Non JTA datasource: org.springframework.jdbc.datasource.DriverManagerDataSource@36eb76 Transaction type: RESOURCE_LOCAL PU root URL: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/ Jar files URLs [] Managed classes names [] Mapping files names [] Properties [] java.lang.RuntimeException: error trying to scan <jar-file>: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/ at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:635) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126) ... Caused by: java.lang.RuntimeException: Archive browser cannot handle protocol: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/ at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:93) Regards, Roman

    Hibernate JIRA | 10 years ago | Roman Legat
    java.lang.RuntimeException: error trying to scan <jar-file>: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/

    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.RuntimeException

      error trying to scan <jar-file>: file:/C:/SYSTEMi/Systemi/webapp/WEB-INF/lib/ms-bcm-ecp-intg.jar

      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues()
    2. Spring ORM
      PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues
      1. org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:342)
      1 frame
    3. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      4. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
      5. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
      6. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
      7. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      8. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
      8 frames
    4. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
      2 frames
    5. Spring
      ContextLoaderListener.contextInitialized
      1. org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
      2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
      3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
      3 frames
    6. Glassfish Core
      Catalina.start
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
      3. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      4. org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
      5. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      6. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
      7. org.apache.catalina.core.StandardService.start(StandardService.java:519)
      8. org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      9. org.apache.catalina.startup.Catalina.start(Catalina.java:581)
      9 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    8. Glassfish Core
      Bootstrap.main
      1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
      2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      2 frames