Open GoogleCodeExporter opened 9 years ago
Hi,
Based on the "Caused by:" lines in your stack trace it would appear that the
issue is related to JPA/Hibernate.
Are you new to JPA? If so take a look at this post ->
http://blog.m1key.me/2010/06/eclipse-jpa-with-hibernate-hsqldb-part_23.html and
try and get a simple test case up and running in you environment.
Also take a look at the persistence.xml file:
->
<!-- Database connection settings -->
<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
<property name="hibernate.connection.url" value="jdbc:hsqldb:file:/db/serendipitydb" />
<property name="hibernate.connection.username" value="sa" />
<property name="hibernate.connection.password" value="" />
->
Do you have write permissions to "/db"?
Cheers
Rob
Original comment by rob.ferg...@gtempaccount.com
on 5 Jul 2011 at 8:39
Hi,
Thanks for the link and it helps me a lot about jpa, hibernate and hsqldb. I
was able to set up a hsql db server and to access a hsql db - serendipitydb
through eclipse (ping successful).
However, I still could not pass the JUnit test for
au.com.uptick.serendipity.server.AccountTestCase (Run as -> Junit Test in
Eclipse). Each time the same exceptions above occurred.
I have tried a number of db connection settings as follows:
<!-- Database connection settings -->
<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
<property name="hibernate.connection.url" value="jdbc:hsqldb:file:/path/db/serendipitydb" />
<property name="hibernate.connection.username" value="sa" />
<property name="hibernate.connection.password" value="" />
or
<!-- Database connection settings -->
<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
<property name="hibernate.connection.url" value="jdbc:hsqldb:hsql://localhost/serendipitydb" />
<property name="hibernate.connection.username" value="sa" />
<property name="hibernate.connection.password" value="" />
Am I missing anything?
Thanks,
-Guoqian
Original comment by jiang.gu...@gmail.com
on 6 Jul 2011 at 4:35
Hi,
The entries look fine.
You might try moving the HSLQDB jar into your webs server's lib directory.
Cheers
Rob
Original comment by rob.ferg...@gtempaccount.com
on 8 Jul 2011 at 2:30
As far as I can tell, this is because you are using GWT 2.3. I had the same
issue and, even though I changed the project's GWT SDK from 2.3 to 2.2, the
exception still occurred. It wasn't until I manually removed
validation-api-1.0.0.GA.jar from the buildpath (which is part of GWT 2.3 and
not GWT 2.2) that the problem was fixed.
I actually removed Google Web Toolkit from the Eclipse project first
(Properties -> Google -> Web Toolkit - unchecked the "Use Google Web Toolkit"
box). Afterwards, I removed validation-api-1.0.0.GA.jar,
validation-api-1.0.0.GA-sources.jar, gwt-dev.jar and gwt-user.jar (which for
some reason stayed on the buildpath) and added Google Web Toolkit (GWT 2.2)
again.
Original comment by dev.kyle...@gmail.com
on 26 Jul 2011 at 6:47
Hi,
Very good point. GWTP 5.1 doesn't support GWT 2.3.
You have to be very careful when trying to mix and match components and
versions.
That's why I have the statement (in bold) on the CRMdipity Project Home Page
(http://code.google.com/p/crmdipity/):
->
New: Serendipty version 0.6.0 - includes support for Login security, CSV file
import/export and visualisations (GWT 2.2.0, GWTP 0.5.1 and smartGWT 2.4).
->
The next release of Serendipity will include support for Maven.
Cheers
Rob
Original comment by rob.ferg...@uptick.com.au
on 26 Jul 2011 at 10:25
I did exactly as the op except that I use GWT 2.2.0. The test case passes
without an error.
However when I click the "sign in" button in dev mode, the UI does not respond,
and I get error messages in the Console (see attachment). By debugging I found
that the error is thrown from the following line in LoginHander.excute() :
try {
User user = userDao.retrieveUser(action.getLogin());
If I input an invalid password, a popup dialog tells me it's a wrong password.
Original comment by warren.c...@gmail.com
on 2 Aug 2011 at 1:07
Attachments:
The log and script files for HSQLDB are also attached.
Original comment by warren.c...@gmail.com
on 2 Aug 2011 at 2:09
Attachments:
The problem is that I need to comment out the following line in persistence.xml
after the test case has been finished and before I run the project in dev mode:
<property name="hibernate.hbm2ddl.auto" value="create" />
Another thing to notice is that I set the connection url in absolute path,
otherwise it is relative to the root of the drive where JVM is starting from:
<property name="hibernate.connection.url"
value="jdbc:hsqldb:file:d:/temp/db/serendipitydb" />
Original comment by warren.c...@gmail.com
on 3 Aug 2011 at 3:03
Original issue reported on code.google.com by
jiang.gu...@gmail.com
on 5 Jul 2011 at 11:55