Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XPAND] java.net.MalformedURLException: unknown protocol: ar( [XPAND]java.net.MalformedURLException: unknown protocol: ar)
[XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692393] Wed, 15 April 2015 12:53 Go to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
Hi,
I am new to xtend and xpand. I am trying to access the model elements and element values in xpand template. while accessing the elements i am able to generating the output(source file) file. but when i am trying to access the element value i am getting java.net.MalformedURLException: unknown protocol: ar this exception.Please help me in this
Thank you in advance.
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692430 is a reply to message #1692393] Wed, 15 April 2015 16:15 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Set an exception breakpoint on MalformedURLException to debug this further. It is not clear which protocol is used here and why.

Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692450 is a reply to message #1692430] Wed, 15 April 2015 19:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
This error ususally occurs in context of artop (autosar) models. how do you read the model?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692465 is a reply to message #1692450] Thu, 16 April 2015 05:20 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
i am reading the model from my project path

<component class="org.eclipse.emf.mwe.utils.Reader">
<modelSlot value="model" />
<uri value="platform:/resource/${model}" />
</component>
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692466 is a reply to message #1692465] Thu, 16 April 2015 05:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
and how does the setup look like? and does the model have references to other models

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692470 is a reply to message #1692466] Thu, 16 April 2015 06:28 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
my models are of .arxml type and yes model is having references to other model. but here as of now i am just trying to access the same model references, in future i will access the other model references from the current model in one template file.
NOTE: The exception is getting only in case of accessing element value or reference.
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692473 is a reply to message #1692470] Thu, 16 April 2015 06:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
still the question: how do you do the setup (registering epackages etc)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692474 is a reply to message #1692473] Thu, 16 April 2015 07:16 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
No, i am not registering any epackages.
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692475 is a reply to message #1692474] Thu, 16 April 2015 07:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Why can the reader then at all read the model?
maybe it wont work standalone at all since artup uses sphinx wich requires a headless eclipse


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692479 is a reply to message #1692475] Thu, 16 April 2015 07:55 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
reader is reading the model, but in case of accessing reference value i am getting that error.

is it because of only sphinx or somrthing?

Please suggest me
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692480 is a reply to message #1692479] Thu, 16 April 2015 08:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Hi,

sure the reader is all you have in the workspace?
if i try reading the file without any registrations i get tons of errors

the problem is that the artop magic together with sphinx to no fill the ProtocolToFactoryMap of the Resource.registry


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692482 is a reply to message #1692480] Thu, 16 April 2015 08:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
p.s: how is the workflow executed? maybe you have some magic that it is not really standalone

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692487 is a reply to message #1692482] Thu, 16 April 2015 08:50 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Btw. the following code works nice for me: (requires org.artop.aal.examples.standalone)

module Test

Workflow {
	
	bean = xxx.AutosarAwareStandaloneSetup {
		platformUri = ".."
	}
	
	bean = org.artop.aal.examples.standalone.StandaloneResourceSet : rs {
		
	}
	
	component = org.eclipse.emf.mwe.utils.Reader {
		modelSlot = "model"
		uri = "platform:/resource/xxx/yyyy.arxml"
		resourceSet = rs	
	}
	
	...
	
}


with

import org.artop.aal.examples.standalone.AutosarStandaloneSetup;
import org.eclipse.emf.mwe.utils.StandaloneSetup;

public class AutosarAwareStandaloneSetup extends StandaloneSetup {
	
	public AutosarAwareStandaloneSetup() {
		super();
		AutosarStandaloneSetup.doSetupForAutosar40();
	}

}


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692488 is a reply to message #1692482] Thu, 16 April 2015 08:55 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
As per my understanding you are saying about the below one right?

<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
<platformUri value=".."/>
<registerGeneratedEPackage
value="autosar40.util.Autosar40Package"/>
<extensionMap>
<from value="arxml" />
<to value="autosar40.util.Autosar40ResourceFactoryImpl" />
</extensionMap>
</bean>

if i am correct then i am registering this in the workflow.
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692489 is a reply to message #1692488] Thu, 16 April 2015 08:56 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
No that is not sufficient, see my posting above

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692493 is a reply to message #1692489] Thu, 16 April 2015 09:09 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
i am sharing my workflow... please look into it

