what does java.lang.NoClassDefFoundError: javax/persistence/PersistenceException means?

381 views
Skip to first unread message

Sendipad

unread,
Dec 4, 2010, 4:11:28 PM12/4/10
to play-framework
Hi Guys again,

I have successfully create the first app , but when i do the run
command i always get these: where is the problem ?

Listening for transport dt_socket at address: 8000
04:57:46,890 INFO ~ Starting C:\Documents and Settings\admin\hello
Exception in thread "main" java.lang.NoClassDefFoundError: javax/
persistence/Per
sistenceException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown
Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at play.Play.loadPlugins(Play.java:566)
at play.Play.init(Play.java:268)
at play.server.Server.main(Server.java:131)
Caused by: java.lang.ClassNotFoundException:
javax.persistence.PersistenceExcept
ion
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more


and when try to visit http://ocalhost:9000/ i got this message.

C:\Documents and Settings\admin>

Access to the webpage was denied.

You are not authorized to access the webpage at http://localhost:9000/.
You may need to log in.

More information on this error.

here what i use :
Play! 1.1
JDK1.6.0_22

Hope u guys could help me with this problem i really liked Play!
framework .

Thanks

GrailsDeveloper

unread,
Dec 5, 2010, 4:11:21 AM12/5/10
to play-framework
Can you try it in a folder with has no spaces in the path? So C:\temp
\play-1.1 and C:\temp\hello?

Niels
> and when try to visithttp://ocalhost:9000/i got this message.
>
> C:\Documents and Settings\admin>
>
> Access to the webpage was denied.
>
> You are not authorized to access the webpage athttp://localhost:9000/.

Sendipad

unread,
Dec 5, 2010, 5:11:40 AM12/5/10
to play-framework
Thanks , I just tried what you suggest but i get the same error ,here
is what i did :

C:\play>play new myapp
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.1, http://www.playframework.org
~
~ The new application will be created in C:\play\myapp
~ What is the application name? [myapp] mayapp
~
~ OK, the application is created.
~ Start it with : play run myapp
~ Have fun!
~

C:\play>play run myapp
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.1, http://www.playframework.org
~
~ Ctrl+C to stop
~
Listening for transport dt_socket at address: 8000
18:01:24,750 INFO ~ Starting C:\play\myapp
Exception in thread "main" java.lang.NoClassDefFoundError: javax/
persistence/Per
sistenceException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown
Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at play.Play.loadPlugins(Play.java:566)
at play.Play.init(Play.java:268)
at play.server.Server.main(Server.java:131)
Caused by: java.lang.ClassNotFoundException:
javax.persistence.PersistenceExcept
ion
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more


C:\play>

Thanks again for your reply.

On Dec 5, 5:11 pm, GrailsDeveloper <opensourc...@googlemail.com>
wrote:
> > and when try to visithttp://ocalhost:9000/igot this message.
Reply all
Reply to author
Forward
0 new messages