users@glassfish.java.net

Problem with embedded Glassfish, NetBeans 7.x and Maven

From: <forums_at_java.net>
Date: Wed, 30 Jan 2013 02:25:12 -0600 (CST)

Hi, recently I found a little problem that can be very annoying. I have an
JEE application that is deployed and run on embedded Glassfish 3.1.2. When I
run the application form NB, two empty files are created in target/classes:
.netbeans_automatic_build .netbeans_update_resources They come form NB
compile-on-save These files are packed into JAR/WAR by ScatteredArchive and
then to an EAR by ScatteredEnterpriseArchive. Everything was OK., till I
created a portable CDI extension and attached it to an EAR. I got the
following exception: SEVERE: Exception while loading the app : WELD-001417
Enabled interceptor class pl.tewi.interceptors.EjbSupportInterceptor in
file:/F:/JavaProg/JavaEEIntegration/JavaSeRunnerSample/target/classes/META-INF/beans.xm
is neither annotated @Interceptor nor registered through a portable extension
org.jboss.weld.exceptions.DeploymentException: WELD-001417 Enabled
interceptor class pl.tewi.interceptors.EjbSupportInterceptor in
file:/F:/JavaProg/JavaEEIntegration/JavaSeRunnerSample/target/classes/META-INF/beans.xm
is neither annotated @Interceptor nor registered through a portable extension
This exception is completely misleading here. It occurred, that JAR with
portable extension containing these two files is corrupt (7zip says it). The
problem is only with portable extensions. EJB jars are also corrupted zip
archives, but they work. The solution is to completely disable
compile-on-save functionality in NB. Regards Marcin

--
[Message sent by forum member 'mkwapisz']
View Post: http://forums.java.net/node/894310