<?xml version="1.0"?>
<workflow>
<property name="model" value="project/folder/abc.arxml" />
<property name="systemmodel" value="project/folder/xyz.arxml" />

<property name="genPath" value="src-gen" />

<!-- set up EMF for standalone execution -->
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
<platformUri value=".."/>
<registerGeneratedEPackage
value="autosar40.util.Autosar40Package"/>
<extensionMap>
<from value="arxml" />
<to value="autosar40.util.Autosar40ResourceFactoryImpl" />
</extensionMap>
</bean>

<!-- instantiate metamodel -->
<bean id="mm_emf" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>

<!-- load model and store it in slot 'model' -->
<component class="org.eclipse.emf.mwe.utils.Reader">
<modelSlot value="systemmodel" />
<uri value="platform:/resource/${systemmodel}" />

</component>


<component class="org.eclipse.emf.mwe.utils.Reader">
<modelSlot value="model" />
<uri value="platform:/resource/${model}" />
</component>


<!-- Clear output directory -->
<component class="org.eclipse.emf.mwe.utils.DirectoryCleaner">
<directory value="${genPath}"/>
</component>


<!-- generate code -->
<component class="org.eclipse.xpand2.Generator">
<metaModel idRef="mm_emf"/>
<expand
value="templates::Test::MainGenerate FOR systemmodel" />
<genPath value="${genPath}"/>

<!--<metaModel class="org.eclipse.xtend.type.impl.java.JavaBeansMetaModel" />-->
</component>
</workflow>


from here i am accessing the model in xpand template. Any modification needed here?
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692498 is a reply to message #1692493] Thu, 16 April 2015 09:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
as is said: USE MY CODE (it should be translated to mwe1 in less then 1 min)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692503 is a reply to message #1692498] Thu, 16 April 2015 09:38 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
you are saying i have to copy the code you shared in my mwe file?

could you share the complete workflow (as i am new to this technology), so that i can understand it clearly.

Thank you.
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692506 is a reply to message #1692503] Thu, 16 April 2015 09:47 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Hi,

i have no mwe1 thus i cannot do the backport

what i posted before is my complete workflow. (what i do with the model does not matter)
so the only change you need is:

(1) you need that special standalonesetup that does the proper registration
(2) the xtext reader needs a special resourceset

so just from guessing:

<bean class="xxx.AutosarAwareStandaloneSetup" platformUri = ".." />

<bean id="myRS" class="org.artop.aal.examples.standalone.StandaloneResourceSet"/>

<component class="org.eclipse.emf.mwe.utils.Reader">
<modelSlot value="model" />
<uri value="platform:/resource/..." />
<resourceSet idRef="myRS"/>
</component>


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692512 is a reply to message #1692506] Thu, 16 April 2015 10:11 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
Thank you very much for the quick responses christian...
mwe1 file means mwe right?
I have both mwe and mwe2 workflow files. Both are independent files right?...Project will run even if i delete the mwe2 file. The code which you have shared first belongs to mwe2 file and the code u have shared in the previous post belongs to mwe file?
you want me to make changes in only one workflow file(mwe or mwe2) or both. And
i am bit confused with this christian.
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692514 is a reply to message #1692512] Thu, 16 April 2015 10:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
yes my code is mwe2 code
your code is mwe(1)
both do (basically) the same.

what i want you to do is to use

-> the autosar standalone setup i provided
-> pass the standaloneresourceset to the reader that reads the autosar model

it does not matter if you do this in an mwe(1) oder mwe2 file


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692524 is a reply to message #1692514] Thu, 16 April 2015 10:51 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
Thank you christian...
i do not have org.artop.aal.examples.standalone pulgin. could you please address me from where i can get this plugin?
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692525 is a reply to message #1692524] Thu, 16 April 2015 10:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
if you have artop you should be able to get it https://www.artop.org/gitweb/?p=development/core;a=tree;f=aal/examples;h=01b9e78a04569c63aa1df5ea2316638e9b5ed8f5;hb=HEAD

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692542 is a reply to message #1692525] Thu, 16 April 2015 12:13 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
HI,
i have downloaded the plugin and imported. and the code which you have shared...i put in mwe file for reading the model.But while running the mwe file i am getting the below error.
Please help

