Hi,

for me looks like that the stereotypes list cannot be null as you make a new
ArrayList in the ProfileMetaModel's getType method:

           } else {
                List<StereotypeType> types = new
ArrayList<StereotypeType>(stereotypes.size());
                // collect StereotypeTypes
                    for (Iterator iter = stereotypes.iterator(); 
iter.hasNext();) {
                        Stereotype st = (Stereotype) iter.next();
                        types.add((StereotypeType)
getTypeSystem().getTypeForName(getFullName(st)));
                    }
                return new MultipleStereotypeType(getTypeSystem(), types);
            }


Could it be that the element of the list is null? It looks for me like the
TypeSystem getTypeForName is returning null.....Anyway i will try to make an
example to reproduce it....




Karsten Thoms wrote:
> 
> Seems to be a bug. Could you please open a bug report at  
> bugs.eclipse.org and attach a project for reproduction?
> 
> The method where the NPE occurs is (first line):
>       private static String computeName (List<StereotypeType> stereotypes) {
>               String result = stereotypes.get(0).getName();
>               for (int i=1; i<stereotypes.size(); i++) {
>                       result += ","+stereotypes.get(i).getName();
>               }
>               return result;
>       }
> 
> 
> So it seems that the list "stereotypes" is null somehow. But this  
> method is covered by a unit test and there it does not occur.  
> Therefore I need an example that helps to reproduce this.
> Until solution please avoid multiple stereotypes.
> 
> ~Karsten
> 
> Am 04.04.2007 um 09:34 schrieb dhol68:
> 
>>
>> Hi,
>>
>> I'm using openArchitectureWare 4.1.2, Build v20070314.
>> I apply to my class 2 stereotypes. When i call the hibernate  
>> cartridge from
>> my one i get the following error:
>>
>>
>> 11747 INFO  CompositeComponent - workflow
>> org/fornax/cartridges/uml2/hibernate/h
>> ibernate.oaw
>> 11747 INFO  CompositeComponent - XtendComponent: executing
>> 'org::fornax::cartrid
>> ges::uml2::hibernate::extensions::ModelTransformation'
>> 12077 ERROR WorkflowRunner     -
>> java.lang.NullPointerException
>>         at
>> org.openarchitectureware.uml2.profile.MultipleStereotypeType.computeN
>> ame(MultipleStereotypeType.java:30)
>>         at
>> org.openarchitectureware.uml2.profile.MultipleStereotypeType.<init>(M
>> ultipleStereotypeType.java:24)
>>         at
>> org.openarchitectureware.uml2.profile.ProfileMetaModel.getType(Profil
>> eMetaModel.java:109)
>>         at
>> org.openarchitectureware.expression.TypeSystemImpl$1.createNew(TypeSy
>> stemImpl.java:136)
>>         at org.openarchitectureware.workflow.util.Cache.get 
>> (Cache.java:26)
>>         at
>> org.openarchitectureware.expression.TypeSystemImpl.getType(TypeSystem
>> Impl.java:149)
>>         at
>> org.openarchitectureware.expression.ExecutionContextImpl.getType(Exec
>> utionContextImpl.java:171)
>>         at
>> org.openarchitectureware.expression.ast.TypeSelectExpression.executeT
>> ypeSelect(TypeSelectExpression.java:78)
>>         at
>> org.openarchitectureware.expression.ast.TypeSelectExpression.evaluate
>> Internal(TypeSelectExpression.java:68)
>>         at
>> org.openarchitectureware.expression.ast.Expression.evaluate(Expressio
>> n.java:41)
>>         at
>> org.openarchitectureware.expression.ast.CollectionExpression.evaluate
>> Internal(CollectionExpression.java:71)
>>         at
>> org.openarchitectureware.expression.ast.Expression.evaluate(Expressio
>> n.java:41)
>>         at
>> org.openarchitectureware.expression.ast.OperationCall.evaluateInterna
>> l(OperationCall.java:88)
>>         at
>> org.openarchitectureware.expression.ast.Expression.evaluate(Expressio
>> n.java:41)
>>         at
>> org.openarchitectureware.xtend.ast.ExpressionExtensionStatement.evalu
>> ateInternal2(ExpressionExtensionStatement.java:71)
>>         at
>> org.openarchitectureware.xtend.ast.ExpressionExtensionStatement.evalu
>> ateInternal(ExpressionExtensionStatement.java:55)
>>         at
>> org.openarchitectureware.xtend.ast.Extension.evaluate(Extension.java:
>> 117)
>>         at
>> org.openarchitectureware.expression.ast.OperationCall.evaluateInterna
>> l(OperationCall.java:103)
>>         at
>> org.openarchitectureware.expression.ast.Expression.evaluate(Expressio
>> n.java:41)
>>         at
>> org.openarchitectureware.expression.ast.ChainExpression.evaluateInter
>> nal(ChainExpression.java:41)
>>         at
>> org.openarchitectureware.expression.ast.Expression.evaluate(Expressio
>> n.java:41)
>>         at
>> org.openarchitectureware.expression.ast.ChainExpression.evaluateInter
>> nal(ChainExpression.java:41)
>>         at
>> org.openarchitectureware.expression.ast.Expression.evaluate(Expressio
>> n.java:41)
>>         at
>> org.openarchitectureware.xtend.ast.ExpressionExtensionStatement.evalu
>> ateInternal2(ExpressionExtensionStatement.java:71)
>>         at
>> org.openarchitectureware.xtend.ast.ExpressionExtensionStatement.evalu
>> ateInternal(ExpressionExtensionStatement.java:55)
>>         at
>> org.openarchitectureware.xtend.ast.Extension.evaluate(Extension.java:
>> 117)
>>         at
>> org.openarchitectureware.expression.ast.OperationCall.evaluateInterna
>> l(OperationCall.java:74)
>>         at
>> org.openarchitectureware.expression.ast.Expression.evaluate(Expressio
>> n.java:41)
>>         at
>> org.openarchitectureware.expression.ExpressionFacade.evaluate(Express
>> ionFacade.java:62)
>>         at
>> org.openarchitectureware.expression.ExpressionFacade.evaluate(Express
>> ionFacade.java:51)
>>         at
>> org.openarchitectureware.xtend.XtendComponent.invokeInternal(XtendCom
>> ponent.java:126)
>>         at
>> org.openarchitectureware.workflow.lib.AbstractWorkflowComponent2.invo
>> ke(AbstractWorkflowComponent2.java:38)
>>         at
>> org.openarchitectureware.workflow.container.CompositeComponent.intern
>> alInvoke(CompositeComponent.java:81)
>>         at
>> org.openarchitectureware.workflow.container.CompositeComponent.invoke
>> (CompositeComponent.java:69)
>>         at
>> org.openarchitectureware.workflow.container.CompositeComponent.intern
>> alInvoke(CompositeComponent.java:81)
>>         at
>> org.openarchitectureware.workflow.container.CompositeComponent.invoke
>> (CompositeComponent.java:69)
>>         at
>> org.openarchitectureware.workflow.WorkflowRunner.executeWorkflow(Work
>> flowRunner.java:243)
>>         at
>> org.openarchitectureware.workflow.WorkflowRunner.run(WorkflowRunner.j
>> ava:172)
>>         at
>> org.fornax.toolsupport.maven2.OawWorkflowMojo.execute(OawWorkflowMojo
>> .java:214)
>>         at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
>> nManager.java:412)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:534)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
>> fecycle(DefaultLifecycleExecutor.java:475)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
>> ltLifecycleExecutor.java:454)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
>> dleFailures(DefaultLifecycleExecutor.java:306)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> ts(DefaultLifecycleExecutor.java:273)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> fecycleExecutor.java:140)
>>         at org.apache.maven.DefaultMaven.doExecute 
>> (DefaultMaven.java:322)
>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java: 
>> 115)
>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> java:39)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>         at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>         at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>
>>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>>
>> Any ideas what is going wrong there?
>> -- 
>> View this message in context: http://www.nabble.com/Problems-with- 
>> multiple-steretotypes-applied-to-one-class- 
>> tf3524333s17564.html#a9832409
>> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------- 
>> ---
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to  
>> share your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php? 
>> page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Fornax-developer mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>>
> 
> ____________________________
> 
> Dipl.-Inf. (FH) Karsten Thoms
> Software-Architekt und Coach
> 
> Telefon: +49 (0) 231 / 98 60-210
> Telefax: +49 (0) 231 / 98 60-211
> Mobil: +49 (0) 163/4979708
> 
> http://www.itemis.de
> [EMAIL PROTECTED]
> 
> itemis GmbH & Co. KG
> Heinrich Str. 51
> 44536 Lünen
> 
> Rechtlicher Hinweis:
> Amtsgericht Dortmund, HRA 15248
> P.h.G.:
> itemis Verwaltungs GmbH, Amtsgericht Dortmund HRB 18216
> Geschäftsführer: Wolfgang Neuhaus, Jens Wagener
> 
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Fornax-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problems-with-multiple-steretotypes-applied-to-one-class-tf3524333s17564.html#a9833100
Sent from the Fornax-Platform mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to