users@glassfish.java.net

RE: _at_OneToMany(mappedBy) - not working...

From: Kenneth Clark <kenneth_at_rabiddog.co.za>
Date: Mon, 6 Aug 2007 13:09:55 +0200

Also notice the lower case "w" on the mappedBy value. It points to the name
of the variable, not the type.

Kenneth Clark
Solution Architect / Lead Developer
Rabid Dog Labs

Tel: +27 11 475 7409
Mobile: +27 82 500 5090
Email: kenneth_at_rabiddog.co.za
Web: http://www.rabiddog.co.za

-----Original Message-----
From: Kenneth Clark [mailto:kenneth_at_rabiddog.co.za]
Sent: Monday, August 06, 2007 13:05
To: users_at_glassfish.dev.java.net
Subject: RE: @OneToMany(mappedBy) - not working...

Not sure if this will help but all my mappings take the form of

Website:
@OneToMany(mappedBy="website")
private List<Crawl> crawls;

Crawl:
@ManyToOne
@JoinColumn(name="website_id", referencedColumnName = "id") // where ID is
the name of the PK field
private Website website;

Kenneth Clark
Solution Architect / Lead Developer
Rabid Dog Labs

Tel: +27 11 475 7409
Mobile: +27 82 500 5090
Email: kenneth_at_rabiddog.co.za
Web: http://www.rabiddog.co.za
-----Original Message-----
From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
Sent: Monday, August 06, 2007 13:05
To: users_at_glassfish.dev.java.net
Subject: Re: @OneToMany(mappedBy) - not working...

That didn't help much... still:

Exception Description: The attribute [crawls] in entity class [class
sam.core.ejb.Website] has a mappedBy value of [Website] which does not exist
in its owning entity class [class sam.core.ejb.Crawl]. If the owning entity
class is a @MappedSuperclass, this is invalid, and your attribute should
reference the correct subclass.
        at
oracle.toplink.essentials.exceptions.ValidationException.noMappedByAttribute
Found(ValidationException.java:1104)
        at
oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataValidator.throw
NoMappedByAttributeFound(MetadataValidator.java:196)
        at
oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipA
ccessor.getOwningMapping(RelationshipAccessor.java:126)
        at
oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.OneToManyAcce
ssor.process(OneToManyAccessor.java:104)
        at
oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipA
ccessor.processRelationship(RelationshipAccessor.java:250)
        at
oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.process
RelationshipDescriptors(MetadataProject.java:513)
        at
oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.process
(MetadataProject.java:445)
        at
oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.proce
ssAnnotations(MetadataProcessor.java:203)
        at
oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.processOR
Metadata(EntityManagerSetupImpl.java:993)
        at
oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy
(EntityManagerSetupImpl.java:501)
        at
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContai
nerEntityManagerFactory(EntityManagerFactoryProvider.java:152)
        at
com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.loadPersis
tenceUnitBundle(PersistenceProcessor.java:467)
        at
com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.createTabl
esInDB(PersistenceProcessor.java:325)
        at
com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.processApp
Bundle(PersistenceProcessor.java:190)
        at
com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.processApp
lication(PersistenceProcessor.java:125)
        at
com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.pro
cessApplication(DeploymentEventListenerImpl.java:193)
        at
com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.pro
cessEvent(DeploymentEventListenerImpl.java:152)
        at
com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.not
ifyDeploymentEvent(DeploymentEventListenerImpl.java:109)
        at
com.sun.enterprise.deployment.backend.DeploymentEventManager.notifyDeploymen
tEvent(DeploymentEventManager.java:66)
        at
com.sun.enterprise.deployment.backend.ModuleDeployer.handlePostDeployEvent(M
oduleDeployer.java:689)
        at
com.sun.enterprise.deployment.backend.ModuleDeployer.postDeploy(ModuleDeploy
er.java:677)
        at
com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleD
eployer.java:169)
        at
com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:16
9)
        at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(Deploymen
tPhase.java:95)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDe
ploymentService.java:871)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymen
tService.java:266)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymen
tService.java:739)
        at
com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:1
74)
        at
com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
[Message sent by forum member 'kosta2' (kosta2)]

http://forums.java.net/jive/thread.jspa?messageID=229581

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 2007/08/05
16:16
 

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 2007/08/05
16:16
 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 2007/08/05
16:16
 

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 2007/08/05
16:16