0 INFO WorkflowEngine - --------------------------------------------------------------------------------------
0 INFO WorkflowEngine - EMF Modeling Workflow Engine 1.2.1, Build v201309030422
0 INFO WorkflowEngine - (c) 2005-2009 openarchitectureware.org and contributors
0 INFO WorkflowEngine - --------------------------------------------------------------------------------------
0 INFO WorkflowEngine - running workflow: D:/workspace_NDE2/Test_Rte/src/workflow/generator.mwe
0 INFO WorkflowEngine -
780 ERROR WorkflowEngine - [ERROR]: Class not found: 'org.artop.aal.examples.standalone.StandaloneResourceSet'(Element: bean bean class='org.artop.aal.examples.standalone.StandaloneResourceSet' id='myRS' in D:/workspace_NDE2/Test_Rte/src/workflow/generator.mwe:22; Reported by: -UNKNOWN-)
780 WARN WorkflowEngine - [WARNING]: The type of the referred bean (java.lang.Object) is not assignable to org.eclipse.emf.ecore.resource.ResourceSet(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
780 ERROR WorkflowEngine - Workflow interrupted because of configuration errors.


And the java code you shared...where should i create the java file? and how does the mwe file will know it?
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692543 is a reply to message #1692542] Thu, 16 April 2015 12:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
sure you have Class org.artop.aal.examples.standalone.StandaloneResourceSet on the classpath ?!?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692544 is a reply to message #1692543] Thu, 16 April 2015 12:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
the error

ERROR]: Class not found: 'org.artop.aal.examples.standalone.StandaloneResourceSet'(Element: bean bean class='org.artop.aal.examples.standalone.StandaloneResourceSet' id='myRS' in D:/workspace_NDE2/Test_Rte/src/workflow/generator.mwe:22; Reported by: -UNKNOWN-)

says you have not


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692545 is a reply to message #1692544] Thu, 16 April 2015 12:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
(in doubt copy & paste the class to your project)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692546 is a reply to message #1692543] Thu, 16 April 2015 12:17 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
yes
i have copied the plugin in dropins folder and i am able to see it.
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692550 is a reply to message #1692546] Thu, 16 April 2015 12:41 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
sure? does it work now? did you add a plugin depenency in your mwe plugin?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692551 is a reply to message #1692550] Thu, 16 April 2015 12:51 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
Hi,
i have copied that particular class into my project and it is working fine now. Smile
Thank you very much christian. Helped me a lot.
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692627 is a reply to message #1692551] Fri, 17 April 2015 05:26 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
Hi,
while accessing i am getting eProxyURI error for one reference...
how can i resolve it?
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692628 is a reply to message #1692627] Fri, 17 April 2015 05:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Maybe it is actually a proxy that cannot be resolved: did you double check that it is a local reference?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692637 is a reply to message #1692628] Fri, 17 April 2015 07:33 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
It is resolved...
now i want to access multiple models with in one template at a time
can you suggest me on this...
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692638 is a reply to message #1692637] Fri, 17 April 2015 07:34 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Simply read multiple models?!?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692644 is a reply to message #1692638] Fri, 17 April 2015 07:42 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
i am defining multiple models in reader and in generator i am defining like below

<expand value="templates::Test::MainGenerate FOREACH {systemmodel,model}" />

in this case (in output file) the second model data is replacing the first model output. Because i want to generate a single output for multiple models.
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692647 is a reply to message #1692644] Fri, 17 April 2015 07:54 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
as said before i have no xpand to test, but as i remember

<expand value="templates::Test::MainGenerate(model) FOR systemmodel" />

(define the root template with two lists)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692659 is a reply to message #1692647] Fri, 17 April 2015 09:35 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
can you elaborate it please.
<expand value="templates::Test::MainGenerate(model) FOR systemmodel" /> this is showing error(workflow interrupt).
is there any another way to define two models in a generator file

Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692660 is a reply to message #1692659] Fri, 17 April 2015 09:38 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Please give the full trace

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692663 is a reply to message #1692660] Fri, 17 April 2015 09:41 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
As i said
You can define a template having parameters

<<DEFINE Root(List second) FOR List>>

