[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-5646) Publishing to JBOSS AS 5.1 threw ClassCastException

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Wed Jan 20 20:01:47 EST 2010


    [ https://jira.jboss.org/jira/browse/JBIDE-5646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12507388#action_12507388 ] 

Snjezana Peco commented on JBIDE-5646:
--------------------------------------

Nick,

You need to do the following :

1. ejb, ear, web modules
- change the names of the modules to:
photoalbum-ear
photoalbum-ejb
photoalbum-web

2. ear module
- set the version to 5 in maven-ear-plugin
- set photoalbum-ear final-name to photoalbum-ear and add bundleFileName to the web and ejb module of maven-ear-plugin - obliged because the WTP
deployer ignores deployName - see https://jira.jboss.org/jira/browse/JBIDE-4655 and https://issues.sonatype.org/browse/MNGECLIPSE-1564
- create application.xml and jboss-app.xml in src/main/application/META-INF - see https://jira.jboss.org/jira/browse/JBIDE-4809
- change context-root from photoalbum to photoalbum-web in pom.xml and in application.xml because m2eclipse ignores context-root - see https://issues.sonatype.org/browse/MNGECLIPSE-1564

3. ejb module
- move components.properties from src/main/resources-filtered to src/main/resources with the following contents:
#
#Mon Sep 15 14:29:32 EEST 2008
jndiPattern=photoalbum-ear/#{ejbName}/local
embeddedEjb=false
and remove src/main/resources-filtered
- remove the configuration of maven-resource-plugin

3) web module
- fix the XSD schemas in components.xml (replace *-2.1.0.xsd with *-2.1.xsd)
- change the following declaration in web.xml :

<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    <url-pattern>*.seam</url-pattern>
</servlet-mapping>
 
to

<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>*.seam</url-pattern>
</servlet-mapping>

The JBoss AS doesn't support multiple url-pattern in a single servlet-mapping. I have tested JBoss AS 4.2.3 and JBoss 5.1.

Do not use "mvn eclipse:eclipse".
maven-eclipse-plugin is deprecated. Instal m2eclipse and import some Maven project using Import>Maven>Existing Maven Project. It is also possible to create the project from the SVN directly using New>Project>Maven>Checkout Maven Project from SCM.

If you have Seam 2.1 in the workspace, JBoss Tools will configure Seam for these projects.

BTW Have you ever executed this application on JBoss AS 4.2.3/JBoss AS 5.1 out of JBoss Tools?

> Publishing to JBOSS AS 5.1 threw ClassCastException
> ---------------------------------------------------
>
>                 Key: JBIDE-5646
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-5646
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: JBossAS
>    Affects Versions: 3.1.0.CR2
>            Reporter: Maxim Areshkau
>            Assignee: Rob Stryker
>            Priority: Critical
>             Fix For: 3.1.0.CR2
>
>         Attachments: JBOSS_AS_Publish_Exception.png
>
>
> When I have try to run rich faces demo photo album application, an error has thrown,
> org.eclipse.jst.j2ee.application.internal.impl.ApplicationImpl cannot be cast to org.eclipse.jst.javaee.application.Application

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list