Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 3454 invoked from network); 23 Jun 2010 17:01:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Jun 2010 17:01:18 -0000 Received: (qmail 27930 invoked by uid 500); 23 Jun 2010 17:01:18 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 27873 invoked by uid 500); 23 Jun 2010 17:01:17 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 27866 invoked by uid 99); 23 Jun 2010 17:01:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jun 2010 17:01:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jun 2010 17:01:14 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5NH0qWZ003065 for ; Wed, 23 Jun 2010 17:00:53 GMT Message-ID: <9153436.18331277312452822.JavaMail.jira@thor> Date: Wed, 23 Jun 2010 13:00:52 -0400 (EDT) From: "Forrest Xia (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Updated: (GERONIMO-5398) CCE when making plugin for webfragment-javaee6 sample In-Reply-To: <21094409.17161277309149297.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GERONIMO-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Forrest Xia updated GERONIMO-5398: ---------------------------------- Attachment: GERONIMO-5398.patch In MergeHelper.processWebFragmentsAndAnnotations method, a type cast statement: webFragmentDocument = (WebFragmentDocument)XmlBeansUtil.parse(in); caused this exception. Actually, we need to use XmlCursor to move cursor to the WebFragment element, then try instanceof to make the type cast. I provided a patch for review. I tried it and now the webfragment-javaee6 sample passes the plugin generation. > CCE when making plugin for webfragment-javaee6 sample > ----------------------------------------------------- > > Key: GERONIMO-5398 > URL: https://issues.apache.org/jira/browse/GERONIMO-5398 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Affects Versions: 3.0-M1, 3.0 > Reporter: Forrest Xia > Assignee: Forrest Xia > Priority: Minor > Attachments: GERONIMO-5398.patch > > > When trying to make a plugin for webfragment-javaee6 sample, > The car-maven-plugin throws these exception: > [INFO] ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] ------------------------------------------------------------------------ > [INFO] could not package plugin > Embedded error: java.lang.ClassCastException: org.apache.xmlbeans.impl.values.XmlAnyTypeImpl cannot be cast to org.apache.geronimo.xbeans.javaee6.WebFragmentDocument > [INFO] ------------------------------------------------------------------------ > [INFO] Trace > org.apache.maven.lifecycle.LifecycleExecutionException: could not package plugin > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) > at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > Caused by: org.apache.maven.plugin.MojoExecutionException: could not package plugin > at org.apache.geronimo.mavenplugins.car.PackageMojo.execute(PackageMojo.java:246) > at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) > ... 17 more > Caused by: org.apache.geronimo.common.DeploymentException: java.lang.ClassCastException: org.apache.xmlbeans.impl.values.XmlAnyTypeImpl cannot be cast to org.apache.geronimo.xbeans.javaee6.WebFragmentDocument > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:284) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) > at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131) > at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:856) > at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245) > at org.apache.geronimo.mavenplugins.car.PackageMojo.invokeDeployer(PackageMojo.java:560) > at org.apache.geronimo.mavenplugins.car.PackageMojo.buildPackage(PackageMojo.java:376) > at org.apache.geronimo.mavenplugins.car.PackageMojo.execute(PackageMojo.java:243) > ... 19 more > Caused by: java.lang.ClassCastException: org.apache.xmlbeans.impl.values.XmlAnyTypeImpl cannot be cast to org.apache.geronimo.xbeans.javaee6.WebFragmentDocument > at org.apache.geronimo.web25.deployment.merge.MergeHelper.processWebFragmentsAndAnnotations(MergeHelper.java:366) > at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext(AbstractWebModuleBuilder.java:450) > at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.initContext(AbstractWebModuleBuilder.java:405) > at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:169) > at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:630) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:250) > ... 30 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.