You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Thomas Dudziak <to...@first.gmd.de> on 2004/01/07 21:03:30 UTC

Update to Antlr 2.7.2 + Unicode

I tried the update and found some interesting things:

Using the version that were in CVS a couple of hours ago (before Thomas
updated to Antlr 2.7.2), I get 3 test failures and 2 errors from the odmg
tests (using Hsqldb and a clean target directory) - see attached file
test-odmg-original.xml

Regenerating the OQL parser (no changes to antlr or the grammar, only
deletion of the lexer/parser files and then invocation of the oql
target) produces 4 failures and 2 errors (same as before: Hsqldb and clean
target directory) - see test-odmg-recompile.xml. Now the test
testComplexOQL2 fails.

Changing the grammar to use unicode and regenerating it with antlr 2.7.2
also produces 4 failures and 2 errors (environment as before) - see
test-odmg-unicode.xml. Interestingly, now the test testMtoNSeparate_II
runs successful whereas testMtoNTogether fails.

I also get several other test failures/errors (I attached the test
results).

Tom


Re: Update to Antlr 2.7.2 + Unicode

Posted by Thomas Dudziak <to...@first.gmd.de>.
On Wed, 7 Jan 2004, Thomas Mahler wrote:

> Hi Tom!
> 
> Mhh, that's strange. I'm getting only 1 Failure and 2 errors in the ODMG 
> tests. ANd no one is releated to OQL as far as I can see.
> Did you also check out my updated generated Lexer and Parser classes?

Well I tested it before I saw that you updated the lexer/parser files. So
the first test results come from the original lexer/parser. The second
results are from regenerated lexer/parser files (no checkout either).
 
> there should be no need for you to run the oql target, as everything is 
> in cvs already?!

That was just for completion's sake, and I did not think that there is a
problem, but strangely there was one. The only thing that I changed is
that I exchanged the java-call with the antlr ant-task though it did use
the antlr libraries in the lib folder (it said antlr 2.7.1 and ant 1.6
does not include antlr anyway).

I would look into it, but I'm currently pretty busy with the XDoclet
module. If you wante me to, then I could have a look at the weekend.

Tom



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: Update to Antlr 2.7.2 + Unicode

Posted by Thomas Dudziak <to...@first.gmd.de>.
On Thu, 8 Jan 2004, Thomas Mahler wrote:

> Mhh, Maybe that's the explanation? antlr-1.7.2 must in the ojb lib 
> directory as it contains stuff needed at runtime by the generated parser!

Obviously antlr is present (and it can only be 2.7.2 as there no older or
newer version on my computer anywhere) as oql works (most of the time).

BTW, its Antlr 2.7.2 not 1.7.2 (that was Hsqldb ;-) You also mixed that up
in the release notes.

> C++? that sounds even more as serious fun as simple mounting of IKEA 
> furniture ;-)

A language for real programmers :-) But actually its fun because of the
work (graphics stuff). And with the right tools and libraries (wxWindows,
boost library, STL) its not so bad.

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: Update to Antlr 2.7.2 + Unicode

Posted by Thomas Mahler <th...@web.de>.
Hi again Tom,

Thomas Dudziak wrote:
> On Thu, 8 Jan 2004, Thomas Mahler wrote:
> 
> 
>>Hi again Tom,
>>
>>Today made a fresh checkout including your patch to oql.g and the Lexer.
>>I still get 1 Failure and two error. (see in attachment).
>>No OQL related problems as far as I can see.
>>
>>Maybe you still have the old ANTLR jars on your classpath? For ANTLR 
>>1.7.1 we needed 3 jars:
>>antlr.jar: the runtime stuff
>>antlr-compiletime.jar: needed to compile the parser
>>antlr-debug.jar: needed for the eclipse IDE for some strange reasons.
> 
> 
> No, antlr is not on the classpath (I only use antlr via ant) 

Mhh, Maybe that's the explanation? antlr-1.7.2 must in the ojb lib 
directory as it contains stuff needed at runtime by the generated parser!

> and 
> the replace took good care of the old antlr jars ... However, I just did a
> quick test here on my work computer (which is basically used for C++
> development 

C++? that sounds even more as serious fun as simple mounting of IKEA 
furniture ;-)

> hence not really setup'd for serious java development), and I
> got only 1 failure in the odmg tests, no errors (testStoreUpdate still
> fails). Can it be that the tests are somehow dependent on the environment
> ? 
I don't know of any dependencies...
> Or were there updates to the src (that passed my notice) which fixed the
> two errors ?

No, I simply replace the old three jars by the new one.

Does somebody else have similar problems with the new parser?

Thomas


> Tom
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: Update to Antlr 2.7.2 + Unicode

