Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Resolving PersistentClass instances mapping to the same entity

$
0
0
Hi. :)
I have following case:
Article

Fruits Vegetables

Fruits and Vegetables inherits Article, and both Fruits and Vegetables have same DiscriminatorValue. Now when I try to do some ValueEncoder magic like in following
public class ArticleEncoder implements ValueEncoder< Article>, ValueEncoderFactory< Article> {

private LogicDAO logicDAO;

@Override
public String toClient(final Article v) {
return String.valueOf(v.getName());

@Override
public Artikal toValue(String string) {
Article result = new Article();
result = logicDAO.listSpecificArticle(string);
return result;

@Override
public ValueEncoder< Article> create(Class< Article> type) {
return this;

I get following
HTTP Status 500 - Exception constructing service
'ValueEncoderSource': Error invoking service contribution method
org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
boolean, HibernateSessionSource, Session, TypeCoercer, PropertyAccess,
LoggerSource): Service contribution (to service 'ValueEncoderSource')
conflicts with existing contribution (by com.google.tapestrySection.teamAlpha.services.AppModule.contributeValueEncoderSource(MappedConfiguration, LogicDAO) (at AppModule.java:1264)).

Anyone knows how to hack this issue here? :)

Viewing all articles
Browse latest Browse all 5648

Latest Images

Trending Articles



Latest Images