You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m trying to work around the duplicate entry bug by creating the part in two steps. Create the part first then add the sequence. However, this is throwing an exception (see below). Here is my log messages:
22:30:14.005 [1182432132@qtp-1354277996-51] INFO org.jbei.ice - Administrator: created new Part
22:30:14.158 [1182432132@qtp-1354277996-51] ERROR org.jbei.ice - null
java.lang.NullPointerException: null
at org.jbei.ice.lib.group.GroupController.getAllPublicGroupsForAccount(GroupController.java:191)
at org.jbei.ice.lib.entry.EntryCreator.createEntry(EntryCreator.java:100)
at org.jbei.ice.lib.parsers.sbol.SBOLParser.createNewEntry(SBOLParser.java:168)
at org.jbei.ice.lib.parsers.sbol.SBOLParser.createICEComponentDefinitionRecord(SBOLParser.java:229)
at org.jbei.ice.lib.parsers.sbol.SBOLParser.parseToEntry(SBOLParser.java:75)
at org.jbei.ice.lib.entry.sequence.PartSequence.parseSequenceFile(PartSequence.java:106)
at org.jbei.ice.services.rest.FileResource.uploadSequence(FileResource.java:280)
…
The text was updated successfully, but these errors were encountered:
Adding a null pointer check here seems to fix this:
public ArrayList getAllPublicGroupsForAccount(Account account) {
ArrayList groups = new ArrayList<>();
if (account==null || account.getGroups()==null) return groups; <———— NEW LINE
for (Group group : account.getGroups()) {
if (group.getType() == GroupType.PUBLIC)
groups.add(group);
}
return groups;
}
I’m trying to work around the duplicate entry bug by creating the part in two steps. Create the part first then add the sequence. However, this is throwing an exception (see below). Here is my log messages:
postIceJson: https://localhost:8443/rest/parts
post: {"type":"PART","name":"A1_AmtR","status":"Complete","shortDescription":"","longDescription":"","bioSafetyLevel":0,"principalInvestigator":"Chris Myers","principalInvestigatorEmail":"[email protected]","fundingSource":""}
postIceJson: https://localhost:8443/rest/parts: response received
postIceJson: success
resp:200
body:{"id":93,"type":"PART","parents":[],"index":0,"recordId":"0211088c-872f-45bf-a2af-ece5bd5c7b8f","ownerId":0,"creatorId":0,"status":"","creationTime":0,"modificationTime":0,"bioSafetyLevel":1,"principalInvestigatorId":0,"basePairCount":0,"featureCount":0,"viewCount":0,"hasAttachment":false,"hasSample":false,"hasSequence":false,"hasOriginalSequence":false,"canEdit":false,"accessPermissions":[],"publicRead":false,"linkedParts":[]}
postIceFile: https://localhost:8443/rest/file/sequence/
formData: {"file": ... ,"entryRecordId": 93, "entryType": "PART" }
postIceFile: https://localhost:8443/rest/file/sequence/: response received
And here is the ICE error trace:
22:30:14.005 [1182432132@qtp-1354277996-51] INFO org.jbei.ice - Administrator: created new Part
22:30:14.158 [1182432132@qtp-1354277996-51] ERROR org.jbei.ice - null
java.lang.NullPointerException: null
at org.jbei.ice.lib.group.GroupController.getAllPublicGroupsForAccount(GroupController.java:191)
at org.jbei.ice.lib.entry.EntryCreator.createEntry(EntryCreator.java:100)
at org.jbei.ice.lib.parsers.sbol.SBOLParser.createNewEntry(SBOLParser.java:168)
at org.jbei.ice.lib.parsers.sbol.SBOLParser.createICEComponentDefinitionRecord(SBOLParser.java:229)
at org.jbei.ice.lib.parsers.sbol.SBOLParser.parseToEntry(SBOLParser.java:75)
at org.jbei.ice.lib.entry.sequence.PartSequence.parseSequenceFile(PartSequence.java:106)
at org.jbei.ice.services.rest.FileResource.uploadSequence(FileResource.java:280)
…
The text was updated successfully, but these errors were encountered: