Announcement Announcement Module
Collapse
No announcement yet.
JNLP JPA Spring and Hibernate Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JNLP JPA Spring and Hibernate

    Hello,

    i have a serious problem with my application. when i run it through webstart i got some problems when resolving jars.
    from begining:

    i configured JPA in tis way:
    Code:
        @Bean
        public EntityManagerFactory entityManagerFactory() {
            final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
            em.setDataSource(dataSource);
            em.setJpaVendorAdapter(jpaVendorAdapter());
            em.setPackagesToScan("de.bigmichi1.aquariummanager.model");
            em.setPersistenceUnitName("AQM");
            em.afterPropertiesSet();
            return em.getObject();
        }
    when the code now reaches the point afterPropertiesSet() i got many request to the JnlpDownloadServlet that requests jars without an versionId and so the libraries are not found and everything breaks.
    When running the app locally without webstart everything is working.

    One example:
    the jar aquarium-manager-persistence-0.1-SNAPSHOT.jar is in the lib folder of the server. this jar is loaded when starting the app through webstart, but it is loaded as aquarium-manager-persistence.jar with versionID 0.1-SNAPSHOT.

    i'm using maven3 with spring 3.1.1 and hibernate 4.1.4

    can you please give my a hint how to solve the problem? from my point of view it looks like that PathMatchingResourcePatternResolver#findAllClassPa thResources(String location) is involved in the resolution of the resourceUrls

  • #2
    check your jnlp file : does it has the correct file names ?
    and also : you'll need to define your persistence classes in the persistence.xml :
    classpathscanning does not work in webstart

    Comment


    • #3
      meanwhile i got it working for jnlp and package scanning. the problem here was that using jnlp with downloadservlet and packagescanning dind't work, if using it without the download servlet it works when also creating an INDEX.LIST in my jars. it is not really what i want but it works now

      Comment

      Working...
      X