Re: SerializationException

2016-02-01 Thread claudio sergio Goncalves
i solve using hibernate transformes

q.setResultTransformer(Transformers.aliasToBean(mypojo.class));

thanks

Em sexta-feira, 29 de janeiro de 2016 09:11:57 UTC-2, claudio sergio 
Goncalves escreveu:
>
> Thanks Jen 
>
> i'll see the docs.
>
>
>
>
> Em quarta-feira, 27 de janeiro de 2016 12:47:30 UTC-2, Jens escreveu:
>>
>> You are trying to send a collection of java.lang.Object which is not 
>> allowed by GWT-RPC. 
>>
>> See documentation 
>> http://www.gwtproject.org/doc/latest/DevGuideServerCommunication.html#DevGuideSerializableTypes
>>
>> As you are using JPA you should also read the section about serializing 
>> enhanced classes on the linked page.
>>
>> -- J.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: erro migrating hibernate

2016-02-01 Thread claudio sergio Goncalves
Sorry wrong post

I solved this one using Hibernate tools and using hbm.xml in all my classes
then hibernate stop freezing


thanks for all.


Em segunda-feira, 1 de fevereiro de 2016 15:11:13 UTC-2, claudio sergio 
Goncalves escreveu:
>
> i solve using hibernate transformes
>
> q.setResultTransformer(Transformers.aliasToBean(mypojo.class));
>
>
>
> Em segunda-feira, 1 de fevereiro de 2016 12:40:42 UTC-2, va...@ant.ee 
> escreveu:
>>
>> What hibernate-validator version do you use? From my experiments you 
>> can't use version higher than 4.3.1.Final because it breaks dependency of 
>> GWT validation-api-1.0.0-GA
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: erro migrating hibernate

2016-02-01 Thread claudio sergio Goncalves
i solve using hibernate transformes

q.setResultTransformer(Transformers.aliasToBean(mypojo.class));



Em segunda-feira, 1 de fevereiro de 2016 12:40:42 UTC-2, va...@ant.ee 
escreveu:
>
> What hibernate-validator version do you use? From my experiments you can't 
> use version higher than 4.3.1.Final because it breaks dependency of GWT 
> validation-api-1.0.0-GA
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: erro migrating hibernate

2016-01-30 Thread claudio sergio Goncalves
I forgot to tell that my project is in gwt 2.7.0


