[ome-devel] bio-formats Maven problems

Curtis Rueden ctrueden at wisc.edu
Tue May 13 19:25:57 BST 2014


Hi Ian,

Glad to hear you figured it out.

Regards,
Curtis


On Tue, May 13, 2014 at 1:22 PM, Munro, Ian <i.munro at imperial.ac.uk> wrote:

>  Hi Curtis
>
>  Thanks. You gave me enough of a clue to solve my problem.
> Calling ‘clean & build’ then ‘build with dependencies’ seemed to sort it
> out.
>
>  In answer to your question I’d rather use an IDE as working from the
> command line involves knowing what I’m doing  & I don’t.
>
>  Regards
>
>  Ian
>
>
>  On 13 May 2014, at 17:34, Curtis Rueden <ctrueden at wisc.edu> wrote:
>
>  Hi Ian,
>
>  > For a while now I’ve been building bf with Netbean
> ...
> > About 2 weeks ago I started getting the following errors
>
>  Since your goal is to produce a JAR for use with an external project, it
> might be simpler to execute either "ant tools" or "mvn package" from the
> command line, instead of clicking through an IDE like NetBeans. You can do
> this as your last step after making code changes within NetBeans and then
> testing them within the IDE, once you are confident the changes are what
> you need.
>
>  > The import ome.xml.model.Channel cannot be resolved
>
>  These errors almost certainly indicate either A) NetBeans is never
> running the ome-xml code generation step; or B) NetBeans isn't picking up
> the generated sources when compiling the rest of the code.
>
>  I tried importing the Bio-Formats dev_5_0 code into a fresh NetBeans
> 8.0, then building it at the top level, but I receive an error about genshi
> not being installed (even though it is). Probably system Python vs. brewed
> Python or similar nonsense. So unfortunately I cannot help troubleshoot the
> NB issues much beyond that. However, I do know that NetBeans pretty much
> uses the command line Maven to build Maven projects (and you can tell from
> the output console), so if the build works on the command line for you, it
> is likely to work in NB, as well.
>
>  Is there some reason you need to use NB to build the JARs, rather than
> command line?
>
>  Regards,
> Curtis
>
>  P.S. In the future it would be nice if the OME-XML code was not required
> to be built as part of the Bio-Formats multi-module build. That code does
> not change often and would work better as a release versioned dependency.
> It would make it much easier to build the rest of Bio-Formats since it
> would then all be pure Java again.
>
>
> On Tue, May 13, 2014 at 9:49 AM, Munro, Ian <i.munro at imperial.ac.uk>wrote:
>
>> Hi Curtis
>>
>> I’d really appreciate any assistance.
>>
>> For a while now I’ve been building bf with Netbeans (simply because it
>> was the first IDE on the doc page) without a problem.
>> I don’t, however, have a good understanding of the bf structure but the
>> following ‘incantation' seemed to work.
>>
>> Edit code e.g. SDTReader.java
>>
>> On the ‘Projects’ Window
>>
>> Build Bio-Formats library
>> Build Bio-Formats code generator
>> Build bioformats-package bundle.
>>
>> This generated a bioformats_package 5.0.2 SNAPSHOT which I could then use.
>>
>> About 2 weeks ago I started getting the following errors in Step 1 ,the
>> library build.
>> I’m using open microscopy dev_5_0
>>
>> Regards
>>
>> ian
>>
>> ------------------------------------------------------------------------
>> BUILD FAILURE
>> ------------------------------------------------------------------------
>> Total time: 8.411s
>> Finished at: Tue May 13 15:46:08 BST 2014
>> Final Memory: 17M/310M
>> ------------------------------------------------------------------------
>> Failed to execute goal
>> org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on
>> project formats-gpl: Execution default-test of goal
>> org.apache.maven.plugins:maven-surefire-plugin:2.16:test failed: There was
>> an error in the forked process
>> org.testng.TestNGException:
>> Cannot instantiate class loci.formats.utests.xml.Upgrade200909Test
>> at
>> org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:35)
>> at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:317)
>> at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:71)
>> at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:90)
>> at
>> org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:119)
>> at org.testng.TestRunner.initMethods(TestRunner.java:379)
>> at org.testng.TestRunner.init(TestRunner.java:254)
>> at org.testng.TestRunner.init(TestRunner.java:224)
>> at org.testng.TestRunner.<init>(TestRunner.java:173)
>> at
>> org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:494)
>> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:239)
>> at org.testng.SuiteRunner.run(SuiteRunner.java:193)
>> at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:910)
>> at org.testng.TestNG.runSuitesLocally(TestNG.java:879)
>> at org.testng.TestNG.run(TestNG.java:787)
>> at
>> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:217)
>> at
>> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
>> at
>> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:92)
>> at
>> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
>> at
>> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
>> at
>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
>> Caused by: java.lang.reflect.InvocationTargetException
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>> at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>> at
>> org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:26)
>> ... 20 more
>> Caused by: java.lang.Error: Unresolved compilation problems:
>> The import ome.xml.model.Channel cannot be resolved
>> The import ome.xml.model.Image cannot be resolved
>> The import ome.xml.model.OME cannot be resolved
>> The import ome.xml.model.Pixels cannot be resolved
>> The import ome.xml.model.enums.AcquisitionMode cannot be resolved
>> OME cannot be resolved to a type
>> OME cannot be resolved to a type
>> OME cannot be resolved to a type
>> The method getRoot() is undefined for the type OMEXMLMetadata
>> OME cannot be resolved to a type
>> Image cannot be resolved to a type
>> OME cannot be resolved to a type
>> Pixels cannot be resolved to a type
>> Channel cannot be resolved to a type
>> AcquisitionMode cannot be resolved to a variable
>>
>> at
>> loci.formats.utests.xml.Upgrade200909Test.<init>(Upgrade200909Test.java:38)
>> ... 25 more
>> -> [Help 1]
>>
>> To see the full stack trace of the errors, re-run Maven with the -e
>> switch.
>> Re-run Maven using the -X switch to enable full debug logging.
>>
>> For more information about the errors and possible solutions, please read
>> the following articles:
>> [Help 1]
>> http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20140513/3ff67b5d/attachment.html>


More information about the ome-devel mailing list