We're Hiring!

Exception: Java could not be found. (Executable=java)

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Exception: Java could not be found. (Executable=java)

Postby jwarren » Mon Jul 21, 2014 4:25 pm

Hi

when running the python script I've written based on https://github.com/openmicroscopy/openm ... g_setup.sh
import example it works for a few minutes loading a few hundred images and then gives me a "Exception: Java could not be found. (Executable=java)" error? is this to do with sessions timeout (although I'm pretty sure thats set to 10minutes and it doesn't go 10 minutes)? If I start it up again it runs past the "problem file" just fine. How do I get around this?

error log below:

Code: Select all
['import', '-d', '52', '--debug', 'DEBUG', u'/Users/jwarren/images/impc/ICS/ICS_001/IMPC_XRY_001/IMPC_XRY_048_001/30556.bmp']
Using session 5cb05134-1322-433f-99b6-8a97c953b93a (root@172.22.68.222:4064). Idle timeout: 10.0 min. Current group: system
Traceback (most recent call last):
  File "upload_to_omero2.py", line 301, in <module>
    main(sys.argv[1:])
  File "upload_to_omero2.py", line 59, in main
    runWithSolrAsDataSource(solrUrl, rootDestinationDir, alreadyInOmero, omeroUser, omeroPass, omeroHost, omeroPort)
  File "upload_to_omero2.py", line 185, in runWithSolrAsDataSource
    processFile(alreadyInOmero,observation_id, rootDestinationDir,phenotyping_center,pipeline_stable_id, procedure_stable_id, parameter_stable_id, download_file_path,  omeroUser, omeroPass, omeroHost, omeroPort)
  File "upload_to_omero2.py", line 213, in processFile
    loadIntoOmero(dstfilename, project, dataset,  omeroUser, omeroPass, omeroHost, omeroPort)
  File "upload_to_omero2.py", line 223, in loadIntoOmero
    do_import(omeroUser, omeroPass, omeroHost, omeroPort,  fullNfsUrl, dataset, project, omeroPass)
  File "upload_to_omero2.py", line 246, in do_import
    cli.invoke(import_args, strict=True)
  File "/Users/jwarren/Documents/omerolibs/OMERO.server-5.0-1.2-ice35-b26/lib/python/omero/cli.py", line 791, in invoke
    stop = self.onecmd(line, previous_args)
  File "/Users/jwarren/Documents/omerolibs/OMERO.server-5.0-1.2-ice35-b26/lib/python/omero/cli.py", line 860, in onecmd
    self.execute(line, previous_args)
  File "/Users/jwarren/Documents/omerolibs/OMERO.server-5.0-1.2-ice35-b26/lib/python/omero/cli.py", line 940, in execute
    args.func(args)
  File "/Users/jwarren/Documents/omerolibs/OMERO.server-5.0-1.2-ice35-b26/lib/python/omero/plugins/import.py", line 238, in importer
    a, debug=False, xargs=xargs, stdout=out, stderr=err)
  File "/Users/jwarren/Documents/omerolibs/OMERO.server-5.0-1.2-ice35-b26/lib/python/omero/java.py", line 129, in popen
    check_java(command)
  File "/Users/jwarren/Documents/omerolibs/OMERO.server-5.0-1.2-ice35-b26/lib/python/omero/java.py", line 28, in check_java
    raise Exception("Java could not be found. (Executable=%s)" % command[0])
Exception: Java could not be found. (Executable=java)
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: Exception: Java could not be found. (Executable=java)

Postby jmoore » Mon Jul 21, 2014 6:57 pm

No, the error is simply that "java" cannot be executed, but if this is working in other instances, that would seem quite odd. What's the open file limit in your shell? (`ulimit -n`) If the Python process is not careful to close all resources, it could run out of file handles. Is there any further logging you could show us? Is your script accessible somewhere?

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Exception: Java could not be found. (Executable=java)

Postby jwarren » Tue Jul 22, 2014 3:30 pm

Hi Josh

ulimit -n
2560

Thanks for the reply. Today I've had less issues with this script due to a couple of changes to the way I'm doing things. However there has been some different errors and I would guess I'm not doing things the most efficient way (although it does seem to be using a single session and not creating new ones).

At the moment it fails a few times with this error that I'll paste in after the code. I'm using the same user credentials for all requests and only uploading about 800 files total from different directories - into only 3 projects and about 1 or 2 datasets under each.

Code: Select all
#!/usr/bin/python

import os
import requests
import json
from xml.dom.minidom import parseString
import glob
import shutil
import sys
import os.path
import sys, getopt
import mysql.connector
from mysql.connector import errorcode
import omero.rtypes
import omero
import omero.cli
from omero.gateway import BlitzGateway
from omero.rtypes import wrap
from omero.model import DatasetI, ProjectI
from common import splitString

responseFailed=0
numberOfImageDownloadAttemps=0
totalNumberOfImagesWeHave=0
numFoundInSolr=0

cli=None

group='system'

uniqueUris=set()
def main(argv):
    solrUrl="""http://wwwdev.ebi.ac.uk/mi/impc/dev/solr/experiment/select?q=observation_type:image_record&fq=(download_file_path:*mousephenotype.org*%20AND%20!download_file_path:*.pdf)&fl=id,download_file_path,phenotyping_center,pipeline_stable_id,procedure_stable_id,datasource_name,parameter_stable_id&wt=json&indent=on&rows=10000000"""
    #below url for testing one paremeter only
    #solrUrl="""http://wwwdev.ebi.ac.uk/mi/impc/dev/solr/experiment/select?q=observation_type:image_record&fq=(download_file_path:*mousephenotype.org*%20AND%20parameter_stable_id:IMPC_XRY_034_001)&fl=id,download_file_path,phenotyping_center,pipeline_stable_id,procedure_stable_id,datasource_name,parameter_stable_id&wt=json&indent=on&rows=1000000"""
    #note cant split this url over a few lines as puts in newlines into url which doesn't work
    rootDestinationDir='myimagesdir'
    omeroHost = ''localhost'
    omeroPort = 4064
    omeroUser = 'user'
    omeroPass = 'userpass''
    print("running python image download script for impc images")


    try:
          opts, args = getopt.getopt(argv,"d:s:h:p:u::db:pass:ohost:oport:ouser:opass",[])
    except getopt.GetoptError:
        print 'upload_to_omero2.py -d <rootDestinationDir> -s <solrUrl> -h <komp2host> -p <komp2Port> -db <komp2db> -u <komp2User> -pass <komp2Pass> -ohost <omerohost> -oport <omero port> -ouser <omero user> -opass <omero pass>'
        sys.exit(2)
    for opt, arg in opts:
        print 'upload_to_omero2.py -d <rootDestinationDir> -s <solrUrl> -h <komp2host> -p <komp2Port> -db <komp2db> -u <komp2User> -pass <komp2Pass> -ohost <omerohost> -oport <omero port> -ouser <omero user> -opass <omero pass>'
        if opt in ("-d", "--rootDestinationDir"):
            rootDestinationDir = arg
        elif opt in ("-s", "--solrUrl"):
             solrUrl = arg
    print 'rootDestinationDir is "', rootDestinationDir
    print 'solrUrl', solrUrl
    #deleteImagesAlreadyInOmero(omeroHost, omeroPort, omeroUser, omeroPass)
    alreadyInOmero=getImagesAlreadyInOmero(omeroHost, omeroPort, omeroUser, omeroPass)
    runWithSolrAsDataSource(solrUrl, rootDestinationDir, alreadyInOmero, omeroUser, omeroPass, omeroHost, omeroPort)
   

