You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by rsdev <vi...@rockshore.net> on 2009/06/10 17:38:00 UTC

Problems with Tapestry, Spring & jax-ws integration

Has anyone successfully created a project using Tapestry and Spring for
jax-ws web services? 

I have a project using these technologies and I'm getting a number of
issues. The first is this error:-

org.apache.tapestry5.ioc.internal.util.TapestryException: Exception
constructing service 'ValueEncoderSource': Error invoking service builder
method
org.apache.tapestry5.services.TapestryModule.buildValueEncoderSource(Map,
InvalidationEventHub) (at TapestryModule.java:1910) (for service
'ValueEncoderSource'): Error invoking service contribution method
org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
boolean, HibernateSessionSource, Session, TypeCoercer, PropertyAccess,
LoggerSource): Exception constructing service 'HibernateSessionSource':
Error invoking service builder method
org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionSource(Logger,
List, RegistryShutdownHub) (at HibernateCoreModule.java:123) (for service
'HibernateSessionSource'):
org.hibernate.validator.event.ValidateEventListener cannot be cast to
org.hibernate.event.PreInsertEventListener [at
classpath:org/apache/tapestry5/corelib/components/ExceptionDisplay.tml, line
3]


org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:948)


This is using the latest hibernate annotaions (version 3.4.0 GA).  In the
Maven pom.xml if I change the org.hibernate dependency to be:-

 <dependency>

            <groupId>org.hibernate</groupId>

            <artifactId>hibernate-annotations</artifactId>

            <version>3.2.1.ga</version>

        </dependency>

the error goes away, but we lose the bug fixes from the newer versions of
annotations.  Does anyone know a way around this? 


-- 
View this message in context: http://www.nabble.com/Problems-with-Tapestry%2C-Spring---jax-ws-integration-tp23965049p23965049.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Problems with Tapestry, Spring & jax-ws integration

Posted by rsdev <vi...@rockshore.net>.
Solved it! 

The JBoss lib had version 3.2.1 of hibernate-annotations jar,  if I removed
this and re-deployed everything worked :-) 
-- 
View this message in context: http://www.nabble.com/Problems-with-Tapestry%2C-Spring---jax-ws-integration-tp23965049p23977749.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Problems with Tapestry, Spring & jax-ws integration

Posted by Peter Stavrinides <P....@albourne.com>.
> Has anyone successfully created a project using Tapestry and Spring for
> jax-ws web services? 

I would be interested in giving this a try! If you get this working could you document it, perhaps in a wiki article?

Cheers,
Peter

----- Original Message -----
From: "Otho" <ta...@googlemail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Thursday, 11 June, 2009 12:06:50 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: Problems with Tapestry, Spring & jax-ws integration

Is there any obligation to use hibernate 3.2.6 instead of 3.3.1?
I'm not 100% sure, but the problem might be in annotations 3.4 being not
entirely compatible with hibernate core 3.2. In the stacktrace you posted,
this:

org.hibernate.validator.event.ValidateEventListener cannot be cast to
org.hibernate.event.PreInsertEventListener

is a pointer in that direction.



2009/6/11 rsdev <vi...@rockshore.net>

>
> Thanks, I have just tried that and it still gives me the same error. The
> dependencies I have are:-
>
> <dependencies>
>        <dependency>
>            <groupId>com.sun.xml.bind</groupId>
>            <artifactId>jaxb-impl</artifactId>
>            <version>2.1.9</version>
>            <scope>provided</scope>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.tapestry</groupId>
>            <artifactId>tapestry-core</artifactId>
>            <version>${tapestry-release-version}</version>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.tapestry</groupId>
>            <artifactId>tapestry-hibernate-core</artifactId>
>            <version>${tapestry-release-version}</version>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.tapestry</groupId>
>            <artifactId>tapestry-hibernate</artifactId>
>            <version>${tapestry-release-version}</version>
>            <scope>compile</scope>
>        </dependency>
>        <dependency>
>            <groupId>javax.servlet</groupId>
>            <artifactId>servlet-api</artifactId>
>            <version>2.5</version>
>            <scope>compile</scope>
>        </dependency>
>        <dependency>
>            <groupId>junit</groupId>
>            <artifactId>junit</artifactId>
>            <version>4.6</version>
>            <scope>test</scope>
>        </dependency>
>        <dependency>
>            <groupId>hsqldb</groupId>
>            <artifactId>hsqldb</artifactId>
>            <version>1.8.0.7</version>
>            <scope>test</scope>
>        </dependency>
>         <dependency>
>            <groupId>org.hibernate</groupId>
>             <artifactId>hibernate</artifactId>
>            <version>3.2.6.ga</version>
>        </dependency>
>         <dependency>
>            <groupId>org.hibernate</groupId>
>            <artifactId>hibernate-annotations</artifactId>
>             <version>3.4.0.GA</version>
>        </dependency>
>        <dependency>
>            <groupId>javax.persistence</groupId>
>            <artifactId>persistence-api</artifactId>
>            <version>1.0</version>
>        </dependency>
>        <dependency>
>            <groupId>mysql</groupId>
>            <artifactId>mysql-connector-java</artifactId>
>            <version>5.1.6</version>
>            <scope>compile</scope>
>        </dependency>
>        <dependency>
>            <groupId>org.mockito</groupId>
>            <artifactId>mockito-all</artifactId>
>            <version>1.7</version>
>            <scope>test</scope>
>        </dependency>
>        <dependency>
>            <groupId>log4j</groupId>
>            <artifactId>log4j</artifactId>
>            <version>1.2.15</version>
>            <scope>compile</scope>
>        </dependency>
>        <dependency>
>            <groupId>org.hamcrest</groupId>
>            <artifactId>hamcrest-all</artifactId>
>            <version>1.1</version>
>            <scope>test</scope>
>        </dependency>
>        <dependency>
>            <groupId>commons-collections</groupId>
>            <artifactId>commons-collections</artifactId>
>            <version>3.2.1</version>
>            <scope>compile</scope>
>        </dependency>
>                <dependency>
>                        <groupId>org.springframework.ws</groupId>
>                        <artifactId>spring-ws-core</artifactId>
>                        <version>1.5.6</version>
>                </dependency>
>                <dependency>
>                        <groupId>org.springframework.ws</groupId>
>                        <artifactId>spring-oxm</artifactId>
>                        <version>1.5.6</version>
>                </dependency>
>                <dependency>
>                        <groupId>jdom</groupId>
>                        <artifactId>jdom</artifactId>
>                        <version>1.0</version>
>                </dependency>
>        <dependency>
>                        <groupId>com.sun.xml.messaging.saaj</groupId>
>                        <artifactId>saaj-impl</artifactId>
>                        <version>1.3.2</version>
>                        <scope>runtime</scope>
>                </dependency>
>    </dependencies>
>
>
> --
> View this message in context:
> http://www.nabble.com/Problems-with-Tapestry%2C-Spring---jax-ws-integration-tp23965049p23977345.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Problems with Tapestry, Spring & jax-ws integration

