PDA

View Full Version : Class [MyServlet]$ResinWebBean must belong to a package


Mark
09-13-2010, 09:04 AM
Hi folks, I'd appreciate some assistance if you can please.
I've just ported a really old set of apps from tomcat 4 to resin 3.1.9.
I've configured my virtual servers and my webapps and Ive got rid of the old "invoker" method in the web.xml.
I've named and mapped my servlets, but I'm now getting an error message which I dont understand.

"Class [MyServlet]$ResinWebBean must belong to a package".

I see the resin source code generating the error, something to so with generating a session bean by the looks of it.
But I have no idea where to go from here really.
Any help would be greatly appreciated.
Kind Regards,
Mark

emil
09-13-2010, 04:41 PM
Hi Mark,

That should only be a warning message, so it shouldn't stop you from running. Is the servlet in a package? If it's in the unnamed/default package (i.e. has no package declaration), that's generally considered bad practice, so we emit a warning. If it's a legacy app that you don't have control over and/or don't feel safe in changing, you can probably ignore it. If it's something that you can change though, I would put the class in a package.

Best,
Emil

Mark
09-14-2010, 12:50 AM
Thanks Emil, that helped.
I assumed it was an error because it was the last thing I saw in the log when it fell over.
I removed that applications (dubious) log spec, set the debugging level to finer and I now see an error I CAN fix in the default application log. :)
Many thanks!
Mark