Question: I got the following, not to comlex code, anyway I get an exception while deserialization.
The exception is: Binary stream '0' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization.

But I don't get what is wrong with my code

```
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization;
using System.IO;

namespace Server
{
    [Serializable]
    class testclass
    {
        int a;
        int b;
        int c;
        public testclass()
        {
            a = 1;
            b = 2;
            c = 3000;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            testclass test = new testclass();
            IFormatter bf = new BinaryFormatter();
            MemoryStream ms = new MemoryStream(new byte[512],0,512,true,true);
            bf.Serialize(ms,test);
            testclass detest=(testclass)bf.Deserialize(ms);
            Console.ReadLine();
        }
    }
}

```

Answer: 
The solution in the link [HSQL Create Procedure Syntax doesn't seem to match the documentation](https://stackoverflow.com/questions/9157027/hsql-create-procedure-syntax-doesnt-seem-to-match-the-documentation) is in this line of configuration:

```
<jdbc:script location="file:Artifacts/Hsql Version Scripts/install/install.sql" separator="/;"/>

```

By default, the separator used by the Spring script is the semicolon. This means when the first semicolon inside the trigger definition is reached, the incomplete definition is sent to HSQLDB (which results in the error). When you use the above configuration line, it changes the default separator to two characters "/;". Using the special configuration, you need to modify your script to have this separator at the end of each create trigger definition. Leave the semicolons inside the trigger definition body as they are.
1. Terminate each of the SQL statements (insert, create, select etc) within the script 
(some\_script.sql) with /;
2. Whilst configuring in Spring - add the following:

return new EmbeddedDatabaseBuilder()
 .setType("HSQL")
 .setName("DBNAME")
 .addScript("some\_script.sql")
 .setSeparator("/;")
 .build();