Project

General

Profile

Bug #2285

Regression when converting the server sources: null annotation

Added by Vadim Nebogatov about 10 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Vadim Nebogatov
Start date:
04/14/2014
Due date:
% Done:

100%

Estimated time:
14.00 h
billable:
No
vendor_id:
GCD
case_num:

vmn_upd20140416a.zip (18.5 KB) Vadim Nebogatov, 04/16/2014 02:35 PM

vmn_upd20140416b.zip (2.92 KB) Vadim Nebogatov, 04/16/2014 02:35 PM

History

#1 Updated by Vadim Nebogatov about 10 years ago

  • Status changed from New to WIP

-------- Original Message --------
Subject: regression when converting the server sources
Date: Mon, 14 Apr 2014 13:04:10 +0300
From: Constantin Asofiei
To: Greg Shah, "Faulhaber, Eric", Vadim Nebogatov
CC: Lomany, Stanislav

Guys,

There are some problems when converting the server sources with bzr rev 10510.

Vadim: I suspect it is related to your changes in rev 10500, because with 10499 the NPE at P2O Generation phase is no longer raised.

Greg/Eric: I think we should make it standard to conversion-test the server sources and parse-test the GUI sources, at least before releasing a new P2J version to the customer.

Thanks,
Constantin

1st:
------------------------------------------------------------------------------
P2O Generation (database schema files)
------------------------------------------------------------------------------

./data/namespace/<db_name>.schema
...
WARNING: Declared "jlprhtr1.p" schema trigger for WRITE of table 'jlndprhist' could not be located in PROPATH.
java.lang.NullPointerException: null value for annotation 'extent':compositenull [COMPOSITE] @0:0

at com.goldencode.ast.XmlFilePlugin.writeSingleAnnotation(XmlFilePlugin.java:1062)
at com.goldencode.ast.XmlFilePlugin.writeAnnotations(XmlFilePlugin.java:1023)
at com.goldencode.ast.XmlFilePlugin.writeAst(XmlFilePlugin.java:984)
at com.goldencode.ast.XmlFilePlugin.writeAst(XmlFilePlugin.java:990)
at com.goldencode.ast.XmlFilePlugin.writeAst(XmlFilePlugin.java:990)
at com.goldencode.ast.XmlFilePlugin.saveTree(XmlFilePlugin.java:425)
at com.goldencode.ast.AstManager.saveTree(AstManager.java:257)
at com.goldencode.p2j.schema.DataModelWorker$Library.persistTarget(DataModelWorker.java:709)
at com.goldencode.expr.CE867.execute(Unknown Source)
at com.goldencode.expr.Expression.execute(Expression.java:341)
at com.goldencode.p2j.pattern.Rule.apply(Rule.java:401)
at com.goldencode.p2j.pattern.Rule.executeActions(Rule.java:640)
at com.goldencode.p2j.pattern.Rule.coreProcessing(Rule.java:609)
at com.goldencode.p2j.pattern.Rule.apply(Rule.java:440)
at com.goldencode.p2j.pattern.RuleContainer.apply(RuleContainer.java:530)
at com.goldencode.p2j.pattern.RuleSet.apply(RuleSet.java:50)
at com.goldencode.p2j.pattern.PatternEngine.apply(PatternEngine.java:1519)
at com.goldencode.p2j.pattern.PatternEngine.processAst(PatternEngine.java:1398)
at com.goldencode.p2j.pattern.PatternEngine.processAst(PatternEngine.java:1346)
at com.goldencode.p2j.pattern.PatternEngine.run(PatternEngine.java:972)
at com.goldencode.p2j.convert.ConversionDriver.processTrees(ConversionDriver.java:915)
at com.goldencode.p2j.convert.ConversionDriver.middle(ConversionDriver.java:578)
at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:1734)
./data/namespace/standard.schema

2nd:
------------------------------------------------------------------------------
Generate Data Model Objects (database DMOs)
------------------------------------------------------------------------------

null
com/something/server/dmo/<db_name>/Aaddress.java.jast

3rd:
Generate base/table DDL scripts for schema '<db_name>' and target DB 'postgresql'
------------------------------------------------------------------------------

Apr 14, 2014 5:33:28 AM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
Apr 14, 2014 5:33:28 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.1.9-SNAPSHOT}
Apr 14, 2014 5:33:28 AM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Apr 14, 2014 5:33:28 AM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Apr 14, 2014 5:33:28 AM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: com.goldencode.p2j.persist.dialect.P2JPostgreSQLDialect
null

4th:
------------------------------------------------------------------------------
Metadata XML Generation
------------------------------------------------------------------------------

null
java.lang.NullPointerException
at com.goldencode.p2j.schema.DataModelWorker$Library.loadRelatedTree(DataModelWorker.java:661)
at com.goldencode.expr.CE2231.execute(Unknown Source)
at com.goldencode.expr.Expression.execute(Expression.java:341)
at com.goldencode.p2j.pattern.Rule.apply(Rule.java:401)
at com.goldencode.p2j.pattern.RuleContainer.apply(RuleContainer.java:530)
at com.goldencode.p2j.pattern.RuleSet.apply(RuleSet.java:50)
at com.goldencode.p2j.pattern.PatternEngine.apply(PatternEngine.java:1479)
at com.goldencode.p2j.pattern.PatternEngine.processAst(PatternEngine.java:1398)
at com.goldencode.p2j.pattern.PatternEngine.processAst(PatternEngine.java:1346)
at com.goldencode.p2j.pattern.PatternEngine.run(PatternEngine.java:972)
at com.goldencode.p2j.convert.ConversionDriver.processTrees(ConversionDriver.java:915)
at com.goldencode.p2j.convert.ConversionDriver.middle(ConversionDriver.java:656)
at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:1734)
Elapsed job time: 00:01:26.559

LE: GES removed the customer name, package and db name from this entry.

#2 Updated by Vadim Nebogatov about 10 years ago

  • Estimated time changed from 6.00 to 14.00

#3 Updated by Vadim Nebogatov about 10 years ago

Attached vmn_upd20140416a.zip fixes first exception. It is possible some more errors also will be fixed. Attached vmn_upd20140416b.zip is test case. The only change in p2j_test.df is in field schedule (<db_name>.df contains a lot of such VALEXP attributes):

ADD FIELD "schedule" OF "Person" AS character 
  FORMAT "x(64)" 
  INITIAL "" 
  SQL-WIDTH 650
  EXTENT 5
  *VALEXP "CAN-FIND(customer WHERE customer.Name = schedule[0])"*
  *VALMSG "Property Class mandatory."*
  ORDER 160

LE: GES removed the database name in this entry.

#4 Updated by Eric Faulhaber about 10 years ago

Code review 20140416a:

The changes look OK to me. Please do a regular conversion regression test.

I will run a conversion of the current project and let you know whether this fixes the issues in the conversion log.

#5 Updated by Eric Faulhaber about 10 years ago

With this fix, the NullPointerException (the 1st problem in note 1 above) no longer occurs. I don't see the other problems (2nd through 4th) in the log, however I didn't see these with my previous conversion using rev 10510, either.

If your conversion test is successful, please check in and distribute the update.

#6 Updated by Vadim Nebogatov about 10 years ago

Update vmn_upd20140416a.zip committed to bzr rev.10512 and distributed.

#7 Updated by Eric Faulhaber about 10 years ago

  • Status changed from WIP to Closed
  • % Done changed from 0 to 100

#8 Updated by Greg Shah over 7 years ago

  • Target version changed from Milestone 11 to Cleanup and Stablization for Server Features

Also available in: Atom PDF