Task #10828 (closed)
Bug: omero.data.dir ignored in current develop branch
Reported by: | mtbcarroll | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 5.0.0-beta1 |
Component: | ApplicationServer | Version: | n.a. |
Keywords: | n.a. | Cc: | omero-team@… |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | FS demo 4.2 |
Description
mark@ls27175:~/src/openmicroscopy$ ls dist/var/log/ mark@ls27175:~/src/openmicroscopy$ omero config get omero.data.dir /Users/mark/var/omero/ mark@ls27175:~/src/openmicroscopy$ omero admin start No descriptor given. Using etc/grid/default.xml Waiting on startup. Use CTRL-C to exit mark@ls27175:~/src/openmicroscopy$ grep /OMERO dist/var/log/Blitz-0.log | head -n 2 2013-05-01 10:35:53,929 INFO [ o.s.blitz.repo.AbstractRepositoryI] ( main) Initializing repository in /OMERO/ org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [OMERO.blitz], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'OMERO.blitz' defined in URL [jar:file:/Users/mark/src/openmicroscopy/dist/lib/server/blitz.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [ome.system.OmeroContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'legacyRepository' defined in URL [jar:file:/Users/mark/src/openmicroscopy/dist/lib/server/blitz.jar!/ome/services/blitz-repositories.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [ome.services.blitz.repo.LegacyRepositoryI]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Invalid directory specified for file system service./OMERO mark@ls27175:~/src/openmicroscopy$
Attachments (1)
Change History (11)
comment:1 Changed 10 years ago by jamoore
comment:2 Changed 10 years ago by jamoore
- Milestone changed from Unscheduled to OMERO-5
- Sprint set to FS demo 4.1
Changed 10 years ago by mtbcarroll
comment:3 Changed 10 years ago by bpindelski
This still happens on develop. The exception thrown comes from AbstractFileSystemService. It seems that the legacyRepository bean in blitz-repositories.xml is the culprit. Josh's suggestion: a change to PreferenceContext? for logback work has somehow changed the order of operations in Spring. That causes a null to be passed to the bean ctor and the default value of /OMERO/ is taken from omero.properties.
comment:4 Changed 10 years ago by jamoore
- Owner jamoore deleted
- Sprint changed from FS demo 4.1 to FS demo 4.2
Open bug which needs to be looked at. Removing my name in case anyone else wants to pick it up.
comment:5 Changed 10 years ago by bpindelski
Suggestion from Josh: adding "lazy-init=..." or "depends-on=..." in the bean parameters might fix the issue of operation order.
comment:6 Changed 10 years ago by mtbcarroll
In case it's any help, I seem to have created /OMERO/ on the morning of May 8th, so it's probably a PR merged shortly beforehand that caused the problem.
comment:7 Changed 10 years ago by bpindelski
After laborious debugging and Josh's help, it came out that PreferencesContext? subclasses PropertyPlaceholderConfigurer? subclasses PropertyResourceConfigurer? subclasses PropertiesLoaderSupport? and systemPropertiesMode is in PropertyPlaceholderConfigurer? and mergeProperties is in PropertiesLoaderSupport?. That tells us that if the omero.data.dir property is already set in the System.properties, we should ignore the return value from mergeProperties(). Some changes in the mentioned classes might have been a result of work needed to get Logback working (especially the logback.xml file).
comment:8 Changed 10 years ago by jamoore
- Resolution set to fixed
- Status changed from new to closed
PR filed (https://github.com/openmicroscopy/openmicroscopy/pull/1201) and tested locally.
comment:9 Changed 10 years ago by Blazej Pindelski <bpindelski@…>
(In [1faee00473ad4cb519b12b0faff7ccc9bc0edf6f/ome.git] on branch develop) Don't overwrite System properties (see #10828).
comment:10 Changed 10 years ago by Josh Moore <josh@…>
(In [83bc0ff5498c0933620d832d7ff8ac8831abd29c/ome.git] on branch develop) Merge pull request #1201 from bpindelski/data-dir
Fix omero.data.dir ignored in current develop branch (see #10828)
Can you attach the full log, please?