----- Original Message -----
From: Gordon Luk <[EMAIL PROTECTED]>
Date: Wednesday, June 26, 2002 11:17 am
Subject: Re: [Middlegen-user] [CVS-21/6/2002 Ver 1.1 beta] [Error] GUI 
interface

> Hi Aslak,
> 
> [EMAIL PROTECTED] wrote:
> 
> >Could it be
> >
> >https://sourceforge.net/tracker/?
> >func=detail&atid=415990&aid=548768&group_id=36044
> >
> >?
> >
> >Aslak
> >
> 
> Ok, thanks....  i try it as the message... also got problem...  
> but that 
> is ok... no gui also fine for me... :-)
> 
> The Good news is, i could deploy the ejb to JBOSS 3.0 now... Great!!!
> But i have modify some of files...  
> 

Great news. I've never tried JBoss myself ;-)

> ------>8---------  build.xml ------
>         <jboss
>            version="3.0"
>            xmlencoding="UTF-8"
>            destdir="${build.ejb.dir}/META-INF"
>            validatexml="false"
>            datasource="java:/${name}_DS"
>            typemapping="${database.datasource-mapping}"

I think typemapping only applies to jaws (deprecated JBoss CMP stuff, 
no?). I think that since you're on JBoss 3.0, you shouldn't need this.
There is a merge point for jbosscmp-jdbc-typemappings.xml. See
http://xdoclet.sourceforge.net/jboss.html

Thanks for correcting the datasource attribute.

>         />
>      </ejbdoclet>
> ------>8---------
> 
> ------>8---------  postgresql.xml ------
>   <!-- 
> =================================================================== --
>
>   <!-- ant properties/targets for 
> mysql                                    -->
>   <!-- note: this is not a proper xml file (there is no root 
> element)      -->
>   <!--       it is intended to be imported from a *real* xml 
> file          -->
>   <!-- 
> =================================================================== --
>
> 
>   <property name="database.script.file"           
> value="${src.dir}/sql/${name}-postgresq.sql"/>
>   <property name="database.driver.file"           
> value="${lib.dir}/pgjdbc2.jar"/>
>   <property name="database.driver"                
> value="org.postgresql.Driver"/>
>   <property name="database.url"                   
> value="jdbc:postgresql://localhos
>   <property name="database.userid"                value="postgres"/>
>   <property name="database.password"              value="postgres"/>
>   <property name="database.schema"                value=""/>
>   <property name="database.catalog"               value=""/>
>   <property name="database.datasource-mapping"    
> value="PostgreSQL 7.2"/>

Not needed I think (see above).

> ------>8---------
> 
> And the bad news, i couldn't compile the web... it got following 
> error :
> 

The struts actions expect the person+flight EJBs to use Integer as PK. 
Middlegen will choose simple classes (java.lang.Integer, 
java.lang.Long, java.lang.String etc.) for PK class when the table's PK 
consists of only one column (in other words when there is no need for a 
compound PK). It's strange that your person+flight EJBs have been 
generated to use custom PK classes since these fall into this category. 
It can be:

a) You're on JDK 1.4 and you have an airline-prefs.xml lying around 
that specifies PersonPK and FlightPK instead of java.lang.Integer

b) There is something strange with how your JDBC driver reports primary 
keys for your tables.

I'd be grateful if you could send me a snapshot of the GUI (make sure 
you delete airline-prefs.xml first) and the generated PersonBean.java

> The <compile-web> task just i have cut in two part (ejb and web)....
> 
> ------>8---------
> [webdoclet] DEBUG [main] MergeTagsHandler.merge 
> (MergeTagsHandler.java:61)     - Pattern = actions.xml
> [webdoclet] DEBUG [main] MergeTagsHandler.merge 
> (MergeTagsHandler.java:81)     - Merge File NOT found
> [webdoclet] DEBUG [main] XmlSubTask.engineFinished 
> (XmlSubTask.java:236)     - isValidateXML()=false
> 
> compile-web:
>    [javac] Compiling 14 source files to 
> /home/gordon/middlegen_cvs_update/middlegen/samples/build/classes
>    [javac] 
> /home/gordon/middlegen_cvs_update/middlegen/samples/src/javcreate() 
in airline.ejb.interfaces.PersonLocalHome cannot be applied to 
> (java.lang.Integer,java.lang.String,java.lang.String)
>    [javac]                             PersonLocal person = 
> PersonUtil.getLocalHome().create(personId, firstName, lastName);
>    
> [javac]                                                            
>                 
> ^
>    [javac] 
> /home/gordon/middlegen_cvs_update/middlegen/samples/src/javfindByPrima
ryKey(airline.ejb.interfaces.PersonPK) in 
> airline.ejb.interfaces.PersonLocalHome cannot be applied to 
> (java.lang.Integer)
>    [javac]                             person = 
> PersonUtil.getLocalHome().findByPrimaryKey(personPK);
>    
> [javac]                                                            
>     ^
>    [javac] 
> /home/gordon/middlegen_cvs_update/middlegen/samples/src/javcannot 
> resolve symbol
>    [javac] symbol  : method findByFirstName  (java.lang.String)
>    [javac] location: interface airline.ejb.interfaces.PersonLocalHome
>    [javac]                     
> persons.addAll(PersonUtil.getLocalHome().findByFirstName
(request.getParameter("firstName")));
>    [javac]                                                        
>       ^
>    [javac] 
> /home/gordon/middlegen_cvs_update/middlegen/samples/src/javcannot 
> resolve symbol
>    [javac] symbol  : method findByLastName  (java.lang.String)
>    [javac] location: interface airline.ejb.interfaces.PersonLocalHome
>    [javac]                     
> persons.addAll(PersonUtil.getLocalHome().findByLastName
(request.getParameter("lastName")));
>    [javac]                                                        
>       ^
>    [javac] 
> /home/gordon/middlegen_cvs_update/middlegen/samples/src/javfindByPrima
ryKey(airline.ejb.interfaces.PersonPK) in 
> airline.ejb.interfaces.PersonLocalHome cannot be applied to 
> (java.lang.Integer)
>    [javac]                     PersonLocal person = 
> PersonUtil.getLocalHome().findByPrimaryKey(personId);
> 
> ------>8---------
> 
> 
> Gordon
> 
> 
> 
> _________________________________________________________
> 
> Do You Yahoo!?
> 
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> 
> 



-------------------------------------------------------
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members! 
JabConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to