Re: Weird: DeploymentConfiguratorTst fails only with HSQLDB

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sat Mar 15 2003 - 13:48:04 EST

  • Next message: Holger Hoffstätte: "Re: Weird: DeploymentConfiguratorTst fails (not) only with HSQLDB"

    Are you running an "in-process" HSQLDB? Wonder if this might be locking
    the JAR somehow. I added this test case since on one of my projects
    developers had similar locking problem when doing ant deployment on
    Windows. It turned out that the problem was that the target jar was
    used by the running container (and JVM locked the jar).

    Also I just tried it with HSQL running on a remote linux box, and
    Cayenne on Windows machine. Everything works without a glitch. So maybe
    you can just disable this particular test case run for HSQL? Look at
    DatabaseSetupDelegate under tests, this may be the place to do such
    checks.

    Andrus

    On Friday, March 14, 2003, at 09:46 PM, Holger Hoffstätte wrote:

    >
    > I've been running unit tests against HSQLDB since it's so fast, but get
    > the following error (also got it before I made any changes, so it's
    > unrelated to anything I did). The weird thing is that this is
    > repeatable,
    > but passes OK when running against PostgreSQL or MySQL. The files in
    > question were not opened by external editors etc. - Andrus, do you have
    > any idea what might be causing this?
    >
    > <testcase name="testSameJar" time="0.032">
    > <error message="Error generating classes."
    > type="org.apache.tools.ant.BuildException">Error generating classes.
    > at
    > org.objectstyle.cayenne.tools.DeploymentConfigurator.execute(Deployment
    > Configurator.java:102)
    > at
    > org.objectstyle.cayenne.tools.DeploymentConfiguratorTst.testSameJar(Dep
    > loymentConfiguratorTst.java:200)
    > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    > at
    > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
    > va:39)
    > at
    > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
    > rImpl.java:25)
    > Caused by: org.objectstyle.cayenne.project.ProjectException: Error
    > performing reconfiguration.
    > at
    > org.objectstyle.cayenne.project.ProjectConfigurator.execute(ProjectConf
    > igurator.java:117)
    > at
    > org.objectstyle.cayenne.tools.DeploymentConfigurator.processProject(Dep
    > loymentConfigurator.java:150)
    > at
    > org.objectstyle.cayenne.tools.DeploymentConfigurator.execute(Deployment
    > Configurator.java:99)
    > ... 25 more
    > Caused by: java.io.IOException: Can&apos;t delete old jar file:
    > C:\home\holger\Projects\eclipseWorkspace\cayenne\testrun\cdeploy\test4\
    > test-out.jar
    > at
    > org.objectstyle.cayenne.project.ProjectConfigurator.execute(ProjectConf
    > igurator.java:108)
    > ... 27 more
    > --- Nested Exception ---
    > org.objectstyle.cayenne.project.ProjectException: Error performing
    > reconfiguration.
    > at
    > org.objectstyle.cayenne.project.ProjectConfigurator.execute(ProjectConf
    > igurator.java:117)
    > at
    > org.objectstyle.cayenne.tools.DeploymentConfigurator.processProject(Dep
    > loymentConfigurator.java:150)
    > at
    > org.objectstyle.cayenne.tools.DeploymentConfigurator.execute(Deployment
    > Configurator.java:99)
    > at
    > org.objectstyle.cayenne.tools.DeploymentConfiguratorTst.testSameJar(Dep
    > loymentConfiguratorTst.java:200)
    > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    > at
    > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
    > va:39)
    > at
    > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
    > rImpl.java:25)
    > Caused by: java.io.IOException: Can&apos;t delete old jar file:
    > C:\home\holger\Projects\eclipseWorkspace\cayenne\testrun\cdeploy\test4\
    > test-out.jar
    > at
    > org.objectstyle.cayenne.project.ProjectConfigurator.execute(ProjectConf
    > igurator.java:108)
    > ... 27 more
    >



    This archive was generated by hypermail 2.0.0 : Sat Mar 15 2003 - 13:51:31 EST