def getImagesAlreadyInOmero( omeroHost, omeroPort, omeroUsername, omeroPass ):
    alreadyInOmero=set()
   
    from omero.gateway import BlitzGateway


    # Connect to the Python Blitz Gateway
    # =============================================================
    # Make a simple connection to OMERO, printing details of the
    # connection. See OmeroPy/Gateway for more info
    conn = BlitzGateway(omeroUsername, omeroPass, host=omeroHost, port=omeroPort)
    connected = conn.connect()


    # Check if you are connected.
    # =============================================================
    if not connected:
        import sys
        sys.stderr.write("Error: Connection not available, please check your user name and password.\n")
        sys.exit(1)


    # Using secure connection.
    # =============================================================
    # By default, once we have logged in, data transfer is not encrypted (faster)
    # To use a secure connection, call setSecure(True):

    # conn.setSecure(True)         # <--------- Uncomment this


    # Current session details
    # =============================================================
    # By default, you will have logged into your 'current' group in OMERO. This
    # can be changed by switching group in the OMERO.insight or OMERO.web clients.

    user = conn.getUser()
    print "Current user:"
    print "   ID:", user.getId()
    print "   Username:", user.getName()
    print "   Full Name:", user.getFullName()

    print "Member of:"
    for g in conn.getGroupsMemberOf():
        print "   ID:", g.getName(), " Name:", g.getId()
    group = conn.getGroupFromContext()
    print "Current group: ", group.getName()

    print "Other Members of current group:"
    for exp in conn.listColleagues():
        print "   ID:", exp.getId(), exp.getOmeName(), " Name:", exp.getFullName()

    print "Owner of:"
    for g in conn.listOwnedGroups():
        print "   ID:", g.getName(), " Name:", g.getId()

    # New in OMERO 5
    print "Admins:"
    for exp in conn.getAdministrators():
        print "   ID:", exp.getId(), exp.getOmeName(), " Name:", exp.getFullName()

    # The 'context' of our current session
    ctx = conn.getEventContext()
    # print ctx     # for more info
    print ctx
    # The only_owned=True parameter limits the Projects which are returned.
    # If the parameter is omitted or the value is False, then all Projects
    # visible in the current group are returned.
    print "\nList Projects:"
    print "=" * 50
    my_expId = conn.getUser().getId()
    for project in conn.listProjects(my_expId):
        print_obj(project)
        for dataset in project.listChildren():
            print_obj(dataset, 2)
            for image in dataset.listChildren():
                #print_obj(image, 4)
                fileset = image.getFileset()
                if fileset is not None:
                    print image.getId()
                    filesetId=fileset.getId()
                    query = 'SELECT clientPath FROM FilesetEntry WHERE fileset.id = :id'
                    params = omero.sys.ParametersI()
                    params.addId(omero.rtypes.rlong(filesetId))
                    for path in conn.getQueryService().projection(query, params):
                        fullPath=path[0].val
                        if splitString in fullPath:
                            print 'path in omero=' +fullPath
                            relativeOmeroUrl=fullPath.split(splitString,1)[1]
                            print "adding to hash relative omero url="+relativeOmeroUrl
                            alreadyInOmero.add(relativeOmeroUrl)
    # Close connection:
    # =================================================================
    # When you are done, close the session to free up server resources.
    conn._closeSession()
    return alreadyInOmero

def print_obj(obj, indent=0):
    """
    Helper method to display info about OMERO objects.
    Not all objects will have a "name" or owner field.
    """
    print """%s%s:%s  Name:"%s" (owner=%s)""" % (\
            " " * indent,
            obj.OMERO_CLASS,\
            obj.getId(),\
            obj.getName(),\
            obj.getOwnerOmeName())

def runWithSolrAsDataSource(solrUrl, rootDestinationDir, alreadyInOmero, omeroUser, omeroPass, omeroHost, omeroPort):
#need to get these passed in as arguments - the host and db name etc for jenkins to run
#first get the list of download urls and the data source, experiment, procdure and parameter and observation id for the images
    v = json.loads(requests.get(solrUrl).text)
    docs=v['response']['docs']
    numFoundInSolr=v['response']['numFound']
    for doc in docs:
        download_file_path=doc['download_file_path']
        datasource_id=doc['datasource_name']
        phenotyping_center=doc['phenotyping_center']
        #experiment=doc['experiment']
        pipeline_stable_id=doc['pipeline_stable_id']
        observation_id=doc['id']
        procedure_stable_id=doc['procedure_stable_id']
        parameter_stable_id=doc['parameter_stable_id']
        processFile(alreadyInOmero,observation_id, rootDestinationDir,phenotyping_center,pipeline_stable_id, procedure_stable_id, parameter_stable_id, download_file_path,  omeroUser, omeroPass, omeroHost, omeroPort)
           
    print 'number found in solr='+str(numFoundInSolr)+' number of failed responses='+str(responseFailed)+' number of requests='+str(numberOfImageDownloadAttemps)+' total totalNumberOfImagesWeHave='+str(totalNumberOfImagesWeHave)
   
