[JBoss Seam] - Can't run seam setup with Seam 2.0.0.CR2
by tonylmai
Hi,
I am trying to upgrade to Seam 2 CR2. When I tried to run the seam setup ant file, I got the following error:
anonymous wrote :
| D:\JBoss\jboss-seam-2.0.0.CR2>seam setup
| Buildfile: D:\JBoss\jboss-seam-2.0.0.CR2\seam-gen\build.xml
|
| init:
| [artifact:dependencies] Downloading: org/jboss/seam/jboss-seam-gen/2.0.0.CR2/jboss-seam-gen-2.0.0.CR2.pom
| [artifact:dependencies] Downloading: org/jboss/seam/jboss-seam-gen/2.0.0.CR2/jboss-seam-gen-2.0.0.CR2.jar
| [artifact:dependencies] An error has occurred while processing the Maven artifact tasks.
| [artifact:dependencies] Diagnosis:
| [artifact:dependencies]
| [artifact:dependencies] Unable to resolve artifact: Missing:
| [artifact:dependencies] ----------
| [artifact:dependencies] 1) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
| [artifact:dependencies]
| [artifact:dependencies] Try downloading the file manually from the project website.
| [artifact:dependencies]
| [artifact:dependencies] Then, install it using the command:
| [artifact:dependencies] mvn install:install-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-gen \
| [artifact:dependencies] -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file
| [artifact:dependencies] Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-gen \
| [artifact:dependencies] -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file \
| [artifact:dependencies] -Durl=[url] -DrepositoryId=[id]
| [artifact:dependencies]
| [artifact:dependencies] Path to dependency:
| [artifact:dependencies] 1) unspecified:unspecified:jar:0.0
| [artifact:dependencies] 2) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
| [artifact:dependencies]
| [artifact:dependencies] ----------
| [artifact:dependencies] 1 required artifact is missing.
| [artifact:dependencies]
| [artifact:dependencies] for artifact:
| [artifact:dependencies] unspecified:unspecified:jar:0.0
| [artifact:dependencies]
| [artifact:dependencies] from the specified remote repositories:
| [artifact:dependencies] central (http://repo1.maven.org/maven2)
| [artifact:dependencies]
| [artifact:dependencies]
|
| BUILD FAILED
| D:\JBoss\jboss-seam-2.0.0.CR2\seam-gen\build.xml:14: Unable to resolve artifact: Missing:
| ----------
| 1) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
|
| Try downloading the file manually from the project website.
|
| Then, install it using the command:
| mvn install:install-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-gen \
| -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file
| Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-gen \
| -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file \
| -Durl=[url] -DrepositoryId=[id]
|
| Path to dependency:
| 1) unspecified:unspecified:jar:0.0
| 2) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
|
| ----------
| 1 required artifact is missing.
|
| for artifact:
| unspecified:unspecified:jar:0.0
|
| from the specified remote repositories:
| central (http://repo1.maven.org/maven2)
|
|
| Total time: 2 seconds
|
| D:\JBoss\jboss-seam-2.0.0.CR2>
I tried to download the file manually but the URL from the command line output was not a valid URL.
Any idea?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095377#4095377
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095377
18Â years, 9Â months
[JBoss Seam] - Re: coerceToType / javaassist error
by paulkossler
I am mainly saying that the implementation documentation leads people to the wrong conclusions. The example exercises all target direct use of the Proxy. This is incorrect for the GoF proxy pattern.
Seam handles some aspects of it for you; however, if you pass a Proxy AS A Subject to the View Layer through JSF; its lifecycle requires saving and reconstituting your objects. The coerceToType error occurs because the Proxy fails the to be converted to the Subject... because it is not one. This is correct. The problem is that you have to use a commonly implemented interface or tell the JPA/Hibernate/Ibatis et al. not to use the Auto-Proxy. Then it will build the actual Subject each time. Unfortunately, as I mentioned in my first posting on the topic, this seriously affects the caching paradigm.
Read GoF: Design Patterns. Proxy Pattern.
Use a common interface. (Eclipse can help you "Extract interfaces") Just read carefully into how to connect the interface to the mapped version. I mentioned that the annotation:
@org.hibernate.annotations.Proxy(proxyClass = myProxyInterface.class)
Does seem to function properly. I have not had the time to formally test this out. (on my todo list.)
:)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095365#4095365
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095365
18Â years, 9Â months
[JBoss Seam] - Re: Seam 2 breaks all-on-one-page application
by damianharvey
Sure thing.
I have an MaintainVessels.xhtml page like this:
| <h:form>
| <!-- Vessel name -->
| <s:decorate id="validateName" template="/layout/edit.xhtml">
| <ui:define name="label">#{messages['vessels.vesselName']}</ui:define>
| <h:inputText tabindex="1" styleClass="inputField" id="vesselName" value="#{vesselHome.instance.vesselName}" required="true" size="40" maxlength="150">
| <a:support event="onchange" reRender="validateName"/>
| </h:inputText>
| </s:decorate>
| other fields....
| <h:commandButton value="#{messages['saveButton']}" styleClass="button" action="#{vesselHome.persist}" rendered="#{!vesselHome.managed}"/>
| </h:form>
| <h:form>
| <rich:dataTable styleClass="dataTable" id="vesselTable" value="#{vesselList.allVessels}" var="vesselEntry" rows="20">
| <rich:column>
| <f:facet name="header">#{messages['vessels.carrier']}</f:facet>
| <h:outputText value="#{vesselEntry.company.companyName}"/>
| </rich:column>
| more columns....
| <rich:column>
| <s:link action="#{vesselHome.find}"
| title="#{messages['edit.entry']}">
| <f:param name="vesselVesselId" value="#{vesselEntry.vesselId}"/>
| <h:graphicImage url="/img/edit.png" border="0"/>
| </s:link>
| <s:link action="#{vesselHome.remove}"
| onclick="return confirm('#{messages['confirm.deleteEntry']}');"
| title="#{messages['delete.entry']}">
| <f:param name="vesselVesselId" value="#{vesselEntry.vesselId}"/>
| <h:graphicImage url="/img/cross.png" border="0"/>
| </s:link>
| </rich:column>
| </rich:dataTable>
| </h:form>
|
And my VesselHome persist method looks like this:
| @Override
| @Transactional
| public String persist() {
|
| //Set status to active
| getInstance().setStatus(VesselStatus.ACTIVE);
|
| String status = super.persist();
|
| //Remove from Conversation context
| Contexts.removeFromAllContexts("vesselHome");
|
| return status;
| }
|
The MaintainVessels.page.xml has the following rules:
| <?xml version="1.0" encoding="UTF-8"?>
| <page xmlns="http://jboss.com/products/seam/pages"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd" login-required="true">
| <begin-conversation join="true"/>
| <restrict>#{s:hasRole('VESSEL EDITOR') or s:hasRole('VESSEL APPROVER')}</restrict>
| <param name="vesselVesselId" value="#{vesselHome.vesselVesselId}"/>
| <navigation from-action="#{vesselHome.persist}">
| <redirect view-id="/secure/MaintainVessels.xhtml"/>
| </navigation>
| <navigation from-action="#{vesselHome.update}">
| <redirect view-id="/secure/MaintainVessels.xhtml"/>
| </navigation>
| <navigation from-action="#{vesselHome.remove}">
| <redirect view-id="/secure/MaintainVessels.xhtml"/>
| </navigation>
| <navigation from-action="#{vesselHome.reset}">
| <redirect view-id="/secure/MaintainVessels.xhtml"/>
| </navigation>
|
| </page>
|
Under Seam 1.2.1.GA I could fill in the values for a new Vessel and click save. This would call the persist() method. Once that had finished the page.xml would redirect it back to the MaintainVessels page and the values in the fields would be blank as no VesselHome existed in the context.
This doesn't happen under Seam 2.0.0.CR2. When I click save, the instance is persisted and the page is redirected fine, but the values exist.
I've tried adding an <end-conversation/> to the MaintainVessel.page.xml but this will only work if I redirect to another page and not back to the same page.
Cheers,
Damian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095363#4095363
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095363
18Â years, 9Â months