Exception when starting tomcat

Starting Tomcat throws:

java.net.BindException: Address already in use: JVM_Bind

This is because the port has been used. To find out which program is using that port, open a command prompt

1. Get PID of the process by running netstat -a -n -o

2. Go to Task Manager (CTRL+ALT+DEL) under tab Services

3. Kill the process or change tomcat shutdown port


Fedora add datastream Exception

Today, when I deployed my application on a production server and tested it, I received this exception:

fedora.server.errors.GeneralException: Unable to add or modify object (commit canceled)

This is caused by fedora.API-M.addDatastream() method. It turned out that the issue is because I used null value for an alternateid, instead of an empty array of string. This is quite strange because everything works fine on my development machine. Anyway, this is the correct syntax.

apim.addDatastream(“changeme:1”, “DsId”, new String[] {}, …);


apim.addDatastream(“changeme:1”, “DsId”, null, …);

Source: [1], [2].