8 Replies Latest reply: Apr 25, 2012 4:08 AM by 930451 RSS

    NullPointerException in publish task 'Split Source Mapping Generation Task'

    930451
      With Oracle Enterprise Pack for Eclipse 12.1.1.0.1, When I try to publish an EAR project to Oracle Weblogic 12.1, I always get the following error

      org.eclipse.core.runtime.CoreException: Runtime exception occurred in publish task 'Split Source Mapping Generation Task'.
           at oracle.eclipse.tools.weblogic.server.model.WeblogicPublishOperation.execute(WeblogicPublishOperation.java:103)
           at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.performTasks(WeblogicServerBehaviour.java:1311)
           at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:855)
           at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:686)
           at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:539)
           at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
           at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3087)
           at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
           at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      Caused by: java.lang.NullPointerException
           at oracle.eclipse.tools.weblogic.server.internal.GenerationOperation.generateApplicationEntries(GenerationOperation.java:407)
           at oracle.eclipse.tools.weblogic.server.internal.GenerationOperation.processRootModule(GenerationOperation.java:138)
           at oracle.eclipse.tools.weblogic.server.model.WeblogicPublishOperation.execute(WeblogicPublishOperation.java:92)
           ... 8 more

      Nothing seems to be wrong with Oracle Weblogic's config.xml file; I can start the server normally when I build the EAR with maven and add an entry for it manually.
        • 1. Re: NullPointerException in publish task 'Split Source Mapping Generation Task'
          danny.ju
          Need more detail of your EAR project structure. Can you post the content of this Eclipse WTP project config file:

          [Your EAR PROJECT]/.settings/org.eclipse.wst.common.component
          • 2. Re: NullPointerException in publish task 'Split Source Mapping Generation Task'
            930451
            Thank you for your quick reply.

            Here is the file you requested:

            <?xml version="1.0" encoding="UTF-8"?>
            <project-modules id="moduleCoreId" project-version="1.5.0">
            <wb-module deploy-name="AtomsPresentationEAR">
            <wb-resource deploy-path="/" source-path="/EarContent" tag="defaultRootSource"/>
            <dependent-module archiveName="AtomsWeb.war" deploy-path="/" handle="module:/resource/AtomsWeb/AtomsWeb">
            <dependent-object/>
            <dependency-type>uses</dependency-type>
            </dependent-module>
            </wb-module>
            </project-modules>
            • 3. Re: NullPointerException in publish task 'Split Source Mapping Generation Task'
              danny.ju
              The EAR project looks OK. It is likely that some dependencies of the Web project is causing the problem
              Can you post the content of:
              AtomsWeb/.settings/org.eclipse.wst.common.component

              A workaround while I am investigating the issue:
              you can switch the WLS publishing mode from split source to exploded archive mode.
              Right click the wls server in Servers View, select properties\WebLogic\Publishing
              • 4. Re: NullPointerException in publish task 'Split Source Mapping Generation Task'
                930451
                thanks a lot. here is AtomsWeb/.settings/org.eclipse.wst.common.component

                <?xml version="1.0" encoding="UTF-8"?>
                <project-modules id="moduleCoreId" project-version="2.0">
                <wb-module deploy-name="AtomsWeb">
                <property name="context-root" value="AtomsWeb"/>
                <wb-resource deploy-path="/" source-path="src/main/webapp"/>
                <property name="java-output-path" value="/target/classes"/>
                <dependent-module archiveName="primefaces-extensions-0.3.0.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/primefaces/extensions/primefaces-extensions/0.3.0/primefaces-extensions-0.3.0.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="primefaces-3.1.1.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/primefaces/primefaces/3.1.1/primefaces-3.1.1.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="gson-2.1.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/google/code/gson/gson/2.1/gson-2.1.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="commons-lang3-3.1.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="slf4j-api-1.6.1.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="commons-logging-1.1.1.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-beans-3.0.5.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/spring-beans/3.0.5.RELEASE/spring-beans-3.0.5.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-core-3.0.5.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/spring-core/3.0.5.RELEASE/spring-core-3.0.5.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-context-3.0.5.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/spring-context/3.0.5.RELEASE/spring-context-3.0.5.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="aopalliance-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-tx-3.0.3.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/spring-tx/3.0.3.RELEASE/spring-tx-3.0.3.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="FrameworkExceptions-0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/cosmosworldwide/FrameworkExceptions/0.1-SNAPSHOT/FrameworkExceptions-0.1-SNAPSHOT.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="FrameworkCommon-0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/cosmosworldwide/FrameworkCommon/0.1-SNAPSHOT/FrameworkCommon-0.1-SNAPSHOT.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="SecurityAdmin-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/cosmosworldwide/SecurityAdmin/1.0-SNAPSHOT/SecurityAdmin-1.0-SNAPSHOT.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="FrameworkValidation-0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/cosmosworldwide/FrameworkValidation/0.1-SNAPSHOT/FrameworkValidation-0.1-SNAPSHOT.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="ApplicationCommon-0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/cosmosworldwide/ApplicationCommon/0.1-SNAPSHOT/ApplicationCommon-0.1-SNAPSHOT.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="dao-1.0.0.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/googlecode/genericdao/dao/1.0.0/dao-1.0.0.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="search-1.0.0.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/googlecode/genericdao/search/1.0.0/search-1.0.0.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="LookupAdmin-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/cosmosworldwide/LookupAdmin/1.0-SNAPSHOT/LookupAdmin-1.0-SNAPSHOT.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="AtomsWebResources.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/AtomsWebResources/AtomsWebResources">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="SecurityRoleMapperServiceClient-0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/cosmosworldwide/SecurityRoleMapperServiceClient/0.1-SNAPSHOT/SecurityRoleMapperServiceClient-0.1-SNAPSHOT.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="RemoteResourceBundle-0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/cosmosworldwide/RemoteResourceBundle/0.1-SNAPSHOT/RemoteResourceBundle-0.1-SNAPSHOT.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="RemoteResourceBundleFacade-0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/cosmosworldwide/RemoteResourceBundleFacade/0.1-SNAPSHOT/RemoteResourceBundleFacade-0.1-SNAPSHOT.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="AtomsComponents.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/AtomsComponents/AtomsComponents">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="facelets-taglib-jsf20-spring-3-0.5.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/security/facelets-taglib-jsf20-spring-3/0.5/facelets-taglib-jsf20-spring-3-0.5.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-aop-3.0.5.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/spring-aop/3.0.5.RELEASE/spring-aop-3.0.5.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-asm-3.0.5.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/spring-asm/3.0.5.RELEASE/spring-asm-3.0.5.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-expression-3.0.5.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/spring-expression/3.0.5.RELEASE/spring-expression-3.0.5.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-security-core-3.0.5.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/security/spring-security-core/3.0.5.RELEASE/spring-security-core-3.0.5.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="aspectjrt-1.6.8.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/aspectj/aspectjrt/1.6.8/aspectjrt-1.6.8.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="aspectjweaver-1.6.8.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/aspectj/aspectjweaver/1.6.8/aspectjweaver-1.6.8.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-security-config-3.0.5.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/security/spring-security-config/3.0.5.RELEASE/spring-security-config-3.0.5.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-security-web-3.0.5.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/security/spring-security-web/3.0.5.RELEASE/spring-security-web-3.0.5.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <dependent-module archiveName="spring-web-3.0.3.RELEASE.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/spring-web/3.0.3.RELEASE/spring-web-3.0.3.RELEASE.jar">
                <dependency-type>uses</dependency-type>
                </dependent-module>
                <wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
                <wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/resources"/>
                </wb-module>
                </project-modules>

                ------------------------------------------

                AtomsComponents/.settings/org.eclipse.wst.common.component:

                <?xml version="1.0" encoding="UTF-8"?>
                <project-modules id="moduleCoreId" project-version="2.0">
                <wb-module deploy-name="AtomsComponents">
                <wb-resource deploy-path="/" source-path="src/main/java"/>
                <wb-resource deploy-path="/" source-path="src/main/resources"/>
                </wb-module>
                </project-modules>


                AtomsWebResources doesn't have org.eclipse.wst.common.component in its settings, only org.eclipse.jdt.core.prefs
                • 5. Re: NullPointerException in publish task 'Split Source Mapping Generation Task'
                  930451
                  the workaround does not work because of another exception

                  Caused by: weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
                  problem: cvc-complex-type.2.4c: Expected element 'module@http://java.sun.com/xml/ns/javaee' before the end of the content in element application@http://java.sun.com/xml/ns/javaee:<null>

                       at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:245)
                       at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:231)
                       at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:155)

                  the application.xml that it complains about is generated by maven and looks fine as far as I can see:

                  <?xml version="1.0" encoding="UTF-8"?>
                  <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">
                  <description>Presentation Atoms Application</description>
                  <display-name>Presentation Atoms Application</display-name>
                  <module>
                  <web>
                  <web-uri>AtomsWeb-0.1-SNAPSHOT.war</web-uri>
                  <context-root>/AtomsWeb</context-root>
                  </web>
                  </module>
                  <library-directory>lib</library-directory>
                  </application>
                  • 6. Re: NullPointerException in publish task 'Split Source Mapping Generation Task'
                    danny.ju
                    From the stack trace, the NullPointer exception was caused by the EAR project missing ModuleCoreNature project nature.

                    This nature should be added automatically when the WTP EAR project is created. Could check your the content of the
                    .project file under the EAR project root?
                    (The file is hidden by default, you will have to use the Eclipse Navigator view to see it)

                    The natures section should look like:
                         <natures>
                              <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
                              <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
                         </natures>

                    Try adding the missing nature if it is not there.
                    • 7. Re: NullPointerException in publish task 'Split Source Mapping Generation Task'
                      danny.ju
                      The application.xml you have is missing this attribute:
                      xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd"

                      compared to the one generated by Eclipse WTP:

                      <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" id="Application_ID" version="5">

                      I saw the validation error once but could not reproduced consistently. Please post to WebLogic server OTN forum if you can reproduce it
                      consistently.
                      • 8. Re: NullPointerException in publish task 'Split Source Mapping Generation Task'
                        930451
                        actually the project nature was the correct answer. I fumbled in my feedback. Thanks a million, Danny!