You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "max laenzlinger (JIRA)" <ji...@apache.org> on 2009/08/04 11:14:14 UTC

[jira] Created: (CXF-2377) jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working

jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working
----------------------------------------------------------------------------------------

                 Key: CXF-2377
                 URL: https://issues.apache.org/jira/browse/CXF-2377
             Project: CXF
          Issue Type: Bug
          Components: REST
    Affects Versions: 2.2.3
            Reporter: max laenzlinger


See summary. Using absolute path works, but using classpath cant find the schema file inside the webapplication-context.

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


[jira] Commented: (CXF-2377) jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739523#action_12739523 ] 

Sergey Beryozkin commented on CXF-2377:
---------------------------------------

Hi Max

by the way, which Tomcat version are you using ?
Do you mean /shared/lib folder (assuming it's Tomcat 5.5) ?

> jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working
> ----------------------------------------------------------------------------------------
>
>                 Key: CXF-2377
>                 URL: https://issues.apache.org/jira/browse/CXF-2377
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2.3
>            Reporter: max laenzlinger
>
> See summary. Using absolute path works, but using classpath cant find the schema file inside the webapplication-context.

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


[jira] Resolved: (CXF-2377) jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-2377.
-----------------------------------

    Resolution: Cannot Reproduce

Max - please reopen this issue if you're still seeing the problem, but ideally with a test web app attached :-)

> jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working
> ----------------------------------------------------------------------------------------
>
>                 Key: CXF-2377
>                 URL: https://issues.apache.org/jira/browse/CXF-2377
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2.3
>            Reporter: max laenzlinger
>         Attachments: cxf.zip
>
>
> See summary. Using absolute path works, but using classpath cant find the schema file inside the webapplication-context.

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


[jira] Updated: (CXF-2377) jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin updated CXF-2377:
----------------------------------

    Attachment: cxf.zip

> jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working
> ----------------------------------------------------------------------------------------
>
>                 Key: CXF-2377
>                 URL: https://issues.apache.org/jira/browse/CXF-2377
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2.3
>            Reporter: max laenzlinger
>         Attachments: cxf.zip
>
>
> See summary. Using absolute path works, but using classpath cant find the schema file inside the webapplication-context.

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


[jira] Commented: (CXF-2377) jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working

Posted by "max laenzlinger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769247#action_12769247 ] 

max laenzlinger commented on CXF-2377:
--------------------------------------

Hi Sergey, many many thanks for all your help. i'm sorry im late and too stupid to reproduce also much time since then,  my workaround since works well too (by putting the xsd inside the /lib folder).  Cheers MAx

> jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working
> ----------------------------------------------------------------------------------------
>
>                 Key: CXF-2377
>                 URL: https://issues.apache.org/jira/browse/CXF-2377
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2.3
>            Reporter: max laenzlinger
>         Attachments: cxf.zip
>
>
> See summary. Using absolute path works, but using classpath cant find the schema file inside the webapplication-context.

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


[jira] Commented: (CXF-2377) jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739520#action_12739520 ] 

Sergey Beryozkin commented on CXF-2377:
---------------------------------------

Hi Max, thanks for opening this issue.

Hi Dan, here's the code from ResourceUtils :

public static InputStream getClasspathResourceStream(String path, Class<?> callingClass, Bus bus) {
        InputStream is = ClassLoaderUtils.getResourceAsStream(path, callingClass);
        if (is == null && bus != null) {
            ResourceManager rm = bus.getExtension(ResourceManager.class);
            if (rm != null) {
                is = rm.getResourceAsStream(path);
            }
        }
        return is;
    }


what else can be done there to make things working as expected ? I thought ResourceManager would take care of it ?

thanks, Sergey


> jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working
> ----------------------------------------------------------------------------------------
>
>                 Key: CXF-2377
>                 URL: https://issues.apache.org/jira/browse/CXF-2377
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2.3
>            Reporter: max laenzlinger
>
> See summary. Using absolute path works, but using classpath cant find the schema file inside the webapplication-context.

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


[jira] Commented: (CXF-2377) jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working

Posted by "max laenzlinger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739572#action_12739572 ] 

max laenzlinger commented on CXF-2377:
--------------------------------------

Hi Sergey,

I use Tomcat 6.0.18 and its the (standard?) folder with the name /lib 

((Meanwhile for workaround (instead using classpath) i can use absolute path "c:\...". Do you maybe know can i use relative path kind of '..//xsd//my.xsd', and  where could be the xsd? It does not have to be inside the context, somewhere in tomcat is ok))

Thanks for all & Greetings MAx 

> jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working
> ----------------------------------------------------------------------------------------
>
>                 Key: CXF-2377
>                 URL: https://issues.apache.org/jira/browse/CXF-2377
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2.3
>            Reporter: max laenzlinger
>
> See summary. Using absolute path works, but using classpath cant find the schema file inside the webapplication-context.

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


[jira] Commented: (CXF-2377) jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763037#action_12763037 ] 

Sergey Beryozkin commented on CXF-2377:
---------------------------------------

Max, if you can attach a sample web app showing how schemas are referred to then it would help, otherwise I'd be keen on closing this issue.

I've run a quick test today with Tomcat 6.0.20, I've added a temp log warning showing schemas can be loaded :

y.NoOpPolicyInterceptorProvider,org.apache.cxf.transport.http.ClientOnlyHTTPTran
sportFactory,org.apache.cxf.transport.servlet.ServletTransportFactory,serviceBea
n,bookservice,schemaHolder,theSchemas,jsonProvider]; root of factory hierarchy
07-Oct-2009 13:43:49 org.apache.cxf.jaxrs.utils.schemas.SchemaHandler createSche
ma
*******************************************
WARNING: Schema resource classpath:/WEB-INF/schemas/bookid.xsd is available on c
lasspath
*******************************************
07-Oct-2009 13:43:50 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /bookstore
07-Oct-2009 13:43:50 org.springframework.web.context.ContextLoader initWebApplic
ationContext

CXF libs are in /lib
See the attached sample web app as well 

> jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working
> ----------------------------------------------------------------------------------------
>
>                 Key: CXF-2377
>                 URL: https://issues.apache.org/jira/browse/CXF-2377
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2.3
>            Reporter: max laenzlinger
>         Attachments: cxf.zip
>
>
> See summary. Using absolute path works, but using classpath cant find the schema file inside the webapplication-context.

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


[jira] Commented: (CXF-2377) jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working

Posted by "max laenzlinger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740561#action_12740561 ] 

max laenzlinger commented on CXF-2377:
--------------------------------------

Hi Sergey and Dan,

Meanwhile - as workaround - we will put the xsd-file(s) inside the tomcat /lib folder and use 'classpath:/my.xsd' (better then absolute path from a drive.  I did not find a solution to jump out of the /lib-folder, kind of  'classpath/../../xsd/my.xsd' or '...\..\xsd/my.xsd)

Many greetingsand thanks  MAx

> jaxrs Schemahandler inside tomcat lib folder - loading schema with classpath not working
> ----------------------------------------------------------------------------------------
>
>                 Key: CXF-2377
>                 URL: https://issues.apache.org/jira/browse/CXF-2377
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2.3
>            Reporter: max laenzlinger
>
> See summary. Using absolute path works, but using classpath cant find the schema file inside the webapplication-context.

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