Currently, when I run mvn test on the perscala subproject, I get this: mvn test [17:12] [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building perscala [INFO] task-segment: [test] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Nothing to compile - all classes are up to date [INFO] [scala:compile {execution: default}] [INFO] suggestion: remove the scalaVersion from pom.xml [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Nothing to compile - all classes are up to date [INFO] [scala:testCompile {execution: default}] [INFO] suggestion: remove the scalaVersion from pom.xml [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test] [INFO] Surefire report directory: /private/var/www/JPADemo/perscala/target/surefire-reports
------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.foo.jpaweb.model.TestJPAWeb Sep 4, 2008 8:22:15 PM org.hibernate.cfg.annotations.Version <clinit> INFO: Hibernate Annotations 3.3.0.GA Sep 4, 2008 8:22:15 PM org.hibernate.cfg.Environment <clinit> INFO: Hibernate 3.2.4 Sep 4, 2008 8:22:15 PM org.hibernate.cfg.Environment <clinit> INFO: hibernate.properties not found Sep 4, 2008 8:22:15 PM org.hibernate.cfg.Environment buildBytecodeProvider INFO: Bytecode provider name : cglib Sep 4, 2008 8:22:15 PM org.hibernate.cfg.Environment <clinit> INFO: using JDK 1.4 java.sql.Timestamp handling Sep 4, 2008 8:22:15 PM org.hibernate.ejb.Version <clinit> INFO: Hibernate EntityManager 3.3.1.GA Sep 4, 2008 8:22:16 PM org.hibernate.cfg.AnnotationBinder bindClass INFO: Binding entity from annotated class: com.foo.jpaweb.model.Book Sep 4, 2008 8:22:16 PM org.hibernate.cfg.annotations.QueryBinder bindQuery INFO: Binding Named query: findBooksByAuthor => from Book b where b.author.id = :id order by b.title Sep 4, 2008 8:22:16 PM org.hibernate.cfg.annotations.QueryBinder bindQuery INFO: Binding Named query: findBooksByDate => from Book b where b.published between :startDate and :endDate Sep 4, 2008 8:22:16 PM org.hibernate.cfg.annotations.QueryBinder bindQuery INFO: Binding Named query: findBooksByTitle => from Book b where lower(b.title) like :title order by b.title Sep 4, 2008 8:22:16 PM org.hibernate.cfg.annotations.QueryBinder bindQuery INFO: Binding Named query: findAllBooks => from Book b order by b.title Sep 4, 2008 8:22:16 PM org.hibernate.cfg.annotations.EntityBinder bindTable INFO: Bind entity com.foo.jpaweb.model.Book on table Book Sep 4, 2008 8:22:16 PM org.hibernate.cfg.AnnotationBinder bindClass INFO: Binding entity from annotated class: com.foo.jpaweb.model.Author Sep 4, 2008 8:22:16 PM org.hibernate.cfg.annotations.QueryBinder bindQuery INFO: Binding Named query: findAllAuthors => from Author a order by a.name Sep 4, 2008 8:22:16 PM org.hibernate.cfg.annotations.EntityBinder bindTable INFO: Bind entity com.foo.jpaweb.model.Author on table Author Sep 4, 2008 8:22:16 PM org.hibernate.cfg.annotations.CollectionBinder bindOneToManySecondPass INFO: Mapping collection: com.foo.jpaweb.model.Author.books -> Book Sep 4, 2008 8:22:16 PM org.hibernate.validator.Version <clinit> INFO: Hibernate Validator 3.0.0.GA Sep 4, 2008 8:22:16 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: Using Hibernate built-in connection pool (not for production use!) Sep 4, 2008 8:22:16 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: Hibernate connection pool size: 20 Sep 4, 2008 8:22:16 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: autocommit mode: true Sep 4, 2008 8:22:16 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:file:jpaweb Sep 4, 2008 8:22:16 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: connection properties: {user=sa, password=****, autocommit=true, release_mode=auto} Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: RDBMS: HSQL Database Engine, version: 1.8.0 Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC driver: HSQL Database Engine Driver, version: 1.8.0 Sep 4, 2008 8:22:16 PM org.hibernate.dialect.Dialect <init> INFO: Using dialect: org.hibernate.dialect.HSQLDialect Sep 4, 2008 8:22:16 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory INFO: Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory Sep 4, 2008 8:22:16 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Automatic flush during beforeCompletion(): disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Automatic session close at end of transaction: disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC batch size: 15 Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC batch updates for versioned data: disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Scrollable result sets: enabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC3 getGeneratedKeys(): disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Connection release mode: auto Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Maximum outer join fetch depth: 3 Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Default batch fetch size: 1 Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Generate SQL with comments: disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Order SQL updates by primary key: disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Order SQL inserts for batching: disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory Sep 4, 2008 8:22:16 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init> INFO: Using ASTQueryTranslatorFactory Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Query language substitutions: {} Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JPA-QL strict compliance: enabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Second-level cache: enabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Query cache: disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory createCacheProvider INFO: Cache provider: org.hibernate.cache.NoCacheProvider Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Optimize cache for minimal puts: disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Structured second-level cache entries: disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Echoing all SQL to stdout Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Statistics: disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Deleted entity synthetic identifier rollback: disabled Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Default entity-mode: pojo Sep 4, 2008 8:22:16 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Named query checking : enabled Sep 4, 2008 8:22:16 PM org.hibernate.impl.SessionFactoryImpl <init> INFO: building session factory Sep 4, 2008 8:22:17 PM org.hibernate.impl.SessionFactoryObjectFactory addInstance INFO: Not binding factory to JNDI, no JNDI name configured Sep 4, 2008 8:22:17 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: Running hbm2ddl schema update Sep 4, 2008 8:22:17 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: fetching database metadata Sep 4, 2008 8:22:17 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: updating schema Sep 4, 2008 8:22:17 PM org.hibernate.tool.hbm2ddl.DatabaseMetadata getTableMetadata INFO: table not found: Author Sep 4, 2008 8:22:17 PM org.hibernate.tool.hbm2ddl.DatabaseMetadata getTableMetadata INFO: table not found: Book Sep 4, 2008 8:22:17 PM org.hibernate.tool.hbm2ddl.DatabaseMetadata getTableMetadata INFO: table not found: Author Sep 4, 2008 8:22:17 PM org.hibernate.tool.hbm2ddl.DatabaseMetadata getTableMetadata INFO: table not found: Book Sep 4, 2008 8:22:17 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: schema update complete Sep 4, 2008 8:22:17 PM org.hibernate.impl.SessionFactoryImpl close INFO: closing Sep 4, 2008 8:22:17 PM org.hibernate.connection.DriverManagerConnectionProvider close INFO: cleaning up connection pool: jdbc:hsqldb:file:jpaweb Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.095 sec <<< FAILURE! Results : Tests in error: save_stuff(com.foo.jpaweb.model.TestJPAWeb) Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. Please refer to /private/var/www/JPADemo/perscala/target/surefire-reports for the individual test results. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7 seconds [INFO] Finished at: Thu Sep 04 20:22:17 PDT 2008 [INFO] Final Memory: 9M/17M [INFO] ------------------------------------------------------------------------ This was after making the following change to perscala/pom.xml suggested by Derek: <dependency> <groupId>javax.persistence</groupId> <artifactId>ejb</artifactId> <version>3.0</version> </dependency> to <dependency> <groupId>javax.persistence</groupId> <artifactId>persistence-api</artifactId> <version>1.0</version> </dependency> Here is what is in my perscala/src/main/resources folder. The same jars are in the webapp/src/main/resources folder. ejb3-persistence.jar hibernate-testing.jar* jta.jar slf4j-jcl-1.5.2.jar antlr-2.7.6.jar hibernate-annotations.jar hibernate3.jar* lift_chef.properties commons-collections-3.1.jar hibernate-commons-annotations.jar javassist-3.4.GA.jar slf4j-api-1.4.2.jar dom4j-1.6.1.jar hibernate-core.jar javassist.jar slf4j-api-1.5.2.jar dom4j.jar hibernate-entitymanager.jar jta-1.1.jar slf4j-api.jar Obviously, I don't need all of these, but I haven't figured out which ones go where yet. The remaining code is identical to what Derek just posted. Any ideas? Chas. Derek Chen-Becker wrote: > I agree with keeping the discussions on-list. I've actually been asking > the relevant questions on-list, just not in the thread of the final JPA > demo project. I didn't intend to be seen as hiding it, I just didn't > want to post up code and a tutorial that were based on a SNAPSHOT > version. In hindsight maybe that wasn't appropriate and I apologize if > that came off negatively; I really enjoy being part of such a vibrant > project/community and I'm hoping this work helps others using JPA get > their feet wet with Lift :) > > Cheers, > > Derek > > On Fri, Sep 5, 2008 at 7:41 AM, David Pollak > <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > wrote: > > Derek, > > Thanks for posting up the code. > > In general, I like to keep conversations on-list. People learn a > lot by seeing back and forth communications rather than simply the > magic result. Additionally, there are a number of folks who have > different skills and different perspectives and allowing them to be > part of the conversation is very important as well... as they will > contribute to the over-all result. > > To put this in perspective, I have very, very few off-list > communications (and they are mainly in the form of IMs related to > small, timely decisions) with the other committers about what we > commit to Lift. We intensionally keep our communications visible. > > Thanks, > > David > > > On Fri, Sep 5, 2008 at 6:01 AM, Derek Chen-Becker > <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: > > I think Chas didn't post up the code because I had said I wanted > to wait to release this until the kinks were worked out, not > because he's obstructionist :). I've attached the current form > of the tutorial project. The code in question is > JPADemo/perscala/src/main/scala/com/jpaweb/foo/model/Author.scala. > Chas is helping me work out the kinks and I'm waiting for 0.10 > to go GA before we update the actual tutorial page on the wiki > to match. Right now it's mostly down to some maven issues, which > I'd appreciate any help on: > > 1. The webapp module is dependent on the perscala module. As > the project is currently layed out, you need to run "mvn > install" in the perscala project before you can go into > the webapp project and run "mvn jetty:run". I was hoping > there would be a way for the webapp module to trigger the > "mvn install" when you try to run things (test, jetty:run, > etc), but I'm no maven guru > 2. I had some problems with my dependencies that meant you > had to manually install some jars. I'm hoping to get it > down to completely automatic on the dependency updates. > > Cheers > > Derek > > > On Fri, Sep 5, 2008 at 5:26 AM, Tim Perrett > <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: > > > Chas, > > It would be usefull if you just posted the entity code - if > it's from > the tutorial, or a varient of that, I don't see why your not > giving > others their chance to contribute? Just post up the code... > There are > a lot of talented people on this list who I'm sure can a) > help improve > the implementation, and b) would be very interested to see > scala JPA. > > Cheers > > Tim > > Sent from my iPhone > > On 5 Sep 2008, at 10:20, "Charles F. Munat" <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > > > I think Derek has a new version of the tutorial. I've been > > communicating > > with him about it, and am trying to get his Scala-only > version > > working. > > I'll check with him to make sure my suspicions are > correct. Then one > > of > > us will update the tutorial. > > > > I was planning to revise the tutorial myself, but since > he has a > > revised > > one pretty much ready to go (I think), I'm just trying to > help him to > > debug it. > > > > Either way, it will be fixed shortly. > > > > Chas. > > > > Viktor Klang wrote: > >> Sorry Chas, > >> > >> I think I expressed myself somewhat unfortunate, > >> what I meant was: "Can you paste in the code for the > Author-class"? > >> > >> > >> Cheers, > >> Viktor > >> > >> On Thu, Sep 4, 2008 at 10:18 PM, Charles F. Munat > <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > >> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > >> > >> > >> Oh, sorry, Victor. I think I posted a response to my own > >> question almost > >> immediately after I posted it. I was aiming this > question at > >> anyone who > >> had used the JPA tutorial because I figured that the > problem was > >> in the > >> difference between using POJOs and POSOs (hence, I > assumed they > >> would > >> have not just the Author model, but the entire sample > app, > >> available). I > >> should have tried a few things before posting. As it > turned out, > >> using > >> author.name <http://author.name> <http://author.name> > worked fine. > >> > >> Thanks for the help. > >> > >> Chas. > >> > >> Viktor Klang wrote: > >>> Chas, > >>> > >>> You'll have to give us more than that, i.e. the > definition of > >>> Author. > >>> > >>> Cheers, > >>> Viktor > >>> > >>> On Wed, Sep 3, 2008 at 4:29 AM, Charles F. Munat > <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > >> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > >>> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>> wrote: > >>> > >>> > >>> Has anyone followed the JPA tutorial using pure > Scala instead > >> of Java? > >>> I've got it very close to running, but I am getting the > >> following error: > >>> > >>> [WARNING] > >>> > >> > /private/var/www/wsbg/webapp/src/main/scala/com/foo/jpaweb/ > >> snippet/AuthorOps.scala:22: > >>> error: value getName is not a member of > >> com.foo.jpaweb.model.Author > >>> [WARNING] "name" --> Text(author.getName()), > >>> [WARNING] ^ > >>> [WARNING] one error found > >>> > >>> I'm neither a Scala nor a Java programmer, but I'm > guessing > >> that the > >>> getter for the name attribute in Scala is not > "getName". Is this > >>> correct? > >>> > >>> Chas. > >>> > >>> > >>> > >>> > >>> > >>> -- > >>> Viktor Klang > >>> Rogue Software Architect > >>> > >>>> > >> > >> > >> > >> > >> > >> -- > >> Viktor Klang > >> Rogue Software Architect > >> > >>> > > > > > > > > > > > > > > > > -- > Lift, the simply functional web framework http://liftweb.net > Collaborative Task Management http://much4.us > Follow me: http://twitter.com/dpp > Git some: http://github.com/dpp > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---