Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] OutOfMemory error
[Teneo] OutOfMemory error [message #111853] Wed, 06 February 2008 14:20 Go to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
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
Re: [Teneo] OutOfMemory error [message #111857 is a reply to message #111853] Wed, 06 February 2008 14:27 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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
Re: [Teneo] OutOfMemory error [message #111860 is a reply to message #111857] Wed, 06 February 2008 15:12 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
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
>>
>>
>>
>
>
Re: [Teneo] OutOfMemory error [message #111862 is a reply to message #111860] Wed, 06 February 2008 15:26 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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
Re: [Teneo] silent error, no logging [message #111863 is a reply to message #111862] Wed, 06 February 2008 16:49 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
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
>>>>
>>>>
>>>>
>>>
>>>
>
>
Re: [Teneo] silent error, no logging [message #111864 is a reply to message #111863] Wed, 06 February 2008 17:25 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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
Re: [Teneo] silent error, no logging [message #111869 is a reply to message #111864] Thu, 07 February 2008 09:40 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
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
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>
Re: [Teneo] silent error, no logging [message #111870 is a reply to message #111869] Thu, 07 February 2008 09:55 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi David,
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
Re: [Teneo] OutOfMemory error [message #615410 is a reply to message #111853] Wed, 06 February 2008 14:27 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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
Re: [Teneo] OutOfMemory error [message #615411 is a reply to message #111857] Wed, 06 February 2008 15:12 Go to previous message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
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
>>
>>
>>
>
>
Re: [Teneo] OutOfMemory error [message #615412 is a reply to message #111860] Wed, 06 February 2008 15:26 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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
Re: [Teneo] silent error, no logging [message #615413 is a reply to message #111862] Wed, 06 February 2008 16:49 Go to previous message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
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
>>>>
>>>>
>>>>
>>>
>>>
>
>
Re: [Teneo] silent error, no logging [message #615414 is a reply to message #111863] Wed, 06 February 2008 17:25 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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
Re: [Teneo] silent error, no logging [message #615419 is a reply to message #111864] Thu, 07 February 2008 09:40 Go to previous message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
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
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>
Re: [Teneo] silent error, no logging [message #615420 is a reply to message #111869] Thu, 07 February 2008 09:55 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi David,
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
Previous Topic:[Teneo] Retrieving the teneo version at runtime
Next Topic:[Teneo] Generated identifier names too long
Goto Forum:
  


Current Time: Thu Apr 25 23:47:15 GMT 2024

Powered by FUDForum. Page generated in 0.04200 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top