Bug 111267

Summary: Better error message required for bad PDL types
Product: [Retired] Red Hat Web Application Framework Reporter: Matthew Booth <mbooth>
Component: persistenceAssignee: ccm-bugs-list
Status: CLOSED WONTFIX QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-06-17 22:02:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Booth 2003-12-01 16:09:49 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5)
Gecko/20031026 Firebird/0.7

Description of problem:
Trying to deploy the following pdl:

model com.arsdigita.isc;
                                                                     
          
import com.arsdigita.kernel.ACSObject;
                                                                     
          
object type RemoteHost extends ACSObject {
    unique String[1..1] name = isc_remote_host.name varchar(100);
    BigDecimal[1..1] nonce = isc_remote_host.nonce integer;
    String[1..1] certAlias = isc_remote_host.cert_alias varchar(100);
                                                                     
          
    reference key (isc_remote_host.host_id);
}

gives the error:

generate-ddl-isc-oracle-se:
     [java] Exception in thread "main" java.lang.Error: varchar
     [java]     at
com.redhat.persistence.pdl.nodes.DbTypeNd.getType(DbTypeNd.java:60)
     [java]     at
com.redhat.persistence.pdl.PDL$11.onColumn(PDL.java:606)
     [java]     at
com.redhat.persistence.pdl.nodes.ColumnNd.dispatch(ColumnNd.java(Compiled
Code))
     [java]     at
com.redhat.persistence.pdl.nodes.Node.traverse(Node.java(Compiled Code))
     [java]     at
com.redhat.persistence.pdl.nodes.Node.traverse(Node.java(Compiled Code))
     [java]     at
com.redhat.persistence.pdl.nodes.Node.traverse(Node.java(Compiled Code))
     [java]     at
com.redhat.persistence.pdl.nodes.Node.traverse(Node.java(Compiled Code))
     [java]     at
com.redhat.persistence.pdl.nodes.Node.traverse(Node.java(Compiled Code))
     [java]     at
com.redhat.persistence.pdl.nodes.Node.traverse(Node.java(Compiled Code))
     [java]     at com.redhat.persistence.pdl.PDL.emitDDL(PDL.java:586)
     [java]     at com.redhat.persistence.pdl.PDL.emit(PDL.java:400)
     [java]     at
com.arsdigita.persistence.pdl.PDLCompiler.emit(PDLCompiler.java:47)
     [java]     at com.arsdigita.persistence.pdl.PDL.main(PDL.java:239)

Instead it should point out that 'varchar' isn't a recognised type (it
should be in upper case). It should preferrably give a list of valid
types.

Version-Release number of selected component (if applicable):
Rickshaw

How reproducible:
Always