openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thiago Veronezi <thi...@veronezi.org>
Subject Re: OpenEJB and Database Views
Date Fri, 11 Feb 2011 15:11:36 GMT
To be able to use "3.2-SNAPSHOT" I believe you need to add a new
repository...

<repository>
<id>apache-snapshots</id>
<url>http://repository.sonatype.org/content/repositories/apache-snapshots/
</url>
</repository>

[]s,
Thiago.


On Fri, Feb 11, 2011 at 10:08 AM, Thiago Veronezi <thiago@veronezi.org>wrote:

> Hi,
> Could you try it again with another openejb version?
>
> 3.2-SNAPSHOT
>
> tkx,
> Thiago.
>
> On Fri, Feb 11, 2011 at 9:57 AM, kenundrumz2100 <kenundrumz2100@gmail.com>wrote:
>
>>
>> Hello Thiago, thanks for the reply. We took what you had and tried it
>> again.
>> We once before did use Hibernate and got the following error, both with
>> what
>> we did before and after doing what you suggested.
>>
>> /********************/
>> INFO - PersistenceUnit(name=myPersist,
>> provider=org.hibernate.ejb.HibernatePersistence) - provider time 1197ms
>> INFO - Undeploying app: classpath.ear
>> ERROR - Unable to clear Sun JarFileFactory cache
>> java.net.URISyntaxException: Illegal character in path at index 31:
>> file:///C:/Applications/MyApp/MyApp-ejb/lib/test/openejb-core-3.1.4.jar
>>        at java.net.URI$Parser.fail(URI.java:2809)
>>        at java.net.URI$Parser.checkChars(URI.java:2982)
>>        at java.net.URI$Parser.parseHierarchical(URI.java:3066)
>>        at java.net.URI$Parser.parse(URI.java:3014)
>>        at java.net.URI.<init>(URI.java:578)
>>        at
>>
>> org.apache.openejb.ClassLoaderUtil.clearSunJarFileFactoryCache(ClassLoaderUtil.java:178)
>>        at
>>
>> org.apache.openejb.ClassLoaderUtil.destroyClassLoader(ClassLoaderUtil.java:131)
>>        at
>>
>> org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:931)
>>        at
>>
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:674)
>>        at
>>
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:450)
>>        at
>>
>> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:368)
>>        at
>> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:280)
>>        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:125)
>>        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:60)
>>        at org.apache.openejb.OpenEJB.init(OpenEJB.java:271)
>>        at org.apache.openejb.OpenEJB.init(OpenEJB.java:250)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at
>> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
>>        at
>>
>> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
>>        at
>>
>> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
>>        at
>>
>> org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
>>        at
>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
>>        at
>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
>>        at javax.naming.InitialContext.init(InitialContext.java:223)
>>        at javax.naming.InitialContext.<init>(InitialContext.java:197)
>>        at com.myapp.ejb.session.MyAppTestCase.setUp(MyAppTestCase.java:64)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at
>>
>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>>        at
>>
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>>        at
>>
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>>        at
>>
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>>        at
>>
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
>>        at
>>
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>>        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>>        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>>       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>>        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>>        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>>        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>>        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>>        at
>>
>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
>>        at
>>
>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
>>        at
>>
>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
>> ERROR - Application could not be deployed:  classpath.ear
>> org.apache.openejb.OpenEJBException: Creating application failed:
>> classpath.ear: org.hibernate.AnnotationException: @Column(s) not allowed
>> on
>> a @ManyToOne property: com.myapp.ejb.entity.view.Systems.parent:
>> @Column(s)
>> not allowed on a @ManyToOne property:
>> com.myapp.ejb.entity.view.Systems.parent
>>        at
>>
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:679)
>>        at
>>
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:450)
>>        at
>>
>> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:368)
>>        at
>> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:280)
>>        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:125)
>>        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:60)
>>        at org.apache.openejb.OpenEJB.init(OpenEJB.java:271)
>>        at org.apache.openejb.OpenEJB.init(OpenEJB.java:250)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at
>> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
>>        at
>>
>> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
>>        at
>>
>> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
>>        at
>>
>> org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
>>        at
>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
>>        at
>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
>>        at javax.naming.InitialContext.init(InitialContext.java:223)
>>        at javax.naming.InitialContext.<init>(InitialContext.java:197)
>>        at com.myapp.ejb.session.MyAppTestCase.setUp(MyAppTestCase.java:64)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at
>>
>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>>        at
>>
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>>        at
>>
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>>        at
>>
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>>        at
>>
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
>>        at
>>
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>>        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>>        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>>        at
>> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>>        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>>        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>>        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>>        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>>        at
>>
>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
>>        at
>>
>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
>>        at
>>
>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
>> Caused by: org.apache.openejb.OpenEJBException:
>> org.hibernate.AnnotationException: @Column(s) not allowed on a @ManyToOne
>> property: com.myapp.ejb.entity.view.Systems.parent: @Column(s) not allowed
>> on a @ManyToOne property: com.myapp.ejb.entity.view.Systems.parent
>>        at
>>
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:495)
>>        ... 40 more
>> Caused by: org.hibernate.AnnotationException: @Column(s) not allowed on a
>> @ManyToOne property: com.myapp.ejb.entity.view.Systems.parent
>>        at
>>
>> org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1345)
>>        at
>> org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
>>        at
>>
>> org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546)
>>        at
>>
>> org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
>>        at
>> org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
>>        at
>>
>> org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
>>        at
>>
>> org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
>>        at
>> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
>>        at
>> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
>>        at
>>
>> org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
>>        at
>>
>> org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:186)
>>        at
>>
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:490)
>>        ... 40 more
>> /*********************/
>>
>>
>>
>> And for reference, here is a broken down version of the Systems class it
>> is
>> breaking on.
>>
>>
>>
>> /********************/
>>
>> @Entity
>> @Table(name="MyApp_Systems")
>> public class Systems implements Serializable {
>>    /**
>>     * Primary key id.
>>     */
>>    private String id;
>>    /**
>>     * The System object that is the parent of the System.
>>     */
>>    private Systems parent;
>>
>>    /**
>>     * Default constructor for the <code>Systems</code> object.
>>     */
>>    public Systems() {
>>    }
>>
>>    /**
>>     * Method used to get the primary id of the System.
>>     * @return the primary id value
>>     */
>>    @Id
>>    public String getId() {
>>        return id;
>>    }
>>
>>    /**
>>     * Method used to get the parent System of the System.
>>     * @return the parent <code>Systems</code> object, or <code>null</code>
>> if
>>     * no parent exists
>>     */
>>    @ManyToOne
>>    @Column(name="parentId")
>>    public Systems getParent() {
>>        return parent;
>>    }
>> }
>>
>> /********************/
>>
>>
>> Thoughts? Much appreciated all again!
>> --
>> View this message in context:
>> http://openejb.979440.n4.nabble.com/OpenEJB-and-Database-Views-tp3299801p3301402.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message