cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-1758) Simple front end does not figure out generic implementation beans.
Date Mon, 25 Aug 2008 20:47:44 GMT

     [ https://issues.apache.org/jira/browse/CXF-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benson Margulies updated CXF-1758:
----------------------------------

             Component/s: Simple Frontend
             Description: 
The real issue in the description below is that the SimpleFrontEnd is not dealing with an
implementation bean like

MyClass<String> as it must. It isn't figuring out the actual types, it's just allowing
type erasure to mislead it into treating all instances of the type parameters as Object, which
is to say xsd:anyType. This happened to trigger an obscure explosion in the Javascript generator.

If anyone wants to fix this badly enough, they need to contemplate 

   List<P> doSomething(P someItem)

in terms of the complexity of the code that will trace that P down there in the list up to
the SEB.



I managed to get a javascript client example working but it barfs in some cases.

All my server classes are pojos and I am using the simple frontend (I think) with Aegis. I
am very pleased with java2java communication since I can pass complex types with no annotations
at all.

The problematic cases are of the form. (All other cases are working with js client)

public interface Service<T, P> {
    public int open(P args);

    public void close(int handle);

    public int getValue(int handle);
}

My guess is it barfs in the generic P type argument.

When I am trying to do http://localhost/ws/SomeService?js tomcat produces an error

Aug 20, 2008 7:14:43 AM org.apache.cxf.transport.servlet.ServletController invoke
WARNING: org.apache.cxf.javascript.JavascriptQueryHandler Exception caught writing response.
java.lang.ClassCastException: org.apache.ws.commons.schema.XmlSchemaType cannot be cast to
org.apache.ws.commons.schema.XmlSchemaComplexType
        at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.deserializeElement(SchemaJavascriptBuilder.java:610)
        at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.domDeserializerFunction(SchemaJavascriptBuilder.java:413)
        at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.generateCodeForSchema(SchemaJavascriptBuilder.java:102)
        at org.apache.cxf.javascript.JavascriptQueryHandler.writeResponse(JavascriptQueryHandler.java:135)
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:152)
        at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:174)
        at org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:156)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        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.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:171)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:619)


  was:
I managed to get a javascript client example working but it barfs in some cases.

All my server classes are pojos and I am using the simple frontend (I think) with Aegis. I
am very pleased with java2java communication since I can pass complex types with no annotations
at all.

The problematic cases are of the form. (All other cases are working with js client)

public interface Service<T, P> {
    public int open(P args);

    public void close(int handle);

    public int getValue(int handle);
}

My guess is it barfs in the generic P type argument.

When I am trying to do http://localhost/ws/SomeService?js tomcat produces an error

Aug 20, 2008 7:14:43 AM org.apache.cxf.transport.servlet.ServletController invoke
WARNING: org.apache.cxf.javascript.JavascriptQueryHandler Exception caught writing response.
java.lang.ClassCastException: org.apache.ws.commons.schema.XmlSchemaType cannot be cast to
org.apache.ws.commons.schema.XmlSchemaComplexType
        at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.deserializeElement(SchemaJavascriptBuilder.java:610)
        at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.domDeserializerFunction(SchemaJavascriptBuilder.java:413)
        at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.generateCodeForSchema(SchemaJavascriptBuilder.java:102)
        at org.apache.cxf.javascript.JavascriptQueryHandler.writeResponse(JavascriptQueryHandler.java:135)
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:152)
        at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:174)
        at org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:156)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        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.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:171)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:619)


    Estimated Complexity: Advanced
                 Summary: Simple front end does not figure out generic implementation beans.
 (was: javascript client generation barfs at generic types)

> Simple front end does not figure out generic implementation beans.
> ------------------------------------------------------------------
>
>                 Key: CXF-1758
>                 URL: https://issues.apache.org/jira/browse/CXF-1758
>             Project: CXF
>          Issue Type: Bug
>          Components: Simple Frontend
>    Affects Versions: 2.1.2
>         Environment: linux debian stable (etch) tomcat 5.5.20-2etch3
>            Reporter: Vassilis Virvilis
>
> The real issue in the description below is that the SimpleFrontEnd is not dealing with
an implementation bean like
> MyClass<String> as it must. It isn't figuring out the actual types, it's just allowing
type erasure to mislead it into treating all instances of the type parameters as Object, which
is to say xsd:anyType. This happened to trigger an obscure explosion in the Javascript generator.
> If anyone wants to fix this badly enough, they need to contemplate 
>    List<P> doSomething(P someItem)
> in terms of the complexity of the code that will trace that P down there in the list
up to the SEB.
> I managed to get a javascript client example working but it barfs in some cases.
> All my server classes are pojos and I am using the simple frontend (I think) with Aegis.
I am very pleased with java2java communication since I can pass complex types with no annotations
at all.
> The problematic cases are of the form. (All other cases are working with js client)
> public interface Service<T, P> {
>     public int open(P args);
>     public void close(int handle);
>     public int getValue(int handle);
> }
> My guess is it barfs in the generic P type argument.
> When I am trying to do http://localhost/ws/SomeService?js tomcat produces an error
> Aug 20, 2008 7:14:43 AM org.apache.cxf.transport.servlet.ServletController invoke
> WARNING: org.apache.cxf.javascript.JavascriptQueryHandler Exception caught writing response.
> java.lang.ClassCastException: org.apache.ws.commons.schema.XmlSchemaType cannot be cast
to org.apache.ws.commons.schema.XmlSchemaComplexType
>         at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.deserializeElement(SchemaJavascriptBuilder.java:610)
>         at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.domDeserializerFunction(SchemaJavascriptBuilder.java:413)
>         at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.generateCodeForSchema(SchemaJavascriptBuilder.java:102)
>         at org.apache.cxf.javascript.JavascriptQueryHandler.writeResponse(JavascriptQueryHandler.java:135)
>         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:152)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:174)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:156)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         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.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
>         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:262)
>         at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:192)
>         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:171)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
>         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
>         at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
>         at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>         at java.lang.Thread.run(Thread.java:619)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message