And call it as i said


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692665 is a reply to message #1692660] Fri, 17 April 2015 09:42 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
are you asking about the error?
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692667 is a reply to message #1692665] Fri, 17 April 2015 09:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Yes

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692668 is a reply to message #1692667] Fri, 17 April 2015 09:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Yes

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692669 is a reply to message #1692667] Fri, 17 April 2015 10:01 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
i think i am confused, the way you have defined the models in the generator file i am also defined the same....
but workflow is interrupting while running.

is it the right way to define the multiple models?
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692671 is a reply to message #1692669] Fri, 17 April 2015 10:03 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
I am getting the following error:

ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component of type org.eclipse.xpand2.Generator:
EvaluationException : No Definition 'templates::Rte::RteGenerate(autosartoplevelstructure::AUTOSAR) for autosartoplevelstructure::AUTOSAR' found!
[23,57] on line 1 'EXPAND templates::Rte::RteGenerate(model) FOR systemmodel'

5339 ERROR WorkflowEngine - Workflow interrupted. Reason: No Definition 'templates::Rte::RteGenerate(autosartoplevelstructure::AUTOSAR) for autosartoplevelstructure::AUTOSAR' found!
5339 ERROR WorkflowEngine - [ERROR]: No Definition 'templates::Rte::RteGenerate(autosartoplevelstructure::AUTOSAR) for autosartoplevelstructure::AUTOSAR' found!(Element: EXPAND templates::Rte::RteGenerate(model) FOR systemmodel; Reported by: Generator: generating 'templates::Rte::RteGenerate(model) FOR systemmodel' => [APPEND:src-gen(overwrite=true,append=true,fileEncoding=Cp1252), src-gen/])
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692672 is a reply to message #1692671] Fri, 17 April 2015 10:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Hi i dont know if you have one or multiple models in a slot
The errormessage isclear
Simply define the template it wants to have
!!!


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692673 is a reply to message #1692672] Fri, 17 April 2015 10:11 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
yesterday i have share the generator code...there you can see the slots...
but i am not defining both models with in the same component tag in the generator file
Please look into it and suggest me if any changes are req...

[Updated on: Fri, 17 April 2015 10:19]

Report message to a moderator

Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692678 is a reply to message #1692673] Fri, 17 April 2015 10:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Hi have a look the error message. Then have a look at your root template. The signature of the root template and the expand call in the workflow has to match

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692681 is a reply to message #1692678] Fri, 17 April 2015 10:47 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
for clear idea....i am sharing my reader and generator code
please suggest me if ant changes needed in that area....

<component class="org.eclipse.emf.mwe.utils.Reader">
<modelSlot value="systemmodel" />
<uri value="platform:/resource/${systemmodel}" />
<resourceSet idRef="myRS"/>
</component>

<component class="org.eclipse.emf.mwe.utils.Reader">
<modelSlot value="model" />
<uri value="platform:/resource/${model}" />

</component>


<component class="org.eclipse.xpand2.Generator">
<metaModel idRef="mm_emf"/>
<expand
value="templates::Rte::RteGenerate FOR systemmodel" />

Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692683 is a reply to message #1692681] Fri, 17 April 2015 10:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
Sry i cannot help you if you donot provide sufficient information. Please read the error message and explain it in your words to me

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692684 is a reply to message #1692681] Fri, 17 April 2015 10:52 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
i have defined two models in two components and modelSlot values are different ...

<expand value="templates::Rte::RteGenerate FOREACH {systemmodel,model}" />
In this case i am getting the output of model's data (but not systemmodel's output) .

plz suggest me in this...
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692686 is a reply to message #1692684] Fri, 17 April 2015 10:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
HI,

i tried to explain this to you for the last 20 post !!!

so what happens if
<expand value="templates::Rte::RteGenerate(model) FOR systemmodel" />


<<DEFINE RteGenerate(TypeOfModel model) FOR TypeOfSystemModel>>


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692704 is a reply to message #1692686] Fri, 17 April 2015 12:00 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
sorry...as i am new to this i don't have depth idea on this that is why i am confusing
by the way what do you mean by type of model christian?

Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692706 is a reply to message #1692704] Fri, 17 April 2015 12:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
E.g <<DEFINE RteGenerate(AUTOSAR model) FOR AUTOSAR>> or E.g <<DEFINE RteGenerate(EObject model) FOR EObject>> or <<DEFINE RteGenerate(List model) FOR List>> or <<DEFINE RteGenerate(ABC model) FOR DEF>> or ....
if your cased the damn error message says:

templates::Rte::RteGenerate(autosartoplevelstructure::AUTOSAR) for autosartoplevelstructure::AUTOSAR'

thus o what a great wonder it might be <<DEFINE RteGenerate(autosartoplevelstructure::AUTOSAR model) FOR autosartoplevelstructure::AUTOSAR>>


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692708 is a reply to message #1692706] Fri, 17 April 2015 12:20 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
i have defined the same christian «DEFINE RteGenerate(autosartoplevelstructure::AUTOSAR model) FOR autosartoplevelstructure::AUTOSAR»

but i am not taking about the error....it is getting excecuted but the data is not getting from the model file only systemmodel data is getting in the output file
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692709 is a reply to message #1692708] Fri, 17 April 2015 12:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
are you sure there is a model????? how does your template look like? did you add a debug statement or something like that there? is it called? did you use the debugger? ...
this is what i cannot do!!!


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692710 is a reply to message #1692709] Fri, 17 April 2015 12:26 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
ya there is a model christian...and i am not using the debugger
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692711 is a reply to message #1692710] Fri, 17 April 2015 12:27 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
so the problem is in your logic right?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692712 is a reply to message #1692711] Fri, 17 April 2015 12:35 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
i am not sure...because the text which i have written in accessing the model file is getting in the output file but the data i am not getting
may be i have to change the way of calling the model file or something .... Smile
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692715 is a reply to message #1692712] Fri, 17 April 2015 12:37 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
HI,

i have no idea what you do with the information you do NOT provide

add the following to the template

<<FILE "xxxx.txt">>
<<model>> <<this>>
<<ENDFILE>>

how does the resulting file look like


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692723 is a reply to message #1692715] Fri, 17 April 2015 13:04 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
the output file has written information of systemmodel elements.......
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692725 is a reply to message #1692723] Fri, 17 April 2015 13:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
this does not answer my question:

is there one element in the resulting file or two

<<FILE "xxxx.txt">>
Second:<<model>>
First: <<this>>
<<ENDFILE>>


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692730 is a reply to message #1692725] Fri, 17 April 2015 13:17 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
two
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692732 is a reply to message #1692730] Fri, 17 April 2015 13:19 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
so then the reader works fine and the error is beween

<<DEFINE RteGenerate(autosartoplevelstructure::AUTOSAR model) FOR autosartoplevelstructure::AUTOSAR>>
//HERE
<<ENDDEFINE>>


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1692736 is a reply to message #1692732] Fri, 17 April 2015 13:23 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
ya
Thanks for the useful information christian...Smile
i will look into it...
Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1693627 is a reply to message #1692736] Mon, 27 April 2015 05:57 Go to previous messageGo to next message
lucky star is currently offline lucky starFriend
Messages: 44
Registered: April 2015
Member
HI,
continuation to above...
while i am calling one model elements within another model...i am trying to print <<model.eAllContents>> in this case i am getting the list of all the elements/modules, but when i am calling the modules(i.e «EXPAND RTEMODULE FOREACH AUTOSAR::EcucDefs::Rte» or «model.eAllContents.typeSelect(AUTOSAR::EcucDefs::Rte)») it is showing error "unknown type"...

6727 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component of type org.eclipse.xpand2.Generator:
EvaluationException : Unknown type 'AUTOSAR::EcucDefs::Rte'
[318,22] on line 9 'AUTOSAR::EcucDefs::Rte'
templates::Rte.xpt[919,49] on line 39 'EXPAND Rte_Type_H::include_Type_H(model) FOR this'
templates::Rte.xpt[172,24] on line 7 'EXPAND Rte_Type_H(model)'
[23,57] on line 1 'EXPAND templates::Rte::RteGenerate(model) FOR systemmodel'