Posted by Thomas Dudziak <to...@first.gmd.de>.
On Thu, 8 Jan 2004, Thomas Mahler wrote:

> Hi again Tom,
> 
> Today made a fresh checkout including your patch to oql.g and the Lexer.
> I still get 1 Failure and two error. (see in attachment).
> No OQL related problems as far as I can see.
> 
> Maybe you still have the old ANTLR jars on your classpath? For ANTLR 
> 1.7.1 we needed 3 jars:
> antlr.jar: the runtime stuff
> antlr-compiletime.jar: needed to compile the parser
> antlr-debug.jar: needed for the eclipse IDE for some strange reasons.

No, antlr is not on the classpath (I only use antlr via ant) and 
the replace took good care of the old antlr jars ... However, I just did a
quick test here on my work computer (which is basically used for C++
development hence not really setup'd for serious java development), and I
got only 1 failure in the odmg tests, no errors (testStoreUpdate still
fails). Can it be that the tests are somehow dependent on the environment
? Or were there updates to the src (that passed my notice) which fixed the
two errors ?

Tom



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: Update to Antlr 2.7.2 + Unicode

Posted by Thomas Mahler <th...@web.de>.
Hi again Tom,

Today made a fresh checkout including your patch to oql.g and the Lexer.
I still get 1 Failure and two error. (see in attachment).
No OQL related problems as far as I can see.

Maybe you still have the old ANTLR jars on your classpath? For ANTLR 
1.7.1 we needed 3 jars:
antlr.jar: the runtime stuff
antlr-compiletime.jar: needed to compile the parser
antlr-debug.jar: needed for the eclipse IDE for some strange reasons.

cu,
Thomas

Thomas Dudziak wrote:
> I found it strange that some tests failed for me that did not fail for you
> (especially since I performed a complete update of my source sometime
> yesterday), so I compared the version that I tested first to the version
> that I then checked-out using "replace with latest from head". They did
> only differ in the changes that Armin checked in around 19:00
> (serialVersionId for some odmg and metadata classes) which are not
> relevant to the odmg tests as far as I can see. Pretty strange.
> 
> Anyway, I modified the grammar to unicode, and the tests run as before (3
> failures, 2 errors). I also did a quick test antlr 2.7.3rc1 (Ter wanted to
> have feedback on whether the rc1 has problems with grammars), and the
> generated lexer/parser are identical and the tests run as before.
> 
> Tom
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 

Re: Update to Antlr 2.7.2 + Unicode

Posted by Thomas Dudziak <to...@first.gmd.de>.
I found it strange that some tests failed for me that did not fail for you
(especially since I performed a complete update of my source sometime
yesterday), so I compared the version that I tested first to the version
that I then checked-out using "replace with latest from head". They did
only differ in the changes that Armin checked in around 19:00
(serialVersionId for some odmg and metadata classes) which are not
relevant to the odmg tests as far as I can see. Pretty strange.

Anyway, I modified the grammar to unicode, and the tests run as before (3
failures, 2 errors). I also did a quick test antlr 2.7.3rc1 (Ter wanted to
have feedback on whether the rc1 has problems with grammars), and the
generated lexer/parser are identical and the tests run as before.

Tom




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: Update to Antlr 2.7.2 + Unicode

Posted by Thomas Dudziak <to...@first.gmd.de>.
Did a "replace with latest from HEAD" and then rerun the tests, and the
failure in testComplexOQL2 vanished (so there probably was some old 
source lying around, sorry about that ;-). You did not change the charset
to unicode, though, did you ?
Still I have 3 failures and 2 errors in the odmg tests (Hsqldb, clean
run):


Testcase: testResultsWhileTransactionWithCheckpoint took 0,328 sec
	Caused an ERROR
null
org.apache.ojb.odmg.TransactionAbortedExceptionOJB
	at
org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:217)
    ...
Caused by: org.apache.ojb.broker.KeyConstraintViolatedException: SQL
failure while insert object data for class org.apache.ojb.broker.Role, PK
of the given object is [ person_id=-227407454 project_id=-227407452],
object was
org.apache.ojb.broker.Role@4f0853[roleName=<null>,personId=-227407454,person=Anton,projectId=-227407452,project=Project
2 [Anton],tasks=[]], exception message is [Violation of unique
index: SYS_PK_PERSON_PROJECT in statement [INSERT INTO PERSON_PROJECT
(PERSON_ID,PROJECT_ID,ROLENAME) VALUES (-227407454,-227407452,NULL) ]]
	at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:277)
	...
