Giter VIP home page Giter VIP logo

petclinic-javaee7's Introduction

Java EE 7 Petclinic

JSF with Java EE 7 Version of Spring Petclinic

Running on OpenShift: http://javaee7petclinic-port80guru.rhcloud.com/

Blog: http://thomas-woehlke.blogspot.de/2014/02/java-ee-7-petclinic.html

install JBoss Wildfly

install JBoss Wildfly 8.2.1.Final from http://wildfly.org/downloads/ to e.g. /Users/tw/srv/wildfly-8.2.1.Final/

start JBoss by: cd /Users/tw/srv/wildfly-8.2.1.Final/bin ; ./standalone.sh

install Glassfish 4

I installed Netbeans 8.0.2 with Glassfish 4.1 from https://netbeans.org/downloads/

starting on Mac OSX:

cd /Applications/NetBeans/glassfish-4.1/bin/

sudo ./asadmin start-database

sudo ./asadmin start-domain

For Starting the JavaDB Database with jdk1.7.0_51 refer to: http://thomas-woehlke.blogspot.de/2014/01/start-glassfish4-javadb-running-jdk17051.html

Functional Tests with Selenium2 Webdriver, Arquillian Drone and Graphene

Samples are tested on Wildfly and GlassFish using the Arquillian ecosystem.

Only one profile can be active at a given time otherwise there will be dependency conflicts.

  • mvn clean install -Pwildfly-managed This profile will install a Wildfly server and start up the server. Useful for CI servers.

  • mvn clean install -Pwildfly-remote This profile requires you to start up a Wildfly server outside of the build. Useful for development to avoid the server start up cost per sample.

  • mvn clean install -Pglassfish-remote This profile requires you to start up a GlassFish 4 server outside of the build. Each sample will then reuse this instance to run the tests. Useful for development to avoid the server start up cost per test.

  • mvn clean install -Pglassfish-managed This profile will install a Glassfish 4 server and start up the server. Useful for development, but has the downside of server startup per Test. You have to start a JavaDB (Derby) Server outside of the build before running the Test.

When developing and runing them from IDE, remember to activate the profile before running the test.

To learn more about Arquillian please refer to the Arquillian Guides

build and run

git clone https://github.com/phasenraum2010/javaee7-petclinic.git

build project with: mvn clean install wildfly:deploy

open url in browser: http://localhost:8080/javaee7-petclinic-1.3-SNAPSHOT/

openshift

The OpenShift jbossas cartridge documentation can be found at:

https://github.com/openshift/origin-server/tree/master/cartridges/openshift-origin-cartridge-jbossas/README.md

Software Design

Domain Class Modell

Figure Domain Class Modell

Use Cases

Figure Uses Cases Vet Figure Uses Cases Owner

Page Flow

Figure Pageflow

Screens

Add Vet with ManyToMany Relation to Specialty

Figure Add Vet with ManyToMany Relation to Specialty

New Visit

Figure New Visit

Owner

Figure Owner

First Steps to use

  • add some PetTypes like dog,cat,mouse,...
  • add some Specialties for Vetinarians like dentist, anesthetist, radiology,...
  • add a Vetinarian
  • add an Owner, add him am a Pet and his Pet a visit.

visit Spring Petclinic

petclinic-javaee7's People

Contributors

antoinesd avatar dependabot[bot] avatar phasenraum2010 avatar thomaswoehlke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

petclinic-javaee7's Issues

UTF-16?

User Input in UTF-16 should also be stored and displayed. e.g. japanese.

Exception in RichFaces and Google guava-libraries

08:30:19,097 ERROR [io.undertow.request](default task-14) UT005023: Exception handling request to /javaee7-petclinic-1.3-SNAPSHOT/org.richfaces.resources/rfRes/inputBackgroundImage.png: java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V
at org.richfaces.resource.Java2DUserResourceWrapperImpl.getInputStream(Java2DUserResourceWrapperImpl.java:73) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
at org.richfaces.resource.CachedResourceImpl.initialize(CachedResourceImpl.java:176) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:173) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
at org.richfaces.servlet.ResourceServlet.httpService(ResourceServlet.java:101) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
at org.richfaces.servlet.ResourceServlet.service(ResourceServlet.java:95) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]

Build fails due to a maven resolution error

Building with a default maven config with mvn clean install -Pwildfly-remote will lead to the following error:

The following artifacts could not be resolved: org.richfaces:richfaces-page-fragments:jar:5.0.0.Alpha3, org.slf4j:slf4j-api:jar:1.7.2.jbossorg-1, xalan:xalan:jar:2.7.1.jbossorg-1, xerces:xercesImpl:jar:2.9.1-jbossas-2: Could not find artifact org.richfaces:richfaces-page-fragments:jar:5.0.0.Alpha3 in central

Build should include extra maven repository (JBoss repo probably)

Test04Owner results in Error on Glassfish

testAddVisitToFirstPet(org.woehlke.javaee7.petclinic.web.Test04Owner): Unable to locate element: {"method":"id","selector":"showOwnerForm:petsAndVisitsTable:0:visitsTable:0:date"}
both: -Pglassfish-managed and -Pglassfish-remote

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.