-1

I modeled the metamodel using the ecore tool and generated the Java classes. I would like to use it in my other application as a model library, using a .jar. I tried it, but I got an exception

[AppClassLoader@2f333739] error can't find fields of missing type privacyModel.PrivacyModelPackage
when weaving type com.security.model.validation.aspects.CreatePrincipalAspect
when weaving aspects 
when weaving 
 [Xlint:cantFindType]
Hello from aspect
Tommica
PrincipalId: Tommica
[AppClassLoader@2f333739] error can't find fields of missing type privacyModel.PrivacyModelFactory
when weaving type com.security.model.validation.aspects.CreatePrincipalAspect
when weaving aspects 
when weaving 
 [Xlint:cantFindType]
[AppClassLoader@2f333739] error can't determine methods of missing type privacyModel.PrivacyModelFactory
when weaving type com.security.model.validation.aspects.CreatePrincipalAspect
when weaving aspects 
when weaving 
 [Xlint:cantFindType]
[AppClassLoader@2f333739] error can't determine methods of missing type privacyModel.PrivacyModelFactory
when weaving type com.security.model.validation.aspects.CreatePrincipalAspect
when weaving aspects 
when weaving 

I don't use xtext or sirius. I am trying to develop Java app which use ecore model as external library.

  • It is a long time I used EMF. Yes it should be possible to use the classes generated from an ecore model as a library. But you need to include all of the direct and indirect dependencies of the generated code as dependencies of your application. In this case, it looks like the weaver doesn't know how to find them. – Stephen C Aug 13 '23 at 12:48
  • Please provide enough code so others can better understand or reproduce the problem. – Lore Aug 14 '23 at 09:00

0 Answers0