def createDestinationFilePath(rootDestinationDir, phenotyping_center, pipeline_stable_id, procedure, parameter, download_file_path):
    directory="/".join([rootDestinationDir,phenotyping_center, pipeline_stable_id,procedure,parameter])
    return directory

def processFile(alreadyInOmero, observation_id,  rootDestinationDir, phenotyping_center,pipeline_stable_id, procedure, parameter, downloadFilePath,  omeroUser, omeroPass, omeroHost, omeroPort):
        global totalNumberOfImagesWeHave
        global responseFailed
        global numberOfImageDownloadAttemps
        directory = createDestinationFilePath(rootDestinationDir, phenotyping_center, pipeline_stable_id, procedure,parameter, downloadFilePath)
        print 'directory='+directory
        print 'downloadFilePath='+downloadFilePath
        dstfilename=directory+"/"+str(downloadFilePath.split('/')[-1])
        print 'dstfilename='+dstfilename
        calculatedFilePath=dstfilename.split(splitString,1)[1]
        #print 'calculatedFilePath='+calculatedFilePath
        if calculatedFilePath in alreadyInOmero:
            print 'calculatedFilePath is already in Omero '+calculatedFilePath
        else:
            print 'should load into omero '+calculatedFilePath
            slashSplit=calculatedFilePath.split("/")
            project=slashSplit[0]
            print 'project='+project
            dataset=slashSplit[3]
            print 'dataset='+dataset
            loadIntoOmero(dstfilename, project, dataset,  omeroUser, omeroPass, omeroHost, omeroPort)


        if dstfilename in uniqueUris:
            print '---------------------!!!!!!!!!!error the filePath is not unique and has been specified before:'+dstfilename
        uniqueUris.add(dstfilename)
        print 'dstfilename '+dstfilename
       
def loadIntoOmero(fullNfsUrl, project, dataset,  omeroUser, omeroPass, omeroHost, omeroPort):
    print 'need to load into omero here'
    do_import(omeroUser, omeroPass, omeroHost, omeroPort,  fullNfsUrl, dataset, project, omeroPass)
    print "import finished"


def do_import(omeroUser, omeroPass, omeroHost, omeroPort,  filename, dataset=None, project=None, passw=None):
    #print "printing user info"+user, group, filename
    global cli
    print "-"*100
    if cli is None:
        print "cli is none!!!!!"
        cli = omero.cli.CLI()
        cli.loadplugins()
        cli.invoke(["login", omeroUser+'@'+omeroHost, "-w", passw, "-C"], strict=True)
        #cli.invoke(["login", "%s@localhost" % user, "-w", passw, "-C"], strict=True)
        cli.invoke(["sessions", "group", group], strict=True)
    import_args = ["import"]
    if dataset is not None:
        dsId = create_containers(cli, dataset,omeroHost, project)
        print "dsId="+str(dsId)
        import_args.extend(["-d", str(dsId),"--debug", "DEBUG"])#,"--debug", "ALL"])
    else:
        print "dataset is None!!!!!!!!!!!!!!!!!!!!"
    import_args.append(filename)
    print " import args="
    print import_args
    cli.invoke(import_args, strict=True)


