[ome-devel] using blitz
josh.moore at gmx.de
josh.moore at gmx.de
Wed Nov 19 15:31:18 GMT 2008
Bernhard Voigt writes:
> Dear Josh!
>
> > Good morning, Bernhard. Wish you had better news for us. :)
>
> It's getting (slightly) better now :-)
I definitely see the end of the tunnel for you.
> Well, I am going to update soon, but currently the build from source
> seems to be ok. The tests comming with ice-cpp passed all.
Understood, great. Then I was beating down the wrong path. Good to
hear.
> > Do you mind telling us how you installed Ice 3.3?
>
> Ice-cpp:
> I've installed mcpp from the third party tools archive zeroc provides.
> Then I've simple type make in Ice-3.3.0/cpp and make test and sudo
> make install. My IceHome path is /opt/Ice-3.3.0
>
> Ice-py:
> I've went to Ice-3.3.0/py and type make and make install.
>
> Ice-java (which I didn't know that I don't need it):
> I've installed berkeley-db java bindings using apt
> I've went to Ice-3/java and typed ant ice-jar and copied Ice.jar to
> /usr/share/java/
Ok, then we've definitely not made that clear enough. The good thing
about Java is that we can just pop a jar into svn and all is
fine. Python and C++ need the runtimes, however. In addition, you need
all the Ice tools like: slice2java, slice2py, icegridnode, etc. on
your PATH.
> > You don't need any of the jars since those are present in the
> > omero/lib/repository directory. For the build, if you have:
> >
> > $ slice2py -v
> > 3.3.0
> > $ slice2java -v
> > 3.3.0
> >
> > then things should completely normally.
> That's what I get. I don't have other slice2* from ubuntu packages on
> the system, I've removed the zeroc-ice 3.2.1 packages prior installing
> 3.3.0 from source.
Understood. My guess is then that you still had some old
code-generated java files hanging about which appear to now be gone.
> > > I can work with OmeroPy withouth the need to change the generated
> > > files, but there are still classes missing e.g the
> > > omero.util.ParametersI class is not there.
> >
> > Are you working from trunk or from Beta3.1? If you are working from
> > Beta3.1 then you will need to use the omero.sys.Parameters (no "I")
> > object directly. The "util" in the above is a typo that I'll fix in
> > the documentation. From trunk, you can see ParametersI in action at:
> >
> > https://trac.openmicroscopy.org.uk/omero/browser/trunk/components/tools/OmeroPy/test/t_parameters.py
> >
> I'm working from Beta3.1. Yes, and Parameters are in omero.sys. How do
> I know where to look for the classes? What are the name space
> conventions? Is there a standard way to deduce the python class from
> java code, if I find ome.parameters.Parameters in the javadocs as a
> second parameter to IQuery?
In general, the mappings are defined in:
https://trac.openmicroscopy.org.uk/omero/browser/trunk/components/blitz/resources/omero/API.ice
The javadocs are for the moment still the definitive definition of how
each method call works, but if you want to see what types those are in
blitz, you will need to cross-reference in API.ice and the other files
that it includes. This is obviously sub-optimal, but during this
transition period it is the most informative.
> I was now able to do something like this:
> 2 : import omero
> 3 : cl = omero.client()
> 4 : ses = cl.createSession('omero','omero')
> 5 : q = ses.getQueryService()
> 6 : omero.sys.Parameters(map={'name': omero.RString('omero')})
> 7 : omero.sys.Parameters(map={'name': omero.RString('omero')})
> 8 : param = omero.sys.Parameters(map={'name': omero.RString('omero')})
> 9 : q.findByQuery('select p from Project p where p.details.owner.name
> = :name', param)
See, this *is* good news. You're making calls on your newly built
blitz server. Congratulations! :)
> What I now get is a java exception:
>
> serverExceptionClass = ome.conditions.ApiUsageException
> message = could not resolve property: name of:
> ome.model.meta.Experimenter [select p from
> ome.model.containers.Project p where p.details.owner.name = :name];
> nested exception is org.hibernate.QueryException: could not resolve
> property: name of: ome.model.meta.Experimenter [select p from
> ome.model.containers.Project p where p.details.owner.name = :name]
This is simply a typo. The query should read:
"...where p.details.owner.omeName = :name "
or perhaps
"...where p.details.owner.lastName = :name "
> I don't have JBOSS running, but as far as I understood, this is not
> necessary anymore for omero-blitz to work, right?
Very, very correct.
> > > Compilation does not work, too. Attached is the output from java omero
> > > build-blitz, I couldn't figure out what the root cause of the errors
> > > is. What do I have to put in the classpath, e.g Ice.jar and the
> > > "berkeley-db".jar used during Ice.jar compilation... what about all
> > > the jars in the omero/lib/repository folder, I guess the problem I
> > > have are missing libraries in the classpath?!
> >
> > The problem here also looks like a mismatch between the Ice
> > versions. Since the classpath is automatically handled, my guess is
> > that slice2java and slice2py still point to 3.2.1 versions. If not,
> > let me know and we'll do some more tracking.
> I'm pretty sure this is not the case, I get the same version output as
> you write above.
> Did you check the ant output I've send. For me it seems some classes
> cannot be found, I see some ClassNotFoundExcpt. for hibernate classes.
>
> Well, currently there's no need to compile Beta3.1.1 myself it was
> just that I though that the binary dist was not complete.
Does this mean that you haven't built yet? If so, please let me know.
The only errors I see in your log are of the form:
/home/bernhard/devel/omero/Beta_3.1.1/components/blitz/target/generated/src/omero/model/ExperimenterGroup.java:137: cannot find symbol
symbol : class DispatchStatus
location: package IceInternal
public static IceInternal.DispatchStatus
which is an Ice version mismatch, in which case something still's
stale or left-over.
> Thanks again! Bernhard
Gladly,
~Josh.
More information about the ome-devel
mailing list