vputnik
Posts: 4
Joined: Tue Apr 16, 2013 4:56 am

Java Spring + Hibernate + MySQL + Embedded Jetty Webserver

Thu Apr 18, 2013 6:56 am

I've got a Projekt:

Developing a Web Application with Java Spring MVC including MySQL Database and Hibernate+JPA Support.
I've got one of the "new" PI's with the Hynix Chip and Model B. Now i tried to get the soft-float Img running, but the system does not boot. I've read some articles about this topic and that the Img isn't supported by the "new" PI's ? Is it true?

Is there another possibilty to get a JVM running on the PI e.g. on the raspbian Image?

My Workaround is:
1. Developing the Application with Ecplise on a Windows Workstation
2. Exporting the Project in a jar or war
3. Copying it via WinSCP to the PI
4. Running the APP (e.g. java -jar example.jar)

Thankssss

vputnik
Posts: 4
Joined: Tue Apr 16, 2013 4:56 am

Re: Java Spring + Hibernate + MySQL + Embedded Jetty Webserv

Thu Apr 18, 2013 8:42 am

I've found a solution:

Downloading both images "wheezy raspbian 02.09.2013" and "soft-float wheezy armel 08.08.2012"

then you'll have to flash each image to a seperate SD Card.
after it you copy all view-able files under Windows from the raspbian card to the armel card.
now you should be able to boot the system.
for deploying java support on the system this guide helps me:
http://www.savagehomeautomation.com/pi-jdk

now i'll have to check the java funcionality e.g. "helloWorld.Example"
maybe someone is also testing such a project and can give me some tipps?

greetz

User avatar
crackers
Posts: 55
Joined: Fri Dec 28, 2012 7:45 am

Re: Java Spring + Hibernate + MySQL + Embedded Jetty Webserv

Fri Apr 19, 2013 5:01 am

I've been using Java 8 on hard-float ever since it was announced. I've been running Jetty, and now Felix, (both with Berkeley DB) 24/7 since about a week after that.

That certainly didn't require the interesting gyrations you just went through... ;)

vputnik
Posts: 4
Joined: Tue Apr 16, 2013 4:56 am

Re: Java Spring + Hibernate + MySQL + Embedded Jetty Webserv

Tue Apr 23, 2013 8:53 am

I've finaly installed the JVM on the RPI and deployed a jar file with maven under ecplise. the jar includes an embedded jetty server and some simple jsp pages.
now i've included a sqLite DB to the project...i am going to store some classes via JPA Hibernate to the database.
i am able to create an object e.g. "room" of a class and save it to the smarthome.db. the output is shown on system.out. so now i am going to include such "objects" in de jsp usage.
some facts are transaction manager and session manager. how can i include such "beans" under spring mvc ?!
any ideas?

greetz

User avatar
crackers
Posts: 55
Joined: Fri Dec 28, 2012 7:45 am

Re: Java Spring + Hibernate + MySQL + Embedded Jetty Webserv

Wed Apr 24, 2013 4:16 am

Not to be rude, but all of your answers are in here and via Google:

http://static.springsource.org/spring/d ... ence/html/

I've really found their documentation to be quite good for quite some time.

bullen
Posts: 283
Joined: Sun Apr 28, 2013 2:52 pm

Re: Java Spring + Hibernate + MySQL + Embedded Jetty Webserv

Sun Apr 28, 2013 2:55 pm

If you wan't a more lightweight alternative: http://rupy.googlecode.com
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

Return to “Java”