Java Aspect Component FAQ

This FAQ lists a few common problem that you may encounter while using JAC. If your problem is not listed here, do not hesitate to use the mailing lists to ask for some help.

Technical problems and issues

Web gui and Tomcat

Error: 500

Error: 500
Location: /jac/servlet/JacServlet
Internal Servlet Error:

java.lang.NoClassDefFoundError: jac/core/dist/RemoteContainer
	at JacServlet.doGet(JacServlet.java:71)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:484)

Check the classpath of tomcat. It cannot find the class jac.core.dist.RemoteContainer

java.lang.IllegalAccessException

If you get a java.lang.IllegalAccessException such as the following one, it probably means that you have a non public class <myPackage.myClass>.

java.lang.IllegalAccessException: <myPackage.myClass>
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:237)
        at jac.aspects.gui.InputWrapper.askForParameters(InputWrapper.java:88)
        at java.lang.reflect.Method.invoke(Native Method)
        at jac.core.Wrapping.nextWrapper(Wrapping.java:968)
        at jac.core.Wrapping.nextWrapper(Wrapping.java:842)
        at shoubiao.PhotoRepository.addPhoto(PhotoRepository.java)
        at java.lang.reflect.Method.invoke(Native Method)
        at jac.core.rtti.MethodItem.invoke(MethodItem.java:441)
        at jac.core.InvokeThread.run(InvokeThread.java:200)

Distribution

java.lang.ClassNotFoundException: jac.core.dist.rmi.RMIRemoteContainer_Stub

rmiregistry's CLASSPATH is probably wrong. You may also try to rebuild all classes.

???

Because of the way rmi works, you should not have "127.0.0.1 <your_local_hostname>" in /etc/hosts

NoClassDefFoundError: jac/core/dist/DistdClassLoader at jac.core.dist.Distd.<init>

Check that your .java.policy is properly configured (see the tutorial) and that rmiregistry is running.

Licence

The GPL is known as "infectious". Do I have to distribute my own programs and aspects under the GPL ?

No. These are not considered derivative works. This is explicitly stated at the beginning of the LICENCE file. Moreover, is now distributed under the LGPL.