java ant task hangs after adding documents to exist database

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

java ant task hangs after adding documents to exist database

Jakob Fix-2
Hello,

I have the following snippet in my ant buildfile which until my recent
update to eXist-snapshot-20050805.jar worked fine:

<java fork="true" jar=".\lib\exist/start.jar">
  <jvmarg value="-Xms16000k"/>
  <jvmarg value="-Xmx256000k"/>
  <jvmarg value="-Dexist.home=.\lib\exist"/>
  <arg value="client"/>
  <arg value="-l"/>
  <arg line="-m /db/bv/nr216/nr216_05/doc"/>
  <arg line="-p ${dir.data}/bv/nr216/nr216_05/doc"/>
</java>

The following shows the last entries in the ant log file.  Apparently,
eXist doesn't hand control back to ant, and the build hangs.  Has
anything changed recently that could be the reason for this?

Also, I didn't use the eXist ant tasks because at the time they didn't
seem to work.  Are they now in a usable state, if the purpose is to
simply add documents to the database?

Thanks in advance,
Jakob.

PS: Java version: 1.4.2_04

[java] storing document n000100070003.xml (37 of 37) ...13 Oct 2005
16:40:32,531 [main] DEBUG (Collection.java
[determineTreeStructure]:1007) - checking document n000100070003.xml
[java] 13 Oct 2005 16:40:32,531 [main] DEBUG (Collection.java
[store]:768) - storing document 306; n000100070003.xml ...
[java] 13 Oct 2005 16:40:32,562 [main] DEBUG (Collection.java
[store]:780) - document stored.
[java] done.
[java] parsing 14346 bytes took 31ms.

[java] parsed 650722 bytes in 1922ms.
[java] shutting down database...
[java] 13 Oct 2005 16:40:32,562 [main] DEBUG (SyncDaemon.java
[shutDown]:320) - shutting down sync thread
[java] 13 Oct 2005 16:40:32,562 [main] DEBUG (BrokerPool.java
[shutdown]:696) - calling shutdown ...
[java] 13 Oct 2005 16:40:32,562 [Thread-2] DEBUG (SyncDaemon.java
[run]:384) - exiting
[java] 13 Oct 2005 16:40:32,578 [main] INFO  (BTree.java
[printStatistics]:1759) - words.dbx INDEX 64 / 34 / 62468 / 2
[java] 13 Oct 2005 16:40:32,578 [main] INFO  (BFile.java
[printStatistics]:403) - words.dbx DATA 64 / 63 / 26272 / 296
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (NativeBroker.java
[sync]:2806) - Memory: 15936K total; 254080K max; 10977K free
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (BTree.java
[printStatistics]:1759) - collections.dbx INDEX 64 / 3 / 527 / 3
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (BFile.java
[printStatistics]:403) - collections.dbx DATA 64 / 4 / 168 / 2
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (BTree.java
[printStatistics]:1759) - elements.dbx INDEX 64 / 3 / 7747 / 1
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (BFile.java
[printStatistics]:403) - elements.dbx DATA 64 / 63 / 3885 / 17
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (BTree.java
[printStatistics]:1759) - values.dbx INDEX 64 / 0 / 0 / 0
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (BFile.java
[printStatistics]:403) - values.dbx DATA 64 / 0 / 0 / 0
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (BTree.java
[printStatistics]:1759) - dom.dbx INDEX 64 / 4 / 464 / 3
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (DOMFile.java
[printStatistics]:1169) - dom.dbx DATA 256 / 166 / 34033 / 1
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (BTree.java
[printStatistics]:1759) - values-by-qname.dbx INDEX 64 / 0 / 0 / 0
[java] 13 Oct 2005 16:40:32,640 [main] INFO  (BFile.java
[printStatistics]:403) - values-by-qname.dbx DATA 64 / 0 / 0 / 0
[java] 13 Oct 2005 16:40:32,734 [main] DEBUG (BrokerPool.java
[shutdown]:716) - shutdown!
[java] 13 Oct 2005 16:40:32,734 [main] DEBUG (BrokerPool.java
[shutdown]:720) - removing shutdown hook


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: java ant task hangs after adding documents to exist database

Wolfgang Meier-2
Hi Jakob,

> I have the following snippet in my ant buildfile which until my recent
> update to eXist-snapshot-20050805.jar worked fine:
>
> <java fork="true" jar=".\lib\exist/start.jar">
>   <jvmarg value="-Xms16000k"/>
>   <jvmarg value="-Xmx256000k"/>
>   <jvmarg value="-Dexist.home=.\lib\exist"/>
>   <arg value="client"/>
>   <arg value="-l"/>
>   <arg line="-m /db/bv/nr216/nr216_05/doc"/>
>   <arg line="-p ${dir.data}/bv/nr216/nr216_05/doc"/>
> </java>
>
> The following shows the last entries in the ant log file.  Apparently,
> eXist doesn't hand control back to ant, and the build hangs.  Has
> anything changed recently that could be the reason for this?

I have my doubts if this is really eXist's fault. You set fork="true", so the
client is running in its own process. I made a quick search for System.exit
in the source code, but couldn't find a relevant one. And even if System.exit
got called from within eXist, it shouldn't kill Ant.

> Also, I didn't use the eXist ant tasks because at the time they didn't
> seem to work.  Are they now in a usable state, if the purpose is to
> simply add documents to the database?

I can confirm they work, at least for uploading a larger number of documents
and resources.

Wolfgang


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Fwd: java ant task hangs after adding documents to exist database

Jakob Fix-2
[sorry, this went to Wolfgang only]

---------- Forwarded message ----------
From: Jakob Fix <[hidden email]>
Date: 14-Oct-2005 16:20
Subject: Re: [Exist-open] java ant task hangs after adding documents
to exist database
To: [hidden email]


Hi Wolfgang,

On 13/10/05, Wolfgang Meier <[hidden email]> wrote:
> Hi Jakob,
>
> I have my doubts if this is really eXist's fault. You set fork="true", so the
> client is running in its own process. I made a quick search for System.exit
> in the source code, but couldn't find a relevant one. And even if System.exit
> got called from within eXist, it shouldn't kill Ant.

I just tried with fork="false", and this is what I get:

D:\dy\build.xml:59: Following error occured while executing this line
D:\dy\data\build-bv-nr216-nr216_05.xml:307: Cannot execute a jar in
non-forked mode. Please set fork='true'.

Ooops.

Not sure if this is useful, but this is the stacktrace I get when
Ctrl+C'ing the process:

[java] java.lang.reflect.InvocationTargetException
[java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java]     at java.lang.reflect.Method.invoke(Method.java:324)
[java]     at org.apache.tools.ant.taskdefs.ProcessDestroyer.removeShutdownHook(ProcessDestroyer.java:116)
[java]     at org.apache.tools.ant.taskdefs.ProcessDestroyer.remove(ProcessDestroyer.java:186)
[java]     at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
[java]     at org.apache.tools.ant.taskdefs.Java.fork(Java.java:702)
[java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:161)
[java]     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:77)
[java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[java]     at org.apache.tools.ant.Task.perform(Task.java:364)
[java]     at org.apache.tools.ant.Target.execute(Target.java:301)
[java]     at org.apache.tools.ant.Target.performTasks(Target.java:328)
[java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[java]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
[java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[java]     at org.apache.tools.ant.Task.perform(Task.java:364)
[java]     at org.apache.tools.ant.Target.execute(Target.java:301)
[java]     at org.apache.tools.ant.Target.performTasks(Target.java:328)
[java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[java]     at org.apache.tools.ant.Main.runBuild(Main.java:632)
[java]     at org.apache.tools.ant.Main.startAnt(Main.java:183)
[java]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
[java]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
[java] Caused by: java.lang.IllegalStateException: Shutdown in progress
[java]     at java.lang.Shutdown.remove(Shutdown.java:102)
[java]     at java.lang.Runtime.removeShutdownHook(Runtime.java:218)
[java]     ... 26 more
[java] Java Result: 1
[java] java.lang.reflect.InvocationTargetException
[java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java]     at java.lang.reflect.Method.invoke(Method.java:324)
[java]     at org.apache.tools.ant.taskdefs.ProcessDestroyer.addShutdownHook(ProcessDestroyer.java:98)
[java]     at org.apache.tools.ant.taskdefs.ProcessDestroyer.add(ProcessDestroyer.java:166)
[java]     at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:476)
[java]     at org.apache.tools.ant.taskdefs.Java.fork(Java.java:702)
[java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:161)
[java]     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:77)
[java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[java]     at org.apache.tools.ant.Task.perform(Task.java:364)
[java]     at org.apache.tools.ant.Target.execute(Target.java:301)
[java]     at org.apache.tools.ant.Target.performTasks(Target.java:328)
[java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[java]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
[java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[java]     at org.apache.tools.ant.Task.perform(Task.java:364)
[java]     at org.apache.tools.ant.Target.execute(Target.java:301)
[java]     at org.apache.tools.ant.Target.performTasks(Target.java:328)
[java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[java]     at org.apache.tools.ant.Main.runBuild(Main.java:632)
[java]     at org.apache.tools.ant.Main.startAnt(Main.java:183)
[java]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
[java]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
[java] Caused by: java.lang.IllegalStateException: Shutdown in progress
[java]     at java.lang.Shutdown.add(Shutdown.java:79)
[java]     at java.lang.Runtime.addShutdownHook(Runtime.java:190)
[java]     ... 26 more
Terminate batch job (Y/N)?

--
cheers,
Jakob.


--
cheers,
Jakob.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open