def create_containers(cli, dataset, omeroHost, project=None):
    """
    Creates containers with names provided if they don't exist already.
    Returns Dataset ID.
    """
    sessionId = cli._event_context.sessionUuid
    conn = BlitzGateway(host=omeroHost)
    conn.connect(sUuid = sessionId)
    params = omero.sys.Parameters()
    params.theFilter = omero.sys.Filter()
    params.theFilter.ownerId = wrap(conn.getUser().getId())
    #print "ownerId="+conn.getUser().getId()
    #project=None
    from omero.rtypes import rstring
    d = None
    prId = None
    if project is not None:
        p = conn.getObject("Project", attributes={'name': project}, params=params)
        if p is None:
            print "Creating Project:", project
            p = omero.model.ProjectI()
            p.name = wrap(str(project))
            prId = conn.getUpdateService().saveAndReturnObject(p).id.val
        else:
            print "Using Project:", project, p
            prId = p.getId()
            # Since Project already exists, check children for Dataset
            for c in p.listChildren():
                if c.getName() == dataset:
                    d = c

    if d is None:
        d = conn.getObject("Dataset", attributes={'name': dataset}, params=params)

    if d is None:
        print "Creating Dataset:", dataset
        d = omero.model.DatasetI()
        d.name = wrap(str(dataset))
        dsId = conn.getUpdateService().saveAndReturnObject(d).id.val
        if prId is not None:
            print "Linking Project-Dataset..."
            link = omero.model.ProjectDatasetLinkI()
            link.child = omero.model.DatasetI(dsId, False)
            link.parent = omero.model.ProjectI(prId, False)
            conn.getUpdateService().saveObject(link)
    else:
        print "Using Dataset:", dataset, d
        dsId = d.getId()
    return dsId

def deleteImagesAlreadyInOmero( omeroHost, omeroPort, omeroUsername, omeroPass ):
     
    from omero.gateway import BlitzGateway


    # Connect to the Python Blitz Gateway
    # =============================================================
    # Make a simple connection to OMERO, printing details of the
    # connection. See OmeroPy/Gateway for more info
    conn = BlitzGateway(omeroUsername, omeroPass, host=omeroHost, port=omeroPort)
    connected = conn.connect()


    # Check if you are connected.
    # =============================================================
    if not connected:
        import sys
        sys.stderr.write("Error: Connection not available, please check your user name and password.\n")
        sys.exit(1)


    # Using secure connection.
    # =============================================================
    # By default, once we have logged in, data transfer is not encrypted (faster)
    # To use a secure connection, call setSecure(True):

    # conn.setSecure(True)         # <--------- Uncomment this


    # Current session details
    # =============================================================
    # By default, you will have logged into your 'current' group in OMERO. This
    # can be changed by switching group in the OMERO.insight or OMERO.web clients.

    user = conn.getUser()
    print "Current user:"
    print "   ID:", user.getId()
    print "   Username:", user.getName()
    print "   Full Name:", user.getFullName()

    print "Member of:"
    for g in conn.getGroupsMemberOf():
        print "   ID:", g.getName(), " Name:", g.getId()
    group = conn.getGroupFromContext()
    print "Current group: ", group.getName()

    print "Other Members of current group:"
    for exp in conn.listColleagues():
        print "   ID:", exp.getId(), exp.getOmeName(), " Name:", exp.getFullName()

    print "Owner of:"
    for g in conn.listOwnedGroups():
        print "   ID:", g.getName(), " Name:", g.getId()

    # New in OMERO 5
    print "Admins:"
    for exp in conn.getAdministrators():
        print "   ID:", exp.getId(), exp.getOmeName(), " Name:", exp.getFullName()

    # The 'context' of our current session
    ctx = conn.getEventContext()
    # print ctx     # for more info
    print ctx
    # The only_owned=True parameter limits the Projects which are returned.
    # If the parameter is omitted or the value is False, then all Projects
    # visible in the current group are returned.
    print "\nList Projects:"
    print "=" * 50
    my_expId = conn.getUser().getId()
   
    for project in conn.listProjects(my_expId):
        print_obj(project)
        object_ids=[project.getId()]
        deleteChildren = True
        handle = conn.deleteObjects("Project", object_ids,\
deleteAnns=True, deleteChildren=deleteChildren)
    # Close connection:
    # =================================================================
    # When you are done, close the session to free up server resources.
    conn._closeSession()

if __name__ == "__main__":
    main(sys.argv[1:])


errors:

