I'm not sure about how the protocol is in here but this is what I'm doing. There's an issue I found which I solved myself so I'm posting the issue and posting the solution as question and answer respectively. So here goes the issue:
I was trying to perform unit tests using junit, embedded glashfish, JPA and hit a roadblock when a java.lang.ExceptionInInitializerError at org.apache.derby.jdbc.EmbeddedDataSource.findDriver(Unknown Source) raised after running the tests.
Any ideas?
The pom file has
...
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.glassfish.main.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.10.1.1</version>
</dependency>
...