Em sábado, 30 de janeiro de 2016 12:56:02 UTC-2, claudio sergio Goncalves 
escreveu:
>
> hi guys
>
> i'm updating hibernate from 3.3 to 5.07 but its freezing.
>
> Hibernate Starting -> 
> [INFO ] 2016-01-30 12:49:03.919 [qtp24631344-26] Version - HHH000412: 
> Hibernate Core {5.0.7.Final}
> [INFO ] 2016-01-30 12:49:03.922 [qtp24631344-26] Environment - HHH000206: 
> hibernate.properties not found
> [INFO ] 2016-01-30 12:49:03.923 [qtp24631344-26] Environment - HHH21: 
> Bytecode provider name : javassist
> [INFO ] 2016-01-30 12:49:04.471 [qtp24631344-26] Version - HCANN01: 
> Hibernate Commons Annotations {5.0.1.Final}
> [INFO ] 2016-01-30 12:49:04.525 [qtp24631344-26] C3P0ConnectionProvider - 
> HHH010002: C3P0 using driver: org.firebirdsql.jdbc.FBDriver at URL: 
> jdbc:firebirdsql:localhost:D:\projetos\dados\BDFINAN.FDB
> [INFO ] 2016-01-30 12:49:04.525 [qtp24631344-26] C3P0ConnectionProvider - 
> HHH10001001: Connection properties: {user=SYSDBA, password=, 
> lc_ctype=ISO8859_1}
> [INFO ] 2016-01-30 12:49:04.525 [qtp24631344-26] C3P0ConnectionProvider - 
> HHH10001003: Autocommit mode: false
> [INFO ] 2016-01-30 12:49:04.541 [MLog-Init-Reporter] MLog - MLog clients 
> using slf4j logging.
> [INFO ] 2016-01-30 12:49:04.583 [qtp24631344-26] C3P0Registry - 
> Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? 
> true; trace: 10]
> [INFO ] 2016-01-30 12:49:04.619 [qtp24631344-26] C3P0ConnectionProvider - 
> HHH10001007: JDBC isolation level: 
> [INFO ] 2016-01-30 12:49:04.635 [qtp24631344-26] 
> AbstractPoolBackedDataSource - Initializing c3p0 pool... 
> com.mchange.v2.c3p0.PoolBackedDataSource@80ec5e16 [ 
> connectionPoolDataSource -> 
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@d423b0fc [ 
> acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 
> 1000, autoCommitOnClose -> false, automaticTestTable -> null, 
> breakAfterAcquireFailure -> false, checkoutTimeout -> 0, 
> connectionCustomizerClassName -> null, connectionTesterClassName -> 
> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource 
> -> caller, debugUnreturnedConnectionStackTraces -> false, 
> factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, 
> forceSynchronousCheckins -> false, identityToken -> 
> 1hge0yr9e14sfh9t3es2nx|1df1dc4, idleConnectionTestPeriod -> 0, 
> initialPoolSize -> 3, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 
> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 
> 5, maxStatements -> 50, maxStatementsPerConnection -> 0, minPoolSize -> 3, 
> nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@22e65aac [ 
> description -> null, driverClass -> null, factoryClassLocation -> null, 
> forceUseNamedDriverClass -> false, identityToken -> 
> 1hge0yr9e14sfh9t3es2nx|16a7e52, jdbcUrl -> 
> jdbc:firebirdsql:localhost:D:\projetos\dados\BDFINAN.FDB, properties -> 
> {user=**, password=**, lc_ctype=ISO8859_1} ], preferredTestQuery -> 
> null, privilegeSpawnedThreads -> false, propertyCycle -> 0, 
> statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> 
> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, 
> usesTraditionalReflectiveProxies -> false; userOverrides: {} ], 
> dataSourceName -> null, extensions -> {}, factoryClassLocation -> null, 
> identityToken -> 1hge0yr9e14sfh9t3es2nx|7b97f2, numHelperThreads -> 3 ]
> [INFO ] 2016-01-30 12:49:04.752 [qtp24631344-26] Dialect - HHH000400: 
> Using dialect: org.hibernate.dialect.FirebirdDialect
> [INFO ] 2016-01-30 12:49:05.225 [qtp24631344-26] SchemaValidator - 
> HHH000229: Running schema validator
>
> my hibernate.cfg
>  name="connection.driver_class">org.firebirdsql.jdbc.FBDriver
>  name="connection.url">jdbc:firebirdsql:localhost:D:\projetos\dados\BDFINAN.FDB
> ISO8859_1 
> org.hibernate.dialect.FirebirdDialect 
> SYSDBA
> *
>
> false
> false
> 10
> thread
>   validate
> manual 
>  
> 3
> 5
> 1800
> 1
> 50
>
>
> can anyone help me
>
> thanks in advance
>
> claudio
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


erro migrating hibernate

2016-01-30 Thread claudio sergio Goncalves
hi guys

i'm updating hibernate from 3.3 to 5.07 but its freezing.

Hibernate Starting -> 
[INFO ] 2016-01-30 12:49:03.919 [qtp24631344-26] Version - HHH000412: 
Hibernate Core {5.0.7.Final}
[INFO ] 2016-01-30 12:49:03.922 [qtp24631344-26] Environment - HHH000206: 
hibernate.properties not found
[INFO ] 2016-01-30 12:49:03.923 [qtp24631344-26] Environment - HHH21: 
Bytecode provider name : javassist
[INFO ] 2016-01-30 12:49:04.471 [qtp24631344-26] Version - HCANN01: 
Hibernate Commons Annotations {5.0.1.Final}
[INFO ] 2016-01-30 12:49:04.525 [qtp24631344-26] C3P0ConnectionProvider - 
HHH010002: C3P0 using driver: org.firebirdsql.jdbc.FBDriver at URL: 
jdbc:firebirdsql:localhost:D:\projetos\dados\BDFINAN.FDB
[INFO ] 2016-01-30 12:49:04.525 [qtp24631344-26] C3P0ConnectionProvider - 
HHH10001001: Connection properties: {user=SYSDBA, password=, 
lc_ctype=ISO8859_1}
[INFO ] 2016-01-30 12:49:04.525 [qtp24631344-26] C3P0ConnectionProvider - 
HHH10001003: Autocommit mode: false
[INFO ] 2016-01-30 12:49:04.541 [MLog-Init-Reporter] MLog - MLog clients 
using slf4j logging.
[INFO ] 2016-01-30 12:49:04.583 [qtp24631344-26] C3P0Registry - 
Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? 
true; trace: 10]
[INFO ] 2016-01-30 12:49:04.619 [qtp24631344-26] C3P0ConnectionProvider - 
HHH10001007: JDBC isolation level: 
[INFO ] 2016-01-30 12:49:04.635 [qtp24631344-26] 
AbstractPoolBackedDataSource - Initializing c3p0 pool... 
com.mchange.v2.c3p0.PoolBackedDataSource@80ec5e16 [ 
connectionPoolDataSource -> 
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@d423b0fc [ 
acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 
1000, autoCommitOnClose -> false, automaticTestTable -> null, 
breakAfterAcquireFailure -> false, checkoutTimeout -> 0, 
connectionCustomizerClassName -> null, connectionTesterClassName -> 
com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource 
-> caller, debugUnreturnedConnectionStackTraces -> false, 
factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, 
forceSynchronousCheckins -> false, identityToken -> 
1hge0yr9e14sfh9t3es2nx|1df1dc4, idleConnectionTestPeriod -> 0, 
initialPoolSize -> 3, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 
0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 
5, maxStatements -> 50, maxStatementsPerConnection -> 0, minPoolSize -> 3, 
nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@22e65aac [ 
description -> null, driverClass -> null, factoryClassLocation -> null, 
forceUseNamedDriverClass -> false, identityToken -> 
1hge0yr9e14sfh9t3es2nx|16a7e52, jdbcUrl -> 
jdbc:firebirdsql:localhost:D:\projetos\dados\BDFINAN.FDB, properties -> 
{user=**, password=**, lc_ctype=ISO8859_1} ], preferredTestQuery -> 
null, privilegeSpawnedThreads -> false, propertyCycle -> 0, 
statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> 
false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, 
usesTraditionalReflectiveProxies -> false; userOverrides: {} ], 
dataSourceName -> null, extensions -> {}, factoryClassLocation -> null, 
identityToken -> 1hge0yr9e14sfh9t3es2nx|7b97f2, numHelperThreads -> 3 ]
[INFO ] 2016-01-30 12:49:04.752 [qtp24631344-26] Dialect - HHH000400: Using 
dialect: org.hibernate.dialect.FirebirdDialect
[INFO ] 2016-01-30 12:49:05.225 [qtp24631344-26] SchemaValidator - 
HHH000229: Running schema validator

my hibernate.cfg
org.firebirdsql.jdbc.FBDriver
jdbc:firebirdsql:localhost:D:\projetos\dados\BDFINAN.FDB
ISO8859_1 
org.hibernate.dialect.FirebirdDialect 
SYSDBA
*

false
false
10
thread
  validate
manual 
 
3
5
1800
1
50


can anyone help me

thanks in advance

claudio

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: SerializationException

2016-01-29 Thread claudio sergio Goncalves
Thanks Jen 

i'll see the docs.




Em quarta-feira, 27 de janeiro de 2016 12:47:30 UTC-2, Jens escreveu:
>
> You are trying to send a collection of java.lang.Object which is not 
> allowed by GWT-RPC. 
>
> See documentation 
> http://www.gwtproject.org/doc/latest/DevGuideServerCommunication.html#DevGuideSerializableTypes
>
> As you are using JPA you should also read the section about serializing 
> enhanced classes on the linked page.
>
> -- J.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


SerializationException

2016-01-27 Thread claudio sergio Goncalves
hi guys 

i'd received this message

[WARN ] 2016-01-27 11:34:27.291 [qtp26882648-29] / - Exception while 
dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type 
'[Ljava.lang.Object;' was not included in the set of types which can be 
serialized by this SerializationPolicy or its Class object could not be 
loaded. For security purposes, this type will not be serialized.: instance 
= [Ljava.lang.Object;@ddf831
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:667)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:130)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:44)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:39)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serializeInstance(ArrayList_CustomFieldSerializer.java:51)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serializeInstance(ArrayList_CustomFieldSerializer.java:28)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:789)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:669)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:130)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:587)
 
~[gwt-servlet.jar:?]
at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:631) 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:497) 
~[gwt-servlet.jar:?]
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:589) 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)
 
~[gwt-servlet.jar:?]
at 
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
 
[gwt-servlet.jar:?]

my object is

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "SP_OBTEMGRAFICOFINANCEIRO")
public class SpGrafFinanAnual implements Serializable {


private static final long serialVersionUID = 1L;
private int mes;
private int ano;
@Column(name = "RECEITA", nullable = true, columnDefinition="NUMERIC")
private float receita;
@Column(name = "DESPESA", nullable = true, columnDefinition="NUMERIC")
private float despesa;
@Column(name = "FATURAMENTO", nullable = true, columnDefinition="NUMERIC")
private float faturamento;
public SpGrafFinanAnual(){
}
 getters and setters

i cound't find any solutions around web

the solutions that i found is

   1. 
   
---


   1. 1 - Verify that the class has a default constructor (without 
   arguments)
   2. 2 - Verify that the class implements Serializable or IsSerializable 
   or implements an Interface that extends Serializable or extends a class 
   that implement Serializable
   3. 3 - Verify that the class is in a client.* package or …
   4. 4 - Verify, if the class is not in client.* package, that is compiled 
   in your GWT xml module definition. By default is present. If your class is 
   in another package you have to add it to source. For example if your class 
   is under domain.* you should add it to xml as . Be aware that the class 
   cannot belong to server package! More details on GWT page:
   
http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml
   5. 5 - If you are including the class from another GWT project you have 
   to add the inherits to your xml module definition. For example if your 
   class Foo is in the package com.dummy.domain you have to add to the module 
   definition. More details here:
   
http://code.google.com/webtoolkit/doc/la

Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-27 Thread claudio sergio Goncalves
Hi julio

i use this routine to redimensione my images

public static BufferedImage redimensionarImagem(BufferedImage img, int 
maltura, int mlargura) throws Exception {

java.awt.Image imagem = (java.awt.Image) img;
java.awt.Image thumbs = ((java.awt.Image) imagem)
.getScaledInstance(mlargura, maltura, BufferedImage.SCALE_SMOOTH);
BufferedImage buffer = new BufferedImage(mlargura, maltura, 
BufferedImage.TYPE_INT_RGB);
buffer.createGraphics().drawImage(thumbs, 0, 0, null);
return buffer;
}
pass the width and height in pixels (maltura e mlargura)
After thar you can upload the image.

cheers

Claudio


Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor Nobrega 
escreveu:
>
> Hi guys,
>
> i am trying to upload images with 2mb size but i don't want to send the 
> whole original image to the server. 
>
> What i would like to do is reduce the image dimensions from, for example, 
> *1000x1000* to *50x50* and reduce the file size
> from *2mb* to *~25kb* as well and at the end send the *~25kb* image to 
> the server.
>
> I know there is the Scalr framework that does that in java, but its no 
> compatible with GWT clients.
>
> Is there any client side GWT library that does the same thing as Scalr?
>
> Best Regards!
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.