Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » "does not translate to an instance class"
"does not translate to an instance class" [message #87720] Thu, 28 June 2007 21:03 Go to next message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

I'm still trying to debug my NPE when I create the schema. I have trying
to find a simple example that will give me NPE on Schema creation by
shorten/simplifying my original xsds. All the xsds that failed so far had
used ecore:references. If I removed the ecore annotation from one xsd
file. The schema would build. However, it did not work in all cases. This
one simplified version gave me this error:

1813 [main] ERROR org.eclipse.emf.teneo.jpox.mapper.JPOXMappingException
- Uri: ComponentDefinition does not translate to an instance class
org.eclipse.emf.teneo.jpox.mapper.JPOXMappingException: Uri:
ComponentDefinition does not translate to an instance class
at
org.eclipse.emf.teneo.jpox.mapper.MappingUtil.getImplNameOfE Class(MappingUtil.java:60)
at
org.eclipse.emf.teneo.jpox.mapper.association.ManyToOneMappe r.map(ManyToOneMapper.java:100)
at
org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.processPersistableMember(EClassFeatureMapper.java:153)
at
org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.map(EClassFeatureMapper.java:90)
at
org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.proce ssClassAnnotation(JPOXMappingGenerator.java:250)
at
org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.gener ate(JPOXMappingGenerator.java:133)
at
org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.createORMapper File(GenerateJDO.java:104)
at org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.main(GenerateJ DO.java:82)

What does this mean?
Re: "does not translate to an instance class" [message #87734 is a reply to message #87720] Fri, 29 June 2007 04:15 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
It means that Teneo can't find the class which was generated for the eclass ComponentDefinition. A
reason can be that the generated EPackageImpl of the epackage of ComponentDefinition has not been
initialised or that you use the Teneo menu option to generate the jdo file and the java class of
ComponentDefinition is not in one of the projects containing the ecores/xsd which you selected for
the jdo generation.

If you have a simple example which fails then I can look at it further. Btw, there is also another
user (see recent thread with title: Re: [Teneo / JPOX]) which has the same issue.

gr. Martin

Julia wrote:
> Hi Martin,
>
> I'm still trying to debug my NPE when I create the schema. I have trying
> to find a simple example that will give me NPE on Schema creation by
> shorten/simplifying my original xsds. All the xsds that failed so far
> had used ecore:references. If I removed the ecore annotation from one
> xsd file. The schema would build. However, it did not work in all cases.
> This one simplified version gave me this error:
>
> 1813 [main] ERROR
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingException - Uri:
> ComponentDefinition does not translate to an instance class
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingException: Uri:
> ComponentDefinition does not translate to an instance class
> at
> org.eclipse.emf.teneo.jpox.mapper.MappingUtil.getImplNameOfE Class(MappingUtil.java:60)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.association.ManyToOneMappe r.map(ManyToOneMapper.java:100)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.processPersistableMember(EClassFeatureMapper.java:153)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.map(EClassFeatureMapper.java:90)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.proce ssClassAnnotation(JPOXMappingGenerator.java:250)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.gener ate(JPOXMappingGenerator.java:133)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.createORMapper File(GenerateJDO.java:104)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.main(GenerateJ DO.java:82)
>
> What does this mean?
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #88329 is a reply to message #87734] Thu, 05 July 2007 22:05 Go to previous messageGo to next message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

I have narrowed this error to this section of my xsd:

<xs:element name="component-definition-ref" type="xs:IDREF" minOccurs="0"
ecore:reference="portal:ComponentDefinition">

where

<xs:complexType name="ComponentDefinition" abstract="true">
....
</xs:complexType>


If I commnet out the top element, the error goes away. Can we not have
annotation reference to an abstract like ComponentDefinition? This does
work for non-abstract references.

Julia
Re: "does not translate to an instance class" [message #88595 is a reply to message #88329] Sun, 08 July 2007 20:48 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
I have a testcase which covers this case (reference to an abstract type) and it works fine.

Maybe the following applies to your case:
Teneo requires the instance class of a type (for jpox). It detects the instance class of each eclass
by doing a create of the eclass (using the emf EcoreUtil.create(eclass) and recording the instance
class. For abstract types this is done differently because these can not be instantiated (ofcourse).
The instance class of an abstract type is found through its concrete (non-abstract) subclasses. So
for this to work there has to be at least one non-abstract type in your model which inherits from
this abstract type.
Is this the case for this type?

Btw, I think I found the cause of your npe (the other issue you have). See the thread with subject
Re: [Teneo / JPOX] from 2 days ago.

gr. Martin

Julia wrote:
> Hi Martin,
>
> I have narrowed this error to this section of my xsd:
>
> <xs:element name="component-definition-ref" type="xs:IDREF"
> minOccurs="0" ecore:reference="portal:ComponentDefinition">
>
> where
>
> <xs:complexType name="ComponentDefinition" abstract="true">
> ....
> </xs:complexType>
>
>
> If I commnet out the top element, the error goes away. Can we not have
> annotation reference to an abstract like ComponentDefinition? This does
> work for non-abstract references.
>
> Julia
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #88875 is a reply to message #88595] Tue, 10 July 2007 21:21 Go to previous messageGo to next message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

Yes this is the case here. I have non-abstract class that uses this
abstract class and that works if I substitute that. I trying to figure
what affect that using this non-abstract class will have on the data. We
apparently have it working in a xml file.

Yes I did try changing the metatdata file with <element>..</element>
change and it did work for for one of the xsd. On one of the more
complicated xsd, I'm still getting a NPE. This xsd is full of non-abstract
classes using this one abstract. Still looking thru the metatdata.

What do I do for <embedded> foreign keys?

<embedded>
<field name="localReferenceValue" embedded="true">
<extension vendor-name="jpox" key="implementation-classes"
value="org.eclipse.emf.teneo.jpox.mapping.AnyTypeEObject"/ >
<extension vendor-name="teneo" key="estructuralfeatures" value=""/>
<foreign-key delete-action="restrict" update-action="cascade"/>
</field>
</embedded>

Leave it as is?

Julia
Re: "does not translate to an instance class" [message #88890 is a reply to message #88875] Tue, 10 July 2007 21:33 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
You can leave the fk as it is. The element tag only needs to be around the column tag.

What do you mean with 'non-abstract class that uses this abstract class', do you mean extends?

gr. Martin

Julia wrote:
>
> Hi Martin,
>
> Yes this is the case here. I have non-abstract class that uses this
> abstract class and that works if I substitute that. I trying to figure
> what affect that using this non-abstract class will have on the data. We
> apparently have it working in a xml file.
>
> Yes I did try changing the metatdata file with <element>..</element>
> change and it did work for for one of the xsd. On one of the more
> complicated xsd, I'm still getting a NPE. This xsd is full of
> non-abstract classes using this one abstract. Still looking thru the
> metatdata.
> What do I do for <embedded> foreign keys?
>
> <embedded>
> <field name="localReferenceValue" embedded="true">
> <extension vendor-name="jpox" key="implementation-classes"
> value="org.eclipse.emf.teneo.jpox.mapping.AnyTypeEObject"/ >
> <extension vendor-name="teneo" key="estructuralfeatures" value=""/>
> <foreign-key delete-action="restrict" update-action="cascade"/>
> </field>
> </embedded>
>
> Leave it as is?
>
> Julia
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #89163 is a reply to message #88890] Wed, 11 July 2007 22:37 Go to previous messageGo to next message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

Yes,I meant the extension to the abstract class. I still get NPE error
even with the <order>..<column>..<foreign-jey> fix in the metadata file.

Here's my ecore file. I ran it against a shorten version of my xsd.
Strangely the nPE disappears if I remove the PortletEntity element from my
xsd.

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="topology"

nsURI=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-topology.xsd"
nsPrefix="topology">
<eAnnotations source="http://www.w3.org/XML/1998/namespace">
<details key="lang" value="en"/>
</eAnnotations>
<eClassifiers xsi:type="ecore:EClass" name="ComponentDefinition"
abstract="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The component definition
describes a single application artifact with its properties. &#xD;&#xA;
In most cases, the application artifact is actually defined by its
own deployment descriptor within the &#xD;&#xA; PAA and the
application element is used for referencing it in the PAA deployment
descriptor (using a resource-link &#xD;&#xA; subelement), so
that it can be integrated into the portal application page layout and
navigation. This is an abstract &#xD;&#xA; type that can never
be used directly; actual XML documents can only contain derived types"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="ComponentDefinition"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="description"
eType="ecore:EClass base.ecore#//Text"
containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="description"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="preference"
upperBound="-1"
eType="ecore:EClass base.ecore#//Preference" containment="true"
resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Preferences can hold Meta
Data, which can be applied when deploying a Portal Application Archive.
These preferences are not standardized and their meaning depends on the
implementation, which deploys the portal application. A certain behavior
is not garantueed."/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="preference"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="keyword"
unique="false"
eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="keyword"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="uniqueName"
unique="false"
eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//ID" iD="true">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="uniqueName"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ComponentTree">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The component tree describes all
application artifacts. The tree structure of the component definitions can
be used for organizing the components in the PAA application. There is no
semantics associated with this organization and the portal may not respect
this structure for organizing the actual portal resources corresponding
to it."/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="ComponentTree"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="componentTree"
upperBound="-1"
eType="#//ComponentTree" containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="component-tree"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute"
name="abstractComponentDefinitionGroup"
unique="false" upperBound="-1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Abstract base element for
including component definitions in the component tree. For each concrete
subtype of component definition there must be an element defined that can
substitute abstract-component-definition"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
<details key="name" value="abstract-component-definition:group"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="abstractComponentDefinition"
upperBound="-1" eType="#//ComponentDefinition" changeable="false"
volatile="true"
transient="true" derived="true" containment="true"
resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Abstract base element for
including component definitions in the component tree. For each concrete
subtype of component definition there must be an element defined that can
substitute abstract-component-definition"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="abstract-component-definition"/>
<details key="namespace" value="##targetNamespace"/>
<details key="group" value="abstract-component-definition:group"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="uniqueName"
unique="false"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//ID"
iD="true">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="uniqueName"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value=""/>
<details key="kind" value="mixed"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed"
unique="false" upperBound="-1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="elementWildcard"/>
<details key="name" value=":mixed"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="xMLNSPrefixMap"
upperBound="-1"
eType="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEn try"
transient="true" containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="xmlns:prefix"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="xSISchemaLocation" upperBound="-1"
eType="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEn try"
transient="true" containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="xsi:schemaLocation"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="abstractComponentDefinition"
upperBound="-2" eType="#//ComponentDefinition" changeable="false"
volatile="true"
transient="true" derived="true" containment="true"
resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Abstract base element for
including component definitions in the component tree. For each concrete
subtype of component definition there must be an element defined that can
substitute abstract-component-definition"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="abstract-component-definition"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="ibmPortalTopology" upperBound="-2"
eType="#//IbmPortalTopology" volatile="true" transient="true"
derived="true"
containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="ibm-portal-topology"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="portletDefinition" upperBound="-2"
eType="#//PortletDefinition" volatile="true" transient="true"
derived="true"
containment="true" resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="component definition for
including portlet definitions in the application tree"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="portlet-definition"/>
<details key="namespace" value="##targetNamespace"/>
<details key="affiliation" value="abstract-component-definition"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="portletEntity"
upperBound="-2"
eType="#//PortletEntity" volatile="true" transient="true"
derived="true" containment="true"
resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="component definition for
including portlet entities in the application tree"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="portlet-entity"/>
<details key="namespace" value="##targetNamespace"/>
<details key="affiliation" value="abstract-component-definition"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IbmPortalTopology">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="This is the root element of the
PAA topology description and describes the included applications using
applicationDefinition"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="IbmPortalTopology"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="componentTree"
lowerBound="1"
eType="#//ComponentTree" containment="true" resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The definition of one or more
applications, which are part of this PAA"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="component-tree"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PortletDefinition"
eSuperTypes="#//ComponentDefinition">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A portlet definition refers to a
portlet defined in a portlet.xml deployment descriptor in a portlet WAR
file. A portlet can be associated with a window in a layout. Preferences
specified here override and extend the peferences that have been specified
in the deployment descriptor "/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="PortletDefinition"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="title"
eType="ecore:EClass base.ecore#//Text"
containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="title"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="resourceLink"
lowerBound="1"
eType="#//PortletDefinitionResourceLink" containment="true"
resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="resource-link"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass"
name="PortletDefinitionResourceLink" eSuperTypes="#//ResourceLink">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A link to a portlet definition
that is included in the PAA or deployed separately in the portal. The
attribute &quot;name&quot; is the name of the portlet, as specified by the
portlet-name element in the portlet.xml. If the name of the portlet is not
unique within the PAA, an additional portlet-application attribute must be
specified. "/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="PortletDefinitionResourceLink"/>
<details key="kind" value="empty"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute"
name="portletApplication" unique="false"
eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The portlet-app id in
portlet.xml to fully qualify the portlet within the Portal. Since
different PAAs could have portlets wiith the same name, it is necessary to
name space them.&#xD;&#xA; "/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="portletApplication"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PortletEntity"
eSuperTypes="#//ComponentDefinition">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A portlet entity specifies a
portlet with additional configuration values. A portlet entitiy can be
associated with a window in a layout. Preferences specified here override
and extend the peferences that have been specified in the deployment
decscriptor of the referenced portlet definition. "/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="PortletEntity"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="title"
eType="ecore:EClass base.ecore#//Text"
containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="title"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="portletDefinitionRef" lowerBound="1"
eType="#//PortletDefinition" resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="References the portlet
definition that describes the portlet."/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="portletDefinitionRef"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ResourceLink"
abstract="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A resource link specifies a
reference resource that is not defined in this deployment descriptor. This
is an abstract type that can never be used directly; application elements
that use resource links must define concrete derived types. The name
attribute specifies the name of the artefact to be used"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="ResourceLink"/>
<details key="kind" value="empty"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
unique="false" lowerBound="1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="name"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
</ecore:EPackage>
Re: "does not translate to an instance class" [message #89180 is a reply to message #89163] Thu, 12 July 2007 05:45 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
How does your fixed metadata file look like for this part (particurly the PortletEntity element part)?

gr. Martin

Julia wrote:
> Hi Martin,
>
> Yes,I meant the extension to the abstract class. I still get NPE error
> even with the <order>..<column>..<foreign-jey> fix in the metadata file.
>
> Here's my ecore file. I ran it against a shorten version of my xsd.
> Strangely the nPE disappears if I remove the PortletEntity element from
> my xsd.
> <?xml version="1.0" encoding="UTF-8"?>
> <ecore:EPackage xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="topology"
>
> nsURI=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-topology.xsd"
>
> nsPrefix="topology">
> <eAnnotations source="http://www.w3.org/XML/1998/namespace">
> <details key="lang" value="en"/>
> </eAnnotations>
> <eClassifiers xsi:type="ecore:EClass" name="ComponentDefinition"
> abstract="true">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The component definition
> describes a single application artifact with its properties.
> &#xD;&#xA; In most cases, the application artifact is actually
> defined by its own deployment descriptor within the
> &#xD;&#xA; PAA and the application element is used for
> referencing it in the PAA deployment descriptor (using a resource-link
> &#xD;&#xA; subelement), so that it can be integrated into the
> portal application page layout and navigation. This is an abstract
> &#xD;&#xA; type that can never be used directly; actual XML
> documents can only contain derived types"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="ComponentDefinition"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EReference" name="description"
> eType="ecore:EClass base.ecore#//Text"
> containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="description"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="preference"
> upperBound="-1"
> eType="ecore:EClass base.ecore#//Preference" containment="true"
> resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="Preferences can hold Meta
> Data, which can be applied when deploying a Portal Application Archive.
> These preferences are not standardized and their meaning depends on the
> implementation, which deploys the portal application. A certain behavior
> is not garantueed."/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="preference"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="keyword"
> unique="false"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="keyword"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="uniqueName"
> unique="false"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//ID" iD="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="uniqueName"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="ComponentTree">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The component tree describes
> all application artifacts. The tree structure of the component
> definitions can be used for organizing the components in the PAA
> application. There is no semantics associated with this organization
> and the portal may not respect this structure for organizing the actual
> portal resources corresponding to it."/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="ComponentTree"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EReference" name="componentTree"
> upperBound="-1"
> eType="#//ComponentTree" containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="component-tree"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="abstractComponentDefinitionGroup"
> unique="false" upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="Abstract base element for
> including component definitions in the component tree. For each concrete
> subtype of component definition there must be an element defined that
> can substitute abstract-component-definition"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="group"/>
> <details key="name" value="abstract-component-definition:group"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="abstractComponentDefinition"
> upperBound="-1" eType="#//ComponentDefinition" changeable="false"
> volatile="true"
> transient="true" derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="Abstract base element for
> including component definitions in the component tree. For each concrete
> subtype of component definition there must be an element defined that
> can substitute abstract-component-definition"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="abstract-component-definition"/>
> <details key="namespace" value="##targetNamespace"/>
> <details key="group" value="abstract-component-definition:group"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="uniqueName"
> unique="false"
> lowerBound="1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//ID"
> iD="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="uniqueName"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value=""/>
> <details key="kind" value="mixed"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed"
> unique="false" upperBound="-1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="elementWildcard"/>
> <details key="name" value=":mixed"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="xMLNSPrefixMap" upperBound="-1"
> eType="ecore:EClass
> http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEn try"
> transient="true" containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="xmlns:prefix"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="xSISchemaLocation" upperBound="-1"
> eType="ecore:EClass
> http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEn try"
> transient="true" containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="xsi:schemaLocation"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="abstractComponentDefinition"
> upperBound="-2" eType="#//ComponentDefinition" changeable="false"
> volatile="true"
> transient="true" derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="Abstract base element for
> including component definitions in the component tree. For each concrete
> subtype of component definition there must be an element defined that
> can substitute abstract-component-definition"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="abstract-component-definition"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="ibmPortalTopology" upperBound="-2"
> eType="#//IbmPortalTopology" volatile="true" transient="true"
> derived="true"
> containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="ibm-portal-topology"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="portletDefinition" upperBound="-2"
> eType="#//PortletDefinition" volatile="true" transient="true"
> derived="true"
> containment="true" resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="component definition for
> including portlet definitions in the application tree"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="portlet-definition"/>
> <details key="namespace" value="##targetNamespace"/>
> <details key="affiliation" value="abstract-component-definition"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="portletEntity"
> upperBound="-2"
> eType="#//PortletEntity" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="component definition for
> including portlet entities in the application tree"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="portlet-entity"/>
> <details key="namespace" value="##targetNamespace"/>
> <details key="affiliation" value="abstract-component-definition"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="IbmPortalTopology">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="This is the root element of the
> PAA topology description and describes the included applications using
> applicationDefinition"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="IbmPortalTopology"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EReference" name="componentTree"
> lowerBound="1"
> eType="#//ComponentTree" containment="true" resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The definition of one or more
> applications, which are part of this PAA"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="component-tree"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="PortletDefinition"
> eSuperTypes="#//ComponentDefinition">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="A portlet definition refers to
> a portlet defined in a portlet.xml deployment descriptor in a portlet
> WAR file. A portlet can be associated with a window in a layout.
> Preferences specified here override and extend the peferences that have
> been specified in the deployment descriptor "/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="PortletDefinition"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EReference" name="title"
> eType="ecore:EClass base.ecore#//Text"
> containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="title"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="resourceLink"
> lowerBound="1"
> eType="#//PortletDefinitionResourceLink" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="resource-link"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass"
> name="PortletDefinitionResourceLink" eSuperTypes="#//ResourceLink">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="A link to a portlet definition
> that is included in the PAA or deployed separately in the portal. The
> attribute &quot;name&quot; is the name of the portlet, as specified by
> the portlet-name element in the portlet.xml. If the name of the portlet
> is not unique within the PAA, an additional portlet-application
> attribute must be specified. "/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="PortletDefinitionResourceLink"/>
> <details key="kind" value="empty"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="portletApplication" unique="false"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The portlet-app id in
> portlet.xml to fully qualify the portlet within the Portal. Since
> different PAAs could have portlets wiith the same name, it is necessary
> to name space them.&#xD;&#xA; "/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="portletApplication"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="PortletEntity"
> eSuperTypes="#//ComponentDefinition">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="A portlet entity specifies a
> portlet with additional configuration values. A portlet entitiy can be
> associated with a window in a layout. Preferences specified here
> override and extend the peferences that have been specified in the
> deployment decscriptor of the referenced portlet definition. "/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="PortletEntity"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EReference" name="title"
> eType="ecore:EClass base.ecore#//Text"
> containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="title"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="portletDefinitionRef" lowerBound="1"
> eType="#//PortletDefinition" resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="References the portlet
> definition that describes the portlet."/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="portletDefinitionRef"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="ResourceLink" abstract="true">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="A resource link specifies a
> reference resource that is not defined in this deployment descriptor.
> This is an abstract type that can never be used directly; application
> elements that use resource links must define concrete derived types. The
> name attribute specifies the name of the artefact to be used"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="ResourceLink"/>
> <details key="kind" value="empty"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
> unique="false" lowerBound="1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="name"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> </ecore:EPackage>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #89474 is a reply to message #89180] Thu, 12 July 2007 19:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: juliayi.us.ibm.com

Hi MArtin,

This is the only difference between the 2 metadata file. It's all related
to the portletentity element.

<class name="com.ibm.isclite.wccm.topology.impl.PortletEntityImpl"
requires-extent="true" persistence-modifier="persistence-capable"
detachable="true" identity-type="application">
<implements name="com.ibm.isclite.wccm.topology.PortletEntity"/>
<inheritance strategy="superclass-table">
<discriminator value="PortletEntity"/>
</inheritance>
<version strategy="version-number" column="e_version"/>
<field name="title" persistence-modifier="persistent" dependent="true"
delete-action="restrict" null-value="none">
<foreign-key delete-action="cascade" update-action="cascade">
<column name="text_title_uniquename" allows-null="true"/>
</foreign-key>
<extension vendor-name="jpox" key="implementation-classes"
value="com.ibm.isclite.wccm.base.impl.TextImpl"/>
</field>
<field name="portletDefinitionRef" persistence-modifier="persistent"
delete-action="restrict" null-value="none">
<foreign-key>
<column name="portletdefinition_portletdefinitionref_uniquename"
allows-null="true"/>
</foreign-key>
<extension vendor-name="jpox" key="implementation-classes"
value="com.ibm.isclite.wccm.topology.impl.PortletDefinitionImpl "/>
</field>
</class>

From the xsd it part of the metadata refers to this:

<xs:element name="portlet-entity" type="portal:PortletEntity"
substitutionGroup="portal:abstract-component-definition">
<xs:annotation>
<xs:documentation>component definition for including portlet entities in
the application tree</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="PortletEntity">
<xs:annotation>
<xs:documentation>A portlet entity specifies a portlet with additional
configuration values. A portlet entitiy can be associated with a window in a
layout. Preferences specified here override and extend the peferences that
have been specified in the deployment decscriptor of the referenced portlet
definition. </xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="portal:ComponentDefinition">
<xs:sequence>
<xs:element name="title" type="base:Text" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="portletDefinitionRef" type="xs:IDREF" use="required"
ecore:reference="portal:PortletDefinition" >
<xs:annotation>
<xs:documentation>References the portlet definition that describes the
portlet.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Re: "does not translate to an instance class" [message #89515 is a reply to message #89474] Thu, 12 July 2007 19:36 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
Does it help if you remove the column tags from the <foreign-key> element?

gr. Martin

Julia wrote:
> Hi MArtin,
>
> This is the only difference between the 2 metadata file. It's all
> related to the portletentity element.
>
> <class name="com.ibm.isclite.wccm.topology.impl.PortletEntityImpl"
> requires-extent="true" persistence-modifier="persistence-capable"
> detachable="true" identity-type="application">
> <implements name="com.ibm.isclite.wccm.topology.PortletEntity"/>
> <inheritance strategy="superclass-table">
> <discriminator value="PortletEntity"/>
> </inheritance>
> <version strategy="version-number" column="e_version"/>
> <field name="title" persistence-modifier="persistent" dependent="true"
> delete-action="restrict" null-value="none">
> <foreign-key delete-action="cascade" update-action="cascade">
> <column name="text_title_uniquename" allows-null="true"/>
> </foreign-key>
> <extension vendor-name="jpox" key="implementation-classes"
> value="com.ibm.isclite.wccm.base.impl.TextImpl"/>
> </field>
> <field name="portletDefinitionRef" persistence-modifier="persistent"
> delete-action="restrict" null-value="none">
> <foreign-key>
> <column name="portletdefinition_portletdefinitionref_uniquename"
> allows-null="true"/>
> </foreign-key>
> <extension vendor-name="jpox" key="implementation-classes"
> value="com.ibm.isclite.wccm.topology.impl.PortletDefinitionImpl "/>
> </field>
> </class>
>
> From the xsd it part of the metadata refers to this:
>
> <xs:element name="portlet-entity" type="portal:PortletEntity"
> substitutionGroup="portal:abstract-component-definition">
> <xs:annotation>
> <xs:documentation>component definition for including portlet entities
> in the application tree</xs:documentation>
> </xs:annotation>
> </xs:element>
> <xs:complexType name="PortletEntity">
> <xs:annotation>
> <xs:documentation>A portlet entity specifies a portlet with additional
> configuration values. A portlet entitiy can be associated with a window
> in a layout. Preferences specified here override and extend the
> peferences that have been specified in the deployment decscriptor of the
> referenced portlet definition. </xs:documentation>
> </xs:annotation>
> <xs:complexContent>
> <xs:extension base="portal:ComponentDefinition">
> <xs:sequence>
> <xs:element name="title" type="base:Text"
> minOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="portletDefinitionRef" type="xs:IDREF" use="required"
> ecore:reference="portal:PortletDefinition" >
> <xs:annotation>
> <xs:documentation>References the portlet definition that describes the
> portlet.</xs:documentation>
> </xs:annotation>
> </xs:attribute>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #89811 is a reply to message #89515] Fri, 13 July 2007 21:17 Go to previous messageGo to next message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

No. Removing the <column> element did not help.
Re: "does not translate to an instance class" [message #89825 is a reply to message #89811] Sat, 14 July 2007 09:14 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
Can you try with the latest version of Teneo and jpox 1.1.8? You can try to remove the foreign-key
tag also.

If you still get the npe then if you can package it into a small testcase for me then I can look at it.

gr. Martin

Julia wrote:
> Hi Martin,
>
> No. Removing the <column> element did not help.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #608613 is a reply to message #87720] Fri, 29 June 2007 04:15 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
It means that Teneo can't find the class which was generated for the eclass ComponentDefinition. A
reason can be that the generated EPackageImpl of the epackage of ComponentDefinition has not been
initialised or that you use the Teneo menu option to generate the jdo file and the java class of
ComponentDefinition is not in one of the projects containing the ecores/xsd which you selected for
the jdo generation.

If you have a simple example which fails then I can look at it further. Btw, there is also another
user (see recent thread with title: Re: [Teneo / JPOX]) which has the same issue.

gr. Martin

Julia wrote:
> Hi Martin,
>
> I'm still trying to debug my NPE when I create the schema. I have trying
> to find a simple example that will give me NPE on Schema creation by
> shorten/simplifying my original xsds. All the xsds that failed so far
> had used ecore:references. If I removed the ecore annotation from one
> xsd file. The schema would build. However, it did not work in all cases.
> This one simplified version gave me this error:
>
> 1813 [main] ERROR
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingException - Uri:
> ComponentDefinition does not translate to an instance class
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingException: Uri:
> ComponentDefinition does not translate to an instance class
> at
> org.eclipse.emf.teneo.jpox.mapper.MappingUtil.getImplNameOfE Class(MappingUtil.java:60)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.association.ManyToOneMappe r.map(ManyToOneMapper.java:100)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.processPersistableMember(EClassFeatureMapper.java:153)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.map(EClassFeatureMapper.java:90)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.proce ssClassAnnotation(JPOXMappingGenerator.java:250)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.gener ate(JPOXMappingGenerator.java:133)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.createORMapper File(GenerateJDO.java:104)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.main(GenerateJ DO.java:82)
>
> What does this mean?
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #608653 is a reply to message #87734] Thu, 05 July 2007 22:05 Go to previous message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

I have narrowed this error to this section of my xsd:

<xs:element name="component-definition-ref" type="xs:IDREF" minOccurs="0"
ecore:reference="portal:ComponentDefinition">

where

<xs:complexType name="ComponentDefinition" abstract="true">
....
</xs:complexType>


If I commnet out the top element, the error goes away. Can we not have
annotation reference to an abstract like ComponentDefinition? This does
work for non-abstract references.

Julia
Re: "does not translate to an instance class" [message #608671 is a reply to message #88329] Sun, 08 July 2007 20:48 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
I have a testcase which covers this case (reference to an abstract type) and it works fine.

Maybe the following applies to your case:
Teneo requires the instance class of a type (for jpox). It detects the instance class of each eclass
by doing a create of the eclass (using the emf EcoreUtil.create(eclass) and recording the instance
class. For abstract types this is done differently because these can not be instantiated (ofcourse).
The instance class of an abstract type is found through its concrete (non-abstract) subclasses. So
for this to work there has to be at least one non-abstract type in your model which inherits from
this abstract type.
Is this the case for this type?

Btw, I think I found the cause of your npe (the other issue you have). See the thread with subject
Re: [Teneo / JPOX] from 2 days ago.

gr. Martin

Julia wrote:
> Hi Martin,
>
> I have narrowed this error to this section of my xsd:
>
> <xs:element name="component-definition-ref" type="xs:IDREF"
> minOccurs="0" ecore:reference="portal:ComponentDefinition">
>
> where
>
> <xs:complexType name="ComponentDefinition" abstract="true">
> ....
> </xs:complexType>
>
>
> If I commnet out the top element, the error goes away. Can we not have
> annotation reference to an abstract like ComponentDefinition? This does
> work for non-abstract references.
>
> Julia
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #608689 is a reply to message #88595] Tue, 10 July 2007 21:21 Go to previous message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

Yes this is the case here. I have non-abstract class that uses this
abstract class and that works if I substitute that. I trying to figure
what affect that using this non-abstract class will have on the data. We
apparently have it working in a xml file.

Yes I did try changing the metatdata file with <element>..</element>
change and it did work for for one of the xsd. On one of the more
complicated xsd, I'm still getting a NPE. This xsd is full of non-abstract
classes using this one abstract. Still looking thru the metatdata.

What do I do for <embedded> foreign keys?

<embedded>
<field name="localReferenceValue" embedded="true">
<extension vendor-name="jpox" key="implementation-classes"
value="org.eclipse.emf.teneo.jpox.mapping.AnyTypeEObject"/ >
<extension vendor-name="teneo" key="estructuralfeatures" value=""/>
<foreign-key delete-action="restrict" update-action="cascade"/>
</field>
</embedded>

Leave it as is?

Julia
Re: "does not translate to an instance class" [message #608690 is a reply to message #88875] Tue, 10 July 2007 21:33 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
You can leave the fk as it is. The element tag only needs to be around the column tag.

What do you mean with 'non-abstract class that uses this abstract class', do you mean extends?

gr. Martin

Julia wrote:
>
> Hi Martin,
>
> Yes this is the case here. I have non-abstract class that uses this
> abstract class and that works if I substitute that. I trying to figure
> what affect that using this non-abstract class will have on the data. We
> apparently have it working in a xml file.
>
> Yes I did try changing the metatdata file with <element>..</element>
> change and it did work for for one of the xsd. On one of the more
> complicated xsd, I'm still getting a NPE. This xsd is full of
> non-abstract classes using this one abstract. Still looking thru the
> metatdata.
> What do I do for <embedded> foreign keys?
>
> <embedded>
> <field name="localReferenceValue" embedded="true">
> <extension vendor-name="jpox" key="implementation-classes"
> value="org.eclipse.emf.teneo.jpox.mapping.AnyTypeEObject"/ >
> <extension vendor-name="teneo" key="estructuralfeatures" value=""/>
> <foreign-key delete-action="restrict" update-action="cascade"/>
> </field>
> </embedded>
>
> Leave it as is?
>
> Julia
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #608708 is a reply to message #88890] Wed, 11 July 2007 22:37 Go to previous message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

Yes,I meant the extension to the abstract class. I still get NPE error
even with the <order>..<column>..<foreign-jey> fix in the metadata file.

Here's my ecore file. I ran it against a shorten version of my xsd.
Strangely the nPE disappears if I remove the PortletEntity element from my
xsd.

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="topology"

nsURI=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-topology.xsd"
nsPrefix="topology">
<eAnnotations source="http://www.w3.org/XML/1998/namespace">
<details key="lang" value="en"/>
</eAnnotations>
<eClassifiers xsi:type="ecore:EClass" name="ComponentDefinition"
abstract="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The component definition
describes a single application artifact with its properties. &#xD;&#xA;
In most cases, the application artifact is actually defined by its
own deployment descriptor within the &#xD;&#xA; PAA and the
application element is used for referencing it in the PAA deployment
descriptor (using a resource-link &#xD;&#xA; subelement), so
that it can be integrated into the portal application page layout and
navigation. This is an abstract &#xD;&#xA; type that can never
be used directly; actual XML documents can only contain derived types"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="ComponentDefinition"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="description"
eType="ecore:EClass base.ecore#//Text"
containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="description"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="preference"
upperBound="-1"
eType="ecore:EClass base.ecore#//Preference" containment="true"
resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Preferences can hold Meta
Data, which can be applied when deploying a Portal Application Archive.
These preferences are not standardized and their meaning depends on the
implementation, which deploys the portal application. A certain behavior
is not garantueed."/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="preference"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="keyword"
unique="false"
eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="keyword"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="uniqueName"
unique="false"
eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//ID" iD="true">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="uniqueName"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ComponentTree">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The component tree describes all
application artifacts. The tree structure of the component definitions can
be used for organizing the components in the PAA application. There is no
semantics associated with this organization and the portal may not respect
this structure for organizing the actual portal resources corresponding
to it."/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="ComponentTree"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="componentTree"
upperBound="-1"
eType="#//ComponentTree" containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="component-tree"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute"
name="abstractComponentDefinitionGroup"
unique="false" upperBound="-1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Abstract base element for
including component definitions in the component tree. For each concrete
subtype of component definition there must be an element defined that can
substitute abstract-component-definition"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
<details key="name" value="abstract-component-definition:group"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="abstractComponentDefinition"
upperBound="-1" eType="#//ComponentDefinition" changeable="false"
volatile="true"
transient="true" derived="true" containment="true"
resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Abstract base element for
including component definitions in the component tree. For each concrete
subtype of component definition there must be an element defined that can
substitute abstract-component-definition"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="abstract-component-definition"/>
<details key="namespace" value="##targetNamespace"/>
<details key="group" value="abstract-component-definition:group"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="uniqueName"
unique="false"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//ID"
iD="true">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="uniqueName"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value=""/>
<details key="kind" value="mixed"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed"
unique="false" upperBound="-1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="elementWildcard"/>
<details key="name" value=":mixed"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="xMLNSPrefixMap"
upperBound="-1"
eType="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEn try"
transient="true" containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="xmlns:prefix"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="xSISchemaLocation" upperBound="-1"
eType="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEn try"
transient="true" containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="xsi:schemaLocation"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="abstractComponentDefinition"
upperBound="-2" eType="#//ComponentDefinition" changeable="false"
volatile="true"
transient="true" derived="true" containment="true"
resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Abstract base element for
including component definitions in the component tree. For each concrete
subtype of component definition there must be an element defined that can
substitute abstract-component-definition"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="abstract-component-definition"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="ibmPortalTopology" upperBound="-2"
eType="#//IbmPortalTopology" volatile="true" transient="true"
derived="true"
containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="ibm-portal-topology"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="portletDefinition" upperBound="-2"
eType="#//PortletDefinition" volatile="true" transient="true"
derived="true"
containment="true" resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="component definition for
including portlet definitions in the application tree"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="portlet-definition"/>
<details key="namespace" value="##targetNamespace"/>
<details key="affiliation" value="abstract-component-definition"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="portletEntity"
upperBound="-2"
eType="#//PortletEntity" volatile="true" transient="true"
derived="true" containment="true"
resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="component definition for
including portlet entities in the application tree"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="portlet-entity"/>
<details key="namespace" value="##targetNamespace"/>
<details key="affiliation" value="abstract-component-definition"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IbmPortalTopology">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="This is the root element of the
PAA topology description and describes the included applications using
applicationDefinition"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="IbmPortalTopology"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="componentTree"
lowerBound="1"
eType="#//ComponentTree" containment="true" resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The definition of one or more
applications, which are part of this PAA"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="component-tree"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PortletDefinition"
eSuperTypes="#//ComponentDefinition">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A portlet definition refers to a
portlet defined in a portlet.xml deployment descriptor in a portlet WAR
file. A portlet can be associated with a window in a layout. Preferences
specified here override and extend the peferences that have been specified
in the deployment descriptor "/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="PortletDefinition"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="title"
eType="ecore:EClass base.ecore#//Text"
containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="title"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="resourceLink"
lowerBound="1"
eType="#//PortletDefinitionResourceLink" containment="true"
resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="resource-link"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass"
name="PortletDefinitionResourceLink" eSuperTypes="#//ResourceLink">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A link to a portlet definition
that is included in the PAA or deployed separately in the portal. The
attribute &quot;name&quot; is the name of the portlet, as specified by the
portlet-name element in the portlet.xml. If the name of the portlet is not
unique within the PAA, an additional portlet-application attribute must be
specified. "/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="PortletDefinitionResourceLink"/>
<details key="kind" value="empty"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute"
name="portletApplication" unique="false"
eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The portlet-app id in
portlet.xml to fully qualify the portlet within the Portal. Since
different PAAs could have portlets wiith the same name, it is necessary to
name space them.&#xD;&#xA; "/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="portletApplication"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PortletEntity"
eSuperTypes="#//ComponentDefinition">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A portlet entity specifies a
portlet with additional configuration values. A portlet entitiy can be
associated with a window in a layout. Preferences specified here override
and extend the peferences that have been specified in the deployment
decscriptor of the referenced portlet definition. "/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="PortletEntity"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="title"
eType="ecore:EClass base.ecore#//Text"
containment="true" resolveProxies="false">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="title"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference"
name="portletDefinitionRef" lowerBound="1"
eType="#//PortletDefinition" resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="References the portlet
definition that describes the portlet."/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="portletDefinitionRef"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ResourceLink"
abstract="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A resource link specifies a
reference resource that is not defined in this deployment descriptor. This
is an abstract type that can never be used directly; application elements
that use resource links must define concrete derived types. The name
attribute specifies the name of the artefact to be used"/>
</eAnnotations>
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="ResourceLink"/>
<details key="kind" value="empty"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
unique="false" lowerBound="1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="name"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
</ecore:EPackage>
Re: "does not translate to an instance class" [message #608709 is a reply to message #89163] Thu, 12 July 2007 05:45 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
How does your fixed metadata file look like for this part (particurly the PortletEntity element part)?

gr. Martin

Julia wrote:
> Hi Martin,
>
> Yes,I meant the extension to the abstract class. I still get NPE error
> even with the <order>..<column>..<foreign-jey> fix in the metadata file.
>
> Here's my ecore file. I ran it against a shorten version of my xsd.
> Strangely the nPE disappears if I remove the PortletEntity element from
> my xsd.
> <?xml version="1.0" encoding="UTF-8"?>
> <ecore:EPackage xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="topology"
>
> nsURI=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-topology.xsd"
>
> nsPrefix="topology">
> <eAnnotations source="http://www.w3.org/XML/1998/namespace">
> <details key="lang" value="en"/>
> </eAnnotations>
> <eClassifiers xsi:type="ecore:EClass" name="ComponentDefinition"
> abstract="true">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The component definition
> describes a single application artifact with its properties.
> &#xD;&#xA; In most cases, the application artifact is actually
> defined by its own deployment descriptor within the
> &#xD;&#xA; PAA and the application element is used for
> referencing it in the PAA deployment descriptor (using a resource-link
> &#xD;&#xA; subelement), so that it can be integrated into the
> portal application page layout and navigation. This is an abstract
> &#xD;&#xA; type that can never be used directly; actual XML
> documents can only contain derived types"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="ComponentDefinition"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EReference" name="description"
> eType="ecore:EClass base.ecore#//Text"
> containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="description"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="preference"
> upperBound="-1"
> eType="ecore:EClass base.ecore#//Preference" containment="true"
> resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="Preferences can hold Meta
> Data, which can be applied when deploying a Portal Application Archive.
> These preferences are not standardized and their meaning depends on the
> implementation, which deploys the portal application. A certain behavior
> is not garantueed."/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="preference"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="keyword"
> unique="false"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="keyword"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="uniqueName"
> unique="false"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//ID" iD="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="uniqueName"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="ComponentTree">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The component tree describes
> all application artifacts. The tree structure of the component
> definitions can be used for organizing the components in the PAA
> application. There is no semantics associated with this organization
> and the portal may not respect this structure for organizing the actual
> portal resources corresponding to it."/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="ComponentTree"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EReference" name="componentTree"
> upperBound="-1"
> eType="#//ComponentTree" containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="component-tree"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="abstractComponentDefinitionGroup"
> unique="false" upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="Abstract base element for
> including component definitions in the component tree. For each concrete
> subtype of component definition there must be an element defined that
> can substitute abstract-component-definition"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="group"/>
> <details key="name" value="abstract-component-definition:group"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="abstractComponentDefinition"
> upperBound="-1" eType="#//ComponentDefinition" changeable="false"
> volatile="true"
> transient="true" derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="Abstract base element for
> including component definitions in the component tree. For each concrete
> subtype of component definition there must be an element defined that
> can substitute abstract-component-definition"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="abstract-component-definition"/>
> <details key="namespace" value="##targetNamespace"/>
> <details key="group" value="abstract-component-definition:group"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="uniqueName"
> unique="false"
> lowerBound="1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//ID"
> iD="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="uniqueName"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value=""/>
> <details key="kind" value="mixed"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed"
> unique="false" upperBound="-1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="elementWildcard"/>
> <details key="name" value=":mixed"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="xMLNSPrefixMap" upperBound="-1"
> eType="ecore:EClass
> http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEn try"
> transient="true" containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="xmlns:prefix"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="xSISchemaLocation" upperBound="-1"
> eType="ecore:EClass
> http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEn try"
> transient="true" containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="xsi:schemaLocation"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="abstractComponentDefinition"
> upperBound="-2" eType="#//ComponentDefinition" changeable="false"
> volatile="true"
> transient="true" derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="Abstract base element for
> including component definitions in the component tree. For each concrete
> subtype of component definition there must be an element defined that
> can substitute abstract-component-definition"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="abstract-component-definition"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="ibmPortalTopology" upperBound="-2"
> eType="#//IbmPortalTopology" volatile="true" transient="true"
> derived="true"
> containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="ibm-portal-topology"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="portletDefinition" upperBound="-2"
> eType="#//PortletDefinition" volatile="true" transient="true"
> derived="true"
> containment="true" resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="component definition for
> including portlet definitions in the application tree"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="portlet-definition"/>
> <details key="namespace" value="##targetNamespace"/>
> <details key="affiliation" value="abstract-component-definition"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="portletEntity"
> upperBound="-2"
> eType="#//PortletEntity" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="component definition for
> including portlet entities in the application tree"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="portlet-entity"/>
> <details key="namespace" value="##targetNamespace"/>
> <details key="affiliation" value="abstract-component-definition"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="IbmPortalTopology">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="This is the root element of the
> PAA topology description and describes the included applications using
> applicationDefinition"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="IbmPortalTopology"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EReference" name="componentTree"
> lowerBound="1"
> eType="#//ComponentTree" containment="true" resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The definition of one or more
> applications, which are part of this PAA"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="component-tree"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="PortletDefinition"
> eSuperTypes="#//ComponentDefinition">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="A portlet definition refers to
> a portlet defined in a portlet.xml deployment descriptor in a portlet
> WAR file. A portlet can be associated with a window in a layout.
> Preferences specified here override and extend the peferences that have
> been specified in the deployment descriptor "/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="PortletDefinition"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EReference" name="title"
> eType="ecore:EClass base.ecore#//Text"
> containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="title"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="resourceLink"
> lowerBound="1"
> eType="#//PortletDefinitionResourceLink" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="resource-link"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass"
> name="PortletDefinitionResourceLink" eSuperTypes="#//ResourceLink">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="A link to a portlet definition
> that is included in the PAA or deployed separately in the portal. The
> attribute &quot;name&quot; is the name of the portlet, as specified by
> the portlet-name element in the portlet.xml. If the name of the portlet
> is not unique within the PAA, an additional portlet-application
> attribute must be specified. "/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="PortletDefinitionResourceLink"/>
> <details key="kind" value="empty"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="portletApplication" unique="false"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The portlet-app id in
> portlet.xml to fully qualify the portlet within the Portal. Since
> different PAAs could have portlets wiith the same name, it is necessary
> to name space them.&#xD;&#xA; "/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="portletApplication"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="PortletEntity"
> eSuperTypes="#//ComponentDefinition">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="A portlet entity specifies a
> portlet with additional configuration values. A portlet entitiy can be
> associated with a window in a layout. Preferences specified here
> override and extend the peferences that have been specified in the
> deployment decscriptor of the referenced portlet definition. "/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="PortletEntity"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EReference" name="title"
> eType="ecore:EClass base.ecore#//Text"
> containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="title"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="portletDefinitionRef" lowerBound="1"
> eType="#//PortletDefinition" resolveProxies="false">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="References the portlet
> definition that describes the portlet."/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="portletDefinitionRef"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="ResourceLink" abstract="true">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="A resource link specifies a
> reference resource that is not defined in this deployment descriptor.
> This is an abstract type that can never be used directly; application
> elements that use resource links must define concrete derived types. The
> name attribute specifies the name of the artefact to be used"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="ResourceLink"/>
> <details key="kind" value="empty"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
> unique="false" lowerBound="1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="name"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> </ecore:EPackage>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #608728 is a reply to message #89180] Thu, 12 July 2007 19:25 Go to previous message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi MArtin,

This is the only difference between the 2 metadata file. It's all related
to the portletentity element.

<class name="com.ibm.isclite.wccm.topology.impl.PortletEntityImpl"
requires-extent="true" persistence-modifier="persistence-capable"
detachable="true" identity-type="application">
<implements name="com.ibm.isclite.wccm.topology.PortletEntity"/>
<inheritance strategy="superclass-table">
<discriminator value="PortletEntity"/>
</inheritance>
<version strategy="version-number" column="e_version"/>
<field name="title" persistence-modifier="persistent" dependent="true"
delete-action="restrict" null-value="none">
<foreign-key delete-action="cascade" update-action="cascade">
<column name="text_title_uniquename" allows-null="true"/>
</foreign-key>
<extension vendor-name="jpox" key="implementation-classes"
value="com.ibm.isclite.wccm.base.impl.TextImpl"/>
</field>
<field name="portletDefinitionRef" persistence-modifier="persistent"
delete-action="restrict" null-value="none">
<foreign-key>
<column name="portletdefinition_portletdefinitionref_uniquename"
allows-null="true"/>
</foreign-key>
<extension vendor-name="jpox" key="implementation-classes"
value="com.ibm.isclite.wccm.topology.impl.PortletDefinitionImpl "/>
</field>
</class>

From the xsd it part of the metadata refers to this:

<xs:element name="portlet-entity" type="portal:PortletEntity"
substitutionGroup="portal:abstract-component-definition">
<xs:annotation>
<xs:documentation>component definition for including portlet entities in
the application tree</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="PortletEntity">
<xs:annotation>
<xs:documentation>A portlet entity specifies a portlet with additional
configuration values. A portlet entitiy can be associated with a window in a
layout. Preferences specified here override and extend the peferences that
have been specified in the deployment decscriptor of the referenced portlet
definition. </xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="portal:ComponentDefinition">
<xs:sequence>
<xs:element name="title" type="base:Text" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="portletDefinitionRef" type="xs:IDREF" use="required"
ecore:reference="portal:PortletDefinition" >
<xs:annotation>
<xs:documentation>References the portlet definition that describes the
portlet.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Re: "does not translate to an instance class" [message #608731 is a reply to message #89474] Thu, 12 July 2007 19:36 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
Does it help if you remove the column tags from the <foreign-key> element?

gr. Martin

Julia wrote:
> Hi MArtin,
>
> This is the only difference between the 2 metadata file. It's all
> related to the portletentity element.
>
> <class name="com.ibm.isclite.wccm.topology.impl.PortletEntityImpl"
> requires-extent="true" persistence-modifier="persistence-capable"
> detachable="true" identity-type="application">
> <implements name="com.ibm.isclite.wccm.topology.PortletEntity"/>
> <inheritance strategy="superclass-table">
> <discriminator value="PortletEntity"/>
> </inheritance>
> <version strategy="version-number" column="e_version"/>
> <field name="title" persistence-modifier="persistent" dependent="true"
> delete-action="restrict" null-value="none">
> <foreign-key delete-action="cascade" update-action="cascade">
> <column name="text_title_uniquename" allows-null="true"/>
> </foreign-key>
> <extension vendor-name="jpox" key="implementation-classes"
> value="com.ibm.isclite.wccm.base.impl.TextImpl"/>
> </field>
> <field name="portletDefinitionRef" persistence-modifier="persistent"
> delete-action="restrict" null-value="none">
> <foreign-key>
> <column name="portletdefinition_portletdefinitionref_uniquename"
> allows-null="true"/>
> </foreign-key>
> <extension vendor-name="jpox" key="implementation-classes"
> value="com.ibm.isclite.wccm.topology.impl.PortletDefinitionImpl "/>
> </field>
> </class>
>
> From the xsd it part of the metadata refers to this:
>
> <xs:element name="portlet-entity" type="portal:PortletEntity"
> substitutionGroup="portal:abstract-component-definition">
> <xs:annotation>
> <xs:documentation>component definition for including portlet entities
> in the application tree</xs:documentation>
> </xs:annotation>
> </xs:element>
> <xs:complexType name="PortletEntity">
> <xs:annotation>
> <xs:documentation>A portlet entity specifies a portlet with additional
> configuration values. A portlet entitiy can be associated with a window
> in a layout. Preferences specified here override and extend the
> peferences that have been specified in the deployment decscriptor of the
> referenced portlet definition. </xs:documentation>
> </xs:annotation>
> <xs:complexContent>
> <xs:extension base="portal:ComponentDefinition">
> <xs:sequence>
> <xs:element name="title" type="base:Text"
> minOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="portletDefinitionRef" type="xs:IDREF" use="required"
> ecore:reference="portal:PortletDefinition" >
> <xs:annotation>
> <xs:documentation>References the portlet definition that describes the
> portlet.</xs:documentation>
> </xs:annotation>
> </xs:attribute>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: "does not translate to an instance class" [message #608749 is a reply to message #89515] Fri, 13 July 2007 21:17 Go to previous message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

No. Removing the <column> element did not help.
Re: "does not translate to an instance class" [message #608750 is a reply to message #89811] Sat, 14 July 2007 09:14 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
Can you try with the latest version of Teneo and jpox 1.1.8? You can try to remove the foreign-key
tag also.

If you still get the npe then if you can package it into a small testcase for me then I can look at it.

gr. Martin

Julia wrote:
> Hi Martin,
>
> No. Removing the <column> element did not help.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[Teneo] Lazy loading exception
Next Topic:[Teneo] Lazy loading exception
Goto Forum:
  


Current Time: Fri Apr 19 07:46:45 GMT 2024

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

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

Back to the top