Hello Jarek, I've rebuild the app using Java 5, ran Geronimo using Java 5 too, same problem.
Since the error says: ClassCastException: com.sun.tools.apt.mirror.type.ClassTypeImpl cannot be cast to com.sun.mirror.type.AnnotationType there must be something bothering Geronimo when generating the web service server side, but the only annotations I use are (not sure if this is an exhaustive list): @WebService @TransactionManagement @Stateless @EJB @TransactionAttribute @WebMethod @Entity @Table @TableGenerator @Inheritance @Id @GeneratedValue @Version @OneToOne @OneToMany @Enumerated @JoinTable @ManyToMany @Column ... I mean on EJB3s only, there might be others too, I'm looking for some left-overs from JBoss (which has proprietary annotations of course). Geronimo cannot class cast, but what? Is there a way to debug Geronimo? Or rather configure it to get deeper log? Thanks for any opinion Karel Jarek Gawor-2 wrote: > > Karel, > > Can you try with Java 5 instead of Java 6? > > Jarek > > On Thu, Nov 13, 2008 at 10:05 AM, yosemite <[EMAIL PROTECTED]> wrote: >> >> Hello Kevan, >> >> excellent, it helped again, so >> >> - the out of memory problem is gone >> - the missing tools.jar problem is gone (linking classes.jar helped, I >> will >> suggest a fix) >> >> but the "java.lang.ClassCastException: >> com.sun.tools.apt.mirror.type.ClassTypeImpl cannot be cast to >> com.sun.mirror.type.AnnotationType" is still there, there are about 30 of >> them so more than my web services number. Any idea how to find out what >> Geronimo complains about, please? Other than that the application works >> fine >> so far, I can proceed with my migration from JBoss to Geronimo :-) >> >> Trace of 1 error in geronimo.out: >> >> Geronimo Application Server started >> Problem encountered during annotation processing; >> see stacktrace below for more information. >> java.lang.ClassCastException: com.sun.tools.apt.mirror.type.ClassTypeImpl >> cannot be cast to com.sun.mirror.type.AnnotationType at >> com.sun.tools.apt.mirror.declaration.AnnotationMirrorImpl.getAnnotationType(AnnotationMirrorImpl.java:82) >> com.sun.tools.jxc.apt.InlineAnnotationReaderImpl.getAllAnnotations(InlineAnnotationReaderImpl.java:71) >> com.sun.tools.jxc.apt.InlineAnnotationReaderImpl.getAllMethodAnnotations(InlineAnnotationReaderImpl.java:60) >> com.sun.tools.jxc.apt.InlineAnnotationReaderImpl.getAllMethodAnnotations(InlineAnnotationReaderImpl.java:26) >> com.sun.xml.bind.v2.model.impl.ClassInfoImpl.findGetterSetterProperties(ClassInfoImpl.java:894) >> at >> com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:271) >> at >> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:134) >> at >> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:196) >> at >> com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56) >> at >> com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)at >> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38) >> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41) >> at java.util.AbstractList$Itr.next(AbstractList.java:345) >> at >> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:146) >> at >> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:196) >> at >> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:211) >> at >> com.sun.tools.xjc.api.impl.j2s.JavaCompilerImpl.bind(JavaCompilerImpl.java:54)at >> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.completeModel(WebServiceAP.java:395) >> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:236) >> com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60) >> at com.sun.tools.apt.comp.Apt.main(Apt.java:454) >> at >> com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258) >> at com.sun.tools.apt.main.Main.compile(Main.java:1102) >> at com.sun.tools.apt.main.Main.compile(Main.java:964) >> at com.sun.tools.apt.Main.processing(Main.java:95) >> at com.sun.tools.apt.Main.process(Main.java:85) >> at com.sun.tools.apt.Main.process(Main.java:67) >> at >> com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:603) >> at >> com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:536) >> at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:54) >> at >> com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:42) >> 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.geronimo.jaxws.builder.JAXWSTools.invoke(JAXWSTools.java:199) >> at >> org.apache.geronimo.jaxws.builder.JAXWSTools.invoke(JAXWSTools.java:188) >> at >> org.apache.geronimo.jaxws.builder.JAXWSTools.invokeWsgen(JAXWSTools.java:170) >> at >> org.apache.geronimo.jaxws.builder.WsdlGenerator.invokeWsgen(WsdlGenerator.java:357) >> at >> org.apache.geronimo.jaxws.builder.WsdlGenerator.generateWsdl(WsdlGenerator.java:331) >> at >> org.apache.geronimo.axis2.builder.Axis2Builder.initialize(Axis2Builder.java:222)at >> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.configureEJB(JAXWSServiceBuilder.java:215) >> org.apache.geronimo.jaxws.builder.JAXWSEJBModuleBuilderExtension.addGBeans(JAXWSEJBModuleBuilderExtension.java:167) >> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.addGBeans(EjbModuleBuilder.java:822) >> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647) >> at >> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254) >> at >> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133) >> 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.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) >> at >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) >> at >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867) >> at >> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239) >> at >> org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342) >> 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.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) >> at >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) >> at >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867) >> at >> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239) >> at >> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172) >> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) >> at >> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) >> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426) >> at >> javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72) >> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264) >> at java.security.AccessController.doPrivileged(Native Method)at >> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366) >> at >> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788) >> at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305) >> at sun.rmi.transport.Transport$1.run(Transport.java:159) >> at java.security.AccessController.doPrivileged(Native Method) >> at sun.rmi.transport.Transport.serviceCall(Transport.java:155) >> at >> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) >> at >> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) >> at >> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) >> at java.lang.Thread.run(Thread.java:637) >> Problem encountered during annotation processing; >> see stacktrace below for more information. >> java.lang.ClassCastException: com.sun.tools.apt.mirror.type.ClassTypeImpl >> cannot be cast to com.sun.mirror.type.AnnotationType... and then the same >> 30 >> times. >> >> Thanks for your valuable help >> Karel >> >> >> >> >> Kevan Miller wrote: >>> >>> >>> On Nov 12, 2008, at 11:23 AM, yosemite wrote: >>> >>>> >>>> Kevan, >>>> >>>> thank you for your help, increasing the memory made my application >>>> to work >>>> (I migrate from MS Windows to Mac OS and from JBoss to Geronimo, >>>> probably >>>> too many things at once :-). >>>> >>>> So, all the webServices seem to work OK now, thanks to you, but the >>>> exception is still the same: >>>> >>>> geronimo.out says: >>>> >>>> [JAXWSTools] Missing >>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/lib. This >>>> may be >>>> required for wsgen to run. >>>> Problem encountered during annotation processing; >>>> see stacktrace below for more information. >>>> java.lang.ClassCastException: >>>> com.sun.tools.apt.mirror.type.ClassTypeImpl >>>> cannot be cast to com.sun.mirror.type.AnnotationType at >>>> com >>>> .sun >>>> .tools >>>> .apt >>>> .mirror >>>> .declaration >>>> .AnnotationMirrorImpl.getAnnotationType(AnnotationMirrorImpl.java:82) >>>> com >>>> .sun >>>> .tools >>>> .jxc >>>> .apt >>>> .InlineAnnotationReaderImpl >>>> .getAllAnnotations(InlineAnnotationReaderImpl.java:71) >>>> ... >>>> ... this trace for every webService I deploy (I've got 13 >>>> webServices with >>>> cca 30 methods each). >>>> >>>> This is how I start geronimo: in command line: >>>> export JAVA_OPTS="-Xmx512m -XX:MaxPermSize=128m" >>>> export >>>> JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/ >>>> Home/ >>>> ./geronimo.sh start >>>> >>>> then in Eclipse: Add - Remove projects... my app EAR with EJB module >>>> with >>>> the webServices >>>> >>>> I noticed in your reply you still mention the /lib but I don't have >>>> it in my >>>> ...1.6.0 folder. >>> >>> Ooops. My mistake(s) on multiple levels. >>> >>> So, Java directory layout assumed by >>> https://svn.apache.org/repos/asf/geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSTools.java >>> is not right. Perhaps you'd be interested in suggesting a fix? >>> >>> You can work-around this problem with a bit of a hack: >>> >>> $ cd /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0 >>> $ sudo mkdir lib >>> $ cd lib >>> $ sudo ln -s ../Classes/classes.jar tools.jar >>> >>> --kevan >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/WebService-on-Geronimo-2.1.3-for-Mac-OS-X-10.5.5-using-Java-6-tp20423322s134p20481637.html >> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/WebService-on-Geronimo-2.1.3-for-Mac-OS-X-10.5.5-using-Java-6-tp20423322s134p20500457.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
