[jboss-user] [JBoss Seam] - Conversion Error

2007-05-21 Thread kvchowdary_6699
hi 
when i click submit button in jspx page i got this error.

i ran the application like registration.


  | 
  | application.jspx
  | 
  | 
  | http://java.sun.com/JSP/Page"; 
  |   xmlns:h="http://java.sun.com/jsf/html";
  |   xmlns:f="http://java.sun.com/jsf/core";
  |   xmlns:s="http://jboss.com/products/seam/taglib";
  |   xmlns="http://www.w3.org/1999/xhtml";
  |   version="2.0">
  |   http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  |   
  |   
  |   
  | Application New User
  |   
  |   
  |  
  |   
  | 
  |  
  | 
  |   Application ID
  |   
  | 
  | 
  |   First Name
  |   
  | 
  | 
  |   Last Name
  |   
  | 
  | 
  |   SEX
  |   
  | 
  | 
  |   AGE
  |   
  | 
  |   
  | 
  | 
  | 
  |   
  | 
  |   
  |   
  | 
  | 
  | 
  | ApplicationUser.java 
  | 
  | 
  | package org.jboss.seam.example.application;
  | 
  | import java.io.Serializable;
  | import javax.persistence.Entity;
  | import javax.persistence.Id;
  | import javax.persistence.Table;
  | 
  | import org.hibernate.validator.Length;
  | import org.hibernate.validator.NotNull;
  | import org.jboss.seam.ScopeType;
  | import org.jboss.seam.annotations.Name;
  | import org.jboss.seam.annotations.Scope;
  | 
  | @Entity
  | @Name("app")
  | @Scope(ScopeType.SESSION)
  | @Table(name="applications")
  | 
  | public class ApplicationUser implements Serializable
  | {
  | private int appID;
  | private String firstName;
  | private String lastName;
  | private String sex;
  | private int age;
  | 
  | public ApplicationUser(int appID, String firstName, String 
lastName, String sex, int age)
  | {
  | this.appID = appID;
  | this.firstName = firstName;
  | this.lastName = lastName;
  | this.sex = sex;
  | this.age = age;
  | }
  | 
  | public ApplicationUser(){}
  | 
  | //@NotNull @Length(min=1, max=2)
  | public int getAge() {
  | return age;
  | }
  | 
  | public void setAge(int age) {
  | this.age = age;
  | }
  | 
  | //@Id @NotNull @Length(min=3, max=5)
  | public int getAppID() {
  | return appID;
  | }
  | 
  | public void setAppID(int appID) {
  | this.appID = appID;
  | }
  | 
  | //@NotNull @Length(min=5, max=15)
  | public String getFirstName() {
  | return firstName;
  | }
  | 
  | public void setFirstName(String firstName) {
  | this.firstName = firstName;
  | }
  | 
  | //  @NotNull @Length(min=5, max=15)
  | public String getLastName() {
  | return lastName;
  | }
  | 
  | public void setLastName(String lastName) {
  | this.lastName = lastName;
  | }
  | 
  | //@NotNull @Length(min=4, max=6)
  | public String getSex() {
  | return sex;
  | }
  | 
  | public void setSex(String sex) {
  | this.sex = sex;
  | }
  | }
  | 
  | 
  | 
  | and ApplicationAction.java
  | 
  | 
  | package org.jboss.seam.example.application;
  | 
  | import java.util.List;
  | 
  | import javax.ejb.Stateless;
  | import javax.persistence.EntityManager;
  | import javax.persistence.PersistenceContext;
  | 
  | import org.apache.commons.logging.Log;
  | import org.jboss.seam.annotations.In;
  | import org.jboss.seam.annotations.Logger;
  | import org.jboss.seam.annotations.Name;
  | import org.jboss.seam.core.FacesMessages;
  | 
  | @Stateless
  | @Name("application")
  | public class ApplicationAction implements Application
  | {
  | @In
  | private ApplicationUser app;
  | 
  | @PersistenceContext
  | private EntityManager em;
  | 
  | @Logger
  | private Log log;
  | 
  | public String application() {
  | List existing=em.createQuery("select appID from ApplicationUser 
where appID=#(app.appID)").getResultList();
  | if(existing.size()==0){
  | em.persist(app);
  | log.debug("#(ApplicationUser.appID) approved 
sucessfully");
  | return "/appApproved.jspx";
  | }
  |   

[jboss-user] [JBoss Seam] - Conversion error on simple trial

2007-05-16 Thread dkane
Hi colleagues, 

Just starting to explore Seam and getting "Conversion error" message on 
"Registration" example. 
3 "Conversion error" lines appears below the input fields after clicking 
"Sumbit", and no data appears in database. 

I was searching for postings with similar problems, and have found one  
explanation that components.xml should contain 

ear-file-name/#{ejbName}/local

instead of default 

#{ejbName}/local


I have made this change (tried file names with and without extension) - no 
effect. 

Could anyone please help me ? Also, I would like to know is it possible to dig 
up the Exception trace lying under messages like "Conversion error". Stack 
trace always leads us into the errorneous line in Java code, but "Conversion 
error" is something that you just know or don't know, without any path to the 
solution.. 

Many thanks !




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046084#4046084

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046084
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Conversion Error on Registration example

2006-12-19 Thread fabricio.lemos
Hello,

I´m having trouble running the Registration example. The application seems to 
be deployed ok but when I submit the form, I´m getting "Conversion Error" 3 
times. I am using maven to package the example on a ear.

Here is the Jboss log:


  | 17:46:27,470 INFO  [EARDeployer] Init J2EE application: 
file:/C:/workspacePrototipos/Registration/reg-ear/target/reg-ear-1.0.ear
  | 17:46:30,798 INFO  [Ejb3Deployment] EJB3 deployment time took: 672
  | 17:46:30,954 INFO  [Ejb3Deployment] EJB3 deployment time took: 140
  | 17:46:31,126 INFO  [JmxKernelAbstraction] installing MBean: 
jboss.j2ee:ear=reg-ear-1.0.ear,jar=jboss-seam-1.1.jar,name=Dispatcher,service=EJB3
 with dependencies:
  | 17:46:31,407 INFO  [EJBContainer] STARTED EJB: 
org.jboss.seam.core.Dispatcher ejbName: Dispatcher
  | 17:46:31,501 INFO  [EJB3Deployer] Deployed: 
file:/C:/Java/jboss-4.0.5.GA/server/default/tmp/deploy/tmp59795reg-ear-1.0.ear-contents/jboss-seam-1.1.jar
  | 17:46:31,501 INFO  [JmxKernelAbstraction] installing MBean: 
persistence.units:ear=reg-ear-1.0.ear,jar=reg-ejb-1.0.jar,unitName=userDatabase 
with dependencies:
  | 17:46:31,501 INFO  [JmxKernelAbstraction]   
jboss.jca:name=DefaultDS,service=DataSourceBinding
  | 17:46:31,564 INFO  [Version] Hibernate EntityManager 3.2.0.GA
  | 17:46:31,595 INFO  [Version] Hibernate Annotations 3.2.0.GA
  | 17:46:31,611 INFO  [Environment] Hibernate 3.2.0.ga
  | 17:46:31,611 INFO  [Environment] hibernate.properties not found
  | 17:46:31,626 INFO  [Environment] Bytecode provider name : javassist
  | 17:46:31,626 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
  | 17:46:31,861 INFO  [Ejb3Configuration] found EJB3 Entity bean: 
org.jboss.seam.example.registration.User
  | 17:46:31,861 WARN  [Ejb3Configuration] Persistence provider caller does not 
implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() 
is null.
  | 17:46:31,954 INFO  [Configuration] Reading mappings from resource: 
META-INF/orm.xml
  | 17:46:31,970 INFO  [Ejb3Configuration] [PersistenceUnit: userDatabase] no 
META-INF/orm.xml found
  | 17:46:32,407 INFO  [AnnotationBinder] Binding entity from annotated class: 
org.jboss.seam.example.registration.User
  | 17:46:32,486 INFO  [EntityBinder] Bind entity 
org.jboss.seam.example.registration.User on table users
  | 17:46:32,845 INFO  [ConnectionProviderFactory] Initializing connection 
provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
  | 17:46:32,845 INFO  [InjectedDataSourceConnectionProvider] Using provided 
datasource
  | 17:46:32,861 INFO  [SettingsFactory] RDBMS: HSQL Database Engine, version: 
1.8.0
  | 17:46:32,861 INFO  [SettingsFactory] JDBC driver: HSQL Database Engine 
Driver, version: 1.8.0
  | 17:46:32,892 INFO  [Dialect] Using dialect: 
org.hibernate.dialect.HSQLDialect
  | 17:46:32,907 INFO  [TransactionFactoryFactory] Transaction strategy: 
org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
  | 17:46:32,923 INFO  [TransactionManagerLookupFactory] instantiating 
TransactionManagerLookup: 
org.hibernate.transaction.JBossTransactionManagerLookup
  | 17:46:32,923 INFO  [TransactionManagerLookupFactory] instantiated 
TransactionManagerLookup
  | 17:46:32,923 INFO  [SettingsFactory] Automatic flush during 
beforeCompletion(): disabled
  | 17:46:32,923 INFO  [SettingsFactory] Automatic session close at end of 
transaction: disabled
  | 17:46:32,923 INFO  [SettingsFactory] JDBC batch size: 15
  | 17:46:32,923 INFO  [SettingsFactory] JDBC batch updates for versioned data: 
disabled
  | 17:46:32,923 INFO  [SettingsFactory] Scrollable result sets: enabled
  | 17:46:32,923 INFO  [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
  | 17:46:32,923 INFO  [SettingsFactory] Connection release mode: auto
  | 17:46:32,923 INFO  [SettingsFactory] Default batch fetch size: 1
  | 17:46:32,923 INFO  [SettingsFactory] Generate SQL with comments: disabled
  | 17:46:32,923 INFO  [SettingsFactory] Order SQL updates by primary key: 
disabled
  | 17:46:32,923 INFO  [SettingsFactory] Query translator: 
org.hibernate.hql.ast.ASTQueryTranslatorFactory
  | 17:46:32,939 INFO  [ASTQueryTranslatorFactory] Using 
ASTQueryTranslatorFactory
  | 17:46:32,939 INFO  [SettingsFactory] Query language substitutions: {}
  | 17:46:32,939 INFO  [SettingsFactory] JPA-QL strict compliance: enabled
  | 17:46:32,939 INFO  [SettingsFactory] Second-level cache: enabled
  | 17:46:32,939 INFO  [SettingsFactory] Query cache: disabled
  | 17:46:32,939 INFO  [SettingsFactory] Cache provider: 
org.hibernate.cache.HashtableCacheProvider
  | 17:46:32,939 INFO  [SettingsFactory] Optimize cache for minimal puts: 
disabled
  | 17:46:32,939 INFO  [SettingsFactory] Structured second-level cache entries: 
disabled
  | 17:46:32,954 INFO  [SettingsFactory] Statistics: disabled
  | 17:46:32,954 INFO  [SettingsFactory] Deleted entity synthetic identifier 
rollback: disabled
  | 17:46:32,954 INFO  [SettingsFactory] Default entity-mode: pojo
  | 17:46:33,064 

[jboss-user] [JBoss Seam] - Conversion Error

2006-08-11 Thread koriel
My user entity


  | @Entity
  | @Table(name="USERS")
  | public abstract class User implements Serializable
  | {
  |  
  |private String password;
  |private List name;
  |private long id;
  |
  |
  |@Id
  |@GeneratedValue
  |public long getId() {
  | return id;
  | }
  | 
  | public void setId(long id) {
  | this.id = id;
  | }
  | 
  | public User(List name, String password)
  |{
  |   this.name = name;
  |   this.password = password;
  |  
  |}
  |
  |public User() {}
  | 
  | 
  |
  |@NotNull
  |@Length(min=5, max=15, message="Password must be at least 5 characters")
  |public String getPassword()
  |{
  |   return password;
  |}
  |public void setPassword(String password)
  |{
  |   this.password = password;
  |}
  |
  | @NotNull
  | @OneToMany
  | public List getName() {
  | return name;
  | }
  | 
  | public void setName(List name) {
  | this.name = name;
  | }
  |
  |
  |public String toString() 
  |{
  |   return "User(" + password + ")";
  |}
  | }
  | 

my AuthorUser class 


  | @Entity
  | @DiscriminatorValue("AuthorUser")
  | @Scope(ScopeType.SESSION)
  | public class AuthorUser extends User implements Serializable {
  | 
  | public String gender;
  | public String title;
  | 
  | public AuthorUser() {}
  | 
  | 
  | public String getGender() {
  | return gender;
  | }
  | 
  | public void setGender(String gender) {
  | this.gender = gender;
  | }
  | 
  | public String getTitle() {
  | return title;
  | }
  | 
  | public void setTitle(String title) {
  | this.title = title;
  | }
  | 
  | 
  | 
  | }
  | 

my registerAction class 

  | @Stateful
  | 
  | @Scope(ScopeType.SESSION)
  | 
  | @Name("register")
  | 
  | public class RegisterAction implements Register
  | 
  | {
  | 
  | 
  | 
  |@In(create = true) 
  | 
  |private AuthorUser authorUser;
  | 
  |
  | 
  |@In(create = true)
  | 
  |private Names names;
  | 
  |
  | 
  |@Logger
  | 
  |private Log log;
  | 
  |
  | 
  |@PersistenceContext
  | 
  |private EntityManager em;
  | 
  |
  | 
  |@In(create=true)
  | 
  |private transient FacesMessages facesMessages;
  | 
  |
  | 
  |private String verify;
  | 
  |
  | 
  |public String register()
  | 
  |{
  | 
  |   
  | 
  | log.info("hi");
  |}
  | }
  | 
  |  


and my xhtml page


  |   
  |   
  |   
  | 
  | 
  | 
  | 
  | 
  | Lastname
  | 
  | 
  | 
  | Firstname
  | 
  | 
  | 
  | Middlename
  | 
  |   
  | 
  | 
  | 
  | Gender
  | 
  | 
  | 
  | Title
  | 
  |  
  | 
  | Password
  | 
  |  
  | 
  | 
  | 
  | 
  | 
  |  
  | 
  | 
  | 
  | 
  |  
  | 
  | 

By submiting the form I get conversion error for authorUser.title,gender and 
password..

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964561#3964561

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964561
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user