For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 14 replies, 2 voices, and was last updated 18 years, 6 months ago by
Loyal Water.
-
AuthorPosts
-
autyMemberHi, I’ soory I dont know where I shoud ask.
At first time on starting up Myeclipse,when I selected Reports_install, I was told to install [PDE].So perhaps I installed it.
Next time I selected Reports_install,but it happened Dupulicate ERROR.Now I cannot find [MyEclipse Report Design perspective] in the Windows-menu-[Open
Perspective].What shall I do ? I wanna try MyEclipse Reports.
January 22, 2008 at 5:17 am #280907
Loyal WaterMemberauty,
Are you using Eclipse Europa Classic with MyEclipse 6.0.1 ?Also, can you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.
January 22, 2008 at 5:54 pm #280953
autyMemberHi Nipun ,
Thank you for taking care of my trouble.I’m using
—————————————
eclipse-SDK-3.2.2-win32.zip (perhaps)+ MyEclipse_6.0.1GA_E3.3.1_Installer.exe
+ pleiades-all-in-one-java-wtp-jre_20071121.zip (for Japanese)
—————————————[Installation Details] is as follows
*** Date:
Wednesday, January 23, 2008 8:33:32 AM JST** System properties:
OS=WindowsVista
OS version=6.0
Java �ージョン=1.6.0_03*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 6.0.1 GA
Build id: 6.0.1-GA-200710*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 6.0.1 GA
Build id: 6.0.1-GA-200710Eclipse Platform
Version: 3.3.2.R33x_v20071022-_19UEksF-G8Yc6bUv3Dz
Build id: M20071023-1652Eclipse Java Development Tools
Version: 3.3.1.r331_v20070629-7o7jE72EDlXAbqAcnbmyg1rf8RIL
Build id: M20071023-1652Eclipse Plug-in Development Environment
Version: 3.3.2.R33x_r20071022-7N7M4CYWLBCz-yHkMIuHN
Build id: M20071023-1652Eclipse Graphical Editing Framework
Version: 3.3.1.v20070814
Build id: 20070814-1555Eclipse RCP
Version: 3.3.2.R33x_r20071022-8y8eE9CEV3FspP8HJrY1M2dS
Build id: M20071023-1652Eclipse Graphical Editing Framework
Version: 3.3.1.v20070814
Build id: 20070814-1555Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\eclipse6\eclipse.exe
-name
Eclipse
–launcher.library
C:\eclipse6\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.2.R331_v20071019\eclipse_1021.dll
-startup
C:\eclipse6\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20070828.jar
-product
com.genuitec.myeclipse.product.ide
-vm
C:\eclipse6\jre\bin\client\jvm.dll
———————————————————–auty
JAPANJanuary 23, 2008 at 10:49 am #281001
Loyal WaterMemberauty,
You cannot use WTP with MyEclipse. If you are using the MyEclipse All in one installer, you dont have to install Eclipse separately. Eclipse and MyEclipse are preintegrated in the All in One installer.Installer MyEclipse to a brand new location using the All in One installer and then check if you can setup reports.
January 24, 2008 at 5:49 am #281063
autyMemberNipun,
I used
MyEclipse_6.0.1GA_E3.3.1_FullStackInstaller.exe
I could get Myeclipse Reports. Thanks a lot !Now I have another problem [net/sf/ehcache/CacheException].
Acoording to Hibernate Tutorial,I created simple Java Project.
I got next DUMP.—————————————–
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread “main” java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:327)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:219)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
at com.myeclipse.hibernate.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:31)
at com.myeclipse.hibernate.BaseHibernateDAO.getSession(BaseHibernateDAO.java:13)
at com.myeclipse.hibernate.HibernateExample.addUser(HibernateExample.java:35)
at com.myeclipse.hibernate.HibernateExample.main(HibernateExample.java:12)
—————————————–Once,It went good in the previous environment.
I found the same Exception in another column in this Myeclipse.
https://www.genuitec.com/forums/topic/error-in-hibernate-tutorial-practise-closed/#post-248265
http://64.233.167.104/custom?q=cache:fL47VS1vr6UJ:www.myeclipseide.com/PNphpBB2%2Bfile-viewtopic-t-11355.html+net/sf/ehcache/CacheException&hl=en&ct=clnk&cd=2&client=google-coopI tried several times,in vain.
I will show you my projects.
[hibernate.cfg.xml] ================================
<?xml version=’1.0′ encoding=’UTF-8′?>
<!DOCTYPE hibernate-configuration PUBLIC
“-//Hibernate/Hibernate Configuration DTD 3.0//EN”
“http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd”><!– Generated by MyEclipse Hibernate Tools. –>
<hibernate-configuration><session-factory>
<property name=”connection.username”>jsp10</property>
<property name=”connection.url”>
jdbc:mysql://localhost:3306/jsp10
</property>
<property name=”dialect”>
org.hibernate.dialect.MySQLDialect
</property>
<property name=”myeclipse.connection.profile”>
Mysql jsp10
</property>
<property name=”connection.password”>jsp10</property>
<property name=”connection.driver_class”>
com.mysql.jdbc.Driver
</property>
<mapping resource=”com/myeclipse/hibernate/User.hbm.xml” /></session-factory>
</hibernate-configuration>
[User.hbm.xml] ================================
<?xml version=”1.0″ encoding=”utf-8″?>
<!DOCTYPE hibernate-mapping PUBLIC “-//Hibernate/Hibernate Mapping DTD 3.0//EN”
“http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd”>
<!–
Mapping file autogenerated by MyEclipse Persistence Tools
–>
<hibernate-mapping>
<class name=”com.myeclipse.hibernate.User” table=”user” catalog=”jsp10″>
<id name=”id” type=”java.lang.Integer”>
<column name=”id” />
<generator class=”assigned” />
</id>
<property name=”username” type=”java.lang.String”>
<column name=”username” length=”64″ not-null=”true” />
</property>
<property name=”password” type=”java.lang.String”>
<column name=”password” length=”64″ not-null=”true” />
</property>
<property name=”firstName” type=”java.lang.String”>
<column name=”first_name” length=”128″ not-null=”true” />
</property>
<property name=”lastName” type=”java.lang.String”>
<column name=”last_name” length=”128″ not-null=”true” />
</property>
<property name=”dateCreated” type=”java.lang.Long”>
<column name=”date_created” not-null=”true” />
</property>
</class>
</hibernate-mapping>Can you help me?
autyJanuary 25, 2008 at 10:37 am #281121
Loyal WaterMemberauty,
You got this error when you created a new Java project ?Can you switch to a new workspace and try creating a new Java project. Do you still get the same error ?
January 26, 2008 at 2:36 am #281165
autyMemberNipun,
Thanks again.>You got this error when you created a new Java project ?
Yes.>Can you switch to a new workspace and try creating a new Java project. Do you still get the same error ?
I switched to a new workspace, and everything has gone well.I ‘m so glad to get out of troubles,but I want to know the reason because I can correct the old workspace if I can.
Do you have any infomation?————————————-
autyJanuary 28, 2008 at 6:54 am #281179
Loyal WaterMemberauty,
You can try using the -clean command to clean your old workspace. Incase that doesn’t fix it, you will have to import your projects into the new workspace and continue working.
https://www.genuitec.com/forums/topic/troubleshoot-using-the-clean-command-line-argument/February 2, 2008 at 9:46 am #281403
autyMemberNipun,
I’m quite at a loss.
I get next dump as same as the list above again and again.
—————————————–
log4j:WARN No appenders could be found for logger (hibe.book2.BookDAO).
log4j:WARN Please initialize the log4j system properly.
Exception in thread “main” java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:327)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:219)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
at hibe.book.my.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:31)
at hibe.book.my.BaseHibernateDAO.getSession(BaseHibernateDAO.java:13)
at hibe.book2.BookDAO.findById(BookDAO.java:54)
at hibe.book2.BookLoaderSample.main(BookLoaderSample.java:5)
—————————————–
It often happens just after I reinstall Myeclipse.And,sometimes after reinstalling Myeclipse,it seems to go well at first,
but,once I restart Myeclipse,it continues to dump these messages.What should I do ?
February 4, 2008 at 11:27 am #281427
Loyal WaterMemberCan you give me some information about you project. Have you added MyEclipse Hibernate capabilities to your project ?
Can you go to Project > Properties and check which icons are lit up on the MyEclipse page ?
February 6, 2008 at 8:15 am #281498
autyMemberNipun,
I see only Hibernate icon checked on the MyEclipse page.I found [Window>Preferences>Installed JREs] is queer.
I think a change of JRE affects newly created Java Projects.But the change affects at once.
I hava two JREs there.
1.jdk1.6.0_02
2.MyEclipse 6.0
When I select MyEclipse 6.0, most things go well.
When I select jdk1.6.0_02,those dumps are emitted at once.
… java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException …I can see Hibernate 3.1 Core Libraries in my Project ,and ehchache-1.1.jar there.
auty
February 6, 2008 at 8:58 am #281499
autyMemberNipun,
I’m sorry I didn’t add *.jars to classpath when jdk1.6.0_02 was running.
Now it’s all right.Next using MyEclipse Derby,
table APP.USER
—————————————————-
create table “APP”.”USER”(
“id” INT not null generated always as identity,
“username” VARCHAR(64) default ” not null,
“password” VARCHAR(64) default ” not null,
“first_name” VARCHAR(128) default ” not null,
“last_name” VARCHAR(128) default ” not null,
“date_created” BIGINT not null,
constraint “SQLAPPuser” primary key (“id”)
);
—————————————————-
User.hbm.xml
—————————————————-
<hibernate-mapping>
<class name=”hibe.user.User” table=”USER” schema=”APP”>
<id name=”id” type=”java.lang.Integer”>
<column name=”id” />
<generator class=”identity” />
</id>
<property name=”username” type=”java.lang.String”>
<column name=”username” length=”64″ not-null=”true” />
</property>
<property name=”password” type=”java.lang.String”>
<column name=”password” length=”64″ not-null=”true” />
</property>
<property name=”firstName” type=”java.lang.String”>
<column name=”first_name” length=”128″ not-null=”true” />
</property>
<property name=”lastName” type=”java.lang.String”>
<column name=”last_name” length=”128″ not-null=”true” />
</property>
<property name=”dateCreated” type=”java.lang.Long”>
<column name=”date_created” not-null=”true” />
</property>
</class>
</hibernate-mapping>
—————————————————-
when I run next program(findById)
—————————————————-
public class UserLoaderSample {
public static void main(String args[]) {
User user = new UserDAO().findById(new Integer(3));
System.out.println(user);
}
}
—————————————————-
log4j:WARN No appenders could be found for logger (hibe.user.UserDAO).
log4j:WARN Please initialize the log4j system properly.
Hibernate: select user0_.id as id0_0_, user0_.username as username0_0_, user0_.password as password0_0_, user0_.first_name as first4_0_0_, user0_.last_name as last5_0_0_, user0_.date_created as date6_0_0_ from APP.USER user0_ where user0_.id=?
Exception in thread “main” org.hibernate.exception.SQLGrammarException: could not load an entity: [hibe.user.User#3]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1799)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:47)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:41)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:799)
at hibe.user.UserDAO.findById(UserDAO.java:57)
at hibe.user.UserLoaderSample.main(UserLoaderSample.java:5)
Caused by: java.sql.SQLException: Syntax error: Encountered “USER” at line 1, column 204.
at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
… 12 more
Caused by: org.apache.derby.client.am.SqlException: Syntax error: Encountered “USER” at line 1, column 204.
at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
… 20 more
—————————————————-
when I run next program(save)
—————————————————-
private static void addUser() {
// 1. Create user
User user = new User();
//user.setId(new Integer(1));
user.setUsername(“User”);
user.setPassword(“1234”);
user.setFirstName(“John”);
user.setLastName(“Doe”);
user.setDateCreated(System.currentTimeMillis());// 2. Create DAO
UserDAO dao = new UserDAO();// 3. Start the transaction
Transaction tx = dao.getSession().beginTransaction();// 4. Add user
dao.save(user);// 5. Commit the transaction (write to database)
tx.commit();// 6. Close the session (cleanup connections)
dao.getSession().close();
}
—————————————————-
Hibernate: insert into APP.USER (username, password, first_name, last_name, date_created, id) values (?, ?, ?, ?, ?, default)
Exception in thread “main” org.hibernate.exception.SQLGrammarException: could not insert: [hibe.user.User]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1986)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2405)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:530)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:518)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:514)
at hibe.user.UserDAO.save(UserDAO.java:35)
at hibe.user.HibernateExample.addUser(HibernateExample.java:38)
at hibe.user.HibernateExample.main(HibernateExample.java:12)
Caused by: java.sql.SQLException: Syntax error: Encountered “USER” at line 1, column 17.
at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1948)
… 17 more
Caused by: org.apache.derby.client.am.SqlException: Syntax error: Encountered “USER” at line 1, column 17.
at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
… 21 morehelp me
autyFebruary 7, 2008 at 11:13 am #281564
Loyal WaterMemberauty,
Have you tried running the “Introduction to hibernate” demo which i available for download on the Hibernate tutorial page ? Is the exactly similar to that app or have you made changes to this app ?February 8, 2008 at 10:31 am #281592
autyMemberYes,I’m leaning “Introduction to hibernate” maybe on my way.The above SQL is taken fron Myeclipse Database Explore.
When I was working with other Project using HTML,Myeclipe suddenly got down so I have restarted Myeclipe.As you suggested the original Sample(IntroductionToHibernateProject.zip),I imported it.
I changed a few items(Mysql database name,catalog,password) and then everything is goot.
When I returned to my old project avove,though I don’t guess why,everything is going well now.I learned that it is important to go back to the origin stable.
Thanks a lot all the time !
February 8, 2008 at 10:35 am #281594
Loyal WaterMemberYour Welcome.
-
AuthorPosts
