BuildingServicesInJava: unable to find "preset run configuration for the service generator"

55 views
Skip to first unread message

Tim rdf

unread,
Jan 7, 2012, 10:20:37 AM1/7/12
to sadi-d...@googlegroups.com
sadi,

While walking through http://code.google.com/p/sadi/wiki/BuildingServicesInJava
a colleague and I have independently hit a snag at:

"If you are working in Eclipse, there will be a preset run
configuration for the service generator. Choose Run » Run
configurations… and find generate sadi service under Maven Build in
the left side panel of the dialog. "

The problem: No run configurations are listed.

I'm including a link to a screenshot [1] of the "Maven Build" in the
left side panel, which does not show any configurations.

I am using the following resources:
* Eclipse SDK Version: 3.7.0 (Indigo)
* m2e Version 1.0
* http://sadi.googlecode.com/files/sadi-service-skeleton-0.1.1.zip

Some notes:

1) When creating the eclipse project, the option "Create project from
existing source" was not available.
Instead, I selected the sadi-services directory for the "Location"
field. (Perhaps just a disparity in Eclipse versions?)

2) Although I'm assuming m2e installs its own maven, I am running
Apache Maven 3.0.3 in my regular command line environment.

3) The file "doc/eclipse/generate sadi service.launch" is visible from
the package explorer.

Thank you for your consideration.

Regards,
Tim Lebo


[1] https://github.com/timrdf/DataFAQs/raw/master/doc/sadi/sadi-generate-service-run-config-missing.png

Tim rdf

unread,
Jan 7, 2012, 11:10:15 AM1/7/12
to sadi-d...@googlegroups.com
On Sat, Jan 7, 2012 at 10:20 AM, Tim rdf <tim...@gmail.com> wrote:

> "If you are working in Eclipse, there will be a preset run
> configuration for the service generator. Choose Run » Run
> configurations… and find generate sadi service under Maven Build in
> the left side panel of the dialog. "
>
> The problem: No run configurations are listed.

...

> Some notes:
>
> 1) When creating the eclipse project, the option "Create project from
> existing source" was not available.
> Instead, I selected the sadi-services directory for the "Location"
> field. (Perhaps just a disparity in Eclipse versions?)

Using
"File > Import..." (as suggested in
http://code.google.com/p/sadi/wiki/Dependencies)
instead of
"File > New > Java Project" (as stated in
http://code.google.com/p/sadi/wiki/BuildingServicesInJava)
will provide one maven build run configuration named "sadi-services".

But "generate sadi service" is still not appearing.

Thanks,
Tim

Luke McCarthy

unread,
Jan 7, 2012, 12:40:05 PM1/7/12
to sadi-d...@googlegroups.com
On 2012-01-07, at 7:20 AM, Tim rdf wrote:

> 1) When creating the eclipse project, the option "Create project from
> existing source" was not available.
> Instead, I selected the sadi-services directory for the "Location"
> field. (Perhaps just a disparity in Eclipse versions?)

Must be. I'll install the latest Eclipse next week and look into it.

> 3) The file "doc/eclipse/generate sadi service.launch" is visible from
> the package explorer.

In my version of Eclipse, I can right click on this file in the Package explorer (which is in the left-hand panel by default) and choose "Run as…" and use the option that appears "generate sadi service".

Unfortunately, you need to edit the options in that run configuration. You can try to do that by editing the .launch XML itself, or you can just run it as it is, which will generate a service you probably don't want, but will hopefully also make the configuration visible in the Run menu so that subsequent tutorial instructions will make sense. Let me know if this works and I'll update the wiki for the time being (i.e.: until next week when I will install the new Eclipse and update the tutorial accordingly.

Cheers,

Luke

Tim rdf

unread,
Jan 7, 2012, 1:09:22 PM1/7/12
to sadi-d...@googlegroups.com
Hi, Luke.
Thanks for responding on a weekend.
Responses within.
Regards,
Tim


On Sat, Jan 7, 2012 at 12:40 PM, Luke McCarthy <lu...@elmonline.ca> wrote:
> On 2012-01-07, at 7:20 AM, Tim rdf wrote:
>
>> 1) When creating the eclipse project, the option "Create project from
>> existing source" was not available.
>> Instead, I selected the sadi-services directory for the "Location"
>> field. (Perhaps just a disparity in Eclipse versions?)
>
> Must be.  I'll install the latest Eclipse next week and look into it.
>
>> 3) The file "doc/eclipse/generate sadi service.launch" is visible from
>> the package explorer.
>
> In my version of Eclipse, I can right click on this file in the Package explorer (which is in the left-hand panel by default) and choose "Run as…" and use the option that appears "generate sadi service".

The only option that I am offered is "Run Configurations..."
Opening that lists "sadi-services" and "sadi.service" under "Maven Build"

Which version of Eclipse are you using? I can try to downgrade to get
it to work for this weekend.


>
> Unfortunately, you need to edit the options in that run configuration.

I'm assuming just these, right?

