尽管其他所有人都发布了,但我无法在MacOSX,NetBeans 7.2上找到GlassFish的错误解决方案.
Here the error :
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer
prepare method
SEVERE: Exception while preparing the app
SEVERE: [PersistenceUnit: supmarket] Unable to build EntityManagerFactory
...
Caused by: org.hibernate.MappingException: Repeated column in mapping for entity:
com.supmarket.entity.Sale column: customerId
(should be mapped with insert="false" update="false")
Run Code Online (Sandbox Code Playgroud)
这里的代码:
Sale.java
@Entity
public class Sale {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(nullable=false)
private Long idFromAgency;
private float amountSold;
private String agency;
@Temporal(javax.persistence.TemporalType.DATE)
private Date createdate;
@Column(nullable=false)
private Long productId;
@Column(nullable=false)
private …Run Code Online (Sandbox Code Playgroud) 在关注railstutorial.org之后我试图运行bundle install.它列出了宝石的使用方式:
Using railties (3.0.7)
Using rails (3.0.7)
Using sass (3.1.3)
Run Code Online (Sandbox Code Playgroud)
而这个错误:
Installing rbx-require-relative (0.0.5) /home/canard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:364:in `ensure_required_ruby_version_met': rbx-require-relative requires Ruby version ~> 1.8.7. (Gem::InstallError)
from /home/canard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:135:in `install'
...
Run Code Online (Sandbox Code Playgroud)
我知道ruby 1.9.2需要rbx-require-relative,但为什么它不想安装它.它要求红宝石红宝石1.8.7.我很少迷路.
在此错误之后它停止了,我的Gemfile中的gem永远不会被读取或安装...
我正在使用ruby 1.9.2p180和rails 3.0.7
谢谢你的帮助
为什么这个正则表达式'^[0-9]+\.?[0-9]*$'匹配12.2和12,2?
var dot = '12.2',
comma = '12,2',
regex = '^[0-9]+\.?[0-9]*$';
alert( dot.match(regex) );
alert( comma.match(regex) );
Run Code Online (Sandbox Code Playgroud)
虽然它适用于regexpal.com
有没有办法在谷歌Chrome扩展文件中获取关键事件 - background.html- ?
document.onkeydown = function() {
alert('test)
};
Run Code Online (Sandbox Code Playgroud)
以前的代码不起作用.
你有更好的方法吗?
QString str("I am a long long long"
+ QString("long long long")
+ QString("long QString") );
Run Code Online (Sandbox Code Playgroud)
我不喜欢所有这些QString.
我应该在QMap :: insertMulti和QMultiMap之间使用什么来处理:
2 - > abc
2 - > def
3 - > ghi
3 - > jkl
进入2个解决方案的区别是什么?
我有一个显示表单的jQuery.dialog.
第一个输入是<input type="text" class="datepicker" />,我像这样初始化datepicker jQuery('.datepicker').datepicker().
问题是当对话框打开时,它会聚焦第一个输入.所以datepicker也打开了.
对话框的事件open在焦点开始之前运行.
那么,我怎样才能模糊第一个焦点到日期选择器保持隐藏状态?
经过一番研究,我仍然不明白这个问题.
Const.hpp:
#ifndef CONST_HPP
#define CONST_HPP
#include <QString>
const QString CONFFILENAME("dsibubble.ini"),
STRSEP(" | ");
const int MAXIMGWIDTH = 960;
#endif // CONST_HPP
Run Code Online (Sandbox Code Playgroud)
TabDataBase.cpp:
#include "Const.hpp"
func() {
QString abc = STRSEP;
}
Run Code Online (Sandbox Code Playgroud)
使用STRSEP生成expected unqualified-id before string constant错误.此外,我CONFFILENAME在其他类使用,我没有错误.
QString path = QString("..//") + CONFFILENAME;
Run Code Online (Sandbox Code Playgroud)
编辑:错误的细节:
In file included ..\TabDataBase.cpp: #include "Const.hpp"
expected unqualified-id before string constant: Const.hpp : STRSEP(" | ");
Run Code Online (Sandbox Code Playgroud)