Hi,
I've started to experiment with a Lift project that uses JPA for
persistence. While it works just fine in the web application run with
mvn jetty:run, I cannot use the model classes from the LiftConsole
(mvn scala:console -DmainConsole=LiftConsole). When I try for example

Model.find(classOf[Article], 1)

I get the following error:

java.lang.ClassNotFoundException: javax.transaction.SystemException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
        at java.lang.Clas...

Model is the EntityManager that I created accorting to chapter 10 from
the Lift book. Article is an entity class and 1 is an id that exists
in the database.

I'm using lift version 1.1-M7 and the following persistence.xml

<persistence>
   <persistence-unit name="jpa-dossier" transaction-type="RESOURCE_LOCAL">
      <properties>
         <property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLDialect"/>
         <property name="hibernate.connection.driver_class"
value="com.mysql.jdbc.Driver"/>
         <property name="hibernate.connection.url"
value="jdbc:mysql://localhost/dossier"/>
         <property name="hibernate.max_fetch_depth" value="3"/>
         <property name="hibernate.show_sql" value="true" />
         <property name="hibernate.hbm2ddl.auto" value="update" /><property
                name="hibernate.connection.username" value="***">
</property>
        <property name="hibernate.connection.password" value="***"></property>
      </properties>
   </persistence-unit>
</persistence>

Is there something that I need to initialize to get this to work?

So long
Janico

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to