There are a lot of great resources available to Blackboard Developers. There is of course edugarage and the documents, presentations and discussion forums there, but one of the most active and informative are the list-servs. One in particular that offers up good insight and community insight is BB-OPEN_SRC .
Today’s tech tip comes directly from that list-serv. It was originally posted by Pieter Vandepitte from Katholieke Universiteit Leuven. The post documents just how easy it is to turn an access denied error into a bb-manifest permissions entry, eliminating one of the most frustrating errors to troubleshoot.
How do you know if you are experiencing an AccessControlException error?
The main indication is receiving error 404 when launching your extension. The 404 error you will receive indicates that the resource is unavailable. If you see this, there is a good chance that you are having permission problems. The next step is to figure to investigate to see if this is in fact the problem.
Using RedHat as an example, you would need to take a look at the /usr/local/blackboard/logs/tomcat/stdout-stderr-xxxxxxxx-log.txt. If you search this log for AccessControlException, you should see something like this:
Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission tup6.temple.edu resolve)
This error message takes on the form of:
Caused by: java.security.AccessControlException: access denied (<type> <name> [<actions>])
To resolve this error, you simply need to add a new permission element to your bb-manifest.xml file. Remember, you will need to re-deploy your Building Block after changing your bb-manifest.
The format for the permission element is (notice the same terminology in use):
<permission type=”<type> “ name=”<name>” actions=”<actions>” />
Simply plug in the values from the error message into the permission element, add it to your bb-manifest and re-deploy your building block. It is important to note that <actions> is optional. If your error stack doesn’t have <actions> associated with it, simply leave it blank (i.e. actions=””).
To illustrate this, we’ll take the above listed error and convert it into a permission element.
Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission tup6.temple.edu resolve)
Becomes:
<permission type=” java.net.SocketPermission” name=” tup6.temple.edu” actions=” resolve” />