Declaring member variable for procedure class in java

I need to declare a member variable List propertyNodes in my Procedure class, as shown in the code below. But below code gives me an error while running unit test case (error starting Neo4j database...) While if I initialize the variable inside the procedure function, it works perfectly fine.

Any solution/help will be deeply appreciated.

public class connectToActivities {


public Transaction tx;

//this is the member variable I am refering to - Property is a class.
public List<Node> propertyNodes = new Property().getProperty(tx); 

enum MyRelationshipTypes  implements RelationshipType

@Procedure(mode = Mode.WRITE )
@Description("Connect Inputs To Activities")
public void connectInputsToActivities(@Name("node") Node n) 
      //Property property = new Property();
	 //List<Node> propertyNodes = property.getProperty(tx);
}// end of class

Those procedure classes are stateless holders of methods for the procedures. They cannot have member variables.

If you need intermediate classes for operations/state during the procedure execution, you need to declare those classes separately.

Please note that for writing stored procedures you should have a good understanding and skill in Java development, otherwise you might trip over a lot of things.

Thankyou for the information.