6727 ERROR WorkflowEngine - Workflow interrupted. Reason: Unknown type 'AUTOSAR::EcucDefs::Rte'
6727 ERROR WorkflowEngine - [ERROR]: Unknown type 'AUTOSAR::EcucDefs::Rte'(Element: model.eAllContents.typeSelect(AUTOSAR::EcucDefs::Rte); Reported by: Generator: generating 'templates::Rte::RteGenerate(model) FOR systemmodel' => [APPEND:src-gen(overwrite=true,append=true,fileEncoding=Cp1252), src-gen/])
6727 ERROR WorkflowEngine - [ERROR]: Unknown type 'AUTOSAR::EcucDefs::Rte'(Element: EXPRESSION: model.eAllContents.typeSelect(AUTOSAR::EcucDefs::Rte); Reported by: Generator: generating 'templates::Rte::RteGenerate(model) FOR systemmodel' => [APPEND:src-gen(overwrite=true,append=true,fileEncoding=Cp1252), src-gen/])
6727 ERROR WorkflowEngine - [ERROR]: Unknown type 'AUTOSAR::EcucDefs::Rte'(Element: include_Type_H(autosartoplevelstructure::AUTOSAR model) : autosartoplevelstructure::AUTOSAR; Reported by: Generator: generating 'templates::Rte::RteGenerate(model) FOR systemmodel' => [APPEND:src-gen(overwrite=true,append=true,fileEncoding=Cp1252), src-gen/])
6727 ERROR WorkflowEngine - [ERROR]: Unknown type 'AUTOSAR::EcucDefs::Rte'(Element: EXPAND Rte_Type_H::include_Type_H(model) FOR this; Reported by: Generator: generating 'templates::Rte::RteGenerate(model) FOR systemmodel' => [APPEND:src-gen(overwrite=true,append=true,fileEncoding=Cp1252), src-gen/])
6727 ERROR WorkflowEngine - [ERROR]: Unknown type 'AUTOSAR::EcucDefs::Rte'(Element: «FILE "Rte_Type.h"»...«ENDFILE»; Reported by: Generator: generating 'templates::Rte::RteGenerate(model) FOR systemmodel' => [APPEND:src-gen(overwrite=true,append=true,fileEncoding=Cp1252), src-gen/])
6727 ERROR WorkflowEngine - [ERROR]: Unknown type 'AUTOSAR::EcucDefs::Rte'(Element: Rte_Type_H(autosartoplevelstructure::AUTOSAR model) : autosartoplevelstructure::AUTOSAR; Reported by: Generator: generating 'templates::Rte::RteGenerate(model) FOR systemmodel' => [APPEND:src-gen(overwrite=true,append=true,fileEncoding=Cp1252), src-gen/])
6727 ERROR WorkflowEngine - [ERROR]: Unknown type 'AUTOSAR::EcucDefs::Rte'(Element: EXPAND Rte_Type_H(model); Reported by: Generator: generating 'templates::Rte::RteGenerate(model) FOR systemmodel' => [APPEND:src-gen(overwrite=true,append=true,fileEncoding=Cp1252), src-gen/])
6727 ERROR WorkflowEngine - [ERROR]: Unknown type 'AUTOSAR::EcucDefs::Rte'(Element: RteGenerate(autosartoplevelstructure::AUTOSAR model) : autosartoplevelstructure::AUTOSAR; Reported by: Generator: generating 'templates::Rte::RteGenerate(model) FOR systemmodel' => [APPEND:src-gen(overwrite=true,append=true,fileEncoding=Cp1252), src-gen/])
6727 ERROR WorkflowEngine - [ERROR]: Unknown type 'AUTOSAR::EcucDefs::Rte'(Element: EXPAND templates::Rte::RteGenerate(model) FOR systemmodel; Reported by: Generator: generating 'templates::Rte::RteGenerate(model) FOR systemmodel' => [APPEND:src-gen(overwrite=true,append=true,fileEncoding=Cp1252), src-gen/])


Re: [XPAND] java.net.MalformedURLException: unknown protocol: ar [message #1693739 is a reply to message #1693627] Tue, 28 April 2015 04:48 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
for new problems please open new topics.
make sure the metamodel you use is registered?!?
which one is used in the generator?!?
is one explicitely configured or is it the default


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Previous Topic:[Xtend] provide interface for generation
Next Topic:Problems with flow port stereotype with Luna and Acceleo
Goto Forum:
  


Current Time: Thu Oct 10 21:28:28 GMT 2024

Powered by FUDForum. Page generated in 0.10449 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top