Code: Select all
import finished
dstfilename /Users/jwarren/images/impc/ICS/ICS_001/IMPC_XRY_001/IMPC_XRY_034_001/30971.bmp
directory=/Users/jwarren/images/impc/ICS/ICS_001/IMPC_XRY_001/IMPC_XRY_048_001
downloadFilePath=http://images.mousephenotype.org/src/6/10/1182/35/91/2172/30982.bmp
dstfilename=/Users/jwarren/images/impc/ICS/ICS_001/IMPC_XRY_001/IMPC_XRY_048_001/30982.bmp
calculatedFilePath=ICS/ICS_001/IMPC_XRY_001/IMPC_XRY_048_001/30982.bmp
should load into omero ICS/ICS_001/IMPC_XRY_001/IMPC_XRY_048_001/30982.bmp
project=ICS
dataset=IMPC_XRY_048_001
need to load into omero here
----------------------------------------------------------------------------------------------------
Using Project: ICS <_ProjectWrapper id=102>
Using Dataset: IMPC_XRY_048_001 <_DatasetWrapper id=103>
dsId=103
import args=
['import', '-d', '103', '--debug', 'DEBUG', u'/Users/jwarren/images/impc/ICS/ICS_001/IMPC_XRY_001/IMPC_XRY_048_001/30982.bmp']
Using session 77096529-6faa-43e7-be22-fec671760dbe (root@172.22.68.222:4064). Idle timeout: 10.0 min. Current group: system
2014-07-22 12:41:35,709 241        [      main] INFO          ome.formats.importer.ImportConfig - OMERO Version: 5.0.2-ice35-b26
2014-07-22 12:41:35,730 262        [      main] INFO          ome.formats.importer.ImportConfig - Bioformats version: 5.0.2-ice35-b26 revision: 0c4215a date: 27 May 2014
2014-07-22 12:41:35,743 275        [      main] INFO   formats.importer.cli.CommandLineImporter - Log levels -- Bio-Formats: DEBUG OMERO.importer: DEBUG
2014-07-22 12:41:35,744 276        [      main] DEBUG         ome.formats.importer.ImportConfig - Loaded savedDirectory from ome.formats.importer.util.IniFileLoader@13e7f00e
2014-07-22 12:41:35,744 276        [      main] DEBUG         ome.formats.importer.ImportConfig - Loaded savedDirectory from default
2014-07-22 12:41:36,029 561        [      main] INFO      ome.formats.importer.ImportCandidates - Depth: 4 Metadata Level: MINIMUM
2014-07-22 12:41:36,031 563        [      main] DEBUG     ome.formats.importer.cli.ErrorHandler - SCANNING: Depth:0 Num:    1 Tot:  n/a File: 48_001/30982.bmp
2014-07-22 12:41:36,033 565        [      main] DEBUG                      loci.common.Location - Location.mapFile: embedded-stream.raw -> null
2014-07-22 12:41:36,036 568        [      main] DEBUG                     loci.formats.Memoizer - skipping memo: no directory given
2014-07-22 12:41:36,043 575        [      main] DEBUG         loci.common.NIOByteBufferProvider - Using mapped byte buffer? false
2014-07-22 12:41:36,048 580        [      main] INFO                   loci.formats.ImageReader - BMPReader initializing /Users/jwarren/images/impc/ICS/ICS_001/IMPC_XRY_001/IMPC_XRY_048_001/30982.bmp
2014-07-22 12:41:36,048 580        [      main] DEBUG                loci.formats.FormatHandler - BMPReader initializing /Users/jwarren/images/impc/ICS/ICS_001/IMPC_XRY_001/IMPC_XRY_048_001/30982.bmp
2014-07-22 12:41:36,048 580        [      main] DEBUG                loci.formats.FormatHandler - loci.formats.in.BMPReader.initFile(/Users/jwarren/images/impc/ICS/ICS_001/IMPC_XRY_001/IMPC_XRY_048_001/30982.bmp)
2014-07-22 12:41:36,050 582        [      main] INFO                 loci.formats.FormatHandler - Reading bitmap header
2014-07-22 12:41:36,051 583        [      main] INFO                 loci.formats.FormatHandler - Populating metadata
2014-07-22 12:41:36,131 663        [      main] DEBUG       loci.common.services.ServiceFactory - Loaded properties from: services.properties
2014-07-22 12:41:36,133 665        [      main] DEBUG       loci.common.services.ServiceFactory - Added interface interface loci.formats.services.POIService and implementation class loci.formats.services.POIServiceImpl
2014-07-22 12:41:36,133 665        [      main] DEBUG       loci.common.services.ServiceFactory - Added interface interface loci.formats.services.MDBService and implementation class loci.formats.services.MDBServiceImpl
2014-07-22 12:41:36,133 665        [      main] DEBUG       loci.common.services.ServiceFactory - Added interface interface loci.formats.services.JPEGTurboService and implementation class loci.formats.services.JPEGTurboServiceImpl
2014-07-22 12:41:36,134 666        [      main] DEBUG       loci.common.services.ServiceFactory - Added interface interface loci.formats.services.JAIIIOService and implementation class loci.formats.services.JAIIIOServiceImpl
2014-07-22 12:41:36,135 667        [      main] DEBUG       loci.common.services.ServiceFactory - Added interface interface loci.formats.services.WlzService and implementation class loci.formats.services.WlzServiceImpl
2014-07-22 12:41:36,136 668        [      main] DEBUG       loci.common.services.ServiceFactory - Added interface interface loci.formats.services.NetCDFService and implementation class loci.formats.services.NetCDFServiceImpl
2014-07-22 12:41:36,136 668        [      main] DEBUG       loci.common.services.ServiceFactory - Added interface interface loci.formats.services.MetakitService and implementation class loci.formats.services.MetakitServiceImpl
2014-07-22 12:41:36,137 669        [      main] DEBUG       loci.common.services.ServiceFactory - Added interface interface loci.formats.services.LuraWaveService and implementation class loci.formats.services.LuraWaveServiceImpl
2014-07-22 12:41:36,138 670        [      main] DEBUG       loci.common.services.ServiceFactory - Added interface interface loci.formats.services.OMEXMLService and implementation class loci.formats.services.OMEXMLServiceImpl
2014-07-22 12:41:36,154 686        [      main] DEBUG                     loci.formats.Memoizer - start[1406029296036] time[118] tag[loci.formats.Memoizer.setId]
2014-07-22 12:41:36,163 695        [      main] DEBUG                      loci.common.Location - Location.mapFile: embedded-stream.raw -> null
2014-07-22 12:41:36,164 696        [      main] DEBUG     ome.formats.importer.cli.ErrorHandler - SCANNING: Depth:0 Num:    1 Tot:    1 File: 48_001/30982.bmp
2014-07-22 12:41:36,165 697        [      main] INFO      ome.formats.importer.ImportCandidates - 1 file(s) parsed into 1 group(s) with 1 call(s) to setId in 132ms. (136ms total) [0 unknowns]
2014-07-22 12:41:36,506 1038       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Attempting initial SSL connection to 172.22.68.222:4064
2014-07-22 12:41:37,029 1561       [      main] ERROR  formats.importer.cli.CommandLineImporter - Error during import process.
Ice.SecurityException: javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
   at IceInternal.ConnectRequestHandler.getConnection(ConnectRequestHandler.java:244) ~[ice.jar:na]
   at IceInternal.ConnectRequestHandler.sendRequest(ConnectRequestHandler.java:141) ~[ice.jar:na]
   at IceInternal.Outgoing.invoke(Outgoing.java:77) ~[ice.jar:na]
   at Ice._ObjectDelM.ice_isA(_ObjectDelM.java:33) ~[ice.jar:na]
   at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:98) ~[ice.jar:na]
   at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:61) ~[ice.jar:na]
   at Glacier2.RouterPrxHelper.checkedCast(RouterPrxHelper.java:2262) ~[ice-glacier2.jar:na]
   at omero.client.getRouter(client.java:770) ~[blitz.jar:na]
   at omero.client.createSession(client.java:693) ~[blitz.jar:na]
   at omero.client.joinSession(client.java:623) ~[blitz.jar:na]
   at ome.formats.OMEROMetadataStoreClient.initialize(OMEROMetadataStoreClient.java:674) ~[blitz.jar:na]
   at ome.formats.importer.ImportConfig.createStore(ImportConfig.java:303) ~[blitz.jar:na]
   at ome.formats.importer.cli.CommandLineImporter.<init>(CommandLineImporter.java:125) ~[blitz.jar:na]
   at ome.formats.importer.cli.CommandLineImporter.main(CommandLineImporter.java:719) ~[blitz.jar:na]
