Re: How to Install Spring 4.3.21 on Karaf 4.2.2
Thanks for the answer JB. I did as you suggested and used spring-legacy library and able to install spring-dm and spring-dm.web. it is showing as started successfully. spring-dm| 1.2.1| x| Started | spring-legacy-4.2.2 | Spring DM support spring-dm-web| 1.2.1| x| Started | spring-legacy-4.2.2 | Spring DM Web support spring | 3.2.18.RELEASE_1 | | Started | spring-legacy-4.2.2 | Spring 3.2.x support spring-web | 3.2.18.RELEASE_1 | | Started | spring-legacy-4.2.2 | Spring 3.2.x Web support My intention of downgrading spring on KARAF 4.2.2 was to use OsgiBundleXmlWebApplicationContext class (spring-dm) which is supported upto KARAF 4 only. but while installing my web module, i again got this ClassNotFoundException exception for OsgiBundleXmlWebApplicationContext class. 14:39:48,344 | INFO | onfig-2-thread-2 | ContextLoader| 183 - org.apache.servicemix.bundles.spring-web - 3.2.18.RELEASE_1 | Root WebApplicationContext: initialization started 14:39:48,345 | ERROR | onfig-2-thread-2 | ContextLoader| 183 - org.apache.servicemix.bundles.spring-web - 3.2.18.RELEASE_1 | Context initialization failed org.springframework.context.ApplicationContextException: Failed to load custom context class [ org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext ]; nested exception is java.lang.ClassNotFoundException: org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext not found by docsconsole [321] at org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:476) ~[183:org.apache.servicemix.bundles.spring-web:3.2.18.RELEASE_1] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:355) ~[183:org.apache.servicemix.bundles.spring-web:3.2.18.RELEASE_1] is not it supposed to work now? Thanks -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: How to Install Spring 4.3.21 on Karaf 4.2.2
did it work? -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: Refused to execute script from 'URL' because its MIME type ('') is not executable, and strict MIME type checking is enabled
This was identified as our internal code issue and I was able to resolve it. Thanks JB. Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Refused to execute script from 'URL' because its MIME type ('') is not executable, and strict MIME type checking is enabled
Hi All, After upgrading KARAF to 4.2.0, I am facing this error while loading JSP pages if it loads any custom JS file. Refused to execute script from 'https://localhost:8443/dashboard/views/welcome.js' because its MIME type ('') is not executable, and strict MIME type checking is enabled in my JSP page, I am loading this JS file. Has anybody faced this problem before and has any idea about how we can fix it? Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: issues while using Spring 5.0.4 with latest KARAF 4.2.0
Hi Guillaume, I have attached the sample web apps with JIRA Ticket for your kind reference. Can you please have a look? https://issues.apache.org/jira/browse/ARIES-1819 Regards Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: issues while using Spring 5.0.4 with latest KARAF 4.2.0
Hi Castor, I have add Gemini Blueprint 3.0.0M1 and downloaded IO, Core and Extender module. Can you please suggest me if that is enough to replace with spring-dm for web module. here is my web.xml for now. contextClass org.springframework.osgi.web.context.support.osgibundlexmlwebapplicationcontext javorai-api org.springframework.web.servlet.DispatcherServlet contextClass org.springframework.osgi.web.context.support.osgibundlexmlwebapplicationcontext 2 -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: issues while using Spring 5.0.4 with latest KARAF 4.2.0
Hi JB, As you have asked me for any blocking point t use blueprint instead of Spring, I am just trying to know that can I refer spring Jar's class files directly in web.xml and skip blueprint. as of now, it is referring spring dm provided osgiwebxmlapplicationcontext class but as spring-dm can not be used with spring 5, is there any way not to use blueprint also and directly use spring jar files to load xml context for servlets in web.xml? Not sure if my question is making sense to you, I am little new to this web part. kindly guide. Regards Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: issues while using Spring 5.0.4 with latest KARAF 4.2.0
Hi JB, I am not sure If i understood your question properly but Here is how I started using blueprint. Kindly review and suggest. Earlier we were using KARAF 4.0.10 and spring 3.1.4 release was getting installed when spring-dm was installed. Now when I am upgrading to 4.2.0, I am installing spring feature which is installing spring 5.X. we are using spring MVC in our web related modules and were using spring-osgi-web classes to load XMLWebContext in web.xml. it was using org.springframework.web.context.ContextLoaderListener and org.springframework.osgi.web.context.support. Now when I had faced problem with 4.2.0, i was updated that spring-dm is not supported was i was recommended to use blueprint. Guillaume mentioned in one of the reply that i can use aries-blueprint and it has 99% compatibility with spring-dm. I was able to see aries-blueprint bundles in feature:list also so I moved in that direction. Kindly suggest if I had any way here to get my web part working. Regards Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: issues while using Spring 5.0.4 with latest KARAF 4.2.0
Thanks Guillaume for providing information. I was trying for last 3 days to find any reference documentation which could give me a clue about web support. I have created a JIRA Ticket and here is the number (Web.XML Attached) https://issues.apache.org/jira/browse/ARIES-1819 Meanwhile, can you please suggest me any workaround to get the web APP running (Spring-MVC) on KARAF 4.2.0 and Spring 5.0.X combination? Regards Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: issues while using Spring 5.0.4 with latest KARAF 4.2.0
Hi Lukasz, second one is not same it is "Apache Aries Blueprint Spring Extender". Extender word was moving on to next statement in my old post. mentioning again for clarity. 75 | Active | 80 | 0.6.0 | Apache Aries Blueprint Spring 76 | Active | 80 | 0.4.0 | Apache Aries Blueprint Spring Extender -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: issues while using Spring 5.0.4 with latest KARAF 4.2.0
Thanks Guillaume Nodet-2, I have installed and started 3 blueprint bundles. 75 | Active | 80 | 0.6.0 | Apache Aries Blueprint Spring 76 | Active | 80 | 0.4.0 | Apache Aries Blueprint Spring Extender 77 | Active | 80 | 1.0.1 | Apache Aries Blueprint Web OSGI first I was not able to see my web application (Spring-MVC) open at all and it was throwing wiring exceptions to identify org.springframework related exceptions. Later I commented spring-dm related entry in web.xml and added new entry for blueprint context listener. ** //Added org.apache.aries.blueprint.web.BlueprintContextListener ** // commented org.springframework.web.context.ContextLoaderListener audit org.springframework.web.servlet.DispatcherServlet contextClass org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext ** with that, now I am able to see root JSP page opening but on any action, it is not hitting controller classes. How i need to handle the servlet related configuration defined in web.XML with aries-blueprint? Can you please guide? in case if you have any sample programme, that would be too helpful. My concern is that I am not finding how to handle change in web.xml (changing spring-dm related classes to aries-blueprint). Thanks in Advance Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: issues while using Spring 5.0.4 with latest KARAF 4.2.0
Thanks JB for the quick answer. I will probably check then what exactly this blueprint is and how it works (replacement of spring-dm). Thanks again Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
issues while using Spring 5.0.4 with latest KARAF 4.2.0
Hi All, We are using KARAF 4.0.0 for now and trying to upgrade it to 4.2.0 now. We are also upgrading jetty libraries to latest supported version and upgraded spring version to 5.0.4 Release. for using Spring on OSGI, currently we were using 'spring-osgi-web' and 'spring-osgi-core' libraries of 'org.springframework.osgi; with version as 1.2.1. After upgrade, it seems these libraries are only supported upto Spring Version 4.0.0 and not further. Can you please guide me what i should be trying for using Spring 5.0.4 on latest KARAF 4.2.0? Regards Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
issues with string attributes as backward slash in getting lost in values after karaf restart
Hi All, We are using karaf 4.0.10 and using DS Annotations to create component and attribute. I am facing problem with String type attribute. for example @AttributeDefinition( name = "HTTP Proxy Username", description = "Username of HTTP Proxy if authentication is required", type = AttributeType.STRING ) String http_proxy_userName() default DEFAULT_HTTP_PROXY_USERNAME; here, if i give values with a backward slash like (domain\hostname), it is getting saved properly. if i do restart bundle, still it is fine. but in case I do karaf restart, my string value is getting changed. it is removing backward slash and value is changing to "domainhostname". Can you guys please suggest something for this issue? -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
bootfeature concept with 4.2.0
Hi All, with KARAF 4.1.5 when I was trying to compile after upgrading from 4.0.10, it was not allowing me to compile with bootfeatures as spring-dm spring-dm-web but now 4.2.0 it is again not showing any error and packaging is success. in fact with 4.2.0, if I am giving any junk feature name like spring, still it compiles and on pom.xml it shows a red dot for this plugin saying that Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M2:assembly (execution: default- assembly, phase: process-resources) do we have changes in this concept with new version? Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: KARAF 4.1.5 & pax-logging-service
Hello JB, As you suggested and mentioned like that "If so, you should update your appender to log4j2 style and attach to pax-logging-log4j2". I was trying to do that but it seems creating custom appenders is very different here. earlier I was extending fileappenders and providing configuration parameters in constructor through CFG file. but now it looks very different. is there sample examples to refer about how to create custom file appenders and attach it with pax-logging-log4j2 as fragment? or is there any way to still use pax-logging-service with KARAF 4.1.x onwards as we are OK with log4j1 implementation. can you please help? kindly answer. Regards Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: KARAF 4.1.5 & pax-logging-service
Hi, Yes it looks creating a custom appender is very different with log4j2 and not like that with log4j1 where we were using pax-logging-service as fragment-host with our custom bundle. we don't have AppenderSkeleton class also here. how shall i approach it now? do we have any adapter kind of thing here to continue using same code or we will have to rewrite our logging module. Regards Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: KARAF 4.1.5 & pax-logging-service
Hi, Yes it looks creating a custom appender is very different with log4j2 and not like that with log4j1 where we were using pax-logging-service as fragment-host with our custom bundle. we don't have AppenderSkeleton class also here. how shall i approach it now? do we have any adapter kind of thing here to continue using same code or we will have to rewrite our logging module. Regards Munish Matt Sicker wrote > If you have a custom log4j 1 appender, there's limited support in > log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not > sure > how that would interact without some fragment hackery. > > On 2 March 2018 at 03:34, Jean-Baptiste Onofré > jb@ > wrote: > >> Thanks, please let me know if you have any issue. >> >> Regards >> JB >> >> On 03/02/2018 10:33 AM, munishgupta.asr wrote: >> > Thanks JB. >> > >> > I will try and get back with results. >> > >> > Regards >> > Munish >> > >> > >> > >> > -- >> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html >> > >> >> -- >> Jean-Baptiste Onofré >> > jbonofre@ >> http://blog.nanthrax.net >> Talend - http://www.talend.com >> > > > > -- > Matt Sicker > boards@ > Matt Sicker wrote > If you have a custom log4j 1 appender, there's limited support in > log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not > sure > how that would interact without some fragment hackery. > > On 2 March 2018 at 03:34, Jean-Baptiste Onofré > jb@ > wrote: > >> Thanks, please let me know if you have any issue. >> >> Regards >> JB >> >> On 03/02/2018 10:33 AM, munishgupta.asr wrote: >> > Thanks JB. >> > >> > I will try and get back with results. >> > >> > Regards >> > Munish >> > >> > >> > >> > -- >> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html >> > >> >> -- >> Jean-Baptiste Onofré >> > jbonofre@ >> http://blog.nanthrax.net >> Talend - http://www.talend.com >> > > > > -- > Matt Sicker > boards@ > Matt Sicker wrote > If you have a custom log4j 1 appender, there's limited support in > log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not > sure > how that would interact without some fragment hackery. > > On 2 March 2018 at 03:34, Jean-Baptiste Onofré > jb@ > wrote: > >> Thanks, please let me know if you have any issue. >> >> Regards >> JB >> >> On 03/02/2018 10:33 AM, munishgupta.asr wrote: >> > Thanks JB. >> > >> > I will try and get back with results. >> > >> > Regards >> > Munish >> > >> > >> > >> > -- >> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html >> > >> >> -- >> Jean-Baptiste Onofré >> > jbonofre@ >> http://blog.nanthrax.net >> Talend - http://www.talend.com >> > > > > -- > Matt Sicker > boards@ > Matt Sicker wrote > If you have a custom log4j 1 appender, there's limited support in > log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not > sure > how that would interact without some fragment hackery. > > On 2 March 2018 at 03:34, Jean-Baptiste Onofré > jb@ > wrote: > >> Thanks, please let me know if you have any issue. >> >> Regards >> JB >> >> On 03/02/2018 10:33 AM, munishgupta.asr wrote: >> > Thanks JB. >> > >> > I will try and get back with results. >> > >> > Regards >> > Munish >> > >> > >> > >> > -- >> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html >> > >> >> -- >> Jean-Baptiste Onofré >> > jbonofre@ >> http://blog.nanthrax.net >> Talend - http://www.talend.com >> > > > > -- > Matt Sicker > boards@ > Matt Sicker wrote > If you have a custom log4j 1 appender, there's limited support in > log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not > sure > how that would interact without some fragment hackery. > > On 2 March 2018 at 03:34, Jean-Baptiste Onofré > jb@ > wrote: > >> Thanks, please let me know if you have any issue. >> >> Regards >> JB >> >> On 03/02/2018 10:33 AM, munishgupta.asr wrote: >> > Thanks JB
Re: KARAF 4.1.5 & pax-logging-service
Thanks JB. I will try and get back with results. Regards Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: KARAF 4.1.5 & pax-logging-service
Thanks for the quick response. we are extending the org.apache.log4j.FileAppender and org.apache.log4j.nt.NTEventLogAppender. for now, my fragment pom file is using service as host bundle. ${project.artifactId} ${project.groupId}.${project.artifactId} ${project.version} com.good.gcs.core.logging !* org.ops4j.pax.logging.pax-logging-service <_failok>true So that means I should update my fragment-host to "pax-logging-log4j2" and updated appender to log4j2 style? what is the use of pax-logging-logback? Do i need to do anything with that also? -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
KARAF 4.1.5 & pax-logging-service
Hi All, for our project, we are using KARAF 4.0.9 for now and decided to upgrade it to 4.1.5. we have a customer appender which is used as a fragment with pax-logging-service bundle. After upgrading to KARAF 4.1.5, it is failing to find pax-logging-service and service is not getting downloaded in system folder using maven. rather I could see 2 different folders in system path. Pax-logging-logback pax-logging-log4j2 have we removed support of pax-logging-service with KARAF 4.1.x onwards. What shall i use now as fragment-host bundle to get the build generated? Regards Munish -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html