Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[Teneo] OutOfMemory error
https://www.eclipse.org/forums/index.php/mv/msg/34507/111853/#msg_111853
Martin has helped me get this far with a large model. I now get
log4j:WARN No appenders could be found for logger
(org.eclipse.emf.teneo.hibernate.HbHelper).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
I am using the latest (as of Monday) version of Teneo. I notice the
process doing the work when running my Hib DataStore init (as below)
only uses 100MB. It there some way of increasing the memory available to
this process? There are over 1000 tables being generated.
There is nothing in the error log window from the time I run this.
// the name of the datastore
String hbName = "MyGenSec";
// the name of the database, this database should exist but does not
need to contain tables
String dbName = "gensechib";
// Set the database information, Environment is
org.hibernate.cfg.Environment
final Properties props = new Properties();
props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
props.setProperty(Environment.USER, "root");
props.setProperty(Environment.PASS, "passw0rd");
props.setProperty(Environment.URL, "jdbc:mysql://192.168.0.3:3306/" +
dbName);
props.setProperty(Environment.DIALECT,
org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
// props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
"false");
// create the HbDataStore
HbDataStore hbds = HbHelper.INSTANCE.createRegisterDataStore(hbName);
// sets its epackages stored in this datastore
hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
// set the relational database to use and other properties
// to set Teneo specific options call hbds.setPersistenceProperties
hbds.setHibernateProperties(props);
// initialize, also creates the database tables
hbds.initialize(); }
David]]>David Wynter2008-02-06T14:20:00-00:00Re: [Teneo] OutOfMemory error
https://www.eclipse.org/forums/index.php/mv/msg/34507/111857/#msg_111857
Have you tried with a larger maxpermsize?
gr. Martin
david wrote:
> Hi,
>
> Martin has helped me get this far with a large model. I now get
>
> log4j:WARN No appenders could be found for logger
> (org.eclipse.emf.teneo.hibernate.HbHelper).
> log4j:WARN Please initialize the log4j system properly.
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>
> I have eclipse set top run with these parameters
>
> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
> -XX:MaxPermSize=128M
>
> I am using the latest (as of Monday) version of Teneo. I notice the
> process doing the work when running my Hib DataStore init (as below)
> only uses 100MB. It there some way of increasing the memory available to
> this process? There are over 1000 tables being generated.
>
> There is nothing in the error log window from the time I run this.
>
> // the name of the datastore
> String hbName = "MyGenSec";
> // the name of the database, this database should exist but does
> not need to contain tables
> String dbName = "gensechib";
> // Set the database information, Environment is
> org.hibernate.cfg.Environment
> final Properties props = new Properties();
> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
> props.setProperty(Environment.USER, "root");
> props.setProperty(Environment.PASS, "passw0rd");
> props.setProperty(Environment.URL,
> "jdbc:mysql://192.168.0.3:3306/" + dbName);
> props.setProperty(Environment.DIALECT,
> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
> //
> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY, "false");
> // create the HbDataStore
> HbDataStore hbds =
> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>
> // sets its epackages stored in this datastore
> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>
> // set the relational database to use and other properties
> // to set Teneo specific options call hbds.setPersistenceProperties
> hbds.setHibernateProperties(props);
>
> // initialize, also creates the database tables
> hbds.initialize(); }
>
> David
>
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org]]>Martin Taal2008-02-06T14:27:06-00:00Re: [Teneo] OutOfMemory error
https://www.eclipse.org/forums/index.php/mv/msg/34507/615410/#msg_615410
Have you tried with a larger maxpermsize?
gr. Martin
david wrote:
> Hi,
>
> Martin has helped me get this far with a large model. I now get
>
> log4j:WARN No appenders could be found for logger
> (org.eclipse.emf.teneo.hibernate.HbHelper).
> log4j:WARN Please initialize the log4j system properly.
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>
> I have eclipse set top run with these parameters
>
> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
> -XX:MaxPermSize=128M
>
> I am using the latest (as of Monday) version of Teneo. I notice the
> process doing the work when running my Hib DataStore init (as below)
> only uses 100MB. It there some way of increasing the memory available to
> this process? There are over 1000 tables being generated.
>
> There is nothing in the error log window from the time I run this.
>
> // the name of the datastore
> String hbName = "MyGenSec";
> // the name of the database, this database should exist but does
> not need to contain tables
> String dbName = "gensechib";
> // Set the database information, Environment is
> org.hibernate.cfg.Environment
> final Properties props = new Properties();
> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
> props.setProperty(Environment.USER, "root");
> props.setProperty(Environment.PASS, "passw0rd");
> props.setProperty(Environment.URL,
> "jdbc:mysql://192.168.0.3:3306/" + dbName);
> props.setProperty(Environment.DIALECT,
> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
> //
> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY, "false");
> // create the HbDataStore
> HbDataStore hbds =
> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>
> // sets its epackages stored in this datastore
> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>
> // set the relational database to use and other properties
> // to set Teneo specific options call hbds.setPersistenceProperties
> hbds.setHibernateProperties(props);
>
> // initialize, also creates the database tables
> hbds.initialize(); }
>
> David
>
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org]]>Martin Taal2008-02-06T14:27:06-00:00Re: [Teneo] OutOfMemory error
https://www.eclipse.org/forums/index.php/mv/msg/34507/615411/#msg_615411
Yes I tried 256M and 384M and the size of the process doing the work
remains at about 101MB until it gets that OutOfMemoryException, which
made me think the PermSize is not the issue.
What I do not get is that I know you had success ( partial at least
until MySQL threw in the towel) withthe same model?
David
Martin Taal wrote:
> Hi,
> Have you tried with a larger maxpermsize?
>
> gr. Martin
>
> david wrote:
>> Hi,
>>
>> Martin has helped me get this far with a large model. I now get
>>
>> log4j:WARN No appenders could be found for logger
>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>> log4j:WARN Please initialize the log4j system properly.
>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>
>> I have eclipse set top run with these parameters
>>
>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>> -XX:MaxPermSize=128M
>>
>> I am using the latest (as of Monday) version of Teneo. I notice the
>> process doing the work when running my Hib DataStore init (as below)
>> only uses 100MB. It there some way of increasing the memory available
>> to this process? There are over 1000 tables being generated.
>>
>> There is nothing in the error log window from the time I run this.
>>
>> // the name of the datastore
>> String hbName = "MyGenSec";
>> // the name of the database, this database should exist but
>> does not need to contain tables
>> String dbName = "gensechib";
>> // Set the database information, Environment is
>> org.hibernate.cfg.Environment
>> final Properties props = new Properties();
>> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
>> props.setProperty(Environment.USER, "root");
>> props.setProperty(Environment.PASS, "passw0rd");
>> props.setProperty(Environment.URL,
>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>> props.setProperty(Environment.DIALECT,
>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>> //
>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY, "false");
>> // create the HbDataStore
>> HbDataStore hbds =
>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>
>> // sets its epackages stored in this datastore
>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>
>> // set the relational database to use and other properties
>> // to set Teneo specific options call
>> hbds.setPersistenceProperties
>> hbds.setHibernateProperties(props);
>>
>> // initialize, also creates the database tables
>> hbds.initialize(); }
>>
>> David
>>
>>
>>
>
>]]>David Wynter2008-02-06T15:12:27-00:00Re: [Teneo] OutOfMemory error
https://www.eclipse.org/forums/index.php/mv/msg/34507/111860/#msg_111860
Yes I tried 256M and 384M and the size of the process doing the work
remains at about 101MB until it gets that OutOfMemoryException, which
made me think the PermSize is not the issue.
What I do not get is that I know you had success ( partial at least
until MySQL threw in the towel) withthe same model?
David
Martin Taal wrote:
> Hi,
> Have you tried with a larger maxpermsize?
>
> gr. Martin
>
> david wrote:
>> Hi,
>>
>> Martin has helped me get this far with a large model. I now get
>>
>> log4j:WARN No appenders could be found for logger
>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>> log4j:WARN Please initialize the log4j system properly.
>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>
>> I have eclipse set top run with these parameters
>>
>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>> -XX:MaxPermSize=128M
>>
>> I am using the latest (as of Monday) version of Teneo. I notice the
>> process doing the work when running my Hib DataStore init (as below)
>> only uses 100MB. It there some way of increasing the memory available
>> to this process? There are over 1000 tables being generated.
>>
>> There is nothing in the error log window from the time I run this.
>>
>> // the name of the datastore
>> String hbName = "MyGenSec";
>> // the name of the database, this database should exist but
>> does not need to contain tables
>> String dbName = "gensechib";
>> // Set the database information, Environment is
>> org.hibernate.cfg.Environment
>> final Properties props = new Properties();
>> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
>> props.setProperty(Environment.USER, "root");
>> props.setProperty(Environment.PASS, "passw0rd");
>> props.setProperty(Environment.URL,
>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>> props.setProperty(Environment.DIALECT,
>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>> //
>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY, "false");
>> // create the HbDataStore
>> HbDataStore hbds =
>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>
>> // sets its epackages stored in this datastore
>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>
>> // set the relational database to use and other properties
>> // to set Teneo specific options call
>> hbds.setPersistenceProperties
>> hbds.setHibernateProperties(props);
>>
>> // initialize, also creates the database tables
>> hbds.initialize(); }
>>
>> David
>>
>>
>>
>
>]]>David Wynter2008-02-06T15:12:27-00:00Re: [Teneo] OutOfMemory error
https://www.eclipse.org/forums/index.php/mv/msg/34507/615412/#msg_615412
I should have thought about this earlier: I am not sure how you start the test run but when you do
this from within Eclipse (like with right-mouse click run-ass) then you need to set the -Xmx setting
in the run dialog (so not in the eclipse startup). In Eclipse open the run dialog (under the run
menu), your test program should be listed somewhere, select it and in the second tab (arguments) add
the correct parameters to the VM Arguments field. Press apply and run, normally with subsequent runs
Eclipse will automatically re-use the run settings.
gr. Martin
david wrote:
> Hi,
>
> Yes I tried 256M and 384M and the size of the process doing the work
> remains at about 101MB until it gets that OutOfMemoryException, which
> made me think the PermSize is not the issue.
>
> What I do not get is that I know you had success ( partial at least
> until MySQL threw in the towel) withthe same model?
>
>
> David
>
> Martin Taal wrote:
>> Hi,
>> Have you tried with a larger maxpermsize?
>>
>> gr. Martin
>>
>> david wrote:
>>> Hi,
>>>
>>> Martin has helped me get this far with a large model. I now get
>>>
>>> log4j:WARN No appenders could be found for logger
>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>> log4j:WARN Please initialize the log4j system properly.
>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>>
>>> I have eclipse set top run with these parameters
>>>
>>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>>> -XX:MaxPermSize=128M
>>>
>>> I am using the latest (as of Monday) version of Teneo. I notice the
>>> process doing the work when running my Hib DataStore init (as below)
>>> only uses 100MB. It there some way of increasing the memory available
>>> to this process? There are over 1000 tables being generated.
>>>
>>> There is nothing in the error log window from the time I run this.
>>>
>>> // the name of the datastore
>>> String hbName = "MyGenSec";
>>> // the name of the database, this database should exist but
>>> does not need to contain tables
>>> String dbName = "gensechib";
>>> // Set the database information, Environment is
>>> org.hibernate.cfg.Environment
>>> final Properties props = new Properties();
>>> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
>>> props.setProperty(Environment.USER, "root");
>>> props.setProperty(Environment.PASS, "passw0rd");
>>> props.setProperty(Environment.URL,
>>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>>> props.setProperty(Environment.DIALECT,
>>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>>> //
>>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
>>> "false");
>>> // create the HbDataStore
>>> HbDataStore hbds =
>>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>>
>>> // sets its epackages stored in this datastore
>>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>>
>>> // set the relational database to use and other properties
>>> // to set Teneo specific options call
>>> hbds.setPersistenceProperties
>>> hbds.setHibernateProperties(props);
>>>
>>> // initialize, also creates the database tables
>>> hbds.initialize(); }
>>>
>>> David
>>>
>>>
>>>
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org]]>Martin Taal2008-02-06T15:26:08-00:00Re: [Teneo] OutOfMemory error
https://www.eclipse.org/forums/index.php/mv/msg/34507/111862/#msg_111862
I should have thought about this earlier: I am not sure how you start the test run but when you do
this from within Eclipse (like with right-mouse click run-ass) then you need to set the -Xmx setting
in the run dialog (so not in the eclipse startup). In Eclipse open the run dialog (under the run
menu), your test program should be listed somewhere, select it and in the second tab (arguments) add
the correct parameters to the VM Arguments field. Press apply and run, normally with subsequent runs
Eclipse will automatically re-use the run settings.
gr. Martin
david wrote:
> Hi,
>
> Yes I tried 256M and 384M and the size of the process doing the work
> remains at about 101MB until it gets that OutOfMemoryException, which
> made me think the PermSize is not the issue.
>
> What I do not get is that I know you had success ( partial at least
> until MySQL threw in the towel) withthe same model?
>
>
> David
>
> Martin Taal wrote:
>> Hi,
>> Have you tried with a larger maxpermsize?
>>
>> gr. Martin
>>
>> david wrote:
>>> Hi,
>>>
>>> Martin has helped me get this far with a large model. I now get
>>>
>>> log4j:WARN No appenders could be found for logger
>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>> log4j:WARN Please initialize the log4j system properly.
>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>>
>>> I have eclipse set top run with these parameters
>>>
>>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>>> -XX:MaxPermSize=128M
>>>
>>> I am using the latest (as of Monday) version of Teneo. I notice the
>>> process doing the work when running my Hib DataStore init (as below)
>>> only uses 100MB. It there some way of increasing the memory available
>>> to this process? There are over 1000 tables being generated.
>>>
>>> There is nothing in the error log window from the time I run this.
>>>
>>> // the name of the datastore
>>> String hbName = "MyGenSec";
>>> // the name of the database, this database should exist but
>>> does not need to contain tables
>>> String dbName = "gensechib";
>>> // Set the database information, Environment is
>>> org.hibernate.cfg.Environment
>>> final Properties props = new Properties();
>>> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
>>> props.setProperty(Environment.USER, "root");
>>> props.setProperty(Environment.PASS, "passw0rd");
>>> props.setProperty(Environment.URL,
>>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>>> props.setProperty(Environment.DIALECT,
>>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>>> //
>>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
>>> "false");
>>> // create the HbDataStore
>>> HbDataStore hbds =
>>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>>
>>> // sets its epackages stored in this datastore
>>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>>
>>> // set the relational database to use and other properties
>>> // to set Teneo specific options call
>>> hbds.setPersistenceProperties
>>> hbds.setHibernateProperties(props);
>>>
>>> // initialize, also creates the database tables
>>> hbds.initialize(); }
>>>
>>> David
>>>
>>>
>>>
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org]]>Martin Taal2008-02-06T15:26:08-00:00Re: [Teneo] silent error, no logging
https://www.eclipse.org/forums/index.php/mv/msg/34507/615413/#msg_615413
I gave it -Xmx768M and watched the process as it ran it took up to 268MB
and then failed silently. Nothing in Error log either.
Still getting this
log4j:WARN No appenders could be found for logger
(org.eclipse.emf.teneo.hibernate.HbHelper).
log4j:WARN Please initialize the log4j system properly.
Even after adding the HbHelper to the log4j.properties in the project
src directory
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootCategory=DEBUG, A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
David
Martin Taal wrote:
> Hi David,
> I should have thought about this earlier: I am not sure how you start
> the test run but when you do this from within Eclipse (like with
> right-mouse click run-ass) then you need to set the -Xmx setting in the
> run dialog (so not in the eclipse startup). In Eclipse open the run
> dialog (under the run menu), your test program should be listed
> somewhere, select it and in the second tab (arguments) add the correct
> parameters to the VM Arguments field. Press apply and run, normally with
> subsequent runs Eclipse will automatically re-use the run settings.
>
> gr. Martin
>
> david wrote:
>> Hi,
>>
>> Yes I tried 256M and 384M and the size of the process doing the work
>> remains at about 101MB until it gets that OutOfMemoryException, which
>> made me think the PermSize is not the issue.
>>
>> What I do not get is that I know you had success ( partial at least
>> until MySQL threw in the towel) withthe same model?
>>
>>
>> David
>>
>> Martin Taal wrote:
>>> Hi,
>>> Have you tried with a larger maxpermsize?
>>>
>>> gr. Martin
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> Martin has helped me get this far with a large model. I now get
>>>>
>>>> log4j:WARN No appenders could be found for logger
>>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>>> log4j:WARN Please initialize the log4j system properly.
>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>>>
>>>> I have eclipse set top run with these parameters
>>>>
>>>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>>>> -XX:MaxPermSize=128M
>>>>
>>>> I am using the latest (as of Monday) version of Teneo. I notice the
>>>> process doing the work when running my Hib DataStore init (as below)
>>>> only uses 100MB. It there some way of increasing the memory
>>>> available to this process? There are over 1000 tables being generated.
>>>>
>>>> There is nothing in the error log window from the time I run this.
>>>>
>>>> // the name of the datastore
>>>> String hbName = "MyGenSec";
>>>> // the name of the database, this database should exist but
>>>> does not need to contain tables
>>>> String dbName = "gensechib";
>>>> // Set the database information, Environment is
>>>> org.hibernate.cfg.Environment
>>>> final Properties props = new Properties();
>>>> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
>>>> props.setProperty(Environment.USER, "root");
>>>> props.setProperty(Environment.PASS, "passw0rd");
>>>> props.setProperty(Environment.URL,
>>>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>>>> props.setProperty(Environment.DIALECT,
>>>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>>>> //
>>>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
>>>> "false");
>>>> // create the HbDataStore
>>>> HbDataStore hbds =
>>>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>>>
>>>> // sets its epackages stored in this datastore
>>>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>>>
>>>> // set the relational database to use and other properties
>>>> // to set Teneo specific options call
>>>> hbds.setPersistenceProperties
>>>> hbds.setHibernateProperties(props);
>>>>
>>>> // initialize, also creates the database tables
>>>> hbds.initialize(); }
>>>>
>>>> David
>>>>
>>>>
>>>>
>>>
>>>
>
>]]>David Wynter2008-02-06T16:49:56-00:00Re: [Teneo] silent error, no logging
https://www.eclipse.org/forums/index.php/mv/msg/34507/111863/#msg_111863
I gave it -Xmx768M and watched the process as it ran it took up to 268MB
and then failed silently. Nothing in Error log either.
Still getting this
log4j:WARN No appenders could be found for logger
(org.eclipse.emf.teneo.hibernate.HbHelper).
log4j:WARN Please initialize the log4j system properly.
Even after adding the HbHelper to the log4j.properties in the project
src directory
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootCategory=DEBUG, A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
David
Martin Taal wrote:
> Hi David,
> I should have thought about this earlier: I am not sure how you start
> the test run but when you do this from within Eclipse (like with
> right-mouse click run-ass) then you need to set the -Xmx setting in the
> run dialog (so not in the eclipse startup). In Eclipse open the run
> dialog (under the run menu), your test program should be listed
> somewhere, select it and in the second tab (arguments) add the correct
> parameters to the VM Arguments field. Press apply and run, normally with
> subsequent runs Eclipse will automatically re-use the run settings.
>
> gr. Martin
>
> david wrote:
>> Hi,
>>
>> Yes I tried 256M and 384M and the size of the process doing the work
>> remains at about 101MB until it gets that OutOfMemoryException, which
>> made me think the PermSize is not the issue.
>>
>> What I do not get is that I know you had success ( partial at least
>> until MySQL threw in the towel) withthe same model?
>>
>>
>> David
>>
>> Martin Taal wrote:
>>> Hi,
>>> Have you tried with a larger maxpermsize?
>>>
>>> gr. Martin
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> Martin has helped me get this far with a large model. I now get
>>>>
>>>> log4j:WARN No appenders could be found for logger
>>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>>> log4j:WARN Please initialize the log4j system properly.
>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>>>
>>>> I have eclipse set top run with these parameters
>>>>
>>>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>>>> -XX:MaxPermSize=128M
>>>>
>>>> I am using the latest (as of Monday) version of Teneo. I notice the
>>>> process doing the work when running my Hib DataStore init (as below)
>>>> only uses 100MB. It there some way of increasing the memory
>>>> available to this process? There are over 1000 tables being generated.
>>>>
>>>> There is nothing in the error log window from the time I run this.
>>>>
>>>> // the name of the datastore
>>>> String hbName = "MyGenSec";
>>>> // the name of the database, this database should exist but
>>>> does not need to contain tables
>>>> String dbName = "gensechib";
>>>> // Set the database information, Environment is
>>>> org.hibernate.cfg.Environment
>>>> final Properties props = new Properties();
>>>> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
>>>> props.setProperty(Environment.USER, "root");
>>>> props.setProperty(Environment.PASS, "passw0rd");
>>>> props.setProperty(Environment.URL,
>>>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>>>> props.setProperty(Environment.DIALECT,
>>>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>>>> //
>>>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
>>>> "false");
>>>> // create the HbDataStore
>>>> HbDataStore hbds =
>>>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>>>
>>>> // sets its epackages stored in this datastore
>>>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>>>
>>>> // set the relational database to use and other properties
>>>> // to set Teneo specific options call
>>>> hbds.setPersistenceProperties
>>>> hbds.setHibernateProperties(props);
>>>>
>>>> // initialize, also creates the database tables
>>>> hbds.initialize(); }
>>>>
>>>> David
>>>>
>>>>
>>>>
>>>
>>>
>
>]]>David Wynter2008-02-06T16:49:56-00:00Re: [Teneo] silent error, no logging
https://www.eclipse.org/forums/index.php/mv/msg/34507/615414/#msg_615414
Are you sure that log4j.properties is copied to the output folder?
If you have a plugin project then my experience is that the log4j.properties has to be specifically
selected in the build.properties (to be part of the binary build).
What I find strange is that the console does not show an exception (as you are not mentioning it).
How do you know that the initialize step actually failed?
gr. Martin
david wrote:
> Hi,
>
> I gave it -Xmx768M and watched the process as it ran it took up to 268MB
> and then failed silently. Nothing in Error log either.
>
> Still getting this
>
> log4j:WARN No appenders could be found for logger
> (org.eclipse.emf.teneo.hibernate.HbHelper).
> log4j:WARN Please initialize the log4j system properly.
>
> Even after adding the HbHelper to the log4j.properties in the project
> src directory
>
> # Set root logger level to DEBUG and its only appender to A1.
> log4j.rootCategory=DEBUG, A1
>
> # A1 is set to be a ConsoleAppender.
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>
> # A1 uses PatternLayout.
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
>
> #log4j.logger.org.hibernate=info
> log4j.logger.org.hibernate=debug
>
> ### log HQL query parser activity
> #log4j.logger.org.hibernate.hql.ast.AST=debug
>
> ### log just the SQL
> log4j.logger.org.hibernate.SQL=debug
>
> ### log JDBC bind parameters ###
> log4j.logger.org.hibernate.type=debug
> #log4j.logger.org.hibernate.type=debug
>
> ### log schema export/update ###
> log4j.logger.org.hibernate.tool.hbm2ddl=debug
>
> ### log HQL parse trees
> log4j.logger.org.hibernate.hql=debug
>
> ### log cache activity ###
> log4j.logger.org.hibernate.cache=debug
>
> ### log transaction activity
> log4j.logger.org.hibernate.transaction=debug
>
> ### log JDBC resource acquisition
> log4j.logger.org.hibernate.jdbc=debug
>
> log4j.logger.org.eclipse.emf.teneo.hibernate.mapper.Generate HBM=debug
> log4j.logger.org.eclipse.emf.teneo.hibernate.HbHelper=debug
>
> Thx.
>
> David
> Martin Taal wrote:
>> Hi David,
>> I should have thought about this earlier: I am not sure how you start
>> the test run but when you do this from within Eclipse (like with
>> right-mouse click run-ass) then you need to set the -Xmx setting in
>> the run dialog (so not in the eclipse startup). In Eclipse open the
>> run dialog (under the run menu), your test program should be listed
>> somewhere, select it and in the second tab (arguments) add the correct
>> parameters to the VM Arguments field. Press apply and run, normally
>> with subsequent runs Eclipse will automatically re-use the run settings.
>>
>> gr. Martin
>>
>> david wrote:
>>> Hi,
>>>
>>> Yes I tried 256M and 384M and the size of the process doing the work
>>> remains at about 101MB until it gets that OutOfMemoryException, which
>>> made me think the PermSize is not the issue.
>>>
>>> What I do not get is that I know you had success ( partial at least
>>> until MySQL threw in the towel) withthe same model?
>>>
>>>
>>> David
>>>
>>> Martin Taal wrote:
>>>> Hi,
>>>> Have you tried with a larger maxpermsize?
>>>>
>>>> gr. Martin
>>>>
>>>> david wrote:
>>>>> Hi,
>>>>>
>>>>> Martin has helped me get this far with a large model. I now get
>>>>>
>>>>> log4j:WARN No appenders could be found for logger
>>>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>>>>
>>>>> I have eclipse set top run with these parameters
>>>>>
>>>>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>>>>> -XX:MaxPermSize=128M
>>>>>
>>>>> I am using the latest (as of Monday) version of Teneo. I notice the
>>>>> process doing the work when running my Hib DataStore init (as
>>>>> below) only uses 100MB. It there some way of increasing the memory
>>>>> available to this process? There are over 1000 tables being generated.
>>>>>
>>>>> There is nothing in the error log window from the time I run this.
>>>>>
>>>>> // the name of the datastore
>>>>> String hbName = "MyGenSec";
>>>>> // the name of the database, this database should exist but
>>>>> does not need to contain tables
>>>>> String dbName = "gensechib";
>>>>> // Set the database information, Environment is
>>>>> org.hibernate.cfg.Environment
>>>>> final Properties props = new Properties();
>>>>> props.setProperty(Environment.DRIVER,
>>>>> "com.mysql.jdbc.Driver");
>>>>> props.setProperty(Environment.USER, "root");
>>>>> props.setProperty(Environment.PASS, "passw0rd");
>>>>> props.setProperty(Environment.URL,
>>>>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>>>>> props.setProperty(Environment.DIALECT,
>>>>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>>>>> //
>>>>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
>>>>> "false");
>>>>> // create the HbDataStore
>>>>> HbDataStore hbds =
>>>>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>>>>
>>>>> // sets its epackages stored in this datastore
>>>>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>>>>
>>>>> // set the relational database to use and other properties
>>>>> // to set Teneo specific options call
>>>>> hbds.setPersistenceProperties
>>>>> hbds.setHibernateProperties(props);
>>>>>
>>>>> // initialize, also creates the database tables
>>>>> hbds.initialize(); }
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org]]>Martin Taal2008-02-06T17:25:21-00:00Re: [Teneo] silent error, no logging
https://www.eclipse.org/forums/index.php/mv/msg/34507/111864/#msg_111864
Are you sure that log4j.properties is copied to the output folder?
If you have a plugin project then my experience is that the log4j.properties has to be specifically
selected in the build.properties (to be part of the binary build).
What I find strange is that the console does not show an exception (as you are not mentioning it).
How do you know that the initialize step actually failed?
gr. Martin
david wrote:
> Hi,
>
> I gave it -Xmx768M and watched the process as it ran it took up to 268MB
> and then failed silently. Nothing in Error log either.
>
> Still getting this
>
> log4j:WARN No appenders could be found for logger
> (org.eclipse.emf.teneo.hibernate.HbHelper).
> log4j:WARN Please initialize the log4j system properly.
>
> Even after adding the HbHelper to the log4j.properties in the project
> src directory
>
> # Set root logger level to DEBUG and its only appender to A1.
> log4j.rootCategory=DEBUG, A1
>
> # A1 is set to be a ConsoleAppender.
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>
> # A1 uses PatternLayout.
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
>
> #log4j.logger.org.hibernate=info
> log4j.logger.org.hibernate=debug
>
> ### log HQL query parser activity
> #log4j.logger.org.hibernate.hql.ast.AST=debug
>
> ### log just the SQL
> log4j.logger.org.hibernate.SQL=debug
>
> ### log JDBC bind parameters ###
> log4j.logger.org.hibernate.type=debug
> #log4j.logger.org.hibernate.type=debug
>
> ### log schema export/update ###
> log4j.logger.org.hibernate.tool.hbm2ddl=debug
>
> ### log HQL parse trees
> log4j.logger.org.hibernate.hql=debug
>
> ### log cache activity ###
> log4j.logger.org.hibernate.cache=debug
>
> ### log transaction activity
> log4j.logger.org.hibernate.transaction=debug
>
> ### log JDBC resource acquisition
> log4j.logger.org.hibernate.jdbc=debug
>
> log4j.logger.org.eclipse.emf.teneo.hibernate.mapper.Generate HBM=debug
> log4j.logger.org.eclipse.emf.teneo.hibernate.HbHelper=debug
>
> Thx.
>
> David
> Martin Taal wrote:
>> Hi David,
>> I should have thought about this earlier: I am not sure how you start
>> the test run but when you do this from within Eclipse (like with
>> right-mouse click run-ass) then you need to set the -Xmx setting in
>> the run dialog (so not in the eclipse startup). In Eclipse open the
>> run dialog (under the run menu), your test program should be listed
>> somewhere, select it and in the second tab (arguments) add the correct
>> parameters to the VM Arguments field. Press apply and run, normally
>> with subsequent runs Eclipse will automatically re-use the run settings.
>>
>> gr. Martin
>>
>> david wrote:
>>> Hi,
>>>
>>> Yes I tried 256M and 384M and the size of the process doing the work
>>> remains at about 101MB until it gets that OutOfMemoryException, which
>>> made me think the PermSize is not the issue.
>>>
>>> What I do not get is that I know you had success ( partial at least
>>> until MySQL threw in the towel) withthe same model?
>>>
>>>
>>> David
>>>
>>> Martin Taal wrote:
>>>> Hi,
>>>> Have you tried with a larger maxpermsize?
>>>>
>>>> gr. Martin
>>>>
>>>> david wrote:
>>>>> Hi,
>>>>>
>>>>> Martin has helped me get this far with a large model. I now get
>>>>>
>>>>> log4j:WARN No appenders could be found for logger
>>>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>>>>
>>>>> I have eclipse set top run with these parameters
>>>>>
>>>>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>>>>> -XX:MaxPermSize=128M
>>>>>
>>>>> I am using the latest (as of Monday) version of Teneo. I notice the
>>>>> process doing the work when running my Hib DataStore init (as
>>>>> below) only uses 100MB. It there some way of increasing the memory
>>>>> available to this process? There are over 1000 tables being generated.
>>>>>
>>>>> There is nothing in the error log window from the time I run this.
>>>>>
>>>>> // the name of the datastore
>>>>> String hbName = "MyGenSec";
>>>>> // the name of the database, this database should exist but
>>>>> does not need to contain tables
>>>>> String dbName = "gensechib";
>>>>> // Set the database information, Environment is
>>>>> org.hibernate.cfg.Environment
>>>>> final Properties props = new Properties();
>>>>> props.setProperty(Environment.DRIVER,
>>>>> "com.mysql.jdbc.Driver");
>>>>> props.setProperty(Environment.USER, "root");
>>>>> props.setProperty(Environment.PASS, "passw0rd");
>>>>> props.setProperty(Environment.URL,
>>>>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>>>>> props.setProperty(Environment.DIALECT,
>>>>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>>>>> //
>>>>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
>>>>> "false");
>>>>> // create the HbDataStore
>>>>> HbDataStore hbds =
>>>>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>>>>
>>>>> // sets its epackages stored in this datastore
>>>>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>>>>
>>>>> // set the relational database to use and other properties
>>>>> // to set Teneo specific options call
>>>>> hbds.setPersistenceProperties
>>>>> hbds.setHibernateProperties(props);
>>>>>
>>>>> // initialize, also creates the database tables
>>>>> hbds.initialize(); }
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org]]>Martin Taal2008-02-06T17:25:21-00:00Re: [Teneo] silent error, no logging
https://www.eclipse.org/forums/index.php/mv/msg/34507/615419/#msg_615419
Firstly I was following the instructions on the EMF Hibernate
Troubleshooting page and it says :"This file should be placed directly
in the src directory of your EMF Model project." When I moved
log4j.properties to the bin directory, bingo logging worked and so did
everything else it seems so far.
It has now been running for 45 minutes, creating tables etc. I note lots
of ERROR messages in the log, will investigate these when it is done. I
also note that it produces so many log messages that the Console in
Eclipse does not respond, so will set a RollingFileAppender next time.
Thx.
David
Martin Taal wrote:
> Hi David,
> Are you sure that log4j.properties is copied to the output folder?
> If you have a plugin project then my experience is that the
> log4j.properties has to be specifically selected in the build.properties
> (to be part of the binary build).
>
> What I find strange is that the console does not show an exception (as
> you are not mentioning it). How do you know that the initialize step
> actually failed?
>
> gr. Martin
>
> david wrote:
>> Hi,
>>
>> I gave it -Xmx768M and watched the process as it ran it took up to
>> 268MB and then failed silently. Nothing in Error log either.
>>
>> Still getting this
>>
>> log4j:WARN No appenders could be found for logger
>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>> log4j:WARN Please initialize the log4j system properly.
>>
>> Even after adding the HbHelper to the log4j.properties in the project
>> src directory
>>
>> # Set root logger level to DEBUG and its only appender to A1.
>> log4j.rootCategory=DEBUG, A1
>>
>> # A1 is set to be a ConsoleAppender.
>> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>>
>> # A1 uses PatternLayout.
>> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>> log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
>>
>> #log4j.logger.org.hibernate=info
>> log4j.logger.org.hibernate=debug
>>
>> ### log HQL query parser activity
>> #log4j.logger.org.hibernate.hql.ast.AST=debug
>>
>> ### log just the SQL
>> log4j.logger.org.hibernate.SQL=debug
>>
>> ### log JDBC bind parameters ###
>> log4j.logger.org.hibernate.type=debug
>> #log4j.logger.org.hibernate.type=debug
>>
>> ### log schema export/update ###
>> log4j.logger.org.hibernate.tool.hbm2ddl=debug
>>
>> ### log HQL parse trees
>> log4j.logger.org.hibernate.hql=debug
>>
>> ### log cache activity ###
>> log4j.logger.org.hibernate.cache=debug
>>
>> ### log transaction activity
>> log4j.logger.org.hibernate.transaction=debug
>>
>> ### log JDBC resource acquisition
>> log4j.logger.org.hibernate.jdbc=debug
>>
>> log4j.logger.org.eclipse.emf.teneo.hibernate.mapper.Generate HBM=debug
>> log4j.logger.org.eclipse.emf.teneo.hibernate.HbHelper=debug
>>
>> Thx.
>>
>> David
>> Martin Taal wrote:
>>> Hi David,
>>> I should have thought about this earlier: I am not sure how you start
>>> the test run but when you do this from within Eclipse (like with
>>> right-mouse click run-ass) then you need to set the -Xmx setting in
>>> the run dialog (so not in the eclipse startup). In Eclipse open the
>>> run dialog (under the run menu), your test program should be listed
>>> somewhere, select it and in the second tab (arguments) add the
>>> correct parameters to the VM Arguments field. Press apply and run,
>>> normally with subsequent runs Eclipse will automatically re-use the
>>> run settings.
>>>
>>> gr. Martin
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> Yes I tried 256M and 384M and the size of the process doing the work
>>>> remains at about 101MB until it gets that OutOfMemoryException,
>>>> which made me think the PermSize is not the issue.
>>>>
>>>> What I do not get is that I know you had success ( partial at least
>>>> until MySQL threw in the towel) withthe same model?
>>>>
>>>>
>>>> David
>>>>
>>>> Martin Taal wrote:
>>>>> Hi,
>>>>> Have you tried with a larger maxpermsize?
>>>>>
>>>>> gr. Martin
>>>>>
>>>>> david wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Martin has helped me get this far with a large model. I now get
>>>>>>
>>>>>> log4j:WARN No appenders could be found for logger
>>>>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap
>>>>>> space
>>>>>>
>>>>>> I have eclipse set top run with these parameters
>>>>>>
>>>>>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>>>>>> -XX:MaxPermSize=128M
>>>>>>
>>>>>> I am using the latest (as of Monday) version of Teneo. I notice
>>>>>> the process doing the work when running my Hib DataStore init (as
>>>>>> below) only uses 100MB. It there some way of increasing the memory
>>>>>> available to this process? There are over 1000 tables being
>>>>>> generated.
>>>>>>
>>>>>> There is nothing in the error log window from the time I run this.
>>>>>>
>>>>>> // the name of the datastore
>>>>>> String hbName = "MyGenSec";
>>>>>> // the name of the database, this database should exist
>>>>>> but does not need to contain tables
>>>>>> String dbName = "gensechib";
>>>>>> // Set the database information, Environment is
>>>>>> org.hibernate.cfg.Environment
>>>>>> final Properties props = new Properties();
>>>>>> props.setProperty(Environment.DRIVER,
>>>>>> "com.mysql.jdbc.Driver");
>>>>>> props.setProperty(Environment.USER, "root");
>>>>>> props.setProperty(Environment.PASS, "passw0rd");
>>>>>> props.setProperty(Environment.URL,
>>>>>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>>>>>> props.setProperty(Environment.DIALECT,
>>>>>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>>>>>> //
>>>>>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
>>>>>> "false");
>>>>>> // create the HbDataStore
>>>>>> HbDataStore hbds =
>>>>>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>>>>>
>>>>>> // sets its epackages stored in this datastore
>>>>>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>>>>>
>>>>>> // set the relational database to use and other properties
>>>>>> // to set Teneo specific options call
>>>>>> hbds.setPersistenceProperties
>>>>>> hbds.setHibernateProperties(props);
>>>>>>
>>>>>> // initialize, also creates the database tables
>>>>>> hbds.initialize(); }
>>>>>>
>>>>>> David
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>]]>David Wynter2008-02-07T09:40:06-00:00Re: [Teneo] silent error, no logging
https://www.eclipse.org/forums/index.php/mv/msg/34507/111869/#msg_111869
Firstly I was following the instructions on the EMF Hibernate
Troubleshooting page and it says :"This file should be placed directly
in the src directory of your EMF Model project." When I moved
log4j.properties to the bin directory, bingo logging worked and so did
everything else it seems so far.
It has now been running for 45 minutes, creating tables etc. I note lots
of ERROR messages in the log, will investigate these when it is done. I
also note that it produces so many log messages that the Console in
Eclipse does not respond, so will set a RollingFileAppender next time.
Thx.
David
Martin Taal wrote:
> Hi David,
> Are you sure that log4j.properties is copied to the output folder?
> If you have a plugin project then my experience is that the
> log4j.properties has to be specifically selected in the build.properties
> (to be part of the binary build).
>
> What I find strange is that the console does not show an exception (as
> you are not mentioning it). How do you know that the initialize step
> actually failed?
>
> gr. Martin
>
> david wrote:
>> Hi,
>>
>> I gave it -Xmx768M and watched the process as it ran it took up to
>> 268MB and then failed silently. Nothing in Error log either.
>>
>> Still getting this
>>
>> log4j:WARN No appenders could be found for logger
>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>> log4j:WARN Please initialize the log4j system properly.
>>
>> Even after adding the HbHelper to the log4j.properties in the project
>> src directory
>>
>> # Set root logger level to DEBUG and its only appender to A1.
>> log4j.rootCategory=DEBUG, A1
>>
>> # A1 is set to be a ConsoleAppender.
>> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>>
>> # A1 uses PatternLayout.
>> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>> log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
>>
>> #log4j.logger.org.hibernate=info
>> log4j.logger.org.hibernate=debug
>>
>> ### log HQL query parser activity
>> #log4j.logger.org.hibernate.hql.ast.AST=debug
>>
>> ### log just the SQL
>> log4j.logger.org.hibernate.SQL=debug
>>
>> ### log JDBC bind parameters ###
>> log4j.logger.org.hibernate.type=debug
>> #log4j.logger.org.hibernate.type=debug
>>
>> ### log schema export/update ###
>> log4j.logger.org.hibernate.tool.hbm2ddl=debug
>>
>> ### log HQL parse trees
>> log4j.logger.org.hibernate.hql=debug
>>
>> ### log cache activity ###
>> log4j.logger.org.hibernate.cache=debug
>>
>> ### log transaction activity
>> log4j.logger.org.hibernate.transaction=debug
>>
>> ### log JDBC resource acquisition
>> log4j.logger.org.hibernate.jdbc=debug
>>
>> log4j.logger.org.eclipse.emf.teneo.hibernate.mapper.Generate HBM=debug
>> log4j.logger.org.eclipse.emf.teneo.hibernate.HbHelper=debug
>>
>> Thx.
>>
>> David
>> Martin Taal wrote:
>>> Hi David,
>>> I should have thought about this earlier: I am not sure how you start
>>> the test run but when you do this from within Eclipse (like with
>>> right-mouse click run-ass) then you need to set the -Xmx setting in
>>> the run dialog (so not in the eclipse startup). In Eclipse open the
>>> run dialog (under the run menu), your test program should be listed
>>> somewhere, select it and in the second tab (arguments) add the
>>> correct parameters to the VM Arguments field. Press apply and run,
>>> normally with subsequent runs Eclipse will automatically re-use the
>>> run settings.
>>>
>>> gr. Martin
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> Yes I tried 256M and 384M and the size of the process doing the work
>>>> remains at about 101MB until it gets that OutOfMemoryException,
>>>> which made me think the PermSize is not the issue.
>>>>
>>>> What I do not get is that I know you had success ( partial at least
>>>> until MySQL threw in the towel) withthe same model?
>>>>
>>>>
>>>> David
>>>>
>>>> Martin Taal wrote:
>>>>> Hi,
>>>>> Have you tried with a larger maxpermsize?
>>>>>
>>>>> gr. Martin
>>>>>
>>>>> david wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Martin has helped me get this far with a large model. I now get
>>>>>>
>>>>>> log4j:WARN No appenders could be found for logger
>>>>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap
>>>>>> space
>>>>>>
>>>>>> I have eclipse set top run with these parameters
>>>>>>
>>>>>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>>>>>> -XX:MaxPermSize=128M
>>>>>>
>>>>>> I am using the latest (as of Monday) version of Teneo. I notice
>>>>>> the process doing the work when running my Hib DataStore init (as
>>>>>> below) only uses 100MB. It there some way of increasing the memory
>>>>>> available to this process? There are over 1000 tables being
>>>>>> generated.
>>>>>>
>>>>>> There is nothing in the error log window from the time I run this.
>>>>>>
>>>>>> // the name of the datastore
>>>>>> String hbName = "MyGenSec";
>>>>>> // the name of the database, this database should exist
>>>>>> but does not need to contain tables
>>>>>> String dbName = "gensechib";
>>>>>> // Set the database information, Environment is
>>>>>> org.hibernate.cfg.Environment
>>>>>> final Properties props = new Properties();
>>>>>> props.setProperty(Environment.DRIVER,
>>>>>> "com.mysql.jdbc.Driver");
>>>>>> props.setProperty(Environment.USER, "root");
>>>>>> props.setProperty(Environment.PASS, "passw0rd");
>>>>>> props.setProperty(Environment.URL,
>>>>>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>>>>>> props.setProperty(Environment.DIALECT,
>>>>>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>>>>>> //
>>>>>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
>>>>>> "false");
>>>>>> // create the HbDataStore
>>>>>> HbDataStore hbds =
>>>>>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>>>>>
>>>>>> // sets its epackages stored in this datastore
>>>>>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>>>>>
>>>>>> // set the relational database to use and other properties
>>>>>> // to set Teneo specific options call
>>>>>> hbds.setPersistenceProperties
>>>>>> hbds.setHibernateProperties(props);
>>>>>>
>>>>>> // initialize, also creates the database tables
>>>>>> hbds.initialize(); }
>>>>>>
>>>>>> David
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>]]>David Wynter2008-02-07T09:40:06-00:00Re: [Teneo] silent error, no logging
https://www.eclipse.org/forums/index.php/mv/msg/34507/615420/#msg_615420
Yes you need to place it in the src directory and then you need to tell Eclipse to copy it to the
bin (or build) directory when building. I have added this to the docs, will be visible in the next
release.
I also noticed a lot of errors related to index creation. Often these occur because a table was not
created or because of other database constraints.
gr. Martin
david wrote:
> Hi,
>
> Firstly I was following the instructions on the EMF Hibernate
> Troubleshooting page and it says :"This file should be placed directly
> in the src directory of your EMF Model project." When I moved
> log4j.properties to the bin directory, bingo logging worked and so did
> everything else it seems so far.
>
> It has now been running for 45 minutes, creating tables etc. I note lots
> of ERROR messages in the log, will investigate these when it is done. I
> also note that it produces so many log messages that the Console in
> Eclipse does not respond, so will set a RollingFileAppender next time.
>
> Thx.
>
> David
>
> Martin Taal wrote:
>> Hi David,
>> Are you sure that log4j.properties is copied to the output folder?
>> If you have a plugin project then my experience is that the
>> log4j.properties has to be specifically selected in the
>> build.properties (to be part of the binary build).
>>
>> What I find strange is that the console does not show an exception (as
>> you are not mentioning it). How do you know that the initialize step
>> actually failed?
>>
>> gr. Martin
>>
>> david wrote:
>>> Hi,
>>>
>>> I gave it -Xmx768M and watched the process as it ran it took up to
>>> 268MB and then failed silently. Nothing in Error log either.
>>>
>>> Still getting this
>>>
>>> log4j:WARN No appenders could be found for logger
>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>> log4j:WARN Please initialize the log4j system properly.
>>>
>>> Even after adding the HbHelper to the log4j.properties in the project
>>> src directory
>>>
>>> # Set root logger level to DEBUG and its only appender to A1.
>>> log4j.rootCategory=DEBUG, A1
>>>
>>> # A1 is set to be a ConsoleAppender.
>>> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>>>
>>> # A1 uses PatternLayout.
>>> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
>>>
>>> #log4j.logger.org.hibernate=info
>>> log4j.logger.org.hibernate=debug
>>>
>>> ### log HQL query parser activity
>>> #log4j.logger.org.hibernate.hql.ast.AST=debug
>>>
>>> ### log just the SQL
>>> log4j.logger.org.hibernate.SQL=debug
>>>
>>> ### log JDBC bind parameters ###
>>> log4j.logger.org.hibernate.type=debug
>>> #log4j.logger.org.hibernate.type=debug
>>>
>>> ### log schema export/update ###
>>> log4j.logger.org.hibernate.tool.hbm2ddl=debug
>>>
>>> ### log HQL parse trees
>>> log4j.logger.org.hibernate.hql=debug
>>>
>>> ### log cache activity ###
>>> log4j.logger.org.hibernate.cache=debug
>>>
>>> ### log transaction activity
>>> log4j.logger.org.hibernate.transaction=debug
>>>
>>> ### log JDBC resource acquisition
>>> log4j.logger.org.hibernate.jdbc=debug
>>>
>>> log4j.logger.org.eclipse.emf.teneo.hibernate.mapper.Generate HBM=debug
>>> log4j.logger.org.eclipse.emf.teneo.hibernate.HbHelper=debug
>>>
>>> Thx.
>>>
>>> David
>>> Martin Taal wrote:
>>>> Hi David,
>>>> I should have thought about this earlier: I am not sure how you
>>>> start the test run but when you do this from within Eclipse (like
>>>> with right-mouse click run-ass) then you need to set the -Xmx
>>>> setting in the run dialog (so not in the eclipse startup). In
>>>> Eclipse open the run dialog (under the run menu), your test program
>>>> should be listed somewhere, select it and in the second tab
>>>> (arguments) add the correct parameters to the VM Arguments field.
>>>> Press apply and run, normally with subsequent runs Eclipse will
>>>> automatically re-use the run settings.
>>>>
>>>> gr. Martin
>>>>
>>>> david wrote:
>>>>> Hi,
>>>>>
>>>>> Yes I tried 256M and 384M and the size of the process doing the
>>>>> work remains at about 101MB until it gets that
>>>>> OutOfMemoryException, which made me think the PermSize is not the
>>>>> issue.
>>>>>
>>>>> What I do not get is that I know you had success ( partial at least
>>>>> until MySQL threw in the towel) withthe same model?
>>>>>
>>>>>
>>>>> David
>>>>>
>>>>> Martin Taal wrote:
>>>>>> Hi,
>>>>>> Have you tried with a larger maxpermsize?
>>>>>>
>>>>>> gr. Martin
>>>>>>
>>>>>> david wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Martin has helped me get this far with a large model. I now get
>>>>>>>
>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap
>>>>>>> space
>>>>>>>
>>>>>>> I have eclipse set top run with these parameters
>>>>>>>
>>>>>>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>>>>>>> -XX:MaxPermSize=128M
>>>>>>>
>>>>>>> I am using the latest (as of Monday) version of Teneo. I notice
>>>>>>> the process doing the work when running my Hib DataStore init (as
>>>>>>> below) only uses 100MB. It there some way of increasing the
>>>>>>> memory available to this process? There are over 1000 tables
>>>>>>> being generated.
>>>>>>>
>>>>>>> There is nothing in the error log window from the time I run this.
>>>>>>>
>>>>>>> // the name of the datastore
>>>>>>> String hbName = "MyGenSec";
>>>>>>> // the name of the database, this database should exist
>>>>>>> but does not need to contain tables
>>>>>>> String dbName = "gensechib";
>>>>>>> // Set the database information, Environment is
>>>>>>> org.hibernate.cfg.Environment
>>>>>>> final Properties props = new Properties();
>>>>>>> props.setProperty(Environment.DRIVER,
>>>>>>> "com.mysql.jdbc.Driver");
>>>>>>> props.setProperty(Environment.USER, "root");
>>>>>>> props.setProperty(Environment.PASS, "passw0rd");
>>>>>>> props.setProperty(Environment.URL,
>>>>>>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>>>>>>> props.setProperty(Environment.DIALECT,
>>>>>>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>>>>>>> //
>>>>>>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
>>>>>>> "false");
>>>>>>> // create the HbDataStore
>>>>>>> HbDataStore hbds =
>>>>>>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>>>>>>
>>>>>>> // sets its epackages stored in this datastore
>>>>>>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>>>>>>
>>>>>>> // set the relational database to use and other properties
>>>>>>> // to set Teneo specific options call
>>>>>>> hbds.setPersistenceProperties
>>>>>>> hbds.setHibernateProperties(props);
>>>>>>>
>>>>>>> // initialize, also creates the database tables
>>>>>>> hbds.initialize(); }
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org]]>Martin Taal2008-02-07T09:55:34-00:00Re: [Teneo] silent error, no logging
https://www.eclipse.org/forums/index.php/mv/msg/34507/111870/#msg_111870
Yes you need to place it in the src directory and then you need to tell Eclipse to copy it to the
bin (or build) directory when building. I have added this to the docs, will be visible in the next
release.
I also noticed a lot of errors related to index creation. Often these occur because a table was not
created or because of other database constraints.
gr. Martin
david wrote:
> Hi,
>
> Firstly I was following the instructions on the EMF Hibernate
> Troubleshooting page and it says :"This file should be placed directly
> in the src directory of your EMF Model project." When I moved
> log4j.properties to the bin directory, bingo logging worked and so did
> everything else it seems so far.
>
> It has now been running for 45 minutes, creating tables etc. I note lots
> of ERROR messages in the log, will investigate these when it is done. I
> also note that it produces so many log messages that the Console in
> Eclipse does not respond, so will set a RollingFileAppender next time.
>
> Thx.
>
> David
>
> Martin Taal wrote:
>> Hi David,
>> Are you sure that log4j.properties is copied to the output folder?
>> If you have a plugin project then my experience is that the
>> log4j.properties has to be specifically selected in the
>> build.properties (to be part of the binary build).
>>
>> What I find strange is that the console does not show an exception (as
>> you are not mentioning it). How do you know that the initialize step
>> actually failed?
>>
>> gr. Martin
>>
>> david wrote:
>>> Hi,
>>>
>>> I gave it -Xmx768M and watched the process as it ran it took up to
>>> 268MB and then failed silently. Nothing in Error log either.
>>>
>>> Still getting this
>>>
>>> log4j:WARN No appenders could be found for logger
>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>> log4j:WARN Please initialize the log4j system properly.
>>>
>>> Even after adding the HbHelper to the log4j.properties in the project
>>> src directory
>>>
>>> # Set root logger level to DEBUG and its only appender to A1.
>>> log4j.rootCategory=DEBUG, A1
>>>
>>> # A1 is set to be a ConsoleAppender.
>>> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>>>
>>> # A1 uses PatternLayout.
>>> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
>>>
>>> #log4j.logger.org.hibernate=info
>>> log4j.logger.org.hibernate=debug
>>>
>>> ### log HQL query parser activity
>>> #log4j.logger.org.hibernate.hql.ast.AST=debug
>>>
>>> ### log just the SQL
>>> log4j.logger.org.hibernate.SQL=debug
>>>
>>> ### log JDBC bind parameters ###
>>> log4j.logger.org.hibernate.type=debug
>>> #log4j.logger.org.hibernate.type=debug
>>>
>>> ### log schema export/update ###
>>> log4j.logger.org.hibernate.tool.hbm2ddl=debug
>>>
>>> ### log HQL parse trees
>>> log4j.logger.org.hibernate.hql=debug
>>>
>>> ### log cache activity ###
>>> log4j.logger.org.hibernate.cache=debug
>>>
>>> ### log transaction activity
>>> log4j.logger.org.hibernate.transaction=debug
>>>
>>> ### log JDBC resource acquisition
>>> log4j.logger.org.hibernate.jdbc=debug
>>>
>>> log4j.logger.org.eclipse.emf.teneo.hibernate.mapper.Generate HBM=debug
>>> log4j.logger.org.eclipse.emf.teneo.hibernate.HbHelper=debug
>>>
>>> Thx.
>>>
>>> David
>>> Martin Taal wrote:
>>>> Hi David,
>>>> I should have thought about this earlier: I am not sure how you
>>>> start the test run but when you do this from within Eclipse (like
>>>> with right-mouse click run-ass) then you need to set the -Xmx
>>>> setting in the run dialog (so not in the eclipse startup). In
>>>> Eclipse open the run dialog (under the run menu), your test program
>>>> should be listed somewhere, select it and in the second tab
>>>> (arguments) add the correct parameters to the VM Arguments field.
>>>> Press apply and run, normally with subsequent runs Eclipse will
>>>> automatically re-use the run settings.
>>>>
>>>> gr. Martin
>>>>
>>>> david wrote:
>>>>> Hi,
>>>>>
>>>>> Yes I tried 256M and 384M and the size of the process doing the
>>>>> work remains at about 101MB until it gets that
>>>>> OutOfMemoryException, which made me think the PermSize is not the
>>>>> issue.
>>>>>
>>>>> What I do not get is that I know you had success ( partial at least
>>>>> until MySQL threw in the towel) withthe same model?
>>>>>
>>>>>
>>>>> David
>>>>>
>>>>> Martin Taal wrote:
>>>>>> Hi,
>>>>>> Have you tried with a larger maxpermsize?
>>>>>>
>>>>>> gr. Martin
>>>>>>
>>>>>> david wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Martin has helped me get this far with a large model. I now get
>>>>>>>
>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>> (org.eclipse.emf.teneo.hibernate.HbHelper).
>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap
>>>>>>> space
>>>>>>>
>>>>>>> I have eclipse set top run with these parameters
>>>>>>>
>>>>>>> D:\eclipse\eclipse.exe -vmargs -Xmx1024M -XX:PermSize=64M
>>>>>>> -XX:MaxPermSize=128M
>>>>>>>
>>>>>>> I am using the latest (as of Monday) version of Teneo. I notice
>>>>>>> the process doing the work when running my Hib DataStore init (as
>>>>>>> below) only uses 100MB. It there some way of increasing the
>>>>>>> memory available to this process? There are over 1000 tables
>>>>>>> being generated.
>>>>>>>
>>>>>>> There is nothing in the error log window from the time I run this.
>>>>>>>
>>>>>>> // the name of the datastore
>>>>>>> String hbName = "MyGenSec";
>>>>>>> // the name of the database, this database should exist
>>>>>>> but does not need to contain tables
>>>>>>> String dbName = "gensechib";
>>>>>>> // Set the database information, Environment is
>>>>>>> org.hibernate.cfg.Environment
>>>>>>> final Properties props = new Properties();
>>>>>>> props.setProperty(Environment.DRIVER,
>>>>>>> "com.mysql.jdbc.Driver");
>>>>>>> props.setProperty(Environment.USER, "root");
>>>>>>> props.setProperty(Environment.PASS, "passw0rd");
>>>>>>> props.setProperty(Environment.URL,
>>>>>>> "jdbc:mysql://192.168.0.3:3306/" + dbName);
>>>>>>> props.setProperty(Environment.DIALECT,
>>>>>>> org.hibernate.dialect.MySQLInnoDBDialect.class.getName());
>>>>>>> //
>>>>>>> props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
>>>>>>> "false");
>>>>>>> // create the HbDataStore
>>>>>>> HbDataStore hbds =
>>>>>>> HbHelper.INSTANCE.createRegisterDataStore(hbName);
>>>>>>>
>>>>>>> // sets its epackages stored in this datastore
>>>>>>> hbds.setEPackages(new EPackage[]{GensecPackage.eINSTANCE});
>>>>>>>
>>>>>>> // set the relational database to use and other properties
>>>>>>> // to set Teneo specific options call
>>>>>>> hbds.setPersistenceProperties
>>>>>>> hbds.setHibernateProperties(props);
>>>>>>>
>>>>>>> // initialize, also creates the database tables
>>>>>>> hbds.initialize(); }
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>