Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8359809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:16:07+00:00 2026-06-09T11:16:07+00:00

I’d like to load 2 different input models (a .bpel and a .wsdl) in

  • 0

I’d like to load 2 different input models (a .bpel and a .wsdl) in my main template of Acceleo.

I loaded the ecore metamodels for both bpel and wsdl and I’d like to be able to use something like this:

[comment encoding = UTF-8 /]
[module generate('http:///org/eclipse/bpel/model/bpel.ecore','http://www.eclipse.org/wsdl/2003/WSDL')/]

[import org::eclipse::acceleo::module::sample::files::processJavaFile /]

[template public generate(aProcess : Process, aDefinition : Definition)]
[comment @main /]
    Process Name : [aProcess.name/]
    Def Location : [aDefinition.location/]  

[/template]

but when I run the acceleo template I get this error:

An internal error occurred during: "Launching Generate".
Could not find public template generate in module generate.

I think I have to modify the java launcher (generate.java) because right now it can’t take 2 models as arguments. Do you know how?
Thanks!

** EDIT from Kellindil suggestions:

Just to know if I understood it right, before I get to modify stuff:
I’m trying to modify the Generate() constructor.
I changed it in:

//MODIFIED CODE
public Generate(URI modelURI, URI modelURI2, File targetFolder, 
                List<? extends Object> arguments) {
initialize(modelURI, targetFolder, arguments);
}

In the generic case, I can see it calls the AbstractAcceleoGenerator.initialize(URI, File, List>?>), shall I call it twice, once per each model? like:

initialize(modelURI, targetFolder, arguments);
initialize(modelURI2, targetFolder, arguments);

Then, to mimic in my Generate() constructor the code that is in the super-implementation:

//NON MODIFIED ACCELEO CODE 
Map<String, String> AbstractAcceleoLauncher.generate(Monitor monitor) {
File target = getTargetFolder();
if (!target.exists() && !target.mkdirs()) {
        throw new IOException("target directory " + target + " couldn't be   created."); //$NON-NLS-1$ //$NON-NLS-2$
    }
    AcceleoService service = createAcceleoService();
    String[] templateNames = getTemplateNames();
    Map<String, String> result = new HashMap<String, String>();
    for (int i = 0; i < templateNames.length; i++) {
        result.putAll(service.doGenerate(getModule(), templateNames[i], getModel(), getArguments(),
                target, monitor));
    }

    postGenerate(getModule().eResource().getResourceSet());
    originalResources.clear();

    return result;
}

what shall I do? Shall I try to mimic what this method is doing in my Generate() constructor after the initialize() calls?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:16:10+00:00Added an answer on June 9, 2026 at 11:16 am

    What you wish to do is indeed possible with Acceleo, but it is not the “default” case that the generated launcher expects.

    You’ll have to mark the “generate” method of the generated java class as “@generated NOT” (or remove the “@generated” annotation from its javadoc altogether). In this method, what you need to do is mimic the behavior of the super-implementation (in AbstractAcceleoLauncher) does, loading two models instead of one and passing them on to AcceleoService#doGenerate.

    In other words, you will need to look at the API Acceleo provides to generate code, and use it in the way that fits your need. Our generated java launcher and the AcceleoService class are there to provide an example that fits the general use case. Changing the behavior can be done by following these samples.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:
I need to clean up various Word 'smart' characters in user input, including but
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I am writing an app with both english and french support. The app requests

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.