Hi Kasun,

As per offline chat had with your,we tried adding this new cxf runtime
feature to APIM and we are facing the below issue [1] when invoking the
OAuth2 web-app due to the *velocity-1.7.0.jar* contain in the cxf runtime
jar set.

Once we *remove* that velocity.jar from cxf runtime libraries,we can invoke
the OAuth webapp endpoint successfully.
Can we get rid of this velocity.jar from cxf runtime libraries..Else from
APIM build time,we had to remove that jar without adding it to product/lib
folder..

Thanks;


[1] [2013-07-30 05:11:59,332]  INFO - TimeoutHandler This engine will
expire all callbacks after : 86400 seconds, irrespective of the timeout
action, after the specified or optional timeout
 [trace] *******************************************************************
 [debug] Starting Apache Velocity v1.5 (compiled: 2007-02-22 08:52:29)
 [trace] RuntimeInstance initializing.
 [debug] Default Properties File:
org/apache/velocity/runtime/defaults/velocity.properties
 [debug] Trying to use logger class
org.apache.velocity.runtime.log.NullLogChute
 [error] The specifid logger class
org.apache.velocity.runtime.log.NullLogChute isn't a valid LogChute
implementation.
 [debug] Using SystemLogChute.
 [error] The specified class for ResourceManager
(org.apache.velocity.runtime.resource.ResourceManagerImpl) does not
implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is
not initialized correctly.
[2013-07-30 05:11:59,763] ERROR - SAML2BearerGrantTypeHandler Unable to
initialize Velocity template engine
org.opensaml.xml.ConfigurationException: Unable to initialize Velocity
template engine
at
org.opensaml.DefaultBootstrap.initializeVelocity(DefaultBootstrap.java:168)
at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:85)
at
org.wso2.carbon.identity.oauth2.token.handlers.grant.saml.SAML2BearerGrantTypeHandler.<init>(SAML2BearerGrantTypeHandler.java:82)
at
org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.<init>(AccessTokenIssuer.java:99)
at
org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.getInstance(AccessTokenIssuer.java:80)
at
org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessToken(OAuth2Service.java:173)
at
org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenClient.getAccessToken(OAuth2TokenClient.java:79)
at
org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.issueAccessToken(OAuth2TokenEndpoint.java:106)
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.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.Exception: The specified class for ResourceManager
(org.apache.velocity.runtime.resource.ResourceManagerImpl) does not
implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is
not initialized correctly.
at
org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:589)
at
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:241)
at
org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:113)
at org.apache.velocity.app.Velocity.init(Velocity.java:83)
at
org.opensaml.DefaultBootstrap.initializeVelocity(DefaultBootstrap.java:166)
... 51 more
[2013-07-30 05:11:59,765] ERROR - OAuth2Service Error when issuing the
access token.
org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception: Error in
bootstrapping the OpenSAML2 library
at
org.wso2.carbon.identity.oauth2.token.handlers.grant.saml.SAML2BearerGrantTypeHandler.<init>(SAML2BearerGrantTypeHandler.java:85)
at
org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.<init>(AccessTokenIssuer.java:99)
at
org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.getInstance(AccessTokenIssuer.java:80)
at
org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessToken(OAuth2Service.java:173)
at
org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenClient.getAccessToken(OAuth2TokenClient.java:79)
at
org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.issueAccessToken(OAuth2TokenEndpoint.java:106)
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.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
^C[2013-07-30 05:29:05,815]  INFO - CarbonServerManager Shutdown hook
triggered....



On Tue, Jul 30, 2013 at 2:37 AM, Kasun Gajasinghe <[email protected]> wrote:

