At 17:31 01.12.2003, Alexey Loubyansky wrote:
Unfortunately, I still can't reproduce it. Could you please provide me with the DDs and instructions to reproduce this? Thank you.

We have problems with Tables, where one column names is "name". Than I call findAll() and call the getName() method. I just took our application which run without any problem with JBoss 3.2.2 and Jetty, configure log4j and mysql-ds.xml and deploy our ear.


We have this table:

CREATE TABLE `codec` (
  `codec_id`     SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
  `name`         VARCHAR(20)       NOT NULL,
  `description`  VARCHAR(100)      NOT NULL,
  `file_suffix`  VARCHAR(50)       NOT NULL,
  `mime_type`    VARCHAR(50)       NOT NULL,
  #
  PRIMARY KEY (`codec_id`)
) TYPE=InnoDB;

CREATE UNIQUE INDEX `codec_name__idx`
                      ON `codec` (`name`);

and this mathod in our media session bean:

    public List getAllCodecVO()
             throws OMAException {
        logger.debug("getAllCodecVO() entered");

CodecVOHelper codecVOHelper = CodecVOHelper.getInstance();

try {
CodecBeanLocalHome codecHome = (CodecBeanLocalHome) serviceLocator.getLocalHome(JNDINamesMedia.CODEC_EJB);
Collection codecCol = codecHome.findAll();
int codecColSize = codecCol.size();
List resultList = new ArrayList(codecColSize);
Iterator codecColIte = codecCol.iterator();
for (int i = 0; i < codecColSize; i++) {
CodecBeanLocal codecLocal = (CodecBeanLocal) codecColIte.next();
CodecVO codecVO = codecVOHelper.getVO(codecLocal);
resultList.add(codecVO);
}


return resultList;
}
catch (ServiceLocatorException sle) {
logger.fatal("getAllCodecVO() failed with ServiceLocatorException", sle);
throw new OMAException("MediaBean::getAllCodecVO() failed with ServiceLocatorException", ErrorIDs.FATAL_ERROR);
}
catch (FinderException fe) {
logger.fatal("getAllCodecVO() failed with FinderException", fe);
throw new OMAException("MediaBean::getAllCodecVO() failed with FinderException", ErrorIDs.FATAL_ERROR);
}
}



getVO() in CodecVOHelper looks so:


    public CodecVO getVO(CodecBeanLocal c) {
        if (c != null) {
            CodecVO vo = new CodecVO(c.getCodec_id(),
                    c.getName(),
                    c.getDescription(),
                    c.getFile_suffix(),
                    c.getMime_type());

            return vo;
        }

        return null;
    }


Regards,
Rafal




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to