[JBoss Seam] - Clob and converter/validation
by mheidt
I am using 2.0.0CR2 and will test it against the latest nightly build once there is an error free version.
@Entity
| @Table(name = "Components")
| public class Components implements java.io.Serializable {
| ...
|
| @Id
| @GeneratedValue(strategy=GenerationType.IDENTITY)
| @Column(name = "ID", unique = true, nullable = false)
| public int getId() {
| return this.id;
| }
|
| @ManyToOne(fetch = FetchType.LAZY)
| @JoinColumn(name = "VehicleFamilyID", nullable = false)
| @NotNull
| public VehicleFamilies getVehicleFamilies() {
| return this.vehicleFamilies;
| }
|
|
| @Column(name = "Name", nullable = false, length = 50)
| @NotNull
| @Length(max = 50)
| public String getName() {
| return this.name;
| }
|
| @Column(name = "Description")
| public Clob getDescription() {
| return this.description;
| }
|
| ...
|
| **************************
|
| @Stateless
| @Name("componentsManager")
| public class ComponentsManagerBean implements ComponentsManager {
| ...
| @In(required=false, value="newComponent") @Out(required=false, value="newComponent")
| private Components newComponent;
|
| @Factory("newComponent")
| public void createNewComponent(){
| newComponent = new Components();
| }
|
| **************************
|
| <h:form>
| <s:validateAll>
| <h:panelGrid columns="2">
| <s:span styleClass="label">#{messages['component.name']}</s:span>
| <s:decorate id="component_name">
| <h:inputText value="#{newComponent.name}" required="true" />
| <h:message for="component_name" />
| </s:decorate>
|
| <s:span styleClass="label">#{messages['component.description']}</s:span>
| <s:decorate id="component_description">
| <h:inputTextarea value="#{newComponent.description}" />
| <h:message for="component_description" />
| </s:decorate>
|
| <s:span styleClass="label">#{messages['vehicle_family']}</s:span>
| <s:decorate id="vehicle_family">
| <h:selectOneMenu
| value="#{newComponent.vehicleFamilies}"
| required="true">
| <f:selectItem
| itemLabel="#{messages['component.select_vehicle_family']}"
| itemValue="0" />
| <f:selectItems value="#{componentsManager.vehicleFamiliesList}" />
| <s:convertEntity />
| </h:selectOneMenu>
| <h:message for="vehicle_family" />
| </s:decorate>
|
|
| <f:facet name="footer">
| <h:commandLink styleClass="button" action="#{componentsManager.createComponent}" >
| <h:graphicImage url="/img/ok.gif"
| title="#{messages.add_component}"
| alt="#{messages['component.add']}"
| />
| </h:commandLink>
| </f:facet>
|
| </h:panelGrid>
| </s:validateAll>
| </h:form>
A submit throws a
Conversion Error setting value 'user input' for 'null Converter'.
The example works, when I erase the description row.
The selectOneMenu was throwing one as well when not using
<s:convertEntity />.
But what do I have to do with Clobs?
And what about my style?
Can I get rid of the @Factory somehow?
Thanx in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098815#4098815
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098815
18Â years, 8Â months
[Installation, Configuration & DEPLOYMENT] - Re: Overriding universal classloader, JBoss 4.2.1GA
by jimpo
"jaikiran" wrote :
|
| Makes sense?
|
|
Beautiful explanation of the issue. To recap, my understanding of the issue
- AnnotationConfiguration class (from hibernate-annotations, included in WEB-INF/lib) references Interface A and, if one exists, class B implementing interface A
- AnnotationConfiguration works even if class B does not exist
- interface A is loaded by the application classloader
- class B does not exist in the war. AnnotationConfiguration causes class B to be loaded using the parent classloader, which also loads interface A
- interface A is therefore loaded by two different classloaders -> classcastexception
It seems that the problem is not related to JBoss classloading, after all. The reason that the same war works in other servers, is that those servers do not have the same hibernate jars loaded by their "parent" classloaders.
So nice to finally understand what is going on here. Thanks a lot, I will sleep better now ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098812#4098812
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098812
18Â years, 8Â months
[JBossCache] - Re: Scalability
by FredrikJ
We are currently running 4 nodes with synchronous replication of rather large data objects. (The replication is done within a transaction.)
The objects replicated are from 1k up to about 8k bytes large. These 4 nodes currently handle up to 5000 events/second which would translate into 1250 replications per second and node. (Note: I would really like to try PojoCache here for a more fine grained replication. )
We are constantly trying new jgroups stacks and so forth, but currently it seems like we get better performance with TCP. Buddy replication also helped alot (1 buddy per node).
We also run a cache shared by 8 nodes which is updated more then 5k/s, but that cache carries only small data and is updated asynchronously and is batched.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098811#4098811
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098811
18Â years, 8Â months