-
1. Re: Email attachments and custom facelets composition components
twhitehead.twhiteheadjm.hotmail.com Sep 11, 2008 3:56 PM (in response to twhitehead.twhiteheadjm.hotmail.com)I see my problem has been fixed in 2.1.0.BETA
JIRA - JBSEAM-3014So I am trying to upgrade to that but cant seem to get past this error:
java.lang.IllegalStateException: duplicate factory for: org.jboss.seam.web.webSession (duplicate is specified in components.xml)
I have two ear projects and one is upgraded and working, the other gives the above error. The components.xml files are identical in both projects.
components.xml:
<?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:persistence="http://jboss.com/products/seam/persistence" xmlns:security="http://jboss.com/products/seam/security" xmlns:mail="http://jboss.com/products/seam/mail" xmlns:pdf="http://jboss.com/products/seam/document" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd http://jboss.com/products/seam/document http://jboss.com/products/seam/document-2.1.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd"> <core:init debug="true" jndi-pattern="@jndiPattern@"/> <core:manager concurrent-request-timeout="500" conversation-timeout="120000" conversation-id-parameter="cid" parent-conversation-id-parameter="pid"/> <persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/crsEntityManagerFactory"/> <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="false"/> <event type="org.jboss.seam.security.notLoggedIn"> <action execute="#{redirect.captureCurrentView}"/> </event> <event type="org.jboss.seam.security.loginSuccessful"> <action execute="#{redirect.returnToCapturedView}"/> </event> <mail:mail-session host="smtp.gmail.com" port="587" username="username" password="password" tls="true"/> <pdf:document-store use-extensions="true" error-page="/pdfMissing.seam" /> </components>
-
2. Re: Email attachments and custom facelets composition components
twhitehead.twhiteheadjm.hotmail.com Sep 12, 2008 8:56 AM (in response to twhitehead.twhiteheadjm.hotmail.com)I found that the error is because jboss is creating a temporary copy of jboss-seam.jar as can be seen here
08:39:39,953 INFO [Initialization] reading jar:file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/crs-ear.ear/jboss-seam.jar!/META-INF/components.xml 08:39:39,953 INFO [Initialization] reading jar:file:/C:/dev/jboss-4.2.2.GA/server/default/tmp/deploy/tmp6667jboss-seam.jar!/META-INF/components.xml 08:39:39,953 INFO [Initialization] reading jar:file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/crs-ear.ear/crs.war/WEB-INF/lib/jboss-seam-ioc.jar!/META-INF/components.xml 08:39:39,953 INFO [Initialization] reading jar:file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/crs-ear.ear/crs.war/WEB-INF/lib/jboss-seam-remoting.jar!/META-INF/components.xml 08:39:39,953 INFO [Initialization] reading jar:file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/crs-ear.ear/crs.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/components.xml
so I moved the following lines out of the jboss-seam.jar components.xml into my own components.xml
<factory name="org.jboss.seam.web.webSession" auto-create="true" scope="stateless" value="#{org.jboss.seam.web.session}" /> <factory name="facesMessages" auto-create="true" scope="stateless" value="#{org.jboss.seam.international.statusMessages}" /> <factory name="org.jboss.seam.faces.facesMessages" auto-create="true" scope="stateless" value="#{org.jboss.seam.international.statusMessages}" />
and it is now starting up.
However, both apps, one with the above fix and one without, give another error when I attempt to send email:
08:50:18,484 WARN [lifecycle] executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@d92bd2) threw exception java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
-
3. Re: Email attachments and custom facelets composition components
pmuir Oct 4, 2008 3:58 PM (in response to twhitehead.twhiteheadjm.hotmail.com)FYI I fixed the duplicate factory problem in trunk after CR1.
Can you file a JIRA issue for your remaining problem?
-
4. Re: Email attachments and custom facelets composition components
twhitehead.twhiteheadjm.hotmail.com Oct 5, 2008 4:38 PM (in response to twhitehead.twhiteheadjm.hotmail.com)I had to go back to seam 2.0.3 as I could not get email to work at all with 2.1.0
I will have another go next week and see if the problem still exists.
I do want to move to 2.1.0 as I would like to do pdf attachments, use my own tags in email, and do asynchronous mail.
I also want to try out the new authentication stuff.