Posted by Otho <ta...@googlemail.com>.
Is there any obligation to use hibernate 3.2.6 instead of 3.3.1?
I'm not 100% sure, but the problem might be in annotations 3.4 being not
entirely compatible with hibernate core 3.2. In the stacktrace you posted,
this:

org.hibernate.validator.event.ValidateEventListener cannot be cast to
org.hibernate.event.PreInsertEventListener

is a pointer in that direction.



2009/6/11 rsdev <vi...@rockshore.net>

>
> Thanks, I have just tried that and it still gives me the same error. The
> dependencies I have are:-
>
> <dependencies>
>        <dependency>
>            <groupId>com.sun.xml.bind</groupId>
>            <artifactId>jaxb-impl</artifactId>
>            <version>2.1.9</version>
>            <scope>provided</scope>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.tapestry</groupId>
>            <artifactId>tapestry-core</artifactId>
>            <version>${tapestry-release-version}</version>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.tapestry</groupId>
>            <artifactId>tapestry-hibernate-core</artifactId>
>            <version>${tapestry-release-version}</version>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.tapestry</groupId>
>            <artifactId>tapestry-hibernate</artifactId>
>            <version>${tapestry-release-version}</version>
>            <scope>compile</scope>
>        </dependency>
>        <dependency>
>            <groupId>javax.servlet</groupId>
>            <artifactId>servlet-api</artifactId>
>            <version>2.5</version>
>            <scope>compile</scope>
>        </dependency>
>        <dependency>
>            <groupId>junit</groupId>
>            <artifactId>junit</artifactId>
>            <version>4.6</version>
>            <scope>test</scope>
>        </dependency>
>        <dependency>
>            <groupId>hsqldb</groupId>
>            <artifactId>hsqldb</artifactId>
>            <version>1.8.0.7</version>
>            <scope>test</scope>
>        </dependency>
>         <dependency>
>            <groupId>org.hibernate</groupId>
>             <artifactId>hibernate</artifactId>
>            <version>3.2.6.ga</version>
>        </dependency>
>         <dependency>
>            <groupId>org.hibernate</groupId>
>            <artifactId>hibernate-annotations</artifactId>
>             <version>3.4.0.GA</version>
>        </dependency>
>        <dependency>
>            <groupId>javax.persistence</groupId>
>            <artifactId>persistence-api</artifactId>
>            <version>1.0</version>
>        </dependency>
>        <dependency>
>            <groupId>mysql</groupId>
>            <artifactId>mysql-connector-java</artifactId>
>            <version>5.1.6</version>
>            <scope>compile</scope>
>        </dependency>
>        <dependency>
>            <groupId>org.mockito</groupId>
>            <artifactId>mockito-all</artifactId>
>            <version>1.7</version>
>            <scope>test</scope>
>        </dependency>
>        <dependency>
>            <groupId>log4j</groupId>
>            <artifactId>log4j</artifactId>
>            <version>1.2.15</version>
>            <scope>compile</scope>
>        </dependency>
>        <dependency>
>            <groupId>org.hamcrest</groupId>
>            <artifactId>hamcrest-all</artifactId>
>            <version>1.1</version>
>            <scope>test</scope>
>        </dependency>
>        <dependency>
>            <groupId>commons-collections</groupId>
>            <artifactId>commons-collections</artifactId>
>            <version>3.2.1</version>
>            <scope>compile</scope>
>        </dependency>
>                <dependency>
>                        <groupId>org.springframework.ws</groupId>
>                        <artifactId>spring-ws-core</artifactId>
>                        <version>1.5.6</version>
>                </dependency>
>                <dependency>
>                        <groupId>org.springframework.ws</groupId>
>                        <artifactId>spring-oxm</artifactId>
>                        <version>1.5.6</version>
>                </dependency>
>                <dependency>
>                        <groupId>jdom</groupId>
>                        <artifactId>jdom</artifactId>
>                        <version>1.0</version>
>                </dependency>
>        <dependency>
>                        <groupId>com.sun.xml.messaging.saaj</groupId>
>                        <artifactId>saaj-impl</artifactId>
>                        <version>1.3.2</version>
>                        <scope>runtime</scope>
>                </dependency>
>    </dependencies>
>
>
> --
> View this message in context:
> http://www.nabble.com/Problems-with-Tapestry%2C-Spring---jax-ws-integration-tp23965049p23977345.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Problems with Tapestry, Spring & jax-ws integration

