Hi everyone,
After database migration from neo4j 3.5. * to 4.1.* server and Spring Neo4j Data dependencies update to version 5.3.4.RELEASE, the save (object, depth)
method stopped working. It looks like it hangs at this place:
neo4jSession.save(actualRelation, 0); // actualRelation is an instance of ProfileParentGroupRelation class
ProfileParentGroupRelation.java:
@RelationshipEntity(type = "HAS_PARENT")
public class ProfileParentGroupRelation extends TimespanRelationship {
@StartNode
private Profile profile;
@EndNode
private Group parent;
private List<Integer> userRoles;
public ProfileParentGroupRelation() {
}
public Profile getProfile() {
return profile;
}
public void setProfile(Profile profile) {
this.profile = profile;
}
public Group getParent() {
return parent;
}
public void setParent(Group parent) {
this.parent = parent;
}
public List<Integer> getUserRoles() {
return userRoles;
}
public void setUserRoles(List<Integer> userRoles) {
this.userRoles = userRoles;
}
}
pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.infotemp</groupId>
<artifactId>neo4j-db-module</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>neo4j-db-module</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- <spring.version>5.0.1.RELEASE</spring.version> -->
<spring.version>5.2.11.RELEASE</spring.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<!-- Neo4j -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.3.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.5.0.RELEASE</version>
</dependency>
<dependency>
<groupId>com.graphaware.neo4j</groupId>
<artifactId>uuid</artifactId>
<version>4.1.4.58.19</version>
</dependency>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-releasetrain</artifactId>
<version>Neumann-SR4</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
I suspect that the problem is in the call "neo4jSession.save()", because I’ve raised same problem in other places where this call is used.
Please help me to understand the reason of the following problem. Any help would be appreciated.
UPDATES:
Source:
System.out.println("Start of [neo4jSession.save(actualRelation,0)]");
neo4jSession.save(actualRelation,0);
System.out.println("End of [neo4jSession.save(actualRelation,0)]");
Neo4j Logs:
Start of [neo4jSession.save(actualRelation,0)]
2020-11-19 16:37:24,296 DEBUG .ogm.session.delegates.SaveEventDelegate: 96 - visiting: com.infotemp.neo4j.model.relationship.ProfileParentGroupRelation@c3
2020-11-19 16:37:24,297 DEBUG .ogm.session.delegates.SaveEventDelegate: 96 - visiting: com.infotemp.neo4j.model.Profile@2fbc66a8
2020-11-19 16:37:24,297 DEBUG .ogm.session.delegates.SaveEventDelegate: 104 - already visited: com.infotemp.neo4j.model.relationship.ProfileParentGroupRelation@c3
2020-11-19 16:37:24,297 DEBUG .ogm.session.delegates.SaveEventDelegate: 178 - dirty: com.infotemp.neo4j.model.Profile@2fbc66a8
2020-11-19 16:37:24,299 DEBUG .ogm.session.delegates.SaveEventDelegate: 96 - visiting: Group [labels=[Project], displayName=Sub-project #3 [edited], subdomain=null, secondaryType=7, description=test, allowAccountProfiles=null, locationRadius=null, locationTracking=false, parentGroups=null, addresses=null, phoneNumbers=null, emails=null, historyData=null, actionSets=null, emailTemplates=null, approvalProcesses=null, reportTypes=null, profiles=[com.infotemp.neo4j.model.relationship.ProfileParentGroupRelation@c3], impotTemplates=null]
2020-11-19 16:37:24,299 DEBUG .ogm.session.delegates.SaveEventDelegate: 104 - already visited: com.infotemp.neo4j.model.relationship.ProfileParentGroupRelation@c3
2020-11-19 16:37:24,300 DEBUG .ogm.session.delegates.SaveEventDelegate: 178 - dirty: Group [labels=[Project], displayName=Sub-project #3 [edited], subdomain=null, secondaryType=7, description=test, allowAccountProfiles=null, locationRadius=null, locationTracking=false, parentGroups=null, addresses=null, phoneNumbers=null, emails=null, historyData=null, actionSets=null, emailTemplates=null, approvalProcesses=null, reportTypes=null, profiles=[com.infotemp.neo4j.model.relationship.ProfileParentGroupRelation@c3], impotTemplates=null]
2020-11-19 16:37:24,300 DEBUG .ogm.session.delegates.SaveEventDelegate: 178 - dirty: com.infotemp.neo4j.model.relationship.ProfileParentGroupRelation@c3
HAS_PARENT: f00e48cc-7f31-4df3-b1f7-3b3eb1ce971e
2020-11-19 16:37:24,300 DEBUG org.neo4j.ogm.context.EntityGraphMapper: 124 - context initialised with 0 relationships
2020-11-19 16:37:24,301 DEBUG org.neo4j.ogm.context.EntityGraphMapper: 358 - visiting: com.infotemp.neo4j.model.Profile@2fbc66a8
2020-11-19 16:37:24,301 DEBUG org.neo4j.ogm.context.EntityGraphMapper: 305 - com.infotemp.neo4j.model.Profile@2fbc66a8 has changed
2020-11-19 16:37:24,302 DEBUG org.neo4j.ogm.context.EntityGraphMapper: 284 - at horizon 0: com.infotemp.neo4j.model.Profile@2fbc66a8
2020-11-19 16:37:24,302 DEBUG org.neo4j.ogm.context.EntityGraphMapper: 358 - visiting: Group [labels=[Project], displayName=Sub-project #3 [edited], subdomain=null, secondaryType=7, description=test, allowAccountProfiles=null, locationRadius=null, locationTracking=false, parentGroups=null, addresses=null, phoneNumbers=null, emails=null, historyData=null, actionSets=null, emailTemplates=null, approvalProcesses=null, reportTypes=null, profiles=[com.infotemp.neo4j.model.relationship.ProfileParentGroupRelation@c3], impotTemplates=null]
2020-11-19 16:37:24,302 DEBUG org.neo4j.ogm.context.EntityGraphMapper: 305 - Group [labels=[Project], displayName=Sub-project #3 [edited], subdomain=null, secondaryType=7, description=test, allowAccountProfiles=null, locationRadius=null, locationTracking=false, parentGroups=null, addresses=null, phoneNumbers=null, emails=null, historyData=null, actionSets=null, emailTemplates=null, approvalProcesses=null, reportTypes=null, profiles=[com.infotemp.neo4j.model.relationship.ProfileParentGroupRelation@c3], impotTemplates=null] has changed
2020-11-19 16:37:24,303 DEBUG org.neo4j.ogm.context.EntityGraphMapper: 284 - at horizon 0: Group [labels=[Project], displayName=Sub-project #3 [edited], subdomain=null, secondaryType=7, description=test, allowAccountProfiles=null, locationRadius=null, locationTracking=false, parentGroups=null, addresses=null, phoneNumbers=null, emails=null, historyData=null, actionSets=null, emailTemplates=null, approvalProcesses=null, reportTypes=null, profiles=[com.infotemp.neo4j.model.relationship.ProfileParentGroupRelation@c3], impotTemplates=null]
2020-11-19 16:37:24,303 DEBUG org.neo4j.ogm.context.EntityGraphMapper: 974 - context-new: (-6)-[164:HAS_PARENT]->(-7)
2020-11-19 16:37:24,304 DEBUG drivers.bolt.transaction.BoltTransaction: 61 - No current transaction, starting a new one
2020-11-19 16:37:24,317 DEBUG drivers.bolt.transaction.BoltTransaction: 64 - Native transaction: org.neo4j.driver.internal.InternalTransaction@2c82a47b
2020-11-19 16:37:24,318 DEBUG o4j.ogm.drivers.bolt.request.BoltRequest: 178 - Request: UNWIND $rows as row MERGE (n:`GroupSettings`:`Profile`{uuid: row.props.uuid}) SET n=row.props RETURN row.nodeRef as ref, ID(n) as id, $type as type with params {type=node, rows=[{nodeRef=-6, props={mustUseProjectForReports=false, roundingAmountPauseEndTime=null, allowAutoPauseOverwrite=false, minReportPauseLength=null, dateFormat=null, minReportLength=null, roundingTypeReportStartTime=null, language=null, uuid=0bf5124e-ee46-439c-a98b-3d162bfd3a21, allowReportsToTime=null, sumLeaveLTEOvertimePool=null, honorificSuffix=null, warningTypeReportClocking=null, registrationSourceType=null, familyName=null, roundingAmountReportStartTime=null, givenName=null, timeZone=null, overtimeCorrectionAmount=null, settingsInheritanceStrategy=null, personalNumber=null, creationDate=null, sumVacationLTEVacationPool=null, allowReportsFromTime=null, userRoles=null, approvalNotifications=null, onlyFullDayVacation=null, roundingTypePauseEndTime=null, roundingAmountReportEndTime=null, unique=null, userUuid=f00e48cc-7f31-4df3-b1f7-3b3eb1ce971e, roundingTypePauseStartTime=null, actions=[1000000010002, 2000000010002, 4000100000001, 4000100000002, 4000100000003, 4000100000004, 8000100000001, 8000100000002, 8000100000003, 8000100000004, 9000100000001, 12000000000002, 16000100000002, 17000100000002, 4000000000001, 4000000000002, 4000000000003, 4000000000004, 4000000010003, 5000000010002, 6000000000001, 6000000000002, 6000000000003, 6000000000004, 6000100000001, 6000100000004, 6000100000002, 6000100000003, 8000000000001, 8000000000002, 8000000000003, 8000000000004, 8000000010003, 9000000000001, 14000000000002, 16000100000001, 16000100000003, 16000100000004, 17000000000002, 1000000000001, 1000000000002, 1000000000003, 1000000000004, 2000000000001, 2000000000003, 2000000000002, 2000000000004, 5000000000001, 5000000000002, 5000000000003, 5000000000004, 5000100000003, 9000000000002, 9000200000002, 18000000000000, 13000000000001, 14000000000001, 14000000000003, 14000000000004], gender=null, displayName=null, formatted=null, warningForClockingReport=null, hasAllInclusiveContract=null, reportPauseLengthProblem=null, allowPaidPausesInReports=false, roundingTypeReportEndTime=null, numberFormat=null, autoCreateReports=false, minVacationLength=null, maxDailyReportLength=null, chipId=null, roundingAmountPauseStartTime=null, maxReportLength=null, onlyClockingReports=false, availableLoginMethods=null, unique3=null, honorificPrefix=null, unique1=null, unique2=null, birthDate=null, allowReportsInFuture=7258118400000, highlightTargetTimeDifferences=0, warningForClockingDay=null, vacationCorrectionAmount=null, allowReportsInPast=true, maxReportPauseLength=null, timeFormat=null, hintStatus=null, maxVacationLength=null, autoSaveDesktop=null, middleName=null}}]}
2020-11-19 16:37:24,332 DEBUG o4j.ogm.drivers.bolt.request.BoltRequest: 178 - Request: UNWIND $rows as row MERGE (n:`Group`:`GroupSettings`:`Project`{uuid: row.props.uuid}) SET n=row.props RETURN row.nodeRef as ref, ID(n) as id, $type as type with params {type=node, rows=[{nodeRef=-7, props={mustUseProjectForReports=null, roundingAmountPauseEndTime=null, allowAutoPauseOverwrite=null, minReportPauseLength=null, dateFormat=null, minReportLength=null, roundingTypeReportStartTime=null, language=null, ownerId=null, uuid=12c38bf2-23ea-40d1-b799-c00044c5027f, allowReportsToTime=null, sumLeaveLTEOvertimePool=null, availableUserRoles=null, hardwareTerminalId=null, isLicensePartner=null, stripeSubscriptionId=null, apiUrl=null, warningTypeReportClocking=null, registrationSourceType=null, logo=null, clientSecret=null, userLimit=null, reportTypeStrategy=null, roundingAmountReportStartTime=null, timeZone=null, overtimeCorrectionAmount=null, settingsInheritanceStrategy=null, sumVacationLTEVacationPool=null, locationRadius=null, allowReportsFromTime=null, macAddress=null, legalTermsAcceptDate=null, approvalNotifications=null, onlyFullDayVacation=null, roundingTypePauseEndTime=null, roundingAmountReportEndTime=null, numberEmployees=null, expirationTime=null, unique=null, userUuid=f00e48cc-7f31-4df3-b1f7-3b3eb1ce971e, hardwareTerminalLimit=null, subdomain=null, pckg=null, locationTracking=false, roundingTypePauseStartTime=null, allowAccountProfiles=null, stripeCustomerId=null, status=null, displayName=Sub-project #3 [edited], defaultCompanyOwnerActions=null, creatorId=f00e48cc-7f31-4df3-b1f7-3b3eb1ce971e, warningForClockingReport=null, description=test, hasAllInclusiveContract=null, reportPauseLengthProblem=null, allowPaidPausesInReports=null, ssid=null, roundingTypeReportEndTime=null, promoExpirationTime=null, numberFormat=null, trialTime=null, autoCreateReports=null, wageTypeStrategy=null, minVacationLength=null, maxDailyReportLength=null, promoCode=null, secondaryType=7, clientId=null, roundingAmountPauseStartTime=null, maxReportLength=null, promoCodeRaw=null, additionalUserNumber=null, onlyClockingReports=null, availableLoginMethods=null, unique3=null, unique1=null, defaultCompanyActions=null, unique2=null, allowReportsInFuture=null, highlightTargetTimeDifferences=null, creatorCompanyId=28cd0998-6073-4773-992a-d6cdd9d8cdc6, warningForClockingDay=null, vacationCorrectionAmount=null, isEnabledPayroll=null, allowReportsInPast=null, createTime=null, maxReportPauseLength=null, payMethodType=null, timeFormat=null, maxVacationLength=null, sepaDebitSourceId=null}}]}