orientechnologies / orientechnologies/orientdb
NPE when creating vertex with link via studio
Open
@luigidellaquila is already working on this.
Since Jan 11, 2021.
- Dominant language
- Java
- Stars
- 5k
- Forks
- 868
- Avg merge
- 15h 6m
- Merged PRs (30d)
- 18
Description
OrientDB Version: orientdb-3.1.6
Java Version: 11.0.5
OS: mac os x (10.15.7, x86_64)
Expected behavior
I want to be able to create a new vertex that has a mandatory link property.
Actual behavior
NPE when saving the new vertex:
Internal server error:
java.lang.NullPointerException
at com.orientechnologies.orient.core.record.impl.ODocument.validateField(ODocument.java:786)
at com.orientechnologies.orient.core.record.impl.ODocument.validate(ODocument.java:2625)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.saveInternal(ODatabaseDocumentAbstract.java:1830)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.save(ODatabaseDocumentAbstract.java:1802)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.save(ODatabaseDocumentAbstract.java:135)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:2361)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:2350)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostDocument.execute(OServerCommandPostDocument.java:54)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:253)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:811)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:67)
Steps to reproduce
- I installed orientDB, edited orientdb.sh (properly set
ORIENTDB_DIRundORIENTDB_USER) and run it withstartarg. - I opened studio at http://localhost:2480/ and logged in
- I created a new vertex
Countrywith some string properties - I created a new vertex
Addresswith some string properties and a link property calledCountrypointing toCountyvertex and with min=1, max=1, mandatory=true and not null = true. - I created a record of
Countrywith all properties filled and noted its RID - I created a record of
Addresswith all properties filled and theCountryproperty set to the before noted RID.
At 6. saving failed with the above exception.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.