Juan, How do yo manage cycles in your JPA entity object graph ? For example I have ServiceUsage and ServiceUsageDetails and they have bi-directional relationship. In ServiceUsage: @OneToMany(mappedBy="serviceUsage", fetch = FetchType.EAGER) private List<ServiceUsageDetail> serviceUsageList;
In ServiceUsageDetail: @ManyToOne @JoinColumn(name="SERVICE_USAGE_ID") ServiceUsage serviceUsage; This is causing : com.sun.istack.SAXException2: A cycle is detected in the object graph How do you handle this cases ? Thanks. On 8/22/07, Juan José Vázquez Delgado <[EMAIL PROTECTED]> wrote: > > Now, I have this: > > <jaxws:endpoint id="myServiceEndpoint" > implementor="#myServiceImpl" > implementorClass="com.xx.MyServiceImpl" > address="/MyService" /> > > and everything seems to be ok, > > Thank you Daniel! > > Regards. > > Juanjo. > > > On 8/21/07, Daniel Kulp <[EMAIL PROTECTED]> wrote: > > > > > > > > Mustafa, > > > > This error (according to the "toArray" javadocs) would be caused if > > something in the Collection is not of the same type as the array. What > > we do is take the "generic" type and create and array of that type and > > call "toArray" with that. > > > > Thus, if you have Vector<Integer>, we create an Integer[] and call > > toArray with that. If somehow you got a non-Integer into the Vector, > > that would cause the above error. > > > > Not sure if that helps or not. :-( Before returning the Vector, > you > > might want to try the same thing: > > vector.toArray(new Integer[0]); > > just to see if you get the same error. > > > > Dan > > > > > > > > On Tuesday 21 August 2007, Mustafa Egilmezbilek wrote: > > > Juan, > > > > > > In fact I am using CXF 2.0.1 and I got the following error: > > > INFO: Interceptor has thrown exception, unwinding now > > > java.lang.ArrayStoreException > > > at java.lang.System.arraycopy(Native Method) > > > at java.util.Arrays.copyOf(Unknown Source) > > > at java.util.Vector.toArray(Unknown Source) > > > at org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall( > > > JAXBEncoderDecoder.java:102) > > > .... > > > > > > Any ideas ? > > > > > > On 8/21/07, Juan José Vázquez Delgado <[EMAIL PROTECTED]> > wrote: > > > > Hi, Mustafa. > > > > > > > > I don´t use wsdl2java after generate the wsdl. You can use complex > > > > types and > > > > tunning the mappings with JAXB annotations over the classes (in > > > > jax-ws front-end of course). > > > > > > > > But, you must migrate to CXF-2.0.1 because there was an issue in > > > > CXF-2.0. > > > > > > > > I hope this help you. > > > > > > > > Regards > > > > > > > > On 8/21/07, Mustafa Egilmezbilek <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > > > > > > I have a similar architecture with yours and I have a question > > > > > about publishing your web services (hope you don't mind): > > > > > (Assuming you use Java First Development) After you generate the > > > > > wsdl, > > > > > > > > are > > > > > > > > > you using wsdl2java tool ? > > > > > If you have a complex return type in your interface how do you > > > > > define > > > > > > > > the > > > > > > > > > mapping ? > > > > > > > > > > Thanks, > > > > > > > > > > Mustafa > > > > > > > > > > On 8/21/07, Juan José Vázquez Delgado <[EMAIL PROTECTED]> > > wrote: > > > > > > Hi, guys! > > > > > > > > > > > > I have an application architecture with CXF + Spring + JPA + > > > > > > > > Hibernate. > > > > > > > > > My > > > > > > > > > > > goal is having transactional services with the @Transactional > > > > > > > > > > annotation. > > > > > > > > > > > Although, when the application starts i get an parsing error. > > > > > > The relevant configuration includes this: > > > > > > > > > > > > <bean id="transactionManager" class=" > > > > > > org.springframework.orm.jpa.JpaTransactionManager" /> > > > > > > > > > > > > <tx:annotation-driven /> > > > > > > > > > > > > <bean id="myServiceImpl" > > > > > > class="com.xx.MyServiceImpl" /> > > > > > > > > > > > > <jaxws:endpoint id="myServiceEndpoint" > > > > > > implementor="#myServiceImpl" > > > > > > address="/MyService" /> > > > > > > > > > > > > @Transactional > > > > > > public interface MyService() { > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > Any ideas? > > > > > > > > > > > > Thanks a lot > > > > > > > > > > -- > > > > > Mustafa Egilmezbilek > > > > > > > > -- > > J. Daniel Kulp > > Principal Engineer > > IONA > > P: 781-902-8727 C: 508-380-7194 > > [EMAIL PROTECTED] > > http://www.dankulp.com/blog > > > -- Mustafa Egilmezbilek