你在你的WEB.xml中把这个Entity Bean申明成EJB References了么?还有你的Entity Bean是CMP2的么?如果是你看看你的接口是Local的还是Remote的?
解决方案 »
- 在页面上,如何根据输出内容生成合并的表格?
- 新手求助,spring common包在哪下载?
- ibatis的配置文件这么写有问题吗?报错
- OneToOne 查询请教!!!
- 求大家帮忙!弄不出来呀!关于java.lang.NullPointerException错误的!!!
- static方法在别人机器上运行报no such method,why????
- 求助:struts2的类型转换和输入较验问题
- 急急急---jsp分页问题
- 感觉用myeclipse进行有关的J2EE的开发好复杂呀!欢迎大家过来谈谈自己的看法!
- 数据库操作问题
- j2ee tomcat 上运行该jsp页面总是报错???(急,在线求解)
- ResultSet set = stmt.executeQuery(SQL);执行完后,数据是取到了本机还是在数据库服务器?
我用的是BMP
这个错误和程序没有关系吧???
不知道...
程序在IE中运行,提交以后数据库中没有添家进去;是我程序那里错了吗?劳繁各位了BMP中的CREATE方法如下 public String ejbCreate(String ygid, String ygname, Integer age) throws CreateException {
super.ejbCreate(ygid, ygname, age);
try {
//First see if the object already exists
ejbFindByPrimaryKey(ygid);
//If so, then we have to throw an exception
throw new DuplicateKeyException("Primary key already exists");
}
catch(ObjectNotFoundException e) {
//Otherwise we can go ahead and create it...
}
Connection connection = null;
PreparedStatement statement = null;
try {
connection = dataSource.getConnection();
statement = connection.prepareStatement("INSERT INTO yg (ygid, ygname, age) VALUES (?, ?, ?)");
statement.setString(1, ygid);
statement.setString(2, ygname);
if (age == null) {
statement.setNull(3, Types.INTEGER);
}
else {
statement.setInt(3, age.intValue());
}
if (statement.executeUpdate() != 1) {
throw new CreateException("Error adding row");
}
return ygid;
}
catch(SQLException e) {
throw new EJBException("Error executing SQL INSERT INTO yg (ygid, ygname, age) VALUES (?, ?, ?): " + e.toString());
}
finally {
closeConnection(connection, statement);
}
}
不是程序的问题,应该是jboss出错
免费的性能真是。。