Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Texo] Map is not a known entity type
[Texo] Map is not a known entity type [message #1005122] |
Thu, 24 January 2013 14:13 |
Bastian Wagenfeld Messages: 183 Registered: January 2013 |
Senior Member |
|
|
Hi,
I created an EMF based editor that uses TexoResources. Loading the resources via a texo servlet works, saving the resources after they were edited works, too, except for a map. If I try to persist this map the server throws an IllegalArgumentException and says, this is not a known entity type. Here the complete exception:
java.lang.IllegalArgumentException: Object: SubjectProperty{key: warumvalue: dreck} is not a known entity type.
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4158)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:440)
at org.eclipse.emf.texo.server.store.BaseDao.insert(BaseDao.java:204)
at org.eclipse.emf.texo.server.store.EntityManagerObjectStore.insert(EntityManagerObjectStore.java:146)
at org.eclipse.emf.texo.server.service.UpdateInsertModelOperation.internalExecute(UpdateInsertModelOperation.java:85)
at org.eclipse.emf.texo.server.service.ModelOperation.execute(ModelOperation.java:59)
at org.eclipse.emf.texo.server.web.WebServiceHandler.doPost(WebServiceHandler.java:111)
at org.eclipse.emf.texo.server.web.WebServiceServlet.doPost(WebServiceServlet.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Loading this map and showing it in the editor is no problem, persisting it with the Eclipselink entity manager isn't as well. That is why I assume it is not a problem with the orm.xml or the annotations.
The following xml includes the class "SubjectProperty" represented in the ecore model.
<eClassifiers xsi:type="ecore:EClass" name="SubjectProperty" instanceClassName="java.util.Map$Entry"
eSuperTypes="identifiable.ecore#//Identifiable">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="key" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="org.eclipse.emf.texo">
<details key="java.member" value="key"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="org.eclipse.emf.texo">
<details key="java.member" value="value"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
The orm.xml file contains the following "User" entity that holds the "SubjectProperty":
<orm:entity class="de.test.users.User" name="users_User">
<orm:table name="users_User"/>
<orm:attributes>
<orm:basic name="name" optional="false">
<orm:column name="name"/>
</orm:basic>
<orm:many-to-one name="role" optional="false">
<orm:join-column name="users_User_role"/>
<orm:cascade>
<orm:cascade-persist/>
<orm:cascade-merge/>
<orm:cascade-refresh/>
</orm:cascade>
</orm:many-to-one>
<orm:one-to-many name="grants">
<orm:join-column name="users_User_grants"/>
<orm:cascade>
<orm:cascade-all/>
</orm:cascade>
</orm:one-to-many>
<orm:element-collection name="properties">
<orm:collection-table name="users_User_properties"/>
<orm:cascade-on-delete>true</orm:cascade-on-delete>
</orm:element-collection>
</orm:attributes>
</orm:entity>
The JSON string sent to the server looks like that:
{ "_eclass" : "request|ActionType",
"_title" : "Testuser Server",
"delete" : [ ],
"insert" : [ { "_eclass" : "users|SubjectProperty",
"_title" : "warum",
"_uri" : "http://localhost:8080/de.test.texo.servlet/jsonws/users|SubjectProperty/1359031110842?tempUriNum=1#",
"key" : "warum",
"value" : "nicht"
} ],
"update" : [ { "_eclass" : "users|User",
"_id" : "16003",
"_title" : "Testuser Server",
"_uri" : "http://localhost:8080/de.test.texo.servlet/jsonws/users|User/16003#",
"db_Id" : 16003,
"db_version" : 1,
"grants" : [ ],
"name" : "Testuser Server",
"properties" : [ { "key" : "warum",
"value" : "nicht"
} ],
"role" : { "_eclass" : "users|Role",
"_id" : "16004",
"_proxy" : true,
"_title" : "Default",
"_uri" : "http://localhost:8080/de.test.texo.servlet/jsonws/users|Role/16004#",
"db_Id" : 16004
}
} ]
}
I updated my servlet jar files to the latest version from the plugins folder of eclipse. I also read the following Bugzilla entry which seems to be similar: https://bugs.eclipse.org/bugs/show_bug.cgi?id=391624
I hope, anybody has an idea, how I could solve this problem.
Best regards
Bastian
|
|
|
Re: [Texo] Map is not a known entity type [message #1005373 is a reply to message #1005122] |
Fri, 25 January 2013 07:30 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Bastian,
Afaics there should not be a generated entity for an emap entry eclass. So I think the conversion/jsonresource to the
json message has a bug in that emap entries should not be send back as individual entries but as part of the containing
entity.
But I am surprised that the system does not give an exception earlier. Is the emap entry (UserProperty) present as a
generated java entity (if so can you post it)? Can you post the generated User class also?
This is shown in the json you posted (the entry is both present in the 'inserted' part as well as in the 'properties' of
the updated user).
gr. Martin
On 01/24/2013 03:13 PM, Bastian Wagenfeld wrote:
> Hi,
>
> I created an EMF based editor that uses TexoResources. Loading the resources via a texo servlet works, saving the
> resources after they were edited works, too, except for a map. If I try to persist this map the server throws an
> IllegalArgumentException and says, this is not a known entity type. Here the complete exception:
> java.lang.IllegalArgumentException: Object: SubjectProperty{key: warumvalue: dreck} is not a known entity type.
> at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4158)
> at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:440)
> at org.eclipse.emf.texo.server.store.BaseDao.insert(BaseDao.java:204)
> at org.eclipse.emf.texo.server.store.EntityManagerObjectStore.insert(EntityManagerObjectStore.java:146)
> at org.eclipse.emf.texo.server.service.UpdateInsertModelOperation.internalExecute(UpdateInsertModelOperation.java:85)
> at org.eclipse.emf.texo.server.service.ModelOperation.execute(ModelOperation.java:59)
> at org.eclipse.emf.texo.server.web.WebServiceHandler.doPost(WebServiceHandler.java:111)
> at org.eclipse.emf.texo.server.web.WebServiceServlet.doPost(WebServiceServlet.java:65)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
>
>
> Loading this map and showing it in the editor is no problem, persisting it with the Eclipselink entity manager isn't as
> well. That is why I assume it is not a problem with the orm.xml or the annotations.
> The following xml includes the class "SubjectProperty" represented in the ecore model.
>
> <eClassifiers xsi:type="ecore:EClass" name="SubjectProperty" instanceClassName="java.util.Map$Entry"
> eSuperTypes="identifiable.ecore#//Identifiable">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" lowerBound="1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString">
> <eAnnotations source="org.eclipse.emf.texo">
> <details key="java.member" value="key"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString">
> <eAnnotations source="org.eclipse.emf.texo">
> <details key="java.member" value="value"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
>
> The orm.xml file contains the following "User" entity that holds the "SubjectProperty":
>
> <orm:entity class="de.test.users.User" name="users_User">
> <orm:table name="users_User"/>
> <orm:attributes>
> <orm:basic name="name" optional="false">
> <orm:column name="name"/>
> </orm:basic>
> <orm:many-to-one name="role" optional="false">
> <orm:join-column name="users_User_role"/>
> <orm:cascade>
> <orm:cascade-persist/>
> <orm:cascade-merge/>
> <orm:cascade-refresh/>
> </orm:cascade>
> </orm:many-to-one>
> <orm:one-to-many name="grants">
> <orm:join-column name="users_User_grants"/>
> <orm:cascade>
> <orm:cascade-all/>
> </orm:cascade>
> </orm:one-to-many>
> <orm:element-collection name="properties">
> <orm:collection-table name="users_User_properties"/>
> <orm:cascade-on-delete>true</orm:cascade-on-delete>
> </orm:element-collection>
> </orm:attributes>
> </orm:entity>
>
> The JSON string sent to the server looks like that:
> { "_eclass" : "request|ActionType",
> "_title" : "Testuser Server",
> "delete" : [ ],
> "insert" : [ { "_eclass" : "users|SubjectProperty",
> "_title" : "warum",
> "_uri" : "http://localhost:8080/de.test.texo.servlet/jsonws/users|SubjectProperty/1359031110842?tempUriNum=1#",
> "key" : "warum",
> "value" : "nicht"
> } ],
> "update" : [ { "_eclass" : "users|User",
> "_id" : "16003",
> "_title" : "Testuser Server",
> "_uri" : "http://localhost:8080/de.test.texo.servlet/jsonws/users|User/16003#",
> "db_Id" : 16003,
> "db_version" : 1,
> "grants" : [ ],
> "name" : "Testuser Server",
> "properties" : [ { "key" : "warum",
> "value" : "nicht"
> } ],
> "role" : { "_eclass" : "users|Role",
> "_id" : "16004",
> "_proxy" : true,
> "_title" : "Default",
> "_uri" : "http://localhost:8080/de.test.texo.servlet/jsonws/users|Role/16004#",
> "db_Id" : 16004
> }
> } ]
> }
>
> I updated my servlet jar files to the latest version from the plugins folder of eclipse. I also read the following
> Bugzilla entry which seems to be similar: https://bugs.eclipse.org/bugs/show_bug.cgi?id=391624
>
>
> I hope, anybody has an idea, how I could solve this problem.
>
> Best regards
> Bastian
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Texo] Map is not a known entity type [message #1005381 is a reply to message #1005373] |
Fri, 25 January 2013 08:13 |
Bastian Wagenfeld Messages: 183 Registered: January 2013 |
Senior Member |
|
|
Hi Martin,
Texo does not generate a Java class for the SubjectProperty. The generated User class looks like that:
package de.test.texo.users;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import de.test.texo.identifiable.Identifiable;
/**
* A representation of the model object '<em><b>User</b></em>'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Entity(name = "users_User")
public class User extends Identifiable {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Basic(optional = false)
private String name = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST,
CascadeType.REFRESH }, optional = false)
private Role role = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@OneToMany(cascade = { CascadeType.ALL })
private List<Grant> grants = new ArrayList<Grant>();
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@ElementCollection()
private Map<String, String> properties = new LinkedHashMap<String, String>();
/**
* Returns the value of '<em><b>name</b></em>' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the value of '<em><b>name</b></em>' feature
* @generated
*/
public String getName() {
return name;
}
/**
* Sets the '{@link User#getName() <em>name</em>}' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param the
* new value of the '{@link User#getName() name}' feature.
* @generated
*/
public void setName(String newName) {
name = newName;
}
/**
* Returns the value of '<em><b>role</b></em>' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the value of '<em><b>role</b></em>' feature
* @generated
*/
public Role getRole() {
return role;
}
/**
* Sets the '{@link User#getRole() <em>role</em>}' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param the
* new value of the '{@link User#getRole() role}' feature.
* @generated
*/
public void setRole(Role newRole) {
role = newRole;
}
/**
* Returns the value of '<em><b>grants</b></em>' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the value of '<em><b>grants</b></em>' feature
* @generated
*/
public List<Grant> getGrants() {
return grants;
}
/**
* Adds to the <em>grants</em> feature.
*
* @generated
*/
public void addToGrants(Grant grantsValue) {
if (!grants.contains(grantsValue)) {
grants.add(grantsValue);
}
}
/**
* Removes from the <em>grants</em> feature.
*
* @generated
*/
public void removeFromGrants(Grant grantsValue) {
if (grants.contains(grantsValue)) {
grants.remove(grantsValue);
}
}
/**
* Clears the <em>grants</em> feature.
*
* @generated
*/
public void clearGrants() {
while (!grants.isEmpty()) {
removeFromGrants(grants.iterator().next());
}
}
/**
* Sets the '{@link User#getGrants() <em>grants</em>}' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param the
* new value of the '{@link User#getGrants() grants}' feature.
* @generated
*/
public void setGrants(List<Grant> newGrants) {
grants = newGrants;
}
/**
* Returns the value of '<em><b>properties</b></em>' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the value of '<em><b>properties</b></em>' feature
* @generated
*/
public Map<String, String> getProperties() {
return properties;
}
/**
* Sets the '{@link User#getProperties() <em>properties</em>}' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param the
* new value of the '{@link User#getProperties() properties}'
* feature.
* @generated
*/
public void setProperties(Map<String, String> newProperties) {
properties = newProperties;
}
/**
* A toString method which prints the values of all EAttributes of this
* instance. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public String toString() {
return "User " + " [name: " + getName() + "]";
}
}
If you want to take a look at the ecore model, it is contained in my mail to you from the day before yesterday.
Also, I get another error message, which does not seem to be connected with this entity exception. But I think it could be helpful, to give you as much information as possible The following error occurs sometimes during the data retrieval at the editors startup, sometimes when I click an an item in the editor. I haven't debugged it so far, since I neither see any effect nor do I see the context. But I think, it is nice to mention it
java.lang.IllegalArgumentException: Service path null not supported, uri http://localhost:8080/texo/jsonws
at org.eclipse.emf.texo.server.service.RetrieveModelOperation.internalExecute(RetrieveModelOperation.java:115)
at org.eclipse.emf.texo.server.service.ModelOperation.execute(ModelOperation.java:59)
at org.eclipse.emf.texo.server.web.WebServiceHandler.doGet(WebServiceHandler.java:89)
at org.eclipse.emf.texo.server.web.WebServiceServlet.doGet(WebServiceServlet.java:57)
at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:244)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Thanks for your help, again!
Bastian
|
|
|
Re: [Texo] Map is not a known entity type [message #1005445 is a reply to message #1005381] |
Fri, 25 January 2013 13:22 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Bastian,
Okay, there is a missing feature/bug in that the json (de-) serialization should ignore those EMap eclasses. Can you
enter a bugzilla for it? Will solve it during the weekend.
For the exception below, it seems that the url for the request is incomplete: http://localhost:8080/texo/jsonws
Texo expects an eclass name/id as the last segments of the uri, but the request uri does not have these.
gr. Martin
On 01/25/2013 09:13 AM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> Texo does not generate a Java class for the SubjectProperty. The generated User class looks like that:
>
> package de.test.texo.users;
>
> import java.util.ArrayList;
> import java.util.LinkedHashMap;
> import java.util.List;
> import java.util.Map;
> import javax.persistence.Basic;
> import javax.persistence.CascadeType;
> import javax.persistence.ElementCollection;
> import javax.persistence.Entity;
> import javax.persistence.ManyToOne;
> import javax.persistence.OneToMany;
> import de.test.texo.identifiable.Identifiable;
>
> /**
> * A representation of the model object '<em><b>User</b></em>'. <!--
> * begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> @Entity(name = "users_User")
> public class User extends Identifiable {
>
> /**
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> @Basic(optional = false)
> private String name = null;
>
> /**
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> @ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST,
> CascadeType.REFRESH }, optional = false)
> private Role role = null;
>
> /**
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> @OneToMany(cascade = { CascadeType.ALL })
> private List<Grant> grants = new ArrayList<Grant>();
>
> /**
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> @ElementCollection()
> private Map<String, String> properties = new LinkedHashMap<String, String>();
>
> /**
> * Returns the value of '<em><b>name</b></em>' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @return the value of '<em><b>name</b></em>' feature
> * @generated
> */
> public String getName() {
> return name;
> }
>
> /**
> * Sets the '{@link User#getName() <em>name</em>}' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @param the
> * new value of the '{@link User#getName() name}' feature.
> * @generated
> */
> public void setName(String newName) {
> name = newName;
> }
>
> /**
> * Returns the value of '<em><b>role</b></em>' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @return the value of '<em><b>role</b></em>' feature
> * @generated
> */
> public Role getRole() {
> return role;
> }
>
> /**
> * Sets the '{@link User#getRole() <em>role</em>}' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @param the
> * new value of the '{@link User#getRole() role}' feature.
> * @generated
> */
> public void setRole(Role newRole) {
> role = newRole;
> }
>
> /**
> * Returns the value of '<em><b>grants</b></em>' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @return the value of '<em><b>grants</b></em>' feature
> * @generated
> */
> public List<Grant> getGrants() {
> return grants;
> }
>
> /**
> * Adds to the <em>grants</em> feature.
> * * @generated
> */
> public void addToGrants(Grant grantsValue) {
> if (!grants.contains(grantsValue)) {
> grants.add(grantsValue);
> }
> }
>
> /**
> * Removes from the <em>grants</em> feature.
> * * @generated
> */
> public void removeFromGrants(Grant grantsValue) {
> if (grants.contains(grantsValue)) {
> grants.remove(grantsValue);
> }
> }
>
> /**
> * Clears the <em>grants</em> feature.
> * * @generated
> */
> public void clearGrants() {
> while (!grants.isEmpty()) {
> removeFromGrants(grants.iterator().next());
> }
> }
>
> /**
> * Sets the '{@link User#getGrants() <em>grants</em>}' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @param the
> * new value of the '{@link User#getGrants() grants}' feature.
> * @generated
> */
> public void setGrants(List<Grant> newGrants) {
> grants = newGrants;
> }
>
> /**
> * Returns the value of '<em><b>properties</b></em>' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @return the value of '<em><b>properties</b></em>' feature
> * @generated
> */
> public Map<String, String> getProperties() {
> return properties;
> }
>
> /**
> * Sets the '{@link User#getProperties() <em>properties</em>}' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @param the
> * new value of the '{@link User#getProperties() properties}'
> * feature.
> * @generated
> */
> public void setProperties(Map<String, String> newProperties) {
> properties = newProperties;
> }
>
> /**
> * A toString method which prints the values of all EAttributes of this
> * instance. <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> @Override
> public String toString() {
> return "User " + " [name: " + getName() + "]";
> }
> }
>
>
> If you want to take a look at the ecore model, it is contained in my mail to you from the day before yesterday.
> Also, I get another error message, which does not seem to be connected with this entity exception. But I think it could
> be helpful, to give you as much information as possible :) The following error occurs sometimes during the data
> retrieval at the editors startup, sometimes when I click an an item in the editor. I haven't debugged it so far, since I
> neither see any effect nor do I see the context. But I think, it is nice to mention it :)
>
> java.lang.IllegalArgumentException: Service path null not supported, uri http://localhost:8080/texo/jsonws
> at org.eclipse.emf.texo.server.service.RetrieveModelOperation.internalExecute(RetrieveModelOperation.java:115)
> at org.eclipse.emf.texo.server.service.ModelOperation.execute(ModelOperation.java:59)
> at org.eclipse.emf.texo.server.web.WebServiceHandler.doGet(WebServiceHandler.java:89)
> at org.eclipse.emf.texo.server.web.WebServiceServlet.doGet(WebServiceServlet.java:57)
> at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:244)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
>
> Thanks for your help, again!
> Bastian
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
| | |
Re: [Texo] Map is not a known entity type [message #1005688 is a reply to message #1005670] |
Mon, 28 January 2013 09:30 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Bastian,
Okay and the request you send to the server, how does the URI look like?
You are using the JSON resource, right? If so, then this could be an issue in the JSON resource, but can you provide
some details, maybe I can replay it in a junit testcase.
gr. Martin
On 01/28/2013 09:17 AM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> I just wanted to tell you what evoked the mentioned "service path null exception". It was thrown, when the editor
> selection was empty.
>
> Best regards
> Bastian
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Texo] Map is not a known entity type [message #1005706 is a reply to message #1005688] |
Mon, 28 January 2013 11:02 |
Bastian Wagenfeld Messages: 183 Registered: January 2013 |
Senior Member |
|
|
Hi Martin,
I'm using a JSONResource, right. So when I select an item in the editor (like a User) a SelectionChangedEvent is thrown with the current selection. Somtimes, I don't know for which reasons, a selection is empty (ISelection.isEmpty() == true). Then the doGet method is invoked and the request URI is: "/texo/jsonws", nothing more, and the exception is thrown. If the selection is not empty (e.g. a User) the request URI is: "/texo/jsonws/users|User/1".
So I now filter any empty selection.
Were these information detailled enough?
Best regards
Bastian
[Updated on: Mon, 28 January 2013 11:28] Report message to a moderator
|
|
|
Re: [Texo] Map is not a known entity type [message #1005712 is a reply to message #1005706] |
Mon, 28 January 2013 11:15 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Almost detailed enough :-), where is the doGet method called?
gr. Martin
On 01/28/2013 12:02 PM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> I'm using a JSONResource, right. So when I select an item in the editor (like a User) a SelectionChangedEvent is thrown
> with the current selection. Somtimes, I don't know for which reasons, a selection is empty (ISelection.isEmpty() ==
> true). Then the doGet method is invoked and the request URI is: "/texo/jsonws", nothing more, and the exception is
> thrown. If the selection is not empty (e.g. a User) the request URI is: "/texo/jsonws/users|User/1".
> So I now filter any empty selection.
>
> Where these information detailled enough?
>
> Best regards Bastian
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
| | | |
Re: [Texo] Map is not a known entity type [message #1005748 is a reply to message #1005731] |
Mon, 28 January 2013 14:33 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Bastian,
I mean, can you post the stack trace on the client side? So put a breakpoint where the http request is done to the
server and then get the stacktrace. The error is probably in the JSONresource not on the server side.
gr. Martin
On 01/28/2013 01:57 PM, Bastian Wagenfeld wrote:
> That is the strange thing :)
> It is the stacktrace I posted above: java.lang.IllegalArgumentException: Service path null not supported, uri
> http://localhost:8080/texo/jsonws
> at org.eclipse.emf.texo.server.service.RetrieveModelOperation.internalExecute(RetrieveModelOperation.java:115)
> at org.eclipse.emf.texo.server.service.ModelOperation.execute(ModelOperation.java:59)
> at org.eclipse.emf.texo.server.web.WebServiceHandler.doGet(WebServiceHandler.java:89)
> at org.eclipse.emf.texo.server.web.WebServiceServlet.doGet(WebServiceServlet.java:57)
> at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:244)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
>
> I don't know how Texo reacts to a change of selection, but the error was thrown each time the selection changed, because
> the filters changed the displayed elements.
> A little example: The ResourceSet includes apples and bananas. Only apples are shown. I can click on a apple and Texo
> loads its children. Now, I activate a filter and all apples disappear and the bananas show up instead. That is when the
> selection changes, but actually no item is really selected. So the SelectionChangedEvent includes only an empty
> selection. All I do with Texo in the editor: Load bananas and apples to the ResourceSet of the EMFEditor's
> EditingDomain. That's all. Texo does all the rest.
>
> Bastian
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Texo] Map is not a known entity type [message #1005882 is a reply to message #1005748] |
Tue, 29 January 2013 08:22 |
Bastian Wagenfeld Messages: 183 Registered: January 2013 |
Senior Member |
|
|
Hi Martin,
I thought that you could be interessted in such an error message, but there is none, I'm sorry. Only the server throws an error.
Maybe you can tell me which methods in which classes are invoked, when an object gets selected in an editor. So far I can't see where exactly the exception is thrown. Sometimes the server throws the exception, when the variable urlStr in the doHTTPRequest-method is null. The client itself doesn't throw an exception.
For example the doHTTPRequest with the following parameters in the JSONObjectStore led to an exception:
urlStr = null;
content = { "_eclass" : "request|QueryType",
"_title" : "",
"countOperation" : "false",
"doCount" : "false",
"firstResult" : "-1",
"maxResults" : "-1",
"parameters" : [ ],
"query" : "select a from as_Aircraft a"
}
localUrlStr = http://localhost:8080/texo/jsonws
url:
- file = /texo/jsonws
- path = /texo/jsonws
- query = null
I'm sorry, but that is all I can tell you. I hope that is enough?!
Best regards
Bastian
|
|
|
Re: [Texo] Map is not a known entity type [message #1005953 is a reply to message #1005882] |
Tue, 29 January 2013 11:57 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Bastian,
The client won't show/have an exception, but it does a http request with an invalid uri. So my main thing is to
understand how this client side thing happens. Can you put a breakpoint here:
JSONEObjectStore.doHTTPRequest
and then post the stacktrace of the invalid request (from the client)?
gr. Martin
On 01/29/2013 09:22 AM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> I thought that you could be interessted in such an error message, but there is none, I'm sorry. Only the server throws
> an error.
> Maybe you can tell me which methods in which classes are invoked, when an object gets selected in an editor. So far I
> can't see where exactly the exception is thrown. Sometimes the server throws the exception, when the variable urlStr in
> the doHTTPRequest-method is null. The client itself doesn't throw an exception.
> For example the doHTTPRequest with the following parameters in the JSONObjectStore led to an exception:
>
> urlStr = null;
> content = { "_eclass" : "request|QueryType",
> "_title" : "",
> "countOperation" : "false",
> "doCount" : "false",
> "firstResult" : "-1",
> "maxResults" : "-1",
> "parameters" : [ ],
> "query" : "select a from as_Aircraft a"
> }
> localUrlStr = http://localhost:8080/texo/jsonws
> url:
> - file = /texo/jsonws
> - path = /texo/jsonws
> - query = null
>
> I'm sorry, but that is all I can tell you. I hope that is enough?!
>
> Best regards
> Bastian
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
| |
Re: [Texo] Map is not a known entity type [message #1006291 is a reply to message #1006275] |
Wed, 30 January 2013 17:17 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Bastian,
Thanks for all your tries! But the exception is not thrown in the client. I mean can you for which httprequest-uri the
exception gets thrown on the server.
So the exception is not thrown in doHttpRequest, but the doHttpRequest will cause a server side exception. I am
interested in the client-side stack trace which causes the server side exception.
But it already took a lot of your time, so only if you have some time left.. :-).
gr. Martin
On 01/30/2013 05:25 PM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> we tried a lot today, but couldn't find out at which particular point the exception occurs. Therefore I don't have a
> stack trace to offer :)
> But I can tell you the exception isn't throm in the EObjectStore's doHTTPRequest. And it isn't evoked in any other class
> of the texo packages that does a server request. I don't have a clue where the server is called, instead. So I'm very
> sorry, but I can't tell you where this error is produced.
>
> Best regards
> Bastian
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Texo] Map is not a known entity type [message #1006401 is a reply to message #1006291] |
Thu, 31 January 2013 09:12 |
Bastian Wagenfeld Messages: 183 Registered: January 2013 |
Senior Member |
|
|
Hi Martin,
I would really like to help you and I understand that the exception is thrown on the server side, but the problem is I don't understand at which point the client makes a call that leads to the server error. Amongst others I did the following:
1. I put a breakpoint in the doHTTPRequest method in the JSONEObjectStore.
2. I start the editor -> the editor fills the model and creates the Resource for the editor.
3. The editor includes models of Aircrafts and models of users. Since it is in the Aircraft-perspective, only the Aircrafts are shown. (During this initialization the doHTTPRequest method is called a couple of times, but nothing bad happens.)
4. I switch to the User-perspective. The Aircrafts get filtered and the Users show up.
5. I switch back to the Aircraft-perspective.
6. I select an Aircraft.
7. The server throws the IllegalArgumentException and AFTER THIS the debugging stops in the doHTTPRequest method.
So that is why I don't have a reasonable stacktrace for you. I can offer you the following stack trace. But be aware this is the client's stack trace immediatley AFTER the exception is thrown on the server. The EntityManager did not read or write something between the exception and this point in the stack trace.
Thread [main] (Suspended (breakpoint at line 45 in EObjectStore))
JSONEObjectStore(EObjectStore).getFromQualifiedIdString(String) line: 45
JSONTexoResource(TexoResource).getEObject(String) line: 117
AdapterFactoryEditingDomain$AdapterFactoryEditingDomainResourceSet(ResourceSetImpl).getEObject(URI, boolean) line: 219
EcoreUtil.resolve(EObject, ResourceSet) line: 203
EcoreUtil.resolve(EObject, EObject) line: 263
AircraftImpl(BasicEObjectImpl).eResolveProxy(InternalEObject) line: 1483
AircraftImpl.getDerivate() line: 159
AircraftImpl.eGet(int, boolean, boolean) line: 294
AircraftImpl(BasicEObjectImpl).eGet(EStructuralFeature, boolean, boolean) line: 1021
AircraftImpl(BasicEObjectImpl).eGet(EStructuralFeature, boolean) line: 1013
AircraftImpl(BasicEObjectImpl).eGet(EStructuralFeature) line: 1008
ItemPropertyDescriptor.getValue(EObject, EStructuralFeature) line: 1149
ItemPropertyDescriptor.getPropertyValue(Object) line: 1197
PropertySource.getPropertyValue(Object) line: 92
PropertySheetEntry.refreshValues() line: 611
PropertySheetEntry.refreshChildEntries() line: 568
PropertySheetEntry.setValues(Object[]) line: 760
PropertySheetViewer.setInput(Object) line: 973
AerostructsEditor$10(PropertySheetPage).selectionChanged(IWorkbenchPart, ISelection) line: 510
PropertySheet.selectionChanged(IWorkbenchPart, ISelection) line: 363
PageSelectionService(AbstractSelectionService).firePostSelection(IWorkbenchPart, ISelection) line: 179
AbstractSelectionService$2.selectionChanged(SelectionChangedEvent) line: 71
AerostructsEditor.setSelection(ISelection) line: 1294
AerostructsEditor$5.selectionChanged(SelectionChangedEvent) line: 726
Viewer$2.run() line: 164
SafeRunner.run(ISafeRunnable) line: 42
JFaceUtil$1.run(ISafeRunnable) line: 49
SafeRunnable.run(ISafeRunnable) line: 175
TreeViewer(Viewer).fireSelectionChanged(SelectionChangedEvent) line: 162
TreeViewer(StructuredViewer).updateSelection(ISelection) line: 2188
TreeViewer(StructuredViewer).handleSelect(SelectionEvent) line: 1211
StructuredViewer$4.widgetSelected(SelectionEvent) line: 1241
OpenStrategy.fireSelectionEvent(SelectionEvent) line: 239
OpenStrategy.access$4(OpenStrategy, SelectionEvent) line: 233
OpenStrategy$1.handleEvent(Event) line: 403
EventTable.sendEvent(Event) line: 84
Tree(Widget).sendEvent(Event) line: 1053
Display.runDeferredEvents() line: 4165
Display.readAndDispatch() line: 3754
Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2701
Workbench.runUI() line: 2665
Workbench.access$4(Workbench) line: 2499
Workbench$7.run() line: 679
Realm.runWithDefault(Realm, Runnable) line: 332
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 668
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149
AerostructsEditorAdvisor$Application.start(IApplicationContext) line: 123
EclipseAppHandle.run(Object) line: 196
EclipseAppLauncher.runApplication(Object) line: 110
EclipseAppLauncher.start(Object) line: 79
EclipseStarter.run(Object) line: 344
EclipseStarter.run(String[], Runnable) line: 179
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
Method.invoke(Object, Object...) line: 601
Main.invokeFramework(String[], URL[]) line: 622
Main.basicRun(String[]) line: 577
Main.run(String[]) line: 1410
Main.main(String[]) line: 1386
The localUrl String on the server is: http://localhost:8080/texo/jsonws, but it should be like this: http://localhost:8080/texo/jsonws/aircrafts|Aricraft/1.
Maybe it would be easier, if you'd try to reproduce this error on your own?! This souldn't be much work to do. In my case the basic things to do are: Create an standard EMF editor, replace the createModel method and add a JSONTexoResource and add a filter to the editor. I think that are the main things.
I hope this is at least a little helpful to you to understand the error. I did not
Another thing: Did you have time to look at the Map-issue? This is a big problem to me.
Best regards
Bastian
|
|
|
Re: [Texo] Map is not a known entity type [message #1006509 is a reply to message #1006401] |
Thu, 31 January 2013 14:30 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Bastian,
Thanks for all the debugging! I will spend some time on the map issue, hopefully today, but probably tomorrow. After
that I would like get back to this issue with you...
I would like to reproduce using a junit test, so without rcp code... it seems that the EMF proxy object has a wrong uri.
But will get back to you later on this one :-).
gr. Martiin
On 01/31/2013 10:12 AM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> I would really like to help you and I understand that the exception is thrown on the server side, but the problem is I
> don't understand at which point the client makes a call that leads to the server error. Amongst others I did the following:
> 1. I put a breakpoint in the doHTTPRequest method in the JSONEObjectStore.
> 2. I start the editor -> the editor fills the model and creates the Resource for the editor.
> 3. The editor includes models of Aircrafts and models of users. Since it is in the Aircraft-perspective, only the
> Aircrafts are shown. (During this initialization the doHTTPRequest method is called a couple of times, but nothing bad
> happens.)
> 4. I switch to the User-perspective. The Aircrafts get filtered and the Users show up.
> 5. I switch back to the Aircraft-perspective.
> 6. I select an Aircraft.
> 7. The server throws the IllegalArgumentException and AFTER THIS the debugging stops in the doHTTPRequest method.
>
> So that is why I don't have a reasonable stacktrace for you. I can offer you the following stack trace. But be aware
> this is the client's stack trace immediatley AFTER the exception is thrown on the server. The EntityManager did not read
> or write something between the exception and this point in the stack trace.
>
> Thread [main] (Suspended (breakpoint at line 45 in EObjectStore))
> JSONEObjectStore(EObjectStore).getFromQualifiedIdString(String) line: 45
> JSONTexoResource(TexoResource).getEObject(String) line: 117
> AdapterFactoryEditingDomain$AdapterFactoryEditingDomainResourceSet(ResourceSetImpl).getEObject(URI, boolean) line: 219
> EcoreUtil.resolve(EObject, ResourceSet) line: 203
> EcoreUtil.resolve(EObject, EObject) line: 263
> AircraftImpl(BasicEObjectImpl).eResolveProxy(InternalEObject) line: 1483
> AircraftImpl.getDerivate() line: 159
> AircraftImpl.eGet(int, boolean, boolean) line: 294
> AircraftImpl(BasicEObjectImpl).eGet(EStructuralFeature, boolean, boolean) line: 1021
> AircraftImpl(BasicEObjectImpl).eGet(EStructuralFeature, boolean) line: 1013
> AircraftImpl(BasicEObjectImpl).eGet(EStructuralFeature) line: 1008
> ItemPropertyDescriptor.getValue(EObject, EStructuralFeature) line: 1149
> ItemPropertyDescriptor.getPropertyValue(Object) line: 1197
> PropertySource.getPropertyValue(Object) line: 92
> PropertySheetEntry.refreshValues() line: 611
> PropertySheetEntry.refreshChildEntries() line: 568
> PropertySheetEntry.setValues(Object[]) line: 760
> PropertySheetViewer.setInput(Object) line: 973
> AerostructsEditor$10(PropertySheetPage).selectionChanged(IWorkbenchPart, ISelection) line: 510
> PropertySheet.selectionChanged(IWorkbenchPart, ISelection) line: 363
> PageSelectionService(AbstractSelectionService).firePostSelection(IWorkbenchPart, ISelection) line: 179
> AbstractSelectionService$2.selectionChanged(SelectionChangedEvent) line: 71
> AerostructsEditor.setSelection(ISelection) line: 1294
> AerostructsEditor$5.selectionChanged(SelectionChangedEvent) line: 726
> Viewer$2.run() line: 164
> SafeRunner.run(ISafeRunnable) line: 42
> JFaceUtil$1.run(ISafeRunnable) line: 49
> SafeRunnable.run(ISafeRunnable) line: 175
> TreeViewer(Viewer).fireSelectionChanged(SelectionChangedEvent) line: 162
> TreeViewer(StructuredViewer).updateSelection(ISelection) line: 2188
> TreeViewer(StructuredViewer).handleSelect(SelectionEvent) line: 1211
> StructuredViewer$4.widgetSelected(SelectionEvent) line: 1241
> OpenStrategy.fireSelectionEvent(SelectionEvent) line: 239
> OpenStrategy.access$4(OpenStrategy, SelectionEvent) line: 233
> OpenStrategy$1.handleEvent(Event) line: 403
> EventTable.sendEvent(Event) line: 84
> Tree(Widget).sendEvent(Event) line: 1053
> Display.runDeferredEvents() line: 4165
> Display.readAndDispatch() line: 3754
> Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2701
> Workbench.runUI() line: 2665
> Workbench.access$4(Workbench) line: 2499
> Workbench$7.run() line: 679
> Realm.runWithDefault(Realm, Runnable) line: 332
> Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 668
> PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149
> AerostructsEditorAdvisor$Application.start(IApplicationContext) line: 123
> EclipseAppHandle.run(Object) line: 196
> EclipseAppLauncher.runApplication(Object) line: 110
> EclipseAppLauncher.start(Object) line: 79
> EclipseStarter.run(Object) line: 344
> EclipseStarter.run(String[], Runnable) line: 179
> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
> NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57
> DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
> Method.invoke(Object, Object...) line: 601
> Main.invokeFramework(String[], URL[]) line: 622
> Main.basicRun(String[]) line: 577
> Main.run(String[]) line: 1410
> Main.main(String[]) line: 1386
>
>
> The localUrl String on the server is: http://localhost:8080/texo/jsonws, but it should be like this:
> http://localhost:8080/texo/jsonws/aircrafts|Aricraft/1.
>
> Maybe it would be easier, if you'd try to reproduce this error on your own?! This souldn't be much work to do. In my
> case the basic things to do are: Create an standard EMF editor, replace the createModel method and add a
> JSONTexoResource and add a filter to the editor. I think that are the main things.
>
> I hope this is at least a little helpful to you to understand the error. I did not :)
>
> Another thing: Did you have time to look at the Map-issue? This is a big problem to me.
>
> Best regards
> Bastian
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
| |
Goto Forum:
Current Time: Fri Apr 26 03:48:12 GMT 2024
Powered by FUDForum. Page generated in 0.04082 seconds
|