“ERROR: ORA-00911: invalid character ” for create tables by Hibernate JPA
I want create two tables with Hibernate JPA
.
I use Oracle 11g
and JDBC 6 & 7
(Because I'm not sure which one is suitable for 11g :) ).
my library : hibernate-release-4.2.0.Final
& hibernate-jpa-2.0-api-1.0.1
& Tomcat-8 lib
& JDK 1.8.0-172
I create two Entities but when I run the program , the tables are not created and present this error :
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: create table "PICTURE" ("PID" `NUMBER` not null, " CAPTION " `LONG `, " LIKES_COUNTER " ` NUMBER `, " PIC_ADRESS " ` NVARCHAR2(50) ` not null, FK_USERS `NUMBER`, primary key ("PID"))
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: ORA-00911: invalid character
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: create table "USERS" ("UID" `NUMBER` not null, " EMAIL " ` NVARCHAR2(40)` not null, " USER_PASSWORD " ` NVARCHAR2(32)` not null, " USER_SEX " ` NVARCHAR2(20)`, " UPICADD " ` NVARCHAR2(50)`, " USERNAME " ` NVARCHAR2(30)` not null, primary key ("UID"))
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: ORA-00911: invalid character
I run these queries directly on SQL PLUS for testing. Tables were created correctly. even when I used <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
, The tables that I created directly , dropped but weren't rebuilt.
my entities :
@Entity (name = "person")
@Table(name = "USERS")
@EntityListeners(value = PersonManager.class)
public class Person implements Serializable
@Id
@Column(name="UID" ,columnDefinition = "NUMBER" )
@SequenceGenerator(name = "mySeq" , sequenceName = "DB_MYSEQ")
@GeneratedValue(strategy=GenerationType.AUTO ,generator="mySeq")
private long uId;
//--------define relation------
@OneToMany(cascade = CascadeType.ALL , fetch = FetchType.EAGER)
@JoinColumn(name = " FK_USERS" )
private List<Pictures> picturesList;
@Basic
@Column (name = " USERNAME " , columnDefinition = " NVARCHAR2(30)" , nullable = false )
private String username ;
@Basic
@Column (name = " USER_PASSWORD " , columnDefinition = " NVARCHAR2(32)" , nullable = false )
private String password ;
@Basic
@Column (name = " EMAIL " , columnDefinition = " NVARCHAR2(40)" , nullable = false)
private String email;
@Basic // user picture for profile
@Column (name = " UPICADD " , columnDefinition = " NVARCHAR2(50)" )
private String userPic;
@Basic
@Column (name = " USER_SEX " , columnDefinition = " NVARCHAR2(20)")
private String sex ;
public Person(String username, String password, String email ,String sex, String userPic )
this.picturesList = picturesList;
this.sex = sex;
this.userPic = userPic;
this.email = email;
this.password = password;
this.username = username;
//--------------------------------------------------------
public void setUsername(String username)
this.username = username;
public void setPassword(String password)
this.password = password;
public void setEmail(String email)
this.email = email;
public void setUserPic(String userPic)
this.userPic = userPic;
public void setSex(String sex)
this.sex = sex;
public void setuId(long uId) this.uId = uId;
public void setPicturesList(List<Pictures> picturesList)
this.picturesList = picturesList;
//--------------------------------------------------------
public String getUsername()
return username;
public String getPassword()
return password;
public String getUserPic()
return userPic;
public String getEmail()
return email;
public String getUser_Sex()
return sex;
public long getuId() return uId;
public List<Pictures> getPicturesList()
return picturesList;
and
@Entity(name = "picture")
@Table(name = "PICTURE")
public class Pictures implements Serializable
@Id // create id and fill auto by sequence in database
@Column(name="PID" ,columnDefinition = "NUMBER" )
@SequenceGenerator(name = "mySeq2" , sequenceName = "DB_MYSEQ2")
@GeneratedValue(strategy=GenerationType.AUTO ,generator="mySeq2")
private long pId;
@Basic
@Column (name = "PICADRESS" , columnDefinition = "NVARCHAR2(50)" , nullable = false)
private String picAdress ;
@Basic
@Column (name = "CAPTION" , columnDefinition = "LONG")
private String caption;
@Basic
@Column (name = "LIKE_COUNTER" , columnDefinition = "NUMBER")
private int likes;
//--------------------------------------------------------
public Pictures()
public Pictures( String picAdress, String caption, int likes)
this.picAdress = picAdress;
this.caption = caption;
this.likes = likes;
//--------------------------------------------------------
public void setPid(long pid)
this.pId = pid;
public void setLikes(int likes)
this.likes = likes;
public void setPicAdress(String picAdress)
this.picAdress = picAdress;
public void setCaption(String caption)
this.caption = caption;
//--------------------------------------------------------
public int getLikes()
return likes;
public String getCaption()
return caption;
public String getPicAdress()
return picAdress;
public long getPid()
return pId;
and persistence.xml :
<persistence-unit name="MyConnection" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
<property name="hibernate.connection.username" value="midas"/>
<property name="hibernate.connection.password" value="midas123"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
<property name="hibernate.hbm2ddl.auto" value="create"/>
<property name="show_sql" value="true"></property>
<property name="hibernate.globally_quoted_identifiers" value="true"/>
</properties>
</persistence-unit>
How can I fix it?
java java-ee oracle11g invalid-characters hibernate-jpa
add a comment |
I want create two tables with Hibernate JPA
.
I use Oracle 11g
and JDBC 6 & 7
(Because I'm not sure which one is suitable for 11g :) ).
my library : hibernate-release-4.2.0.Final
& hibernate-jpa-2.0-api-1.0.1
& Tomcat-8 lib
& JDK 1.8.0-172
I create two Entities but when I run the program , the tables are not created and present this error :
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: create table "PICTURE" ("PID" `NUMBER` not null, " CAPTION " `LONG `, " LIKES_COUNTER " ` NUMBER `, " PIC_ADRESS " ` NVARCHAR2(50) ` not null, FK_USERS `NUMBER`, primary key ("PID"))
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: ORA-00911: invalid character
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: create table "USERS" ("UID" `NUMBER` not null, " EMAIL " ` NVARCHAR2(40)` not null, " USER_PASSWORD " ` NVARCHAR2(32)` not null, " USER_SEX " ` NVARCHAR2(20)`, " UPICADD " ` NVARCHAR2(50)`, " USERNAME " ` NVARCHAR2(30)` not null, primary key ("UID"))
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: ORA-00911: invalid character
I run these queries directly on SQL PLUS for testing. Tables were created correctly. even when I used <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
, The tables that I created directly , dropped but weren't rebuilt.
my entities :
@Entity (name = "person")
@Table(name = "USERS")
@EntityListeners(value = PersonManager.class)
public class Person implements Serializable
@Id
@Column(name="UID" ,columnDefinition = "NUMBER" )
@SequenceGenerator(name = "mySeq" , sequenceName = "DB_MYSEQ")
@GeneratedValue(strategy=GenerationType.AUTO ,generator="mySeq")
private long uId;
//--------define relation------
@OneToMany(cascade = CascadeType.ALL , fetch = FetchType.EAGER)
@JoinColumn(name = " FK_USERS" )
private List<Pictures> picturesList;
@Basic
@Column (name = " USERNAME " , columnDefinition = " NVARCHAR2(30)" , nullable = false )
private String username ;
@Basic
@Column (name = " USER_PASSWORD " , columnDefinition = " NVARCHAR2(32)" , nullable = false )
private String password ;
@Basic
@Column (name = " EMAIL " , columnDefinition = " NVARCHAR2(40)" , nullable = false)
private String email;
@Basic // user picture for profile
@Column (name = " UPICADD " , columnDefinition = " NVARCHAR2(50)" )
private String userPic;
@Basic
@Column (name = " USER_SEX " , columnDefinition = " NVARCHAR2(20)")
private String sex ;
public Person(String username, String password, String email ,String sex, String userPic )
this.picturesList = picturesList;
this.sex = sex;
this.userPic = userPic;
this.email = email;
this.password = password;
this.username = username;
//--------------------------------------------------------
public void setUsername(String username)
this.username = username;
public void setPassword(String password)
this.password = password;
public void setEmail(String email)
this.email = email;
public void setUserPic(String userPic)
this.userPic = userPic;
public void setSex(String sex)
this.sex = sex;
public void setuId(long uId) this.uId = uId;
public void setPicturesList(List<Pictures> picturesList)
this.picturesList = picturesList;
//--------------------------------------------------------
public String getUsername()
return username;
public String getPassword()
return password;
public String getUserPic()
return userPic;
public String getEmail()
return email;
public String getUser_Sex()
return sex;
public long getuId() return uId;
public List<Pictures> getPicturesList()
return picturesList;
and
@Entity(name = "picture")
@Table(name = "PICTURE")
public class Pictures implements Serializable
@Id // create id and fill auto by sequence in database
@Column(name="PID" ,columnDefinition = "NUMBER" )
@SequenceGenerator(name = "mySeq2" , sequenceName = "DB_MYSEQ2")
@GeneratedValue(strategy=GenerationType.AUTO ,generator="mySeq2")
private long pId;
@Basic
@Column (name = "PICADRESS" , columnDefinition = "NVARCHAR2(50)" , nullable = false)
private String picAdress ;
@Basic
@Column (name = "CAPTION" , columnDefinition = "LONG")
private String caption;
@Basic
@Column (name = "LIKE_COUNTER" , columnDefinition = "NUMBER")
private int likes;
//--------------------------------------------------------
public Pictures()
public Pictures( String picAdress, String caption, int likes)
this.picAdress = picAdress;
this.caption = caption;
this.likes = likes;
//--------------------------------------------------------
public void setPid(long pid)
this.pId = pid;
public void setLikes(int likes)
this.likes = likes;
public void setPicAdress(String picAdress)
this.picAdress = picAdress;
public void setCaption(String caption)
this.caption = caption;
//--------------------------------------------------------
public int getLikes()
return likes;
public String getCaption()
return caption;
public String getPicAdress()
return picAdress;
public long getPid()
return pId;
and persistence.xml :
<persistence-unit name="MyConnection" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
<property name="hibernate.connection.username" value="midas"/>
<property name="hibernate.connection.password" value="midas123"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
<property name="hibernate.hbm2ddl.auto" value="create"/>
<property name="show_sql" value="true"></property>
<property name="hibernate.globally_quoted_identifiers" value="true"/>
</properties>
</persistence-unit>
How can I fix it?
java java-ee oracle11g invalid-characters hibernate-jpa
Why do you have blanks in your column name: " USERNAME "
– Simon Martinelli
Nov 12 at 9:46
add a comment |
I want create two tables with Hibernate JPA
.
I use Oracle 11g
and JDBC 6 & 7
(Because I'm not sure which one is suitable for 11g :) ).
my library : hibernate-release-4.2.0.Final
& hibernate-jpa-2.0-api-1.0.1
& Tomcat-8 lib
& JDK 1.8.0-172
I create two Entities but when I run the program , the tables are not created and present this error :
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: create table "PICTURE" ("PID" `NUMBER` not null, " CAPTION " `LONG `, " LIKES_COUNTER " ` NUMBER `, " PIC_ADRESS " ` NVARCHAR2(50) ` not null, FK_USERS `NUMBER`, primary key ("PID"))
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: ORA-00911: invalid character
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: create table "USERS" ("UID" `NUMBER` not null, " EMAIL " ` NVARCHAR2(40)` not null, " USER_PASSWORD " ` NVARCHAR2(32)` not null, " USER_SEX " ` NVARCHAR2(20)`, " UPICADD " ` NVARCHAR2(50)`, " USERNAME " ` NVARCHAR2(30)` not null, primary key ("UID"))
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: ORA-00911: invalid character
I run these queries directly on SQL PLUS for testing. Tables were created correctly. even when I used <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
, The tables that I created directly , dropped but weren't rebuilt.
my entities :
@Entity (name = "person")
@Table(name = "USERS")
@EntityListeners(value = PersonManager.class)
public class Person implements Serializable
@Id
@Column(name="UID" ,columnDefinition = "NUMBER" )
@SequenceGenerator(name = "mySeq" , sequenceName = "DB_MYSEQ")
@GeneratedValue(strategy=GenerationType.AUTO ,generator="mySeq")
private long uId;
//--------define relation------
@OneToMany(cascade = CascadeType.ALL , fetch = FetchType.EAGER)
@JoinColumn(name = " FK_USERS" )
private List<Pictures> picturesList;
@Basic
@Column (name = " USERNAME " , columnDefinition = " NVARCHAR2(30)" , nullable = false )
private String username ;
@Basic
@Column (name = " USER_PASSWORD " , columnDefinition = " NVARCHAR2(32)" , nullable = false )
private String password ;
@Basic
@Column (name = " EMAIL " , columnDefinition = " NVARCHAR2(40)" , nullable = false)
private String email;
@Basic // user picture for profile
@Column (name = " UPICADD " , columnDefinition = " NVARCHAR2(50)" )
private String userPic;
@Basic
@Column (name = " USER_SEX " , columnDefinition = " NVARCHAR2(20)")
private String sex ;
public Person(String username, String password, String email ,String sex, String userPic )
this.picturesList = picturesList;
this.sex = sex;
this.userPic = userPic;
this.email = email;
this.password = password;
this.username = username;
//--------------------------------------------------------
public void setUsername(String username)
this.username = username;
public void setPassword(String password)
this.password = password;
public void setEmail(String email)
this.email = email;
public void setUserPic(String userPic)
this.userPic = userPic;
public void setSex(String sex)
this.sex = sex;
public void setuId(long uId) this.uId = uId;
public void setPicturesList(List<Pictures> picturesList)
this.picturesList = picturesList;
//--------------------------------------------------------
public String getUsername()
return username;
public String getPassword()
return password;
public String getUserPic()
return userPic;
public String getEmail()
return email;
public String getUser_Sex()
return sex;
public long getuId() return uId;
public List<Pictures> getPicturesList()
return picturesList;
and
@Entity(name = "picture")
@Table(name = "PICTURE")
public class Pictures implements Serializable
@Id // create id and fill auto by sequence in database
@Column(name="PID" ,columnDefinition = "NUMBER" )
@SequenceGenerator(name = "mySeq2" , sequenceName = "DB_MYSEQ2")
@GeneratedValue(strategy=GenerationType.AUTO ,generator="mySeq2")
private long pId;
@Basic
@Column (name = "PICADRESS" , columnDefinition = "NVARCHAR2(50)" , nullable = false)
private String picAdress ;
@Basic
@Column (name = "CAPTION" , columnDefinition = "LONG")
private String caption;
@Basic
@Column (name = "LIKE_COUNTER" , columnDefinition = "NUMBER")
private int likes;
//--------------------------------------------------------
public Pictures()
public Pictures( String picAdress, String caption, int likes)
this.picAdress = picAdress;
this.caption = caption;
this.likes = likes;
//--------------------------------------------------------
public void setPid(long pid)
this.pId = pid;
public void setLikes(int likes)
this.likes = likes;
public void setPicAdress(String picAdress)
this.picAdress = picAdress;
public void setCaption(String caption)
this.caption = caption;
//--------------------------------------------------------
public int getLikes()
return likes;
public String getCaption()
return caption;
public String getPicAdress()
return picAdress;
public long getPid()
return pId;
and persistence.xml :
<persistence-unit name="MyConnection" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
<property name="hibernate.connection.username" value="midas"/>
<property name="hibernate.connection.password" value="midas123"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
<property name="hibernate.hbm2ddl.auto" value="create"/>
<property name="show_sql" value="true"></property>
<property name="hibernate.globally_quoted_identifiers" value="true"/>
</properties>
</persistence-unit>
How can I fix it?
java java-ee oracle11g invalid-characters hibernate-jpa
I want create two tables with Hibernate JPA
.
I use Oracle 11g
and JDBC 6 & 7
(Because I'm not sure which one is suitable for 11g :) ).
my library : hibernate-release-4.2.0.Final
& hibernate-jpa-2.0-api-1.0.1
& Tomcat-8 lib
& JDK 1.8.0-172
I create two Entities but when I run the program , the tables are not created and present this error :
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: create table "PICTURE" ("PID" `NUMBER` not null, " CAPTION " `LONG `, " LIKES_COUNTER " ` NUMBER `, " PIC_ADRESS " ` NVARCHAR2(50) ` not null, FK_USERS `NUMBER`, primary key ("PID"))
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: ORA-00911: invalid character
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: create table "USERS" ("UID" `NUMBER` not null, " EMAIL " ` NVARCHAR2(40)` not null, " USER_PASSWORD " ` NVARCHAR2(32)` not null, " USER_SEX " ` NVARCHAR2(20)`, " UPICADD " ` NVARCHAR2(50)`, " USERNAME " ` NVARCHAR2(30)` not null, primary key ("UID"))
Nov 12, 2018 10:15:35 AM org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: ORA-00911: invalid character
I run these queries directly on SQL PLUS for testing. Tables were created correctly. even when I used <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
, The tables that I created directly , dropped but weren't rebuilt.
my entities :
@Entity (name = "person")
@Table(name = "USERS")
@EntityListeners(value = PersonManager.class)
public class Person implements Serializable
@Id
@Column(name="UID" ,columnDefinition = "NUMBER" )
@SequenceGenerator(name = "mySeq" , sequenceName = "DB_MYSEQ")
@GeneratedValue(strategy=GenerationType.AUTO ,generator="mySeq")
private long uId;
//--------define relation------
@OneToMany(cascade = CascadeType.ALL , fetch = FetchType.EAGER)
@JoinColumn(name = " FK_USERS" )
private List<Pictures> picturesList;
@Basic
@Column (name = " USERNAME " , columnDefinition = " NVARCHAR2(30)" , nullable = false )
private String username ;
@Basic
@Column (name = " USER_PASSWORD " , columnDefinition = " NVARCHAR2(32)" , nullable = false )
private String password ;
@Basic
@Column (name = " EMAIL " , columnDefinition = " NVARCHAR2(40)" , nullable = false)
private String email;
@Basic // user picture for profile
@Column (name = " UPICADD " , columnDefinition = " NVARCHAR2(50)" )
private String userPic;
@Basic
@Column (name = " USER_SEX " , columnDefinition = " NVARCHAR2(20)")
private String sex ;
public Person(String username, String password, String email ,String sex, String userPic )
this.picturesList = picturesList;
this.sex = sex;
this.userPic = userPic;
this.email = email;
this.password = password;
this.username = username;
//--------------------------------------------------------
public void setUsername(String username)
this.username = username;
public void setPassword(String password)
this.password = password;
public void setEmail(String email)
this.email = email;
public void setUserPic(String userPic)
this.userPic = userPic;
public void setSex(String sex)
this.sex = sex;
public void setuId(long uId) this.uId = uId;
public void setPicturesList(List<Pictures> picturesList)
this.picturesList = picturesList;
//--------------------------------------------------------
public String getUsername()
return username;
public String getPassword()
return password;
public String getUserPic()
return userPic;
public String getEmail()
return email;
public String getUser_Sex()
return sex;
public long getuId() return uId;
public List<Pictures> getPicturesList()
return picturesList;
and
@Entity(name = "picture")
@Table(name = "PICTURE")
public class Pictures implements Serializable
@Id // create id and fill auto by sequence in database
@Column(name="PID" ,columnDefinition = "NUMBER" )
@SequenceGenerator(name = "mySeq2" , sequenceName = "DB_MYSEQ2")
@GeneratedValue(strategy=GenerationType.AUTO ,generator="mySeq2")
private long pId;
@Basic
@Column (name = "PICADRESS" , columnDefinition = "NVARCHAR2(50)" , nullable = false)
private String picAdress ;
@Basic
@Column (name = "CAPTION" , columnDefinition = "LONG")
private String caption;
@Basic
@Column (name = "LIKE_COUNTER" , columnDefinition = "NUMBER")
private int likes;
//--------------------------------------------------------
public Pictures()
public Pictures( String picAdress, String caption, int likes)
this.picAdress = picAdress;
this.caption = caption;
this.likes = likes;
//--------------------------------------------------------
public void setPid(long pid)
this.pId = pid;
public void setLikes(int likes)
this.likes = likes;
public void setPicAdress(String picAdress)
this.picAdress = picAdress;
public void setCaption(String caption)
this.caption = caption;
//--------------------------------------------------------
public int getLikes()
return likes;
public String getCaption()
return caption;
public String getPicAdress()
return picAdress;
public long getPid()
return pId;
and persistence.xml :
<persistence-unit name="MyConnection" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
<property name="hibernate.connection.username" value="midas"/>
<property name="hibernate.connection.password" value="midas123"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
<property name="hibernate.hbm2ddl.auto" value="create"/>
<property name="show_sql" value="true"></property>
<property name="hibernate.globally_quoted_identifiers" value="true"/>
</properties>
</persistence-unit>
How can I fix it?
java java-ee oracle11g invalid-characters hibernate-jpa
java java-ee oracle11g invalid-characters hibernate-jpa
edited Nov 12 at 10:30
jelford
2,20111427
2,20111427
asked Nov 12 at 7:59
farzane
54
54
Why do you have blanks in your column name: " USERNAME "
– Simon Martinelli
Nov 12 at 9:46
add a comment |
Why do you have blanks in your column name: " USERNAME "
– Simon Martinelli
Nov 12 at 9:46
Why do you have blanks in your column name: " USERNAME "
– Simon Martinelli
Nov 12 at 9:46
Why do you have blanks in your column name: " USERNAME "
– Simon Martinelli
Nov 12 at 9:46
add a comment |
1 Answer
1
active
oldest
votes
I finally discovered the problem.
this property <property name="hibernate.globally_quoted_identifiers" value="true"/>
in persistence.xml , add single Quotation for any data_type instead of name column!
I deleted it and solved problem. :)
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53257932%2ferror-ora-00911-invalid-character-for-create-tables-by-hibernate-jpa%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I finally discovered the problem.
this property <property name="hibernate.globally_quoted_identifiers" value="true"/>
in persistence.xml , add single Quotation for any data_type instead of name column!
I deleted it and solved problem. :)
add a comment |
I finally discovered the problem.
this property <property name="hibernate.globally_quoted_identifiers" value="true"/>
in persistence.xml , add single Quotation for any data_type instead of name column!
I deleted it and solved problem. :)
add a comment |
I finally discovered the problem.
this property <property name="hibernate.globally_quoted_identifiers" value="true"/>
in persistence.xml , add single Quotation for any data_type instead of name column!
I deleted it and solved problem. :)
I finally discovered the problem.
this property <property name="hibernate.globally_quoted_identifiers" value="true"/>
in persistence.xml , add single Quotation for any data_type instead of name column!
I deleted it and solved problem. :)
edited Nov 12 at 11:18
answered Nov 12 at 11:12
farzane
54
54
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53257932%2ferror-ora-00911-invalid-character-for-create-tables-by-hibernate-jpa%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why do you have blanks in your column name: " USERNAME "
– Simon Martinelli
Nov 12 at 9:46