0

I developed a gwt application and I used Hibernate as database and it works very well.

Now when I put the application on my phone (format .apk) and I change ip address of my database (mysql) in hibernate file configuration, it gives me an error (ALERT Error).

    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:mysql://192.168.1.218/MyProject_hibernate</property>
    <property name="hibernate.connection.username">ns</property>
    <property name="hibernate.connection.password">ns</property>

enter image description here

I don't know if this approach is logical or not know (to change only the IP address), if you have any idea please share it with us.

Thank you in advance

Cyril
  • 11
  • 5
  • I you could include the error's stack trace and/or logging that would be useful – geert3 Apr 29 '16 at 08:54
  • Also it is very weird to put such applications as an app on a phone. Typically (no, always) you put GWT web applications on a server like tomcat, and access them using a web browser. You don't need to "install" anything on your phone for that. But maybe I misunderstood your question. – geert3 Apr 29 '16 at 08:57
  • I must respect the specifications, it's for this reason that I can not host the application on a server like tomecat. In my desktop application, There are no problem, it works very well. and when I put the application in my phone in apk format I receive an error at the beginning (a window with an error alert title), so I can not see the log – Cyril Apr 29 '16 at 09:38
  • So you will be installing a web application including hibernate and a servlet container on a smartphone? Good luck with that. Better talk to the guy who made the specs, and ask if you understood him correctly. – geert3 Apr 29 '16 at 10:12
  • Do you think it's possible to do it?! – Cyril Apr 29 '16 at 11:24
  • Because the mysql database will be in the computer (server), and in this case we may consider mobile as a Client. Then we will not need to including hibernate on mobile – Cyril Apr 29 '16 at 11:33
  • no not possible at all, sorry... You can write software and put it in an .apk but not GWT+hibernate – geert3 Apr 29 '16 at 11:46
  • It is "possible" to use GWT and Hibernate on a phone. This question addressses running GWT on an Android: http://stackoverflow.com/questions/5932127/can-i-develop-android-applications-using-gwt And t his question discusses Hibernate on Android: http://stackoverflow.com/questions/4257374/is-hibernate-an-overkill-for-an-android-application However, there are better tools than GWT and Hibernate for mobile platforms. GWT and Hibernate are not optimized at all for mobile and you will have a very difficult time getting them to work and will likely suffer performance issues. – Pace Apr 29 '16 at 11:52

0 Answers0