Fórum

Exception starting filter Secure MainServlet Filter -- NoClassDefFoundErro

thumbnail
Eric M Smith, modificado 16 Anos atrás.

Exception starting filter Secure MainServlet Filter -- NoClassDefFoundErro

New Member Postagens: 2 Data de Entrada: 26/06/07 Postagens Recentes
Hello all,

Setup: Glassfish v2 B52
Liferay: version 4.2.2
Deployment Type: war

After following the instructions in SPaquet's 4 part series and failing with the EAR deploy I decided to try the WAR deploy on a clean Glassfish install.

I've configured everything according to the 4 part series.

I've placed the dependency jars in domains/domain1/lib/ext

And I restarted Glassfish.

Now, I get the following failures :

NoClassDefFoundError: javax/servlet/ServletException at com.liferay.portal.kernel.util.JavaProps.<init>(JavaProps.java:84)

followed by

NoClassDefFoundError: Could not initialize class com.liferay.portal.util.PropsUtil at com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter.<clinit>(LayoutCacheFilter.java:453)

followed by 2 instances of

NoClassDefFoundError: Could not initialize class com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

followed by

Context startup failed due to previous errors.


Obviously, this is a classpath issue, but which jar(s) is(are) missing from the classpath?
thumbnail
Eric M Smith, modificado 16 Anos atrás.

RE: Exception starting filter Secure MainServlet Filter -- NoClassDefFoundE

New Member Postagens: 2 Data de Entrada: 26/06/07 Postagens Recentes
Ok,

After about 2 days of working with this, I think I've isolated the problems.

1) The EAR and WAR files that are currently downloadable (4.2.2) are built against j2ee.jar instead of javaee.jar, and although Glassfish v2 has a j2ee.jar in it's classpath, it's just a dummy. To deploy on Glassfish v2 I had to rebuild against the javaee.jar file.

2) The build scripting for the glassfish build (ant clean start build-ext build-ext-glassfish) is broken in the current svn checkout. There are significant changes to sequencing necessary for the deployment to work properly.

Additionally, (and these are at least in build-ext-glassfish, but it could affect others as well)

3) The build-ext-glassfish target in the build chain doesn't use any app.server.${user.name}.properties or build.${user.name}.properties files from the original source tree if you've created them (which you need to do if you have a configuration different than Windows with the liferay source on the D drive in a specific folder). Instead, it just creates a new one with the field for the type of app.server and that's it.

Once I got the build scripts reworked, I was able to get everything installed and running. I'm trying to download a clean SVN so I can create a list of all deltas and submit them to the liferay team.
thumbnail
David H Nebinger, modificado 9 Anos atrás.

RE: Exception starting filter Secure MainServlet Filter -- NoClassDefFoundE

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
Eric's post is from 2007. His profile is so old it doesn't act like any current profiles. I'm guessing Eric isn't here anymore and will not reply to your posts.