Caused by: java.sql.SQLException: Violation of unique
index: SYS_PK_PERSON_PROJECT in statement [INSERT INTO PERSON_PROJECT
(PERSON_ID,PROJECT_ID,ROLENAME) VALUES (-227407454,-227407452,NULL) ]
	at org.hsqldb.Trace.getError(Unknown Source)
	at org.hsqldb.jdbcResultSet.<init>(Unknown Source)
	at org.hsqldb.jdbcConnection.executeStandalone(Unknown Source)
	at org.hsqldb.jdbcConnection.execute(Unknown Source)
	at org.hsqldb.jdbcStatement.fetchResult(Unknown Source)
	at org.hsqldb.jdbcStatement.executeUpdate(Unknown Source)
	at org.hsqldb.jdbcPreparedStatement.executeUpdate(Unknown Source)
	at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:236)
	... 27 more

Testcase: testResultsWhileTransactionWithCheckpointTestcase: testResultsAfterTransaction
took 0,172 sec
	Caused an ERROR
null
org.apache.ojb.odmg.TransactionAbortedExceptionOJB
	at
org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:217)
	...
Caused by: org.apache.ojb.broker.KeyConstraintViolatedException: SQL
failure while insert object data for class org.apache.ojb.broker.Role, PK
of the given object is [ person_id=52 project_id=124], object was
org.apache.ojb.broker.Role@8990e4[roleName=<null>,personId=52,person=ThreadedUsingBroker_1073514397484,projectId=124,project=ThreadedUsingBroker_1073514397484
[ThreadedUsingBroker_1073514397484],tasks=[]], exception message is
[Violation of unique index: SYS_PK_PERSON_PROJECT in statement [INSERT
INTO PERSON_PROJECT (PERSON_ID,PROJECT_ID,ROLENAME) VALUES
(52,124,NULL) ]]
	at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:277)
	...
Caused by: java.sql.SQLException: Violation of unique
index: SYS_PK_PERSON_PROJECT in statement [INSERT INTO PERSON_PROJECT
(PERSON_ID,PROJECT_ID,ROLENAME) VALUES (52,124,NULL) ]
	at org.hsqldb.Trace.getError(Unknown Source)
	at org.hsqldb.jdbcResultSet.<init>(Unknown Source)
	at org.hsqldb.jdbcConnection.executeStandalone(Unknown Source)
	at org.hsqldb.jdbcConnection.execute(Unknown Source)
	at org.hsqldb.jdbcStatement.fetchResult(Unknown Source)
	at org.hsqldb.jdbcStatement.executeUpdate(Unknown Source)
	at org.hsqldb.jdbcPreparedStatement.executeUpdate(Unknown Source)
	at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:236)
	... 29 more

Testcase: testMtoNSeparate_II took 0,015 sec
	FAILED
expected:<2> but was:<4>
junit.framework.AssertionFailedError: expected:<2> but was:<4>
	at
org.apache.ojb.odmg.ManyToManyTest.testMtoNSeparate_II(ManyToManyTest.java:207)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Testcase: testLockNode took 0,016 sec
	FAILED
expected:<7> but was:<5>
junit.framework.AssertionFailedError: expected:<7> but was:<5>
	at
org.apache.ojb.odmg.FieldConversion_4.testLockNode(FieldConversion_4.java:144)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Testcase: testStoreUpdate took 0,031 sec
	FAILED
expected:<3> but was:<0>
junit.framework.AssertionFailedError: expected:<3> but was:<0>
	at
org.apache.ojb.odmg.CollectionsTest.testStoreUpdate(CollectionsTest.java:165)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


Tom



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: Update to Antlr 2.7.2 + Unicode

Posted by Thomas Mahler <th...@web.de>.
Hi Tom!

Mhh, that's strange. I'm getting only 1 Failure and 2 errors in the ODMG 
tests. ANd no one is releated to OQL as far as I can see.
Did you also check out my updated generated Lexer and Parser classes?

there should be no need for you to run the oql target, as everything is 
in cvs already?!

cu,
thomas

Thomas Dudziak wrote:
> I tried the update and found some interesting things:
> 
> Using the version that were in CVS a couple of hours ago (before Thomas
> updated to Antlr 2.7.2), I get 3 test failures and 2 errors from the odmg
> tests (using Hsqldb and a clean target directory) - see attached file
> test-odmg-original.xml
> 
> Regenerating the OQL parser (no changes to antlr or the grammar, only
> deletion of the lexer/parser files and then invocation of the oql
> target) produces 4 failures and 2 errors (same as before: Hsqldb and clean
> target directory) - see test-odmg-recompile.xml. Now the test
> testComplexOQL2 fails.
> 
> Changing the grammar to use unicode and regenerating it with antlr 2.7.2
> also produces 4 failures and 2 errors (environment as before) - see
> test-odmg-unicode.xml. Interestingly, now the test testMtoNSeparate_II
> runs successful whereas testMtoNTogether fails.
> 
> I also get several other test failures/errors (I attached the test
> results).
> 
> Tom
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org