You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Tina Li (Commented) (JIRA)" <ji...@apache.org> on 2012/01/10 11:16:38 UTC
[jira] [Commented] (GERONIMO-6235) "java.lang.ClassCastException"
happened when deployed jsf sample from openwebbeans
[ https://issues.apache.org/jira/browse/GERONIMO-6235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183176#comment-13183176 ]
Tina Li commented on GERONIMO-6235:
-----------------------------------
for the jsf2 sample,made three changes:
(1)Update the sample,change pom.xml, add <scope>provided</scope> to avoid ClassCastException
(2)Update pom.xml file and build the war package using maven-war-plugin:
<build>
<finalName>jsf2sample</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<url>http://localhost:8080/manager/text</url>
</configuration>
</plugin>
</plugins>
</build>
to :
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
(3)Change web.xml and delete the segment:
<listener>
<listener-class>
org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
</listener>
to avoid startup problem.
> "java.lang.ClassCastException" happened when deployed jsf sample from openwebbeans
> ----------------------------------------------------------------------------------
>
> Key: GERONIMO-6235
> URL: https://issues.apache.org/jira/browse/GERONIMO-6235
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: myfaces
> Affects Versions: 3.0-beta-1
> Environment: JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr9-20110624_85526 (JIT enabled, AOT enabled)
> Reporter: Tina Li
> Assignee: Tina Li
> Priority: Minor
> Attachments: jsf2sample-sources.jar, jsf2sample.war
>
>
> 1.Download geronimo server:
> http://mirror.bjtu.edu.cn/apache//geronimo/3.0-beta-1/geronimo-tomcat7-javaee6-3.0-beta-1-bin.tar.gz
> 2.Unzip and started server successfully
> 3.Deploy jsf2sample downloaded from openwebbeans site:
> http://svn.apache.org/repos/asf/openwebbeans/tags/openwebbeans-1.1.2/samples
> 4.But found this sample can't be deployed and problem happened:
> 2011-12-19 15:50:32,470 ERROR [DeploymentPortlet] The application was not deployed.
> Unable to initialize GBean for web app jsf2sample
> org.apache.geronimo.common.DeploymentException: Unable to initialize GBean for web app jsf2sample
> at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:733)
> at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:174)
> at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:763)
> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at java.lang.reflect.Method.invoke(Method.java:611)
> 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:883)
> at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
> at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
> at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
> at java.lang.Thread.run(Thread.java:736)
> Caused by: java.lang.ClassCastException: org.apache.myfaces.spi.impl.DefaultFacesConfigurationMergerFactory incompatible with org.apache.myfaces.spi.FacesConfigurationMergerFactory
> at org.apache.myfaces.spi.FacesConfigurationMergerFactory.getFacesConfigurationMergerFactory(FacesConfigurationMergerFactory.java:74)
> at org.apache.geronimo.myfaces.deployment.MyFacesModuleBuilderExtension.addGBeans(MyFacesModuleBuilderExtension.java:276)
> at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:700)
> ... 15 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira