matias casal

Ranch Hand
+ Follow
since Oct 18, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by matias casal

You should consider using java 1.6.
Maybe it will help you http://dom4j.sourceforge.net/dom4j-1.4/apidocs/
but can I parse this String ?


This throws the same error

java.text.ParseException: Unparseable date: "Miércoles, 01 de Diciembre de 2010 01:00:00"


13 years ago
Thanks.
Unfortunately, I cant use this string :


The string must be


I tried with
but

java.text.ParseException: Unparseable date: "Miércoles, 01 de Diciembre de 2010 01:00:00 a.m."

13 years ago
Thanks, but I tried



But the error continues

java.text.ParseException: Unparseable date: "Miércoles, 01 de Diciembre de 2010 01:00:00 a.m."


13 years ago
Hello, does anyone know how to parse de following String ?

"Miércoles, 01 de Diciembre de 2010 01:00:00 a.m."

I am trying something like this , but it fails


My format is EEEE,dd MMMM yyyy HH:mm:ss aaa

Thanks!
13 years ago
Hello, I am a little bit newbie with hibernate.
Here is my doubt, I want to Truncate a table, (delete all rows) and add an arraylist of objects to the this table. Like a replace

Here is my code



Here is my mysql code





The mysql table truncates, but the arraylist is not added

Error log :



7204 [btpool0-2] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 1048, SQLState: 23000
7204 [btpool0-2] ERROR org.hibernate.util.JDBCExceptionReporter - Column 'nombre' cannot be null
7204 [btpool0-2] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
Starting Jetty on port 8888
[WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List com.google.musicstore.client.MusicStoreService.modificarPersona(java.util.List)' threw an unexpected exception: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:378)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:581)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
at com.google.musicstore.server.MusicStoreServiceImpl.modificarPersona(MusicStoreServiceImpl.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
... 22 more
Caused by: java.sql.BatchUpdateException: Column 'nombre' cannot be null
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
at com.google.musicstore.server.MusicStoreServiceImpl.modificarPersona(MusicStoreServiceImpl.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.sql.BatchUpdateException: Column 'nombre' cannot be null
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2018)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1454)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 35 more
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2018)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1454)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 35 more




I would be very grateful if someone could help me solving my problem

Thanks!
Hello GWT forum, I have a new question.
I am making a crud with hibernate + gwt, and my last topic is the update part.

Here is my table



My update method should be something like that



Now my question, how should I get the values of the modified textbox from the table ??

Thanks!
14 years ago
GWT

When you add a new account, add the newly created POJO to this list and rebuild the UI.
When you delete an account, remove the POJO from this list and rebuild the UI.



I have my different flextables in different classes that exteds composites.

Thats what I would like to know, how should I rebuild the UI ???

Thanks!
14 years ago
GWT
I could not understand correctly.
My delete UI is something like this



What should I add to this to make it works ?
14 years ago
GWT

you will need to write the update UI operations explicitly


I did not make that.

Can you explain me shortly how to write the update UI operations ? Or give any tutorial about this ?
14 years ago
GWT
Hello,

I am making a crud example with hibernate and gwt.
I made the following to delete and read:



They work perfectly, the information change on my mysql database, but the problem is that when I execute them the page/tables does not refresh automatically.

Does anyone knows how to make the dynamic update when the table is changed ?

Thank you!
14 years ago
GWT
The problem is that if myclass is in the server package,gwt does not compile.
If the class is in the client package everything go alright.

I would like to know how to use classes form de server package

This is the error log

Charles is my java class in the server package,
Usuario is my java class in the client package,
Hello is my entry point class

Compiling module testing3.Probando3
Validating newly compiled units
[ERROR] Errors in 'file:/C:/Documents%20and%20Settings/mcasal/Mis%20documentos/proyectos-eclipse/probando3/src/testing3/client/Usuario.java'
[ERROR] Line 4: The import testing3.server.Charles cannot be resolved
[ERROR] Line 33: Charles cannot be resolved to a type
[ERROR] Line 33: Charles cannot be resolved to a type
[ERROR] Line 34: Charles cannot be resolved to a type
Finding entry point classes
[ERROR] Unable to find type 'testing3.client.Hello'
[ERROR] Hint: Previous compiler errors may have made this type unavailable
[ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly


14 years ago
GWT

If you need to make use of some server side class (which does not logically belong to the client side) you can always make a server call via the proxy


I undestand this, but how to make a server call via the proxy?
I used to think that using my class function getName() here, on the client-side ( in the entry point) was right



But i am wrong.

Then, how should I use the the proxy
Thanks for answering!
14 years ago
GWT
Oh nice, it works.
But if want to use a class from the server, how should I use it?

Thanks
14 years ago
GWT
Thank you
I was able to solve it.

Now i Have a new problem.

I created a class on the server package



But when I am going to google-compile the project, this errors appear

[ERROR] Errors in 'file:/C:/Documents%20and%20Settings/mcasal/Mis%20documentos/proyectos-eclipse/probando3/src/testing3/client/Hello.java'
[ERROR] Line 77: No source code is available for type testing3.server.Usuario; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/Documents%20and%20Settings/mcasal/Mis%20documentos/proyectos-eclipse/probando3/src/testing3/client/MyService.java'
[ERROR] Line 13: No source code is available for type testing3.server.Usuario; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/Documents%20and%20Settings/mcasal/Mis%20documentos/proyectos-eclipse/probando3/src/testing3/client/MyServiceAsync.java'
[ERROR] Line 9: No source code is available for type testing3.server.Usuario; did you forget to inherit a required module?


I imported the Usuario class in the entry point class

Any suggestion?
14 years ago
GWT