<listEntry value="serviceName=uniprot2pubmed"/>
<listEntry value="serviceClass=com.example.UniProt2PubMed"/>
<listEntry value="inputClass=http://purl.oclc.org/SADI/LSRN/UniProt_Record"/>
<listEntry value="outputClass=http://sadiframework.org/examples/uniprot2pubmed.owl#AnnotatedUniProtRecord"/>
<listEntry value="contactEmail=your-email-address"/>


> You can try to do that by editing the .launch XML itself, or you can just run it as it is,


Doesn't seem that I can run it :-/


> which will generate a service you probably don't want, but will hopefully also make the configuration visible in the Run menu so that subsequent tutorial instructions will make sense.


The rest of the tutorial makes sense; I've done it from the command
line. I'm now trying to get serious and develop some of my own initial
services, which I'll need Eclipse to stay sane.
Are there advantages to invoking the "generate sadi service" from
Eclipse versus from the command line? Perhaps I can just switch back
an forth.


>  Let me know if this works and I'll update the wiki for the time being (i.e.: until next week when I will install the new Eclipse and update the tutorial accordingly.

Thanks for revisiting the documentation.

Regards,
Tim

Luke McCarthy

unread,
Jan 7, 2012, 1:53:54 PM1/7/12
to sadi-d...@googlegroups.com
On 2012-01-07, at 10:09 AM, Tim rdf wrote:

> Which version of Eclipse are you using? I can try to downgrade to get
> it to work for this weekend.

I have Eclipse 3.6.1 (Helios) and Eclipse 3.5.2 here and it works in both. Helios is much better, though, if you're going that way.

> I'm assuming just these, right?
>
> <listEntry value="serviceName=uniprot2pubmed"/>
> <listEntry value="serviceClass=com.example.UniProt2PubMed"/>
> <listEntry value="inputClass=http://purl.oclc.org/SADI/LSRN/UniProt_Record"/>
> <listEntry value="outputClass=http://sadiframework.org/examples/uniprot2pubmed.owl#AnnotatedUniProtRecord"/>
> <listEntry value="contactEmail=your-email-address"/>

Yes.

> Are there advantages to invoking the "generate sadi service" from
> Eclipse versus from the command line? Perhaps I can just switch back
> an forth.

Only the principle options are right there to be edited. The generate command line can otherwise get very long with a lot of opportunity for typos.

Switching back and forth will be fine — many years ago (before the m2e plugin), that was the only way to do things. You just have to refresh the Eclipse workspace after each Maven operation.

Cheers,

Luke

Tim rdf

unread,
Jan 7, 2012, 2:56:22 PM1/7/12
to sadi-d...@googlegroups.com
On Sat, Jan 7, 2012 at 1:53 PM, Luke McCarthy <lu...@elmonline.ca> wrote:
> On 2012-01-07, at 10:09 AM, Tim rdf wrote:
>
>> Which version of Eclipse are you using? I can try to downgrade to get
>> it to work for this weekend.
>
> I have Eclipse 3.6.1 (Helios) and Eclipse 3.5.2 here and it works in both.  Helios is much better, though, if you're going that way.


Thanks.
I installed a fresh Helios 3.6.1
and m2e 1.0 from http://download.eclipse.org/technology/m2e/releases
I used "File > Import.." to create "Existing Projects into Workspace"
from the uncompressed sadi-service-skeleton-0.1.1.zip
Still no run configurations available when right clicking on "generate
sadi service.launch".

When trying "File » New » Java Project and then choose Create project
from existing source" as per [1], I cannot find option "Create project
from existing source".

[1] http://code.google.com/p/sadi/wiki/BuildingServicesInJava

>
>> I'm assuming just these, right?
>>
>> <listEntry value="serviceName=uniprot2pubmed"/>
>> <listEntry value="serviceClass=com.example.UniProt2PubMed"/>
>> <listEntry value="inputClass=http://purl.oclc.org/SADI/LSRN/UniProt_Record"/>
>> <listEntry value="outputClass=http://sadiframework.org/examples/uniprot2pubmed.owl#AnnotatedUniProtRecord"/>
>> <listEntry value="contactEmail=your-email-address"/>
>
> Yes.

Great, thanks.


>
>> Are there advantages to invoking the "generate sadi service" from
>> Eclipse versus from the command line? Perhaps I can just switch back
>> an forth.
>
> Only the principle options are right there to be edited.  The generate command line can otherwise get very long with a lot of opportunity for typos.
>
> Switching back and forth will be fine — many years ago (before the m2e plugin), that was the only way to do things.  You just have to refresh the Eclipse workspace after each Maven operation.


Given all of the trouble I've been having, I'll just fall back to the
command line to generate the Java stubs and press on. I was just
trying not to miss out on the features that were added for Eclipse.

Thanks for your help.

Regards,
Tim

Luke McCarthy

unread,
Jan 7, 2012, 3:15:29 PM1/7/12
to sadi-d...@googlegroups.com
Okay. I'll spend Monday downloading the latest versions of things and updating the documentation. I suspect that somehow we're using different Maven plugins and I see that the Eclipse 3.7.1 download now includes Maven integration, so I'll rewrite the docs from that perspective.

