Jboss-5.1.0GA and Pretty Faces

Splash Forums PrettyFaces Users Jboss-5.1.0GA and Pretty Faces

This topic contains 7 replies, has 3 voices, and was last updated by  Christian Kaltepoth 6 years, 6 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #17905

    amandabogado
    Participant

    Hello. I’m using Jboss-5.1.0GA and JSF 1.2 for my Web Application. I just found out about Pretty Faces, and started to use it. Although I’m sure I followed all the steps (they seem very easy), I can’t make it work with my app. Jboss starts with an error.

    This started right after I added all the dependecies for Pretty Faces to my proyect.

    ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/C:/Program%20Files/Servidores%20de%20Aplicacion/Jboss-5.1.0/naveOnlne/jboss-5.1.0.GA/server/default/deploy/NaveOnline.war/ state=Not Installed mode=Manual requiredState=Parse

    org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/C:/Program%20Files/Servidores%20de%20Aplicacion/Jboss-5.1.0/naveOnlne/jboss-5.1.0.GA/server/default/deploy/NaveOnline.war/

    at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:362)

    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:322)

    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:294)

    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:234)

    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

    at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

    at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

    at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

    at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

    at org.jboss.Main.boot(Main.java:221)

    at org.jboss.Main$1.run(Main.java:556)

    at java.lang.Thread.run(Thread.java:619)

    I’m also using netbeans 6.9. Hope you can help me to make this work, ‘couse Pretty Faces seems like my salvation!

    #20865

    Is this the complete stacktrace? No further “caused by” in the logs?

    #20866

    amandabogado
    Participant

    This is de complete stacktrace..

    ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/C:/Program%20Files/Servidores%20de%20Aplicacion/Jboss-5.1.0/naveOnlne/jboss-5.1.0.GA/server/default/deploy/NaveOnline.war/ state=Not Installed mode=Manual requiredState=Parse

    org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/C:/Program%20Files/Servidores%20de%20Aplicacion/Jboss-5.1.0/naveOnlne/jboss-5.1.0.GA/server/default/deploy/NaveOnline.war/

    at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:362)

    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:322)

    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:294)

    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:234)

    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

    at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

    at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

    at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

    at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

    at org.jboss.Main.boot(Main.java:221)

    at org.jboss.Main$1.run(Main.java:556)

    at java.lang.Thread.run(Thread.java:619)

    Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Attribute “version” was already specified for element “web-app”. @ vfszip:/C:/Program%20Files/Servidores%20de%20Aplicacion/Jboss-5.1.0/naveOnlne/jboss-5.1.0.GA/server/default/deploy/NaveOnline.war/WEB-INF/web.xml[5,16]

    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)

    at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)

    at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:189)

    at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:166)

    at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)

    at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121)

    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)

    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)

    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)

    … 33 more

    Caused by: org.xml.sax.SAXException: Attribute “version” was already specified for element “web-app”. @ vfszip:/C:/Program%20Files/Servidores%20de%20Aplicacion/Jboss-5.1.0/naveOnlne/jboss-5.1.0.GA/server/default/deploy/NaveOnline.war/WEB-INF/web.xml[5,16]

    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.fatalError(SaxJBossXBParser.java:432)

    at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)

    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

    at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)

    … 41 more

    #20867

    Hmmm. It looks at first glance like there is a problem with your web.xml… could you paste the full contents here? Also, which versions of prettyfaces are you using. If you could show the rrlevant portion of your pom.xml (if using maven) that would be helpful as well.

    Thanks, sorry you are having trouble,

    ~lincoln

    #20868

    amandabogado
    Participant

    <?xml version=”1.0″ encoding=”UTF-8″?>

    This is what I have in my web.xml file..

    <web-app version=”2.5″ xmlns=”http://java.sun.com/xml/ns/javaee&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd“>

    <servlet>

    <servlet-name>jcaptcha</servlet-name>

    <servlet-class>py.com.naveOnline.seguridad.ImageCaptchaServlet</servlet-class>

    <load-on-startup>0</load-on-startup>

    </servlet>

    <servlet>

    <servlet-name>mailServlet</servlet-name>

    <servlet-class>py.com.naveOnline.utils.mailServlet</servlet-class>

    </servlet>

    <servlet>

    <servlet-name>ImageCaptchaServlet</servlet-name>

    <servlet-class>py.com.naveOnline.seguridad.ImageCaptchaServlet</servlet-class>

    </servlet>

    <description>NaveOnLine</description>

    <display-name>NaveOnLine</display-name>

    <context-param>

    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

    <param-value>server</param-value>

    </context-param>

    <context-param>

    <param-name>org.richfaces.SKIN</param-name>

    <param-value>DEFAULT</param-value>

    </context-param>

    <context-param>

    <param-name>com.sun.faces.verifyObjects</param-name>

    <param-value>false</param-value>

    </context-param>

    <context-param>

    <param-name>facelets.REFRESH_PERIOD</param-name>

    <param-value>-1</param-value>

    </context-param>

    <context-param>

    <param-name>com.sun.faces.validateXml</param-name>

    <param-value>false</param-value>

    </context-param>

    <context-param>

    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

    <param-value>server</param-value>

    </context-param>

    <context-param>

    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

    <param-value>.xhtml</param-value>

    </context-param>

    <context-param>

    <param-name>facelets.DEVELOPMENT</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>facelets.SKIP_COMMENTS</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>facelets.LIBRARIES</param-name>

    <param-value>/WEB-INF/components.taglib.xml</param-value>

    </context-param>

    <filter>

    <filter-name>Pretty Filter</filter-name>

    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>

    </filter>

    <filter-mapping>

    <filter-name>Pretty Filter</filter-name>

    <url-pattern>/*</url-pattern>

    <dispatcher>FORWARD</dispatcher>

    <dispatcher>REQUEST</dispatcher>

    <dispatcher>ERROR</dispatcher>

    </filter-mapping>

    <filter>

    <display-name>RichFaces Filter</display-name>

    <filter-name>richfaces</filter-name>

    <filter-class>org.ajax4jsf.Filter</filter-class>

    </filter>

    <filter-mapping>

    <filter-name>richfaces</filter-name>

    <servlet-name>Faces Servlet</servlet-name>

    <dispatcher>REQUEST</dispatcher>

    <dispatcher>FORWARD</dispatcher>

    <dispatcher>INCLUDE</dispatcher>

    </filter-mapping>

    <listener>

    <listener-class>py.com.naveOnline.aplicacion.AppContextListener</listener-class>

    </listener>

    <servlet>

    <servlet-name>Faces Servlet</servlet-name>

    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

    </servlet>

    <servlet>

    <servlet-name>respuestaPagoServlet</servlet-name>

    <servlet-class>py.com.naveOnline.utils.RespuestaPagoServlet</servlet-class>

    </servlet>

    <servlet>

    <servlet-name>PedidoPagoServlet</servlet-name>

    <servlet-class>py.com.naveOnline.utils.PedidoPagoServlet</servlet-class>

    </servlet>

    <servlet-mapping>

    <servlet-name>Faces Servlet</servlet-name>

    <url-pattern>*.jsf</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>respuestaPagoServlet</servlet-name>

    <url-pattern>/respuesta.jsf</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>PedidoPagoServlet</servlet-name>

    <url-pattern>/pedido.jsf</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>ImageCaptchaServlet</servlet-name>

    <url-pattern>/ImageCaptchaServlet</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>jcaptcha</servlet-name>

    <url-pattern>/jcaptcha</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>mailServlet</servlet-name>

    <url-pattern>/mailServlet</url-pattern>

    </servlet-mapping>

    <session-config>

    <session-timeout>

    30

    </session-timeout>

    </session-config>

    <welcome-file-list>

    <welcome-file>index.html</welcome-file>

    </welcome-file-list>

    <error-page>

    <error-code>403</error-code>

    <location>/resources/errorPages/403.jsp</location>

    </error-page>

    <error-page>

    <error-code>404</error-code>

    <location>/resources/errorPages/404.jsp</location>

    </error-page>

    <error-page>

    <error-code>500</error-code>

    <location>/resources/errorPages/500.jsp</location>

    </error-page>

    </web-app>

    I downloaded the 3.2.0 version of Pretty Faces for JSF1.2. I don’t use Maven.

    Thanks..

    #20869

    Very strange! The error says:

    Attribute "version" was already specified for element "web-app".

    But you specified the attribute one once, right?

    #20870

    amandabogado
    Participant

    Thanks for the help! so far, I managed to start the Jboss without errors. I tried other versions of the commons libraries required, and now I have no problem to start my application.

    I started tying the simplest use of Pretty Faces in url rewriting.

    The pretty-config.xml file that I created is..

    <?xml version=”1.0″ encoding=”UTF-8″?>

    <pretty-config xmlns=”http://ocpsoft.com/prettyfaces/3.2.0&#8243;

    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;

    xsi:schemaLocation=”http://ocpsoft.com/prettyfaces/3.2.0

    http://ocpsoft.com/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.2.0.xsd“>

    <url-mapping id=”home”>

    <pattern value=”/ProductosDestacados/”/>

    <view-id>/secure/Index/ProductosDestacados.jsf</view-id>

    </url-mapping>

    </pretty-config>

    But, I still get the old url when I access to the site, in the page specified in the pretty-config.xml file.

    Is there something that I’m missing?

    Thanks again…

    #20871

    What do you mean with “when I access to the site”? Does the new URL work when you enter it manually in the browser bar like this?

    http://localhost:8080/myapp/ProductosDestacados/

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Comments are closed.