Issue1221

classification
Title: Django war packaging - Cannot find jarjar.jar when building on Cygwin/Win32
Type: Severity: normal
Components: Any Versions: 2.5b0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: leosoto Nosy List: JohnSJohnM, leosoto
Priority: Keywords:

Created on 2009-01-08.13:13:30 by JohnSJohnM, last changed 2009-03-12.08:29:10 by zyasoft.

Messages
msg4013 (view) Author: JohnSJohnM (JohnSJohnM) Date: 2009-01-08.13:13:29
When building a Django application war file under Cygwin or directly 
under a Win32 terminal the process terminates prematurely complaining 
about not being able to find jarjar.jar:

C:\Development Work\Java\LSE_PublicSite>jython manage.py war --include-
java-lib
=c:\javaclasses\postgresql.jar;c:\javaclasses\antlr.jar

Assembling WAR on c:\docume~1\njps3\locals~1\temp\tmpw3qj2a
\LSE_PublicSite

Copying WAR skeleton...
Copying jython.jar...
Copying jarjar.jar...
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "C:\jython\Lib\site-packages\django\core\management
\__init__.py", line 3
0, in execute_manager
    utility.execute()
  File "C:\jython\Lib\site-packages\django\core\management
\__init__.py", line 2
5, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\jython\Lib\site-packages\django\core\management\base.py", 
line 195,
n run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\jython\Lib\site-packages\django\core\management\base.py", 
line 222,
n execute
    output = self.handle(*args, **options)
  File "C:\jython\Lib\site-packages\django\core\management\base.py", 
line 222,
n execute
    output = self.handle(*args, **options)
  File "C:\jython\Lib\site-packages\doj\management\commands\war.py", 
line 51, i
 handle
    self.copy_jython(exploded_war_dir)
  File "C:\jython\Lib\site-packages\doj\management\commands\war.py", 
line 115,
n copy_jython
    self.copy_java_jar(exploded_war_dir,
  File "C:\jython\Lib\site-packages\doj\management\commands\war.py", 
line 200,
n copy_java_jar
    shutil.copy(java_lib,
  File "C:\jython\Lib\shutil.py", line 85, in copy
    copyfile(src, dst)
  File "C:\jython\Lib\shutil.py", line 51, in copyfile
    fsrc = open(src, 'rb')
IOError: [Errno 2] ENOENT: 'C:\\jython\\javalib\\jarjar.jar'

If the included jarjar-0.7.jar file in jython\javalib is renamed to 
jarjar.jar then the process completes successfully as shown:

C:\Development Work\Java\LSE_PublicSite>jython manage.py war --include-
java-libs
=c:\javaclasses\postgresql.jar;c:\javaclasses\antlr.jar
*sys-package-mgr*: processing modified jar, 'C:\jython\javalib
\jarjar.jar'

Assembling WAR on c:\docume~1\njps3\locals~1\temp\tmpqerq-n
\LSE_PublicSite

Copying WAR skeleton...
Copying jython.jar...
Copying jarjar.jar...
Copying Lib...
Copying django...
Copying adminmedia...
Copying LSE_PublicSite...
Copying media...
Copying doj...
Copying postgresql.jar...
Copying antlr.jar...
Building WAR on C:\Development Work\Java\LSE_PublicSite.war...
Cleaning c:\docume~1\njps3\locals~1\temp\tmpqerq-n...

Finished.

Now you can copy C:\Development Work\Java\LSE_PublicSite.war to 
whatever location your application server wants it.
msg4014 (view) Author: JohnSJohnM (JohnSJohnM) Date: 2009-01-08.13:17:42
Jython r5899, Django r9718 and Django-Jython trunk.
msg4075 (view) Author: Leonardo Soto (leosoto) Date: 2009-01-25.18:04:26
This was caused by a change of the naming of the jars files for the java
dependencies of jython.

Please try the modjy-0.25-integration branch[1] of django-jython. There
I've fixed this problem (but only when jython is checked out of svn) and
testing is always welcomed

[1] http://django-jython.googlecode.com/svn/branches/modjy-0.25-integration
History
Date User Action Args
2009-03-12 08:29:10zyasoftsetstatus: open -> closed
resolution: fixed
2009-01-25 18:04:26leosotosetassignee: leosoto
messages: + msg4075
nosy: + leosoto
2009-01-08 13:17:42JohnSJohnMsetmessages: + msg4014
2009-01-08 13:13:30JohnSJohnMcreate