Hi, having problem to generate my application from a DB table, I try to
create from a Java file.
>From the createDAO tutorial, #1 I have set the Java file that appfuse
generate to me from the previous experience; I give it to you as atteched
file.
I try to execute ant setup-db and I got the following error :
C:\Program Files\PlanningRAO>ant setup-db
Buildfile: build.xml
init:
db-create:
[echo] Detected MySQL, creating database...
[echo] Creating 'RAO_DB' database with: mysql-create.sql
[echo] URL: jdbc:mysql://localhost/mysql
[copy] Copying 1 file to C:\Program Files\PlanningRAO\build\dao\gen
[sql] Executing file: C:\Program
Files\PlanningRAO\build\dao\gen\mysql-create.sql
[sql] 4 of 4 SQL statements executed successfully
clean:
[echo] Cleaning build and distribution directories
[delete] Deleting directory C:\Program Files\PlanningRAO\build
[delete] Deleting directory C:\Program Files\PlanningRAO\dist
prepare:
[echo] Preparing target directory 'C:\Program
Files\PlanningRAO/build/PlanningRAO'
[mkdir] Created dir: C:\Program Files\PlanningRAO\build\PlanningRAO
[mkdir] Created dir: C:\Program
Files\PlanningRAO\build\PlanningRAO\WEB-INF
[mkdir] Created dir: C:\Program Files\PlanningRAO\dist\webapps
hibernatedoclet:
[hibernatedoclet] (XDocletMain.start 48 ) Running
<hibernate/>
[hibernatedoclet] (TemplateSubTask.engineStarted 829 ) Generating
output 'org\thalesInfo\model\User.hbm.xml' using template file
'jar:file:/C:/Program%20Files/PlanningRAO/lib/xdoclet-1.3-SNAPSHOT/xdoclet-hibernate-module-1.3-SNAPSHOT.jar!/xdoclet/modules/hibernate/resources/hibernate.xdt'.
[hibernatedoclet] org.thalesInfo.model.User
[hibernatedoclet] (TemplateSubTask.engineStarted 829 ) Generating
output 'org\thalesInfo\model\Role.hbm.xml' using template file
'jar:file:/C:/Program%20Files/PlanningRAO/lib/xdoclet-1.3-SNAPSHOT/xdoclet-hibernate-module-1.3-SNAPSHOT.jar!/xdoclet/modules/hibernate/resources/hibernate.xdt'.
[hibernatedoclet] org.thalesInfo.model.Role
[hibernatedoclet] INFO: Some classes refer to other classes that were not
found among the sources or on the classpath.
[hibernatedoclet] (Perhaps the referred class doesn't exist? Hasn't
been generated yet?)
[hibernatedoclet] The referring classes do not import any fully
qualified classes matching these classes.
[hibernatedoclet] However, since no packages are imported, xjavadoc
has assumed that the referred classes
[hibernatedoclet] belong to the same package as the referring
class. The classes are:
[hibernatedoclet] C:\Program
Files\PlanningRAO\src\dao\org\thalesInfo\model\RaoInfo.java --> BaseObject
qualified to org.thalesIDS.model.BaseObject
compile-dao:
[echo] Compiling dao...
[mkdir] Created dir: C:\Program Files\PlanningRAO\build\dao\classes
[mkdir] Created dir: C:\Program Files\PlanningRAO\build\test\dao\classes
[javac] Compiling 15 source files to C:\Program
Files\PlanningRAO\build\dao\classes
[javac] C:\Program
Files\PlanningRAO\src\dao\org\thalesInfo\model\RaoInfo.java:17: cannot find
symbol
[javac] symbol: class BaseObject
[javac] public class RaoInfo extends BaseObject implements Serializable
{
[javac] ^
[javac] C:\Program
Files\PlanningRAO\src\dao\org\thalesInfo\model\RaoInfo.java:292: cannot find
symbol
[javac] symbol : method getClass()
[javac] location: class org.thalesIDS.model.RaoInfo
[javac]
buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append("
[");
[javac] ^
[javac] C:\Program
Files\PlanningRAO\src\dao\org\thalesInfo\model\RaoInfo.java:314: operator ==
cannot be applied to org.thalesIDS.model.RaoInfo,java.lang.Object
[javac] if ( (this == other ) ) return true;
[javac] ^
[javac] C:\Program
Files\PlanningRAO\src\dao\org\thalesInfo\model\RaoInfo.java:316:
inconvertible types
[javac] found : java.lang.Object
[javac] required: org.thalesIDS.model.RaoInfo
[javac] if ( !(other instanceof RaoInfo) ) return false;
[javac] ^
[javac] C:\Program
Files\PlanningRAO\src\dao\org\thalesInfo\model\RaoInfo.java:317:
inconvertible types
[javac] found : java.lang.Object
[javac] required: org.thalesIDS.model.RaoInfo
[javac] RaoInfo castOther = ( RaoInfo ) other;
[javac] ^
[javac] Note C:\Program
Files\PlanningRAO\src\dao\org\thalesInfo\model\User.java uses unchecked or
unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 5 errors
BUILD FAILED
C:\Program Files\PlanningRAO\build.xml:239: The following error occurred
while executing this line:
C:\Program Files\PlanningRAO\build.xml:450: Compile failed; see the compiler
error output for details.
Total time: 5 seconds
C:\Program Files\PlanningRAO>
I have load this project in eclipse and it compiles fine.
Thanks to have a look.
Martin http://www.nabble.com/file/7463/RaoInfo.java RaoInfo.java
--
View this message in context:
http://www.nabble.com/CreateDAO-Javac-PB-tf3474035s2369.html#a9695578
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]