首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >对Axis2 WebServices的JOOQ支持

对Axis2 WebServices的JOOQ支持
EN

Stack Overflow用户
提问于 2014-08-15 08:30:15
回答 1查看 472关注 0票数 1

我有一个带有JOOQ的Axis2应用程序,我正在使用JOOQ创建实体并访问数据库。在数据服务文件中,我有以下代码:

代码语言:javascript
复制
public Contact[] findContactByName(String name) { 
     try { 
            Contact[] result =  new ContactFacade().findContactsByName(name); 
            return result; 
     } catch (Exception ex) { 
            // TODO: Add Error Logger 
            return null; 
     } 
}

如果我在与web服务相同的项目中调用此代码,它可以正常工作,但是当我从客户端应用程序调用服务时,我会在控制台中得到以下消息。

代码语言:javascript
复制
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.AbstractQueryPart (stopClass=class java.lang.Object). This will negatively affect performance!
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.AbstractTable (stopClass=class org.jooq.impl.AbstractQueryPart). This will negatively affect performance!
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.TableImpl (stopClass=class org.jooq.impl.AbstractTable). This will negatively affect performance!
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.IdentityImpl (stopClass=class java.lang.Object). This will negatively affect performance!
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.AbstractQueryPart (stopClass=class java.lang.Object). This will negatively affect performance!
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.AbstractField (stopClass=class org.jooq.impl.AbstractQueryPart). This will negatively affect performance!
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.TableFieldImpl (stopClass=class org.jooq.impl.AbstractField). This will negatively affect performance!
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.IdentityConverter (stopClass=class java.lang.Object). This will negatively affect performance!
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.DefaultDataType (stopClass=class java.lang.Object). This will negatively affect performance!
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.DefaultDataType (stopClass=class java.lang.Object). This will negatively affect performance!
[WARN] Unable to locate a BeanInfo cache for class org.jooq.impl.DefaultDataType (stopClass=class java.lang.Object). This will negatively affect performance!

最后一个警告一直无限期地重复,直到服务触发服务超时为止。

谢谢你的帮助。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-15 15:14:51

我花了一段时间,但我设法解决了这个问题。

结果表明,当试图传递使用上述方法(“TableImpl”、“TableFieldImpl”、.)的jooq生成的类时,会发生此错误。

因此,将生成POJO的选项设置为在配置中为true,它将创建具有基本结构的POJO类。在DAO中,当获取记录时,将它们提取到POJO对象中并通过服务返回。

这是一个示例调用:

代码语言:javascript
复制
List<Contact> contactsList = context.selectFrom(Tables.CONTACT)
.where(Tables.CONTACT.NAME.equal("somevalue")).fetchInto(Contact.class);

希望这能帮助其他人:)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25323429

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档