Caused by: javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
   at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ~[na:1.7.0_25]
   at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1619) ~[na:1.7.0_25]
   at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1587) ~[na:1.7.0_25]
   at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1756) ~[na:1.7.0_25]
   at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1060) ~[na:1.7.0_25]
   at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:884) ~[na:1.7.0_25]
   at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:758) ~[na:1.7.0_25]
   at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) ~[na:1.7.0_25]
   at IceSSL.TransceiverI.handshakeNonBlocking(TransceiverI.java:543) ~[ice.jar:na]
   at IceSSL.TransceiverI.initialize(TransceiverI.java:109) ~[ice.jar:na]
   at Ice.ConnectionI.initialize(ConnectionI.java:1933) ~[ice.jar:na]
   at Ice.ConnectionI.message(ConnectionI.java:1084) ~[ice.jar:na]
   at IceInternal.ThreadPool.run(ThreadPool.java:321) ~[ice.jar:na]
   at IceInternal.ThreadPool.access$300(ThreadPool.java:12) ~[ice.jar:na]
   at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:693) ~[ice.jar:na]
   at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
Traceback (most recent call last):
  File "upload_to_omero2.py", line 382, in <module>
    main(sys.argv[1:])
  File "upload_to_omero2.py", line 60, in main
    runWithSolrAsDataSource(solrUrl, rootDestinationDir, alreadyInOmero, omeroUser, omeroPass, omeroHost, omeroPort)
  File "upload_to_omero2.py", line 186, in runWithSolrAsDataSource
    processFile(alreadyInOmero,observation_id, rootDestinationDir,phenotyping_center,pipeline_stable_id, procedure_stable_id, parameter_stable_id, download_file_path,  omeroUser, omeroPass, omeroHost, omeroPort)
  File "upload_to_omero2.py", line 214, in processFile
    loadIntoOmero(dstfilename, project, dataset,  omeroUser, omeroPass, omeroHost, omeroPort)
  File "upload_to_omero2.py", line 224, in loadIntoOmero
    do_import(omeroUser, omeroPass, omeroHost, omeroPort,  fullNfsUrl, dataset, project, omeroPass)
  File "upload_to_omero2.py", line 247, in do_import
    cli.invoke(import_args, strict=True)
  File "/Users/jwarren/Documents/omerolibs/OMERO.server-5.0-1.2-ice35-b26/lib/python/omero/cli.py", line 794, in invoke
    self.assertRC()
  File "/Users/jwarren/Documents/omerolibs/OMERO.server-5.0-1.2-ice35-b26/lib/python/omero/cli.py", line 783, in assertRC
    raise NonZeroReturnCode(self.rv, "assert failed")
omero.cli.NonZeroReturnCode: assert failed
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: Exception: Java could not be found. (Executable=java)

Postby jmoore » Tue Jul 22, 2014 6:40 pm

Ah, "bad_record_mac"! We ran into this on some of our CI nodes. You might read through http://trac.openmicroscopy.org.uk/ome/ticket/11081 to see if any of the things we tried work for you. In the end, it was fixing a mismatch between Java and OpenSSL that seemed to clear this up.

Hope that helps!
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Exception: Java could not be found. (Executable=java)

Postby jwarren » Wed Jul 23, 2014 8:20 am

ok thanks. Sound like this is a definite mac issue and so hopefully this will be a non-issue for me when I move things to our dev and production linux machines.
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm


Return to Developer Discussion

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest