Task #10018 (closed)
Opened 7 years ago
Closed 6 years ago
Bug: CLI import doesn't use absolute paths
| Reported by: | bpindelski | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | OMERO-4.4.7 |
| Component: | Client | Version: | n.a. |
| Keywords: | n.a. | Cc: | sbesson, jamoore, jburel |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | n.a. |
| Sprint: | Bugs Fixing |
Description
When doing CLI import testing on gretzky (which has OMERO server in a symlinked directory), the command line import fails when trying to import images from a directory outside the symlink:
omero@gretzky:~/OMERO-CURRENT$ bin/omero import ../De-annotate/Image1.png Previous session expired for user-2 on localhost:4064 Server: [localhost] Username: [user-2] Password: Created session 47226bfc-0452-4413-ad84-fdd29fd6392f (user-2@localhost:4064). Idle timeout: 10.0 min. Current group: read-only-1 2012-12-11 11:10:02,004 0 [ main] INFO ome.formats.importer.ImportConfig - OMERO Version: 4.4.4-474-d36b08d-dirty-ice33-b72 2012-12-11 11:10:02,010 6 [ main] INFO ome.formats.importer.ImportConfig - Bioformats version: 4.5-DEV revision: 404d9d1 date: 11 December 2012 2012-12-11 11:10:02,021 17 [ main] INFO formats.importer.cli.CommandLineImporter - Log levels -- Bio-Formats: ERROR OMERO.importer: INFO 2012-12-11 11:10:02,364 360 [ main] INFO ome.formats.importer.ImportCandidates - Depth: 4 Metadata Level: MINIMUM 2012-12-11 11:10:02,369 365 [ main] ERROR ome.formats.importer.cli.ErrorHandler - UNREADABLE_FILE: /home/omero/slave/workspace/OMERO-merge-develop/src/dist/../De-annotate/Image1.png java.io.FileNotFoundException: /home/omero/slave/workspace/OMERO-merge-develop/src/dist/../De-annotate/Image1.png at ome.formats.importer.ImportCandidates.singleFile(ImportCandidates.java:398) at ome.formats.importer.ImportCandidates.handleFile(ImportCandidates.java:603) at ome.formats.importer.ImportCandidates.execute(ImportCandidates.java:371) at ome.formats.importer.ImportCandidates.<init>(ImportCandidates.java:229) at ome.formats.importer.ImportCandidates.<init>(ImportCandidates.java:180) at ome.formats.importer.cli.CommandLineImporter.<init>(CommandLineImporter.java:82) at ome.formats.importer.cli.CommandLineImporter.main(CommandLineImporter.java:466) 2012-12-11 11:10:02,370 366 [ main] INFO ome.formats.importer.ImportCandidates - 1 file(s) parsed into 0 group(s) with 0 call(s) to setId in 0ms. (6ms total) [0 unknowns] 2012-12-11 11:10:02,519 515 [ main] WARN ome.system.UpgradeCheck - UPGRADE AVAILABLE:Please upgrade to 4.4.5 See http://trac.openmicroscopy.org.uk/omero for the latest version 2012-12-11 11:10:02,627 623 [ main] INFO ome.formats.OMEROMetadataStoreClient - Attempting initial SSL connection to localhost:4064 2012-12-11 11:10:03,315 1311 [ main] INFO ome.formats.OMEROMetadataStoreClient - Insecure connection requested, falling back 2012-12-11 11:10:03,572 1568 [ main] INFO ome.formats.OMEROMetadataStoreClient - Server: 4.4.4 2012-12-11 11:10:03,573 1569 [ main] INFO ome.formats.OMEROMetadataStoreClient - Client: 4.4.4-474-d36b08d-dirty-ice33-b72 2012-12-11 11:10:03,573 1569 [ main] INFO ome.formats.OMEROMetadataStoreClient - Java Version: 1.6.0_20 2012-12-11 11:10:03,573 1569 [ main] INFO ome.formats.OMEROMetadataStoreClient - OS Name: Linux 2012-12-11 11:10:03,573 1569 [ main] INFO ome.formats.OMEROMetadataStoreClient - OS Arch: amd64 2012-12-11 11:10:03,573 1569 [ main] INFO ome.formats.OMEROMetadataStoreClient - OS Version: 2.6.32-24-server No imports found
We should resolve the path to an absolute one before import...
Change History (1)
comment:1 Changed 6 years ago by jmoore
- Cc jburel added
- Resolution set to wontfix
- Sprint set to Bugs Fixing
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
You may also have a look at Agilo extensions to the ticket.
Even with a simple test like this:
10018 moore$ cat Makefile t.java test: t.class cd workspace/server && java -cp ../../ t cd current && java -cp ../../ t t.class : t.java setup javac t.java setup: mkdir -p workspace/server test -e current || ln -s workspace/server current touch workspace/test.txt .PHONY: setup test import java.io.*; import java.util.*; public class t { public static void main(String[] args) { find("../test.txt"); find("../t.java"); } public static void find(String fname) { File f = new File(fname); System.out.println("Looking for " + f.getAbsolutePath()); System.out.println("Exists? " + f.exists()); } }The results are still that "../something" from within the symlink fail:
I'm closing this "wontfix" since symlink handling even if bash is confusing enough, I don't know if we should try attempting to workaround from within Java.