It definitely has to do with the TEXT and DATETIME columns. They are not mapped onto a
JAVA type and thus you will see $col.JavaObject in your code, which obviously does not
compile.
Look at the db.props file in the templates\sql\base\sybase\. TEXT and DATETIME are no
Torque supported types. They are Sybase types. You should use LONGVARCHAR and
TIMESTAMP instead.
Hope this help.
----- Original Message -----
From: KL Tse
To: Turbine Users List
Sent: Monday, December 10, 2001 09:43
Subject: cannot resolve symbol
I have added a table to project-schema.xml. Run ant project-om and ant
compile. I got an 'cannot resolve symbol' error.
Are they due to the use of column type "Text" and 'Datetime' ?
p.s. Environment is Sybase on Linux 6.2.
Thanks in advance for all helps.
New Table in schema :
<table name="document">
<column name="docid" required="true" primaryKey="true" type="NUMERIC"/>
<column name="lang" size="2" type="VARCHAR"/>
<column name="title" size="80" type="VARCHAR"/>
<column name="searchstr" size="80" type="VARCHAR"/>
<column name="content" type="TEXT"/>
<column name="doctype" size="10" type="VARCHAR"/>
<column name="docpath" size="80" type="VARCHAR"/>
<column name="creator" size="20" type="VARCHAR"/>
<column name="revisor" size="20" type="VARCHAR"/>
<column name="upddate" type="DATETIME"/>
<column name="inpdate" type="DATETIME"/>
</table>
The Section in DocumentMapBuilder.java causes the compile errors is :
tMap.addPrimaryKey ( getDocument_Docid(), new
BigDecimal(0) );
tMap.addColumn ( getDocument_Lang(), new String() );
tMap.addColumn ( getDocument_Title(), new String() );
tMap.addColumn ( getDocument_Searchstr(), new String() );
tMap.addColumn ( getDocument_Content(), $col.JavaObject );
tMap.addColumn ( getDocument_Doctype(), new String() );
tMap.addColumn ( getDocument_Docpath(), new String() );
tMap.addColumn ( getDocument_Creator(), new String() );
tMap.addColumn ( getDocument_Revisor(), new String() );
tMap.addColumn ( getDocument_Upddate(), $col.JavaObject );
tMap.addColumn ( getDocument_Inpdate(), $col.JavaObject );
Compile errors :
Buildfile: build.xml
compile:
[javac] Compiling 8 source files to
/usr/local/tdk/webapps/jm/WEB-INF/classes
[javac]
/usr/local/tdk/webapps/jm/WEB-INF/src/java/org/alpha/jm/om/map/DocumentMapBu
ilder.java:137: cannot resolve symbol
[javac] symbol : variable $col
[javac] location: class org.alpha.jm.om.map.DocumentMapBuilder
[javac] tMap.addColumn ( getDocument_Content(),
$col.JavaObject );
[javac] ^
[javac]
/usr/local/tdk/webapps/jm/WEB-INF/src/java/org/alpha/jm/om/map/DocumentMapBu
ilder.java:147: cannot resolve symbol
[javac] symbol : variable $col
[javac] location: class org.alpha.jm.om.map.DocumentMapBuilder
[javac] tMap.addColumn ( getDocument_Upddate(),
$col.JavaObject );
[javac] ^
[javac]
/usr/local/tdk/webapps/jm/WEB-INF/src/java/org/alpha/jm/om/map/DocumentMapBu
ilder.java:149: cannot resolve symbol
[javac] symbol : variable $col
[javac] location: class org.alpha.jm.om.map.DocumentMapBuilder
[javac] tMap.addColumn ( getDocument_Inpdate(),
$col.JavaObject );
[javac] ^
[javac]
/usr/local/tdk/webapps/jm/WEB-INF/src/java/org/alpha/jm/om/BaseDocumentPeer.
java:195: cannot resolve symbol
[javac] symbol : variable $col
[javac] location: class com.workingdogs.village.Value
[javac]
obj.setContent(row.getValue(offset+4).$col.VillageMethod);
[javac]
^
[javac]
/usr/local/tdk/webapps/jm/WEB-INF/src/java/org/alpha/jm/om/BaseDocumentPeer.
java:200: cannot resolve symbol
[javac] symbol : variable $col
[javac] location: class com.workingdogs.village.Value
[javac]
obj.setUpddate(row.getValue(offset+9).$col.VillageMethod);
[javac]
^
[javac]
/usr/local/tdk/webapps/jm/WEB-INF/src/java/org/alpha/jm/om/BaseDocumentPeer.
java:201: cannot resolve symbol
[javac] symbol : variable $col
[javac] location: class com.workingdogs.village.Value
[javac]
obj.setInpdate(row.getValue(offset+10).$col.VillageMethod);
[javac]
^
[javac] 6 errors
Total time: 2 seconds
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>