it seems to be impossible to start the Network-Server as a maven goal.
The maven dependency
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbynet</artifactId>
<version>10.10.1.1</version>
</dependency>
loads a file named 'derbynet-10.10.1.1.jar'.
When trying to Start the NetworkServerControl to start the
Network-Server, I am getting the error
"derbynet.jar konnte im Classpath nicht gefunden werden.", which is the
translation of the error code"DRDA_MissingNetworkJar.S"
This error is raised at line 765 of NetworkServerControl.java
743 /**
744 *<p>
745 * Find the url of the library directory which holds derby.jar and
746 * derbynet.jar. The Basic policy assumes that both jar files live
in the
747 * same directory.
748 * </p>
749 */
750 private static String getCodeSourcePrefix(
NetworkServerControlImpl server )
751 throws Exception
752 {
753 String derbyNetURL =
NetworkServerControl.class.getProtectionDomain().getCodeSource().getLocation().toExternalForm();
754 int idx = derbyNetURL.indexOf( DERBYNET_JAR );
755
756 //
757 // If the customer isn't running against jar files, our Basic
policy
758 // won't work.
759 //
760 if ( idx < 0 )
761 {
762 String errorMessage = server.localizeMessage(
"DRDA_MissingNetworkJar.S", null );
763
764 // this throws an exception and exits this method
765 server.consoleError( errorMessage );
766 }
767
768 //
769 // Otherwise, we have the directory prefix for our url.
770 //
771 String directoryPrefix = derbyNetURL.substring( 0, idx );
772
773 return directoryPrefix;
774 }
It seems like for NetworkServerControl the name of the library file in
the classpath must be derbyclient.jar (not derbyclient-10.10.1.1.jar).
Does anybody know how to fix it?