Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Teneo(Basic Tutorial)
icon13.gif  Teneo [message #633182] Fri, 15 October 2010 15:07 Go to next message
tenor  is currently offline tenor Friend
Messages: 57
Registered: October 2010
Member
I am trying the examples from

org.eclipse.emf.teneo.hibernate.examples

How to run for the
Dynamic.java
QuickStart.java
Tutorial.java

It complains of main method not found, though there is indeed main, i tried putting them in classpath too but not of any value.

What i am missing?By default, are they on the classpath?
or somewhere we have to do some minor tweaking ?



Which ways to run them?

Thanks.

Re: Teneo [message #633192 is a reply to message #633182] Fri, 15 October 2010 15:16 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Yes there is a main method in these classes, I have no idea why this happens, is the project indeed a java plugin
project? Do you have automatic build flagged in the project properties?

Which version of Eclipse are you using?

gr. Martin

On 10/15/2010 05:07 PM, tenor wrote:
> I am trying the examples from
> org.eclipse.emf.teneo.hibernate.examples
>
> How to run for the Dynamic.java
> QuickStart.java
> Tutorial.java
>
> It complains of main method not found, though there is indeed main, i
> tried putting them in classpath too but not of any value.
> What i am missing?By default, are they on the classpath?
> or somewhere we have to do some minor tweaking ?
>
>
>
> Which ways to run them?
>
> Thanks.
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
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 [message #633501 is a reply to message #633192] Mon, 18 October 2010 09:16 Go to previous messageGo to next message
tenor  is currently offline tenor Friend
Messages: 57
Registered: October 2010
Member
Background

I downloaded as java project for the teneo project.

Difficulties i encountered, ie by default, it was not being recognized for run configuration. I then imported it as java project in the workspace and pointed out QuickStart as main. But i get errors here ie(those are not found)

import org.eclipse.example.library.Book;
import org.eclipse.example.library.BookCategory;
import org.eclipse.example.library.LibraryFactory;
import org.eclipse.example.library.LibraryPackage;
import org.eclipse.example.library.Writer;


I think the examples are not properly set up or if have any working examples , plz let me know.
Much Thanks.

Re: Teneo [message #633687 is a reply to message #633501] Mon, 18 October 2010 20:52 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
The examples project in HEAD has these imports:
import org.eclipse.emf.teneo.hibernate.examples.extlibrary.Book;
import org.eclipse.emf.teneo.hibernate.examples.extlibrary.BookCate gory;
import org.eclipse.emf.teneo.hibernate.examples.extlibrary.Extlibra ryFactory;
import org.eclipse.emf.teneo.hibernate.examples.extlibrary.Extlibra ryPackage;
import org.eclipse.emf.teneo.hibernate.examples.extlibrary.Library;
import org.eclipse.emf.teneo.hibernate.examples.extlibrary.Writer;

So afaics you have not downloaded the HEAD version. I already pointed this out several times to you...

Please read my replies more carefully and read a tutorial on cvs, it will save you and others a lot of time...

gr. Martin

On 10/18/2010 11:16 AM, tenor wrote:
> Background
> I downloaded as java project for the teneo project.
>
> Difficulties i encountered, ie by default, it was not being recognized
> for run configuration. I then imported it as java project in the
> workspace and pointed out QuickStart as main. But i get errors here
> ie(those are not found)
>
> import org.eclipse.example.library.Book;
> import org.eclipse.example.library.BookCategory;
> import org.eclipse.example.library.LibraryFactory;
> import org.eclipse.example.library.LibraryPackage;
> import org.eclipse.example.library.Writer;
>
> I think the examples are not properly set up or if have any working
> examples , plz let me know. Much Thanks.
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
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
[Teneo] java.lang.SecurityException [message #634499 is a reply to message #633687] Fri, 22 October 2010 00:23 Go to previous messageGo to next message
Ole Ersoy is currently offline Ole ErsoyFriend
Messages: 205
Registered: July 2009
Senior Member
Hi,

I'm using Teneo with Spring. When I try to create a org.eclipse.emf.teneo.hibernate.HbSessionDataStore bean, I get a java.lang.SecurityException (Pasted stack trace below). I'm using the following teneo jars:

<dependency>
<groupId>org.eclipse.emf.teneo</groupId>
<artifactId>hibernate</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.emf.teneo</groupId>
<artifactId>annotations</artifactId>
<version>1.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>teneo</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.emf.teneo.hibernate</groupId>
<artifactId>mapper</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>

Any ideas?

TIA,
- Ole

java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(Signatur eFileVerifier.java:239)
at sun.security.util.SignatureFileVerifier.process(SignatureFil eVerifier.java:193)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:294)
at java.util.jar.JarVerifier.update(JarVerifier.java:205)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:338)
at java.util.jar.JarFile.getInputStream(JarFile.java:403)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPat h.java:706)
at sun.misc.Resource.cachedInputStream(Resource.java:77)
at sun.misc.Resource.getByteBuffer(Resource.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:266)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294 )
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.springframework.util.ClassUtils.forName(ClassUtils.java: 242)
at org.springframework.beans.factory.support.AbstractBeanDefini tion.resolveBeanClass(AbstractBeanDefinition.java:383)
at org.springframework.beans.factory.support.AbstractBeanFactor y.resolveBeanClass(AbstractBeanFactory.java:1135)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.predictBeanType(AbstractAutowireCapableBean Factory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactor y.isFactoryBean(AbstractBeanFactory.java:1174)
at org.springframework.beans.factory.support.DefaultListableBea nFactory.getBeanNamesForType(DefaultListableBeanFactory.java :222)
at org.springframework.context.support.AbstractApplicationConte xt.invokeBeanFactoryPostProcessors(AbstractApplicationContex t.java:506)
at org.springframework.context.support.AbstractApplicationConte xt.refresh(AbstractApplicationContext.java:363)
at org.springframework.context.support.ClassPathXmlApplicationC ontext. <init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationC ontext. <init>(ClassPathXmlApplicationContext.java:83)
at com.pyramidetechnologies.persistance.learning.tests.AccountD AOTest.setUp(AccountDAOTest.java:17)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:197)
Re: [Teneo] java.lang.SecurityException [message #634500 is a reply to message #634499] Fri, 22 October 2010 01:02 Go to previous messageGo to next message
Ole Ersoy is currently offline Ole ErsoyFriend
Messages: 205
Registered: July 2009
Senior Member
Just wanted to mention that I also tried a HbSessionDataStore load test like this:

import junit.framework.TestCase;
import org.eclipse.emf.teneo.hibernate.HbSessionDataStore;

public class TeneoLoadTest extends TestCase
{
public void testClassLoad()
{
HbSessionDataStore hb = new HbSessionDataStore();
assertTrue(true);
}
}

And I still get the same exception.

- Ole
Re: [Teneo] java.lang.SecurityException [message #634516 is a reply to message #634500] Fri, 22 October 2010 04:33 Go to previous message
Ole Ersoy is currently offline Ole ErsoyFriend
Messages: 205
Registered: July 2009
Senior Member
OK - Never mind - I upgraded the dependencies to 1.1.2 and now everything works fine.

Ole

On 10/21/2010 08:02 PM, Ole Ersoy wrote:
> Just wanted to mention that I also tried a HbSessionDataStore load test
> like this:
>
> import junit.framework.TestCase;
> import org.eclipse.emf.teneo.hibernate.HbSessionDataStore;
>
> public class TeneoLoadTest extends TestCase
> {
> public void testClassLoad()
> {
> HbSessionDataStore hb = new HbSessionDataStore();
> assertTrue(true);
> }
> }
>
> And I still get the same exception.
>
> - Ole
Previous Topic:Good idea to inherit from ENamedElement and EModelElement?
Next Topic:Read referenced resource programatically
Goto Forum:
  


Current Time: Wed Oct 16 00:59:08 GMT 2019

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

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

Back to the top