Posted by rsdev <vi...@rockshore.net>.
Thanks, I have just tried that and it still gives me the same error. The
dependencies I have are:-

<dependencies>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.1.9</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-core</artifactId>
            <version>${tapestry-release-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-hibernate-core</artifactId>
            <version>${tapestry-release-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-hibernate</artifactId>
            <version>${tapestry-release-version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.6</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>1.8.0.7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>3.2.6.ga</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-annotations</artifactId>
            <version>3.4.0.GA</version>
        </dependency>
        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>persistence-api</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.6</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
            <scope>compile</scope>
        </dependency>
                <dependency>
                        <groupId>org.springframework.ws</groupId>
                        <artifactId>spring-ws-core</artifactId>
                        <version>1.5.6</version>
                </dependency>
                <dependency>
                        <groupId>org.springframework.ws</groupId>
                        <artifactId>spring-oxm</artifactId>
                        <version>1.5.6</version>
                </dependency>
                <dependency>
                        <groupId>jdom</groupId>
                        <artifactId>jdom</artifactId>
                        <version>1.0</version>
                </dependency>
        <dependency>
                        <groupId>com.sun.xml.messaging.saaj</groupId>
                        <artifactId>saaj-impl</artifactId>
                        <version>1.3.2</version>
                        <scope>runtime</scope>
                </dependency>
    </dependencies>


-- 
View this message in context: http://www.nabble.com/Problems-with-Tapestry%2C-Spring---jax-ws-integration-tp23965049p23977345.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Problems with Tapestry, Spring & jax-ws integration

Posted by Otho <ta...@googlemail.com>.
I use annotations 3.4.0, core 3.3.1 and validator 3.1.0 together with envers
3.4.0-SNAPSHOT without any problems. But I don't use tapestry-hibernate but
have hibernate, datasources and data-access configured with spring,
including the listeners for envers. So I would suspect the problem is
somewhere within tapestry-hibernates dependencies?



2009/6/10 rsdev <vi...@rockshore.net>

>
> Has anyone successfully created a project using Tapestry and Spring for
> jax-ws web services?
>
> I have a project using these technologies and I'm getting a number of
> issues. The first is this error:-
>
> org.apache.tapestry5.ioc.internal.util.TapestryException: Exception
> constructing service 'ValueEncoderSource': Error invoking service builder
> method
> org.apache.tapestry5.services.TapestryModule.buildValueEncoderSource(Map,
> InvalidationEventHub) (at TapestryModule.java:1910) (for service
> 'ValueEncoderSource'): Error invoking service contribution method
>
> org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
> boolean, HibernateSessionSource, Session, TypeCoercer, PropertyAccess,
> LoggerSource): Exception constructing service 'HibernateSessionSource':
> Error invoking service builder method
>
> org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionSource(Logger,
> List, RegistryShutdownHub) (at HibernateCoreModule.java:123) (for service
> 'HibernateSessionSource'):
> org.hibernate.validator.event.ValidateEventListener cannot be cast to
> org.hibernate.event.PreInsertEventListener [at
> classpath:org/apache/tapestry5/corelib/components/ExceptionDisplay.tml,
> line
> 3]
>
>
>
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:948)
>
>
> This is using the latest hibernate annotaions (version 3.4.0 GA).  In the
> Maven pom.xml if I change the org.hibernate dependency to be:-
>
>  <dependency>
>
>            <groupId>org.hibernate</groupId>
>
>            <artifactId>hibernate-annotations</artifactId>
>
>            <version>3.2.1.ga</version>
>
>        </dependency>
>
> the error goes away, but we lose the bug fixes from the newer versions of
> annotations.  Does anyone know a way around this?
>
>
> --
> View this message in context:
> http://www.nabble.com/Problems-with-Tapestry%2C-Spring---jax-ws-integration-tp23965049p23965049.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>