hakandilek / play2-crud

Simple CRUD & DAO implementation for play2
Other
142 stars 52 forks source link

Play run/eclipse not working #23

Closed anil1712 closed 10 years ago

anil1712 commented 10 years ago

Not able to run your app, its throwing error while compiling. I am typing below command. C:\play-2.2.0\play2-crud-master\project-code>play run

hakandilek commented 10 years ago

Can you please attach the error message as well?

anil1712 commented 10 years ago

Hey now its working... I think the problem was in my firewall, It was blocking to download some required repo. but I am still facing problem my browser says "No router defined." Please find the snap also. snap

hakandilek commented 10 years ago

On which sample project are you trying?

anil1712 commented 10 years ago

I am not using any sample project. I am using following steps. Please let me know if I am doing something wrong.

STEP:

  1. Downloaded and extracted your repo.
  2. Paste the "play2-crud-master" directory inside our "play2.2.0" directory
  3. Now using "play run" command and opening the browser. eg. C:\play-2.2.0\play2-crud-master\project-code>play run
hakandilek commented 10 years ago

Oh, well you're trying to run the main library which has no default controller routes defined. You should try running one of the sample projects: https://github.com/hakandilek/play2-crud#samples

But before that, don't forget to make a local publish, as I've not published the latest versiton to the maven-repo yet:

play2-crud-master\project-code>play publish-local
anil1712 commented 10 years ago

Now its throwing exception in my console

C:\play-2.2.0\play2-crud-master\project-code>play publish-local [info] Loading project definition from C:\play-2.2.0\play2-crud-master\project-c ode\project

This project uses Play 2.1.1! Update the Play sbt-plugin version to 2.2.0 (usually in project/plugins.sbt)

[info] Set current project to play2-crud (in build file:/C:/play-2.2.0/play2-cru d-master/project-code/) [info] Packaging C:\play-2.2.0\play2-crud-master\project-code\target\scala-2.10\ play2-crud_2.10-0.7.0-SNAPSHOT-sources.jar ... [info] Done packaging. [info] Wrote C:\play-2.2.0\play2-crud-master\project-code\target\scala-2.10\play 2-crud_2.10-0.7.0-SNAPSHOT.pom [info] Updating {file:/C:/play-2.2.0/play2-crud-master/project-code/}play2-crud. .. [info] Resolving org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Fin

[info] Done updating. [info] :: delivering :: play2-crud#play2-crud_2.10;0.7.0-SNAPSHOT :: 0.7.0-SNAPS HOT :: integration :: Tue Oct 08 14:20:52 IST 2013 [info] delivering ivy file to C:\play-2.2.0\play2-crud-master\project-code\targ et\scala-2.10\ivy-0.7.0-SNAPSHOT.xml [info] Compiling 7 Scala sources and 49 Java sources to C:\play-2.2.0\play2-crud -master\project-code\target\scala-2.10\classes... [info] Packaging C:\play-2.2.0\play2-crud-master\project-code\target\scala-2.10\ play2-crud_2.10-0.7.0-SNAPSHOT.jar ... [info] Done packaging. [info] published play2-crud_2.10 to C:\play-2.2.0\repository\local\play2-crud\p lay2-crud_2.10\0.7.0-SNAPSHOT\poms\play2-crud_2.10.pom [info] published play2-crud_2.10 to C:\play-2.2.0\repository\local\play2-crud\p lay2-crud_2.10\0.7.0-SNAPSHOT\jars\play2-crud_2.10.jar [info] published play2-crud_2.10 to C:\play-2.2.0\repository\local\play2-crud\p lay2-crud_2.10\0.7.0-SNAPSHOT\srcs\play2-crud_2.10-sources.jar [info] published ivy to C:\play-2.2.0\repository\local\play2-crud\play2-crud_2. 10\0.7.0-SNAPSHOT\ivys\ivy.xml [success] Total time: 33 s, completed Oct 8, 2013 2:21:19 PM

C:\play-2.2.0\play2-crud-master\project-code>play run [info] Loading project definition from C:\play-2.2.0\play2-crud-master\project-c ode\project

This project uses Play 2.1.1! Update the Play sbt-plugin version to 2.2.0 (usually in project/plugins.sbt)

[info] Set current project to play2-crud (in build file:/C:/play-2.2.0/play2-cru d-master/project-code/)

--- (Running the application from SBT, auto-reloading is enabled) ---

[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Ctrl+D to stop and go back to the console...)

[info] play - Application started (Dev)

C:\play-2.2.0\play2-crud-master\project-code>cd..

C:\play-2.2.0\play2-crud-master>cd samples

C:\play-2.2.0\play2-crud-master\samples>cd play2-crud-sample

C:\play-2.2.0\play2-crud-master\samples\play2-crud-sample>play run [info] Loading project definition from C:\play-2.2.0\play2-crud-master\samples\p lay2-crud-sample\project

This project uses Play 2.1.1! Update the Play sbt-plugin version to 2.2.0 (usually in project/plugins.sbt)

[info] Set current project to play2-crud-sample (in build file:/C:/play-2.2.0/pl ay2-crud-master/samples/play2-crud-sample/)

[info] Updating {file:/C:/play-2.2.0/play2-crud-master/samples/play2-crud-sample /}play2-crud-sample... [info] Resolving org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Fin

[info] downloading http://repo1.maven.org/maven2/org/mockito/mockito-core/1.9.5/ mockito-core-1.9.5.jar ... [info] [SUCCESSFUL ] org.mockito#mockito-core;1.9.5!mockito-core.jar (36506ms) [info] downloading http://repo1.maven.org/maven2/org/objenesis/objenesis/1.0/obj enesis-1.0.jar ... [info] [SUCCESSFUL ] org.objenesis#objenesis;1.0!objenesis.jar (1503ms) [info] Done updating. --- (Running the application from SBT, auto-reloading is enabled) ---

[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Ctrl+D to stop and go back to the console...)

[info] Compiling 9 Scala sources and 8 Java sources to C:\play-2.2.0\play2-crud- master\samples\play2-crud-sample\target\scala-2.10\classes... [warn] there were 4 feature warnings; re-run with -feature for details [warn] one warning found [info] play - database [default] connected at jdbc:h2:db/development [error] application -

! @6fp518d6e - Internal server error, for (GET) [/] ->

play.api.PlayException: Not initialized[?] at play.core.ReloadableApplication.(ApplicationProvider.scala:92) ~[play_2.10-2.1.1.jar:2.1.1] at play.core.server.NettyServer$$anonfun$mainDev$1.apply(NettyServer.sca la:271) ~[play_2.10-2.1.1.jar:2.1.1] at play.core.server.NettyServer$$anonfun$mainDev$1.apply(NettyServer.sca la:270) ~[play_2.10-2.1.1.jar:2.1.1] at play.utils.Threads$.withContextClassLoader(Threads.scala:18) ~[play_2 .10-2.1.1.jar:2.1.1] at play.core.server.NettyServer$.mainDev(NettyServer.scala:269) ~[play_2 .10-2.1.1.jar:2.1.1] at play.core.server.NettyServer.mainDev(NettyServer.scala) ~[play_2.10-2 .1.1.jar:2.1.1]

hakandilek commented 10 years ago

Well, this might be an incompatibility with play 2.2.0. I'm still on 2.1.0. I'll try it and let you know.

hakandilek commented 10 years ago

Play 2.2 is not fully supported yet. Issue #24 will cover play2.2 upgrade. I'm closing this one.