February 15, 2008

And so I wasted my time: OC4J and EJB Syntax error in source

Error initializing ejb-module;
Exception Error in application ejb-module:
Error loading package at file:/opt/oracle/ejb.jar,
Error compiling /opt/oracle/ejb.jar:
Syntax error in source
This was all I got from OC4J as a response to my attempt to deploy application. Compilation went fine, so it had to be some error in generated wrapper code.

Google search yielded only three results, including one from oracle forums with unanswered question. So I begun removing last changes, line by line, to discover the source of the error. In the end, it turned to be a missing RemoteException in remote interface. Doing it remotely, without IDE and XDoclet I forgot to add this one.

So I am writing it now, hoping that your search yielded four results and that one of them - mine, just saved you an hour of precious time.