Most of these problems are probably related to limitations in the oAW import
mechanism. Search oAW forum and you will probably find similar questions and
answers.
However, one major thing is that Sculptor is currently not designed for this
kind of cross project imports. When you import the common stuff in the app
project the classes from common will be generated in the app project (in
each app project that are using the common stuff). That kind of duplication
is probably not what you would like? I understand why you would like to
separate the common stuff in a separate project, but it is currently not
supported. I don't know how to solve this right now. Any suggestions,
anyone?
/Patrik
amphoras wrote:
>
> Hi,
>
> I have some questions about the "import" statement. In my workspace, I
> have two projects. I have a "common" project and my "app" project. My
> app project has a design file that imports a design file from the "common"
> project. I use an import statement like this:
>
> import
> "platform:/resource/com.foo.common.model/src/main/resources/main-model.design"
>
> I noticed that it isn't enough that the project "com.foo.common.model" is
> in my workspace. It has to physically be in the same directory as my
> "app" project. When I used Eclipse's "import project" function to import
> this project from another directory into my workspace, I got all kinds of
> errors complaining about not being able to find the design file that I
> want to import. Is this to be expected? It was confusing since I could
> see the project and oAW/Sculptor could not.
>
> Then there was another weird problem. In my "common" project, I have
> several design files like this:
> main-model.design:
>
> import
> "platform:/resource/com.foo.common.model/src/main/resources/a-model.design"
> import
> "platform:/resource/com.foo.common.model/src/main/resources/b-model.design"
> import
> "platform:/resource/com.foo.common.model/src/main/resources/c-model.design"
>
> Application CommonModel {
> basePackage=com.foo.common.model
> }
>
> a-model, b-model, and c-model files each contain one ApplicationPart with
> one Module like this:
>
> ApplicationPart A {
>
> Module a {
> ...
> }
> }
>
> The Modules define enums, ValueObjects, BasicTypes, etc.
>
> In my "app" project, I thought that I could just import my "common"
> main-model.design file, but it turns out to not be true. The DSL editor
> shows validation errors unless I import the exact model.design file where
> the Domain Object is defined. This is a bit unwieldy because now I need
> an import statement for each module design files.
>
> So when I do import the correct module design file, then the validation
> error goes away, but I get a NullPointerException when I run the
> generator:
>
> 0 INFO WorkflowRunner -
> --------------------------------------------------------------------------------------
> 453 INFO WorkflowRunner - openArchitectureWare 4.3.0, Build
> 20080508-1430PRD
> 453 INFO WorkflowRunner - (c) 2005-2008 openarchitectureware.org and
> contributors
> 453 INFO WorkflowRunner -
> --------------------------------------------------------------------------------------
> 453 INFO WorkflowRunner - running workflow: workflow.oaw
> 453 INFO WorkflowRunner -
> 18473 INFO StandaloneSetup - Registering platform uri
> 'C:\projects\InforBUS\runtime-mdd3'
> 18707 INFO CompositeComponent - Workflow: executing workflow
> sculptorworkflow.oaw in workflow.oaw:3
> 18707 INFO CompositeComponent - Workflow: executing workflow
> org/fornax/cartridges/sculptor/dsl/parser/Parser.oaw in
> sculptorworkflow.oaw:29
> 18707 INFO CompositeComponent - ParserComponent(sculptordsl-parser)
> 20504 INFO CompositeComponent - IfComponent: executing if
> org/fornax/cartridges/sculptor/dsl/parser/Parser.oaw in
> org/fornax/cartridges/sculptor/dsl/parser/Parser.oaw:9
> 20504 INFO ConditionalComponent - CheckComponent(sculptordsl-checker):
> expression dslModel.eAllContents.union({dslModel}) check file(s):
> org::fornax::cartridges::sculptor::dsl::GenChecks
> org::fornax::cartridges::sculptor::dsl::Checks
> 20692 INFO CompositeComponent - XtendComponent(dslTransformation):
> executing 'transformation::DslTransformation'
> 21583 INFO CompositeComponent - CheckComponent: slot model check file(s):
> constraints/constraints
> 239909 ERROR AbstractExpressionsUsingWorkflowComponent - Error in
> Component of type org.openarchitectureware.check.CheckComponent:
> EvaluationException : java.lang.NullPointerException
> constraints::constraints.chk[1378,30] on line 33
> 'this.checkCyclicDependencies()'
>
> 244081 ERROR WorkflowRunner - Workflow interrupted. Reason:
> EvaluationException : java.lang.NullPointerException
> constraints::constraints.chk[1378,30] on line 33
> 'this.checkCyclicDependencies()'
>
> 244081 ERROR WorkflowRunner - ERROR in Component of type
> org.openarchitectureware.check.CheckComponent
> java.lang.NullPointerException [boolean checkCyclicDependencies(Module
> module)] in workflow: CheckComponent: slot model check file(s):
> constraints/constraints
> 244081 ERROR WorkflowRunner - ERROR in Component of type
> org.openarchitectureware.check.CheckComponent
> java.lang.NullPointerException [this.checkCyclicDependencies()] in
> workflow: CheckComponent: slot model check file(s):
> constraints/constraints
>
> My "app" project has an Entity that is referencing a ValueObject inside
> the "common" project, which seems like it should work. I haven't changed
> any code in the DependencyConstraints.java file either. Any idea why I am
> getting this error?
>
> Thanks,
> Polly
>
>
>
>
--
View this message in context:
http://www.nabble.com/-Sculptor--problems-importing-design-files-tp20236014s17564p20236482.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer