我正在使用Hibernate Criteria从filename我的表中的列获取值contaque_recording_log.
但是当我得到结果时,它会引发异常
org.hibernate.QueryException:无法解析属性:filename of:com.contaque.hibernateTableMappings.contaque_recording_log
我的表bean是:
import java.util.Date;
import javax.persistence.*;
@Entity
@Table(name="contaque_recording_log")
public class contaque_recording_log implements java.io.Serializable{
private static final long serialVersionUID = 1111222233334404L;
@Id
@Column(name="logId", insertable=true, updatable=true, unique=false)
private Integer logId;
@Column(name="userName", insertable=true, updatable=true, unique=false)
private String userName;
@Column(name="ext", insertable=true, updatable=true, unique=false)
private String ext;
@Column(name="phoneNumber", insertable=true, updatable=true, unique=false)
private String phoneNumber;
@Column(name="callerId", insertable=true, updatable=true, unique=false)
private String callerId;
@Column(name="fileName", insertable=true, updatable=true, unique=false)
private String fileName;
@Column(name="campName", insertable=true, updatable=true, unique=false)
private String campName;
@Temporal(javax.persistence.TemporalType.TIMESTAMP) …Run Code Online (Sandbox Code Playgroud) java hibernate hibernateexception hibernate-criteria oracle-sqldeveloper
我最近听说过Vector is a Legacy class,然后我在一个网站上看到了
旧版类用于在集合到来之前保存对象.
那么,为什么这些不被称为Deprecated类,为什么Legacy呢?
我正在使用JQuery Ajax向我的动作类发送请求,data: {campaignId: campaignId}但_=1389258551926也作为数据发送.
我的ajax请求功能是:
$('#submit').click(function() {
var campaignId = $('#campaign').val();
alert("Ajax request ; Camp : " + campaignId);
$.ajax({
type: "get",
url: "getCampData",
data: {campaignId: campaignId},
dataType: "json"
}).done(function(data) {
alert("Camp List : " + data.campList);
});
Run Code Online (Sandbox Code Playgroud)
查询字符串参数:
campaignId=Test&_=1389258551927
Run Code Online (Sandbox Code Playgroud)
为什么这个额外参数作为数据发送?
我想提出一个计划SFTP在NetBeans.
我的代码的一部分:
com.jcraft.jsch.Session sessionTarget = null;
com.jcraft.jsch.ChannelSftp channelTarget = null;
try {
sessionTarget = jsch.getSession(backupUser, backupHost, backupPort);
sessionTarget.setPassword(backupPassword);
sessionTarget.setConfig("StrictHostKeyChecking", "no");
sessionTarget.connect();
channelTarget = (ChannelSftp) sessionTarget.openChannel("sftp");
channelTarget.connect();
System.out.println("Target Channel Connected");
} catch (JSchException e) {
System.out.println("Error Occured ======== Connection not estabilished");
log.error("Error Occured ======== Connection not estabilished", e);
} finally {
channelTarget.exit(); // Warning : dereferencing possible null pointer
channelTarget.disconnect(); // Warning : dereferencing possible null pointer
sessionTarget.disconnect(); // Warning : dereferencing possible null pointer
}
Run Code Online (Sandbox Code Playgroud)
我收到警告 …
由于java.util.Date对象将Date存储为2014-01-24 17:33:47.214,但我希望Date格式为2014-01-24 17:33:47.我想删除毫秒部分.
我查了一个与我的问题有关的问题......
我试过给出了答案
long time = date.getTime();
date.setTime((time / 1000) * 1000);
Run Code Online (Sandbox Code Playgroud)
但我的结果日期格式为2014-01-24 17:33:47.0.如何0从我的日期格式中删除???
我是Postgres触发器的新手.我在www.postgresql.org上看到了一个触发器的例子,我不明白LANGUAGE plpgsql VOLATILE COST 100;触发器函数的结尾是什么.
这条线有什么用?
我看到了一个与此相关的问题"LANGUAGE'plpgsql'VOLATILE"是什么意思?
但这只是关于volatile什么cost 100,language在这一行?
// \u represent unicode sequence
char c = '\u0045';
System.out.println(c);
Run Code Online (Sandbox Code Playgroud)
代码只是这么多,eclipse显示以下错误消息
"Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Invalid unicode
Run Code Online (Sandbox Code Playgroud)
现在,当我\u从评论中删除它工作正常,\u评论中的问题是什么?这是一个错误还是有一些关系,只要认为Java应该保留评论.
我正在用Java学习Hibernate。由于要创建Session,我们必须使用SessionFactory.openSession(),对于创建,SessionFactory我们使用sessionFactory = config.buildSessionFactory(serviceRegistry);
ServiceRegistry在休眠状态下有什么用?
我创建的代码SessionFactory:
Configuration config = new Configuration();
config.addAnnotatedClass(user.class);
config.addAnnotatedClass(emp.class);
config.configure();
// Didn't understand the code below
Properties configProperties = config.getProperties();
ServiceRegistryBuilder serviceRegisteryBuilder = new ServiceRegistryBuilder();
ServiceRegistry serviceRegistry = serviceRegisteryBuilder.applySettings(configProperties).buildServiceRegistry();
SessionFactory sessionFactory = config.buildSessionFactory(serviceRegistry);
Run Code Online (Sandbox Code Playgroud) 如果我想做这样的事情:
List<?> unknownList = new ArrayList<>();
Run Code Online (Sandbox Code Playgroud)
那么代码编译并运行正常,但其类型的ArrayList创造?
在这一行之后,如果我这样做了:
unknownList.add("str"); //compilation error
Run Code Online (Sandbox Code Playgroud)
它给出了编译错误:
error: no suitable method found for add(String)
unList.add("str");
^
method List.add(int,CAP#1) is not applicable
(actual and formal argument lists differ in length)
method List.add(CAP#1) is not applicable
(actual argument String cannot be converted to CAP#1 by method invocation conversion)
method Collection.add(CAP#1) is not applicable
(actual argument String cannot be converted to CAP#1 by method invocation conversion)
where CAP#1 is a fresh type-variable:
CAP#1 extends …Run Code Online (Sandbox Code Playgroud) 如何在单击"确定"按钮时添加监听器JOptionPane.INFORMATION_MESSAGE.
我的JOptionPane是:
JOptionPane.showMessageDialog(null, "Your password is: " + password, "Your Password", JOptionPane.INFORMATION_MESSAGE);
Run Code Online (Sandbox Code Playgroud) java ×8
hibernate ×2
ajax ×1
collections ×1
dereference ×1
generics ×1
javascript ×1
joptionpane ×1
jquery ×1
mouseevent ×1
netbeans ×1
plpgsql ×1
postgresql ×1
swing ×1
triggers ×1
unicode ×1
wildcard ×1