[JBossWS] - Re: Unsupported content type Exception while consuming Jboss
by alessio.soldano@jboss.com
The stack complains because it cannot process html messages. I suggest you to check how you set the content-type in your client, since you're actually providing both text/xml and text/html content types.
anonymous wrote :
| | 2007-12-31 16:00:59,156 DEBUG [org.jboss.ws.binding.soap.SOAPMessageUnMarshaller] getMimeHeaders from: {null=[HTTP/1.1 200 OK], ResponseCodeMessage=OK, Set-cookie=[JSESSIONID=2000581CECAB64B685C0648F6E818CB2;Path=/webauth;Secure], Transfer-encoding=[chunked], http.basic.password=admin12, Date=[Mon, 31 Dec 2007 10:13:45 GMT], http.basic.username=admin, Server=[Sun-ONE-Web-Server/6.1], HEADER={SOAPAction="", Content-Type=text/xml; charset=UTF-8}, Content-type=[text/html;charset=ISO-8859-1], ResponseCode=200}
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116946#4116946
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116946
18 years, 3 months
[JBoss Seam] - Problem retrieving data from the DB
by adriju
Hi people!!
I´ve got the following tables in my DB Oracle 9:
anonymous wrote : USUARIOS
|
| Name Null? Type
| --------------------------------------------- -------- -----------
| COD_USUARIO NOT NULL NUMBER(10)
| NOMBRE_USUARIO VARCHAR2(60)
| PRIORIDAD_USUARIO NUMBER(3)
| PASSWORD_USUARIO VARCHAR2(12)
| FILTRO_USUARIO VARCHAR2(20)
| SNMP_USUARIO VARCHAR2(20)
| COD_GRUPOS_USUARIOS NOT NULL NUMBER(10)
|
| primary key (COD_USUARIO),foreign key (COD_GRUPOS_USUARIOS) references GRUPOS_USUARIOS(COD_GRUPOS_USUARIOS)
|
| GRUPOS_USUARIOS
|
| Name Null? Type
| --------------------------------------------- -------- ------------
| COD_GRUPOS_USUARIOS NOT NULL NUMBER(10)
| NOMBRE_GRUPOS_USUARIOS VARCHAR2(60)
|
| primary key (COD_GRUPOS_USUARIOS)
I do not use any reverse engineering with these tables. Then I use generate-entities to create the entities and I obtain the following:
@Entity
| @Table(name = "USUARIOS")
| public class Usuarios implements java.io.Serializable {
|
| private long codUsuario;
| private GruposUsuarios gruposUsuarios;
| private String nombreUsuario;
| private Short prioridadUsuario;
| private String passwordUsuario;
| private String filtroUsuario;
| private String snmpUsuario;
| private Set<TemispConfiguracion> temispConfiguracions = new HashSet<TemispConfiguracion>(
| 0);
| private Set<FiltrosFichas> filtrosFichases = new HashSet<FiltrosFichas>(0);
| private Set<Operacion> operacions = new HashSet<Operacion>(0);
| private Set<Macro> macros = new HashSet<Macro>(0);
| private Set<NuevaConfiguracion> nuevaConfiguracions = new HashSet<NuevaConfiguracion>(
| 0);
| private Set<Grupo> grupos = new HashSet<Grupo>(0);
|
| public Usuarios() {
| }
|
| public Usuarios(long codUsuario, GruposUsuarios gruposUsuarios) {
| this.codUsuario = codUsuario;
| this.gruposUsuarios = gruposUsuarios;
| }
| public Usuarios(long codUsuario, GruposUsuarios gruposUsuarios,
| String nombreUsuario, Short prioridadUsuario,
| String passwordUsuario, String filtroUsuario, String snmpUsuario,
| Set<TemispConfiguracion> temispConfiguracions,
| Set<FiltrosFichas> filtrosFichases, Set<Operacion> operacions,
| Set<Macro> macros, Set<NuevaConfiguracion> nuevaConfiguracions,
| Set<Grupo> grupos) {
| this.codUsuario = codUsuario;
| this.gruposUsuarios = gruposUsuarios;
| this.nombreUsuario = nombreUsuario;
| this.prioridadUsuario = prioridadUsuario;
| this.passwordUsuario = passwordUsuario;
| this.filtroUsuario = filtroUsuario;
| this.snmpUsuario = snmpUsuario;
| this.temispConfiguracions = temispConfiguracions;
| this.filtrosFichases = filtrosFichases;
| this.operacions = operacions;
| this.macros = macros;
| this.nuevaConfiguracions = nuevaConfiguracions;
| this.grupos = grupos;
| }
|
| @Id
| @Column(name = "COD_USUARIO", unique = true, nullable = false, precision = 10, scale = 0)
| @NotNull
| public long getCodUsuario() {
| return this.codUsuario;
| }
|
| public void setCodUsuario(long codUsuario) {
| this.codUsuario = codUsuario;
| }
| @ManyToOne(fetch = FetchType.LAZY)
| @JoinColumn(name = "COD_GRUPOS_USUARIOS", nullable = false)
| @NotNull
| public GruposUsuarios getGruposUsuarios() {
| return this.gruposUsuarios;
| }
|
| public void setGruposUsuarios(GruposUsuarios gruposUsuarios) {
| this.gruposUsuarios = gruposUsuarios;
| }
|
| @Column(name = "NOMBRE_USUARIO", length = 60)
| @Length(max = 60)
| public String getNombreUsuario() {
| return this.nombreUsuario;
| }
|
| public void setNombreUsuario(String nombreUsuario) {
| this.nombreUsuario = nombreUsuario;
| }
|
| @Column(name = "PRIORIDAD_USUARIO", precision = 3, scale = 0)
| public Short getPrioridadUsuario() {
| return this.prioridadUsuario;
| }
|
| public void setPrioridadUsuario(Short prioridadUsuario) {
| this.prioridadUsuario = prioridadUsuario;
| }
|
| @Column(name = "PASSWORD_USUARIO", length = 128)
| @Length(max = 128)
| public String getPasswordUsuario() {
| return this.passwordUsuario;
| }
|
| public void setPasswordUsuario(String passwordUsuario) {
| this.passwordUsuario = passwordUsuario;
| }
|
| @Column(name = "FILTRO_USUARIO", length = 20)
| @Length(max = 20)
| public String getFiltroUsuario() {
| return this.filtroUsuario;
| }
|
| public void setFiltroUsuario(String filtroUsuario) {
| this.filtroUsuario = filtroUsuario;
| }
|
| @Column(name = "SNMP_USUARIO", length = 20)
| @Length(max = 20)
| public String getSnmpUsuario() {
| return this.snmpUsuario;
| }
|
| public void setSnmpUsuario(String snmpUsuario) {
| this.snmpUsuario = snmpUsuario;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usuarios")
| public Set<TemispConfiguracion> getTemispConfiguracions() {
| return this.temispConfiguracions;
| }
|
| public void setTemispConfiguracions(
| Set<TemispConfiguracion> temispConfiguracions) {
| this.temispConfiguracions = temispConfiguracions;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usuarios")
| public Set<FiltrosFichas> getFiltrosFichases() {
| return this.filtrosFichases;
| }
|
| public void setFiltrosFichases(Set<FiltrosFichas> filtrosFichases) {
| this.filtrosFichases = filtrosFichases;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usuarios")
| public Set<Operacion> getOperacions() {
| return this.operacions;
| }
|
| public void setOperacions(Set<Operacion> operacions) {
| this.operacions = operacions;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usuarios")
| public Set<Macro> getMacros() {
| return this.macros;
| }
|
| public void setMacros(Set<Macro> macros) {
| this.macros = macros;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usuarios")
| public Set<NuevaConfiguracion> getNuevaConfiguracions() {
| return this.nuevaConfiguracions;
| }
|
| public void setNuevaConfiguracions(
| Set<NuevaConfiguracion> nuevaConfiguracions) {
| this.nuevaConfiguracions = nuevaConfiguracions;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usuarios")
| public Set<Grupo> getGrupos() {
| return this.grupos;
| }
|
| public void setGrupos(Set<Grupo> grupos) {
| this.grupos = grupos;
| }
|
| }
For the table USUARIOS; and for GRUPOS_USUARIOS:
@Entity
| @Table(name = "GRUPOS_USUARIOS")
| public class GruposUsuarios implements java.io.Serializable {
|
| private long codGruposUsuarios;
| private String nombreGruposUsuarios;
| private Set<Usuarios> usuarioses = new HashSet<Usuarios>(0);
| private Set<Filtros> filtroses = new HashSet<Filtros>(0);
| private Set<Equipos> equiposes = new HashSet<Equipos>(0);
|
| public GruposUsuarios() {
| }
|
| public GruposUsuarios(long codGruposUsuarios) {
| this.codGruposUsuarios = codGruposUsuarios;
| }
| public GruposUsuarios(long codGruposUsuarios, String nombreGruposUsuarios,
| Set<Usuarios> usuarioses, Set<Filtros> filtroses,
| Set<Equipos> equiposes) {
| this.codGruposUsuarios = codGruposUsuarios;
| this.nombreGruposUsuarios = nombreGruposUsuarios;
| this.usuarioses = usuarioses;
| this.filtroses = filtroses;
| this.equiposes = equiposes;
| }
|
| @Id
| @Column(name = "COD_GRUPOS_USUARIOS", unique = true, nullable = false, precision = 10, scale = 0)
| @NotNull
| public long getCodGruposUsuarios() {
| return this.codGruposUsuarios;
| }
|
| public void setCodGruposUsuarios(long codGruposUsuarios) {
| this.codGruposUsuarios = codGruposUsuarios;
| }
|
| @Column(name = "NOMBRE_GRUPOS_USUARIOS", length = 60)
| @Length(max = 60)
| public String getNombreGruposUsuarios() {
| return this.nombreGruposUsuarios;
| }
|
| public void setNombreGruposUsuarios(String nombreGruposUsuarios) {
| this.nombreGruposUsuarios = nombreGruposUsuarios;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "gruposUsuarios")
| public Set<Usuarios> getUsuarioses() {
| return this.usuarioses;
| }
|
| public void setUsuarioses(Set<Usuarios> usuarioses) {
| this.usuarioses = usuarioses;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "gruposUsuarios")
| public Set<Filtros> getFiltroses() {
| return this.filtroses;
| }
|
| public void setFiltroses(Set<Filtros> filtroses) {
| this.filtroses = filtroses;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "gruposUsuarios")
| public Set<Equipos> getEquiposes() {
| return this.equiposes;
| }
|
| public void setEquiposes(Set<Equipos> equiposes) {
| this.equiposes = equiposes;
| }
|
| }
Until this point, everything is ok. The problem comes when I create a query from the table GRUPOS_USUARIOS in the Authenticator.java file:
private GruposUsuarios grupos;
|
| [...]
|
| List results2 = em.createQuery("select grupos from GruposUsuarios grupos").getResultList();
|
| grupos = (GruposUsuarios) results2.get(0);
|
This table contains more than one entry but this command does not obtain anything. When I debug in Eclipse I get:
grupos = GruposUsuarios_$$_javassist_36 (id=385)
Nevertheless, when I do this for the table USUARIOS I do not have any problem.
Could anyone help me? Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116945#4116945
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116945
18 years, 3 months
[JBoss jBPM] - Hibernate problem
by vsevel
I am getting an hibernate error while getting the jbpmContext in my own application.
I have no clue how to solve it.
However the jbpm console is still working. I am using MySQL.
I've got also the same error now when I am compiling jbpm3 sources.
Please help.
java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.MethodNode
\-[METHOD_CALL] MethodNode: '('
+-[METHOD_NAME] IdentNode: 'stddev' {originalText=stddev}
\-[EXPR_LIST] SqlNode: 'exprList'
\-[DOT] DotNode: 'nodelog0_.DURATION_' {propertyName=duration,dereferenceType=4,propertyPath=duration,path=nl.duration,tableAlias=nodelog0_,className=org.jbpm.graph.log.NodeLog,classAlias=nl}
+-[ALIAS_REF] IdentNode: 'nodelog0_.ID_' {alias=nl, className=org.jbpm.graph.log.NodeLog, tableAlias=nodelog0_}
\-[IDENT] IdentNode: 'duration' {originalText=duration}
org.hibernate.hql.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:145)
org.hibernate.hql.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:705)
org.hibernate.hql.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:529)
org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:645)
org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77)
org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56)
org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:402)
org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:352)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:100)
org.jbpm.JbpmContext.getSession(JbpmContext.java:506)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116939#4116939
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116939
18 years, 3 months