0 Replies Latest reply: May 15, 2012 4:34 AM by 936095 RSS

    JavaxFaces Exception during deploy of a simple app

    936095
      Hi guys I've a problem during the deploy of a simple webapp on weblogic server 10.3.5.
      The application is a simple HelloWorld example and works fine on GlassFish. Below i describe the following informations:
      - maven pom descriptor;
      - web xml descriptor;
      - the exception that I receive during the deploy.

      Please help me Thanks a lots...

      -----

      web.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xmlns="http://java.sun.com/xml/ns/javaee"
                     xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                     id="WebApp_ID" version="2.5">

           <display-name>JavaServerFaces</display-name>

           <context-param>
                <param-name>javax.faces.PROJECT_STAGE</param-name>
                <param-value>Development</param-value>
           </context-param>

           <welcome-file-list>
                <welcome-file>faces/index.xhtml</welcome-file>
           </welcome-file-list>

           <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
           </servlet>

           <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>/faces/*</url-pattern>
           </servlet-mapping>
           <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.jsf</url-pattern>
           </servlet-mapping>
           <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.faces</url-pattern>
           </servlet-mapping>
           <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.xhtml</url-pattern>
           </servlet-mapping>

      </web-app>

      -----

      pom.xml

      <project      xmlns="http://maven.apache.org/POM/4.0.0"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
                     
           <modelVersion>4.0.0</modelVersion>
           <groupId>it.example</groupId>
           <artifactId>SayHelloWorld</artifactId>
           <packaging>war</packaging>
           <version>0.0.1-SNAPSHOT</version>
           <name>SayHelloWorld Maven Webapp</name>
           <url>http://maven.apache.org</url>
           
           <dependencies>

                <dependency>
                     <groupId>javax.faces</groupId>
                     <artifactId>jsf-api</artifactId>
                     <version>2.1</version>
                </dependency>

                <dependency>
                     <groupId>javax.el</groupId>
                     <artifactId>el-api</artifactId>
                     <version>2.2</version>
                </dependency>
           
           </dependencies>     
           
           <build>
                <finalName>SayHelloWorld</finalName>
           </build>
           
      </project>

      -----

      <May 15, 2012 11:24:27 AM CEST> <Error> <HTTP> <BEA-101371> <There was a failure when processing annotations for application /oracle/user_projects/domains/lab_domain/servers/lab_server_2/stage/SayHelloWorld/SayHelloWorld.war. Please make sure that the annotations are valid. The error is Class bytes found but defineClass()failed for: 'javax.faces.webapp.FacesServlet'>
      <May 15, 2012 11:24:27 AM CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1336756555720' for task '13'. Error is: 'weblogic.application.ModuleException: Failed to load webapp: 'SayHelloWorld.war''
      weblogic.application.ModuleException: Failed to load webapp: 'SayHelloWorld.war'
      at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:393)
      at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:180)
      at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
      at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:518)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
      Truncated. see log file for complete stacktrace
      Caused By: java.lang.ClassFormatError: javax/faces/webapp/FacesServlet : Missing Code attribute
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
      Truncated. see log file for complete stacktrace