> Hi Asanka,
>
> Following products use cxf runtime. All these products need to include
> this feature.
>
> AS
> APIM
> BAM
> GReg
> IS
>
> Thanks,
> KasunG
>
>
> On Tue, Jul 30, 2013 at 3:02 PM, Asanka Vithanage <[email protected]>wrote:
>
>> Hi Kasun,
>> Can you please list down the our products which required to include CXF
>> runtime feature? So i can add them to the AS 5.2.0 test plan.
>>
>>
>> On Mon, Jul 29, 2013 at 6:26 PM, Kasun Gajasinghe <[email protected]>wrote:
>>
>>> CCing Asela
>>>
>>>
>>> On Mon, Jul 29, 2013 at 5:06 PM, Pulasthi Supun <[email protected]>wrote:
>>>
>>>> Hi Kasun
>>>>
>>>>
>>>> On Sun, Jul 28, 2013 at 4:20 PM, Kasun Gajasinghe <[email protected]>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Please include the CXF runtime feature in all the products that need
>>>>> CXF runtime for their webapps. We have got rid of generating the CXF
>>>>> runtime functionality during distribution, and improved it to be installed
>>>>> as a feature [1]. This is very helpful when merging two products via
>>>>> feature installation. Say, when installing GReg and IS features in to
>>>>> Carbon, we need to automatically copy the CXF runtime functionality along
>>>>> with it. With this new feature it is made possible. It's committed to
>>>>>  features/as-runtimes/org.wso2.carbon.as.runtimes.cxf.feature/.
>>>>>
>>>>> It is pretty easy to use this feature.
>>>>>
>>>>> 1. Remove the cxf jars copying section from your assembly descriptor
>>>>> (bin.xml) in distribution/, and the relevant dependencies from
>>>>> distribution/pom.xml.
>>>>> 2. Add the feature "*org.wso2.carbon.as.runtimes.cxf.feature*" to
>>>>> p2-profile-gen for both default and worker profile (given that you have a
>>>>> worker profile.)
>>>>>
>>>>> +1, The old method that used the assembly.xml was added to greg
>>>> this approach will be much better.
>>>>
>>>> Regards,
>>>> Pulasthi
>>>>
>>>>> The changes are already done for AS which can be found in revisions
>>>>> 179163 and 179164. Please update this thread once you have done this
>>>>> especially if you are releasing the product with Carbon 4.2.0.
>>>>>
>>>>> [1] https://wso2.org/jira/browse/WSAS-1330
>>>>>
>>>>> Thanks,
>>>>> KasunG
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Kasun Gajasinghe*
>>>>> Software Engineer;
>>>>> Development Technologies Team, WSO2 Inc.; http://wso2.com
>>>>>
>>>>>
>>>>>
>>>>>  ,
>>>>> *email: **kasung AT spamfree wso2.com
>>>>>
>>>>>
>>>>>
>>>>> ** cell: **+94 (77) 678-0813*
>>>>> *linked-in: *http://lk.linkedin.com/in/gajasinghe
>>>>>
>>>>>
>>>>>
>>>>> *
>>>>> *
>>>>> *blog: **http://kasunbg.org* <http://kasunbg.org>
>>>>>
>>>>>
>>>>>
>>>>> *
>>>>> twitter: **http://twitter.com/kasunbg* <http://twitter.com/kasunbg>
>>>>>
>>>>>
>>>>>
>>>>> *
>>>>> *
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Pulasthi Supun
>>>> Software Engineer; WSO2 Inc.; http://wso2.com,
>>>> Email: [email protected]
>>>> Mobile: +94 (71) 9258281
>>>> Blog : http://pulasthisupun.blogspot.com/
>>>> Git hub profile: https://github.com/pulasthi
>>>>
>>>
>>>
>>>
>>> --
>>> *Kasun Gajasinghe*
>>> Software Engineer;
>>> Development Technologies Team, WSO2 Inc.; http://wso2.com
>>>
>>>
>>>  ,
>>> *email: **kasung AT spamfree wso2.com
>>>
>>>
>>> ** cell: **+94 (77) 678-0813*
>>> *linked-in: *http://lk.linkedin.com/in/gajasinghe
>>>
>>>
>>> *
>>> *
>>> *blog: **http://kasunbg.org* <http://kasunbg.org>
>>>
>>>
>>> *
>>> twitter: **http://twitter.com/kasunbg* <http://twitter.com/kasunbg>
>>>
>>>
>>> *
>>> *
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Asanka Vithanage
>> Senior Software Engineer -QA
>> Mobile: +94 0716286708
>> Email: [email protected]
>> WSO2 Inc. www.wso2.com
>>
>>
>
>
> --
> *Kasun Gajasinghe*
> Software Engineer;
> Development Technologies Team, WSO2 Inc.; http://wso2.com
>
>
>  ,
> *email: **kasung AT spamfree wso2.com
>
>
> ** cell: **+94 (77) 678-0813*
> *linked-in: *http://lk.linkedin.com/in/gajasinghe
>
>
> *
> *
> *blog: **http://kasunbg.org* <http://kasunbg.org>
>
>
> *
> twitter: **http://twitter.com/kasunbg* <http://twitter.com/kasunbg>
>
>
> *
> *
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Lalaji Sureshika
WSO2, Inc.;  http://wso2.com/
email: [email protected]; cell: +94 71 608 6811
blog: http://lalajisureshika.blogspot.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to