openjpip-server will likely crash in some obscure way if you provide improper JP2 file.
To produce proper JPIP compatible JP2 file, simply use:
$ image_to_j2k -i copenhague1.tif -o copenhague1.jp2 -p RPCL -c [64,64] -t 640,480 -jpip -TP R
Note:
-jpip Embed index table box into the output JP2 file (compulsory for JPIP)
-TP R Partition a tile into tile parts of different resolution levels (compulsory for JPT-stream)
Warning: -jpip option is really important it adds the cidx/fidx superbox to the
file. Without this information, openjpip server will simply crash on your input
file. Make sure all file accessible from within openjpip server have cidx/fidx
superbox. At the time of writing, kakadu does not support generating cidx/fidx
superbox
See also Annex I Indexing JPEG 2000 files for JPIP, p90:
http://www.jpeg.org/public/fcd15444-9v2.pdf
(Optional) Embed metadata into JP2 file
$ addXMLinJP2 copenhague1.jp2 copenhague1.xml
Input metadata file "copenhague1.xml" looks like:
-- Mathieu Malaterre Fri, 20 Apr 2012 11:45:07 +0200