I've attached a screenshot of what I see when I right-click on the run configuration, just in case it helps:

Screen shot 2012-01-07 at 12.12.25 PM.png

Tim rdf

unread,
Jan 7, 2012, 3:22:29 PM1/7/12
to sadi-d...@googlegroups.com
On Sat, Jan 7, 2012 at 3:15 PM, Luke McCarthy <lu...@elmonline.ca> wrote:
> Okay.  I'll spend Monday downloading the latest versions of things and updating the documentation.


Thanks again.
Please let me know if and when you would like me to review the documentation.

The screenshot you show is what I'm expecting to see, but I only get
"Run Configurations".

Regards,
Tim

Luke McCarthy

unread,
Jan 7, 2012, 3:25:05 PM1/7/12
to sadi-d...@googlegroups.com
I just fired up Eclipse and checked… I have version 0.12 of the Maven integration. In the past it has updated automatically, and when I try to update it manually from within Eclipse, it shows no updates available.

So it does appear that the Maven plugin has changed dramatically. I'll update the wiki on Monday and let you know.

Tim rdf

unread,
Jan 7, 2012, 3:31:37 PM1/7/12
to sadi-d...@googlegroups.com
Sounds good. I'll stop eating up your weekend :-)

Regards,
Tim

Peter Ansell

unread,
Jan 7, 2012, 3:47:45 PM1/7/12
to sadi-d...@googlegroups.com
The launch configuration file syntax changed between M2Eclipse and
M2E. You should be able to manually edit the files to change the
launch configuration tag to look like the following, where the type
changed from that used by M2Eclipse:

<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">

Cheers,

Peter

Tim rdf

unread,
Jan 10, 2012, 4:13:26 PM1/10/12
to sadi-d...@googlegroups.com
Peter,

Making this change allows the run configuration to appear on right-click.

Thanks for your help.

-Tim

Luke McCarthy

unread,
Jan 17, 2012, 5:33:53 PM1/17/12
to sadi-d...@googlegroups.com
I just realized that I didn't follow-up here, but the wiki (and the project skeleton) were updated last week (and again just now to fix a discrepancy in the project skeleton file name…)

Achille Zappa

unread,
Jan 19, 2012, 5:34:23 AM1/19/12
to sadi-d...@googlegroups.com
Hi all!
(New semantic web technologies researcher)
I'm interested in exploring the power of sadi services.
I downloaded Eclipse Indigo 3.7.1 and also Eclipse 4.1.1, to be updated with software.
They didn't have maven preinstalled!! (infact no "maven build" present). So i installed (install new software) "m2e the Maven integration plugin 1.0.1" in Eclipse. Now when I import (as general java or maven?) the sadi-service project I got the generate-sadi-service option in right menu BUT when i try to "RUN" it I got the problem : "Source locator does not exist: org.maven.ide.eclipse.launching.MavenSourceLocator"
and nothing works !
Is there something wrong in my process? Do you know where is the problem?
cheers

Mark

unread,
Jan 19, 2012, 5:43:01 AM1/19/12
to sadi-d...@googlegroups.com, Achille Zappa
Hi Achille,

Luke will likely respond in detail in a few hours (he's on Pacific time,
so he wont be waking up for another 4-5 hrs); however, a very similar
conversation happened on the sadi-dev list just last week... perhaps look
there for answers (and more generally, look/post there about developer
problems).

Cheers!

Mark

--
Dr. Mark Wilkinson
Associate Professor, Medical Genetics
PI Bioinformatics, Institute for Heart + Lung Health
University of British Columbia
Vancouver, BC, Canada

> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1901 / Virus Database: 2109/4752 - Release Date: 01/18/12

Luke McCarthy

unread,
Jan 19, 2012, 5:44:48 AM1/19/12
to sadi-d...@googlegroups.com
Hi,

Can you check the version in the sadi-services/pom.xml file? If if isn't version 0.1.1-e3.7, you need to download the skeleton from http://sadi.googlecode.com/files/sadi-service-skeleton-0.1.1-e3.7.zip (which is the version that works with Eclipse 3.7 and it's built-in Maven integration[1])

If you previously tried to import the old skeleton, you have to make sure the old project is completely removed from the workspace (i.e.: check the box for "delete contents on disk" when you delete the project) before you try again.

If you do have version 0.1.1-e3.7 of the skeleton, this shouldn't be happening and I'm very confused...

Cheers,

Luke

[1] the "Eclipse IDE for Java Developers" (i.e.: the one you can download from http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/indigosr1) includes the Maven plugin

Achille Zappa

unread,
Jan 19, 2012, 9:51:47 AM1/19/12
to Mark, sadi-d...@googlegroups.com
Hi,

thank you
I solved the problem, i think, downloading the new updated version of sadi-template "sadi-service-skeleton-0.1.1-e3.7.zip" , now the maven issue is gone.

Cheers
Achille



2012/1/19 Mark <ma...@illuminae.com>
Reply all
Reply to author
Forward
0 new messages