wso2 - How to byepass a older version jar with new? -
i have written class mediator , used in wso2 esb uses ehcache-core-2.6.6 jar have put jar in \esb_home\repository\components\lib folder here twist, have jar ehcache_1.5.0.wso2v3 jar in esb_home\repository\components\plugins. jar comes wso2 esb. when run proxy containing class mediator, takes refrence of ehcache_1.5.0.wso2v3 jar instead of ehcache-core-2.6.6 jar due getting error as:
[2013-05-14 17:10:59,898] error - nativeworkerpool uncaught exception java.lang.nosuchmethoderror: net.sf.ehcache.cachemanager.newinstance(ljava/lang/string;)lnet/sf/ehcache/cachemanager; @ tempuri.data.cachable.cachedata.cachedata(cachedata.java:32) @ tempuri.data.cachable.cachedata.mediate(cachedata.java:26) @ org.apache.synapse.mediators.ext.classmediator.mediate(classmediator.java:78) @ org.apache.synapse.mediators.abstractlistmediator.mediate(abstractlistmediator.java:71) @ org.apache.synapse.mediators.base.sequencemediator.mediate(sequencemediator.java:114) @ org.apache.synapse.core.axis2.axis2synapseenvironment.injectmessage(axis2synapseenvironment.java:223) @ org.apache.synapse.core.axis2.synapsecallbackreceiver.handlemessage(synapsecallbackreceiver.java:443) @ org.apache.synapse.core.axis2.synapsecallbackreceiver.receive(synapsecallbackreceiver.java:166) @ org.apache.axis2.engine.axisengine.receive(axisengine.java:180) @ org.apache.synapse.transport.passthru.clientworker.run(clientworker.java:217) @ org.apache.axis2.transport.base.threads.nativeworkerpool$1.run(nativeworkerpool.java:172) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1110) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:603) @ java.lang.thread.run(thread.java:722)
so, question how can byepass jar ehcache_1.5.0.wso2v3 when running proxy , refrence jar ehcache-core-2.6.6 need refrence?looking forward answers. in advance
i have followed ratha has mention in reply question after doing steps, getting error , esb doesn't started:
java_home environment variable set d:\eclipse\java\jdk1.7.0 carbon_home environment variable set d:\bpel_wip\wso2es~1.0\bin\.. [2013-05-16 12:22:25,438] debug - carboncontextdataholder started setting authenticator configuration [2013-05-16 12:22:25,498] debug - staxutils create xmlinputfactory implementation classloader=org.eclipse. core.runtime.internal.adaptor.contextfinder@2413d9 [2013-05-16 12:22:25,498] debug - staxutils classloader javax.xml.stream.xmlinputfactory is: null [2013-05-16 12:22:25,518] debug - staxdialectdetector stax implementation @ jar:file:/d:/bpel_wip/wso2esb-4.6.0/lib/end orsed/geronimo-stax-api_1.0_spec-1.0.1.wso2v2.jar!/ is: title: null symbolic name: geronimo-stax-api_1.0_spec vendor: woodstox.wso2.org version: 1.0.1.wso2v2 [2013-05-16 12:22:25,528] debug - staxdialectdetector detected stax dialect: woodstox [2013-05-16 12:22:25,528] debug - staxutils created xmlinputfactory = class org.apache.axiom.util.stax.wrapper.immutable xmlinputfactory classloader=org.eclipse.core.runtime.internal.adaptor.contextfinder@2413d9 [2013-05-16 12:22:25,528] debug - staxutils configuration = default [2013-05-16 12:22:25,528] debug - staxutils size of xmlinputfactory map configuration = 1 [2013-05-16 12:22:25,538] debug - staxutils configurations factories have been cached = [default] [2013-05-16 12:22:25,578] debug - staxutils xmlstreamreader org.apache.axiom.util.stax.dialect.woodstoxstreamreaderwr apper [2013-05-16 12:22:25,678] debug - miscellaneousutil name ' secret.manager.conf ' cannot found. using default value secret-manager.properties [2013-05-16 12:22:25,678] debug - secretmanager configuration properties can not loaded form : secret-manager.propert ies use synapse properties [2013-05-16 12:22:25,678] debug - secretmanager no global secret provider configured. [2013-05-16 12:22:25,678] debug - secretmanager no secret repositories have been configured [2013-05-16 12:22:25,708] debug - staxutils create xmloutputfactory implementation classloader=org.eclipse .core.runtime.internal.adaptor.contextfinder@2413d9 [2013-05-16 12:22:25,708] debug - staxutils classloader javax.xml.stream.xmloutputfactory is: null [2013-05-16 12:22:25,708] debug - staxutils created xmloutputfactory = class org.apache.axiom.util.stax.wrapper.immutabl exmloutputfactory classloader=org.eclipse.core.runtime.internal.adaptor.contextfinder@2413d9 [2013-05-16 12:22:25,708] debug - staxutils configuration = default [2013-05-16 12:22:25,708] debug - staxutils size of xmloutfactory map configuration = 1 [2013-05-16 12:22:25,708] debug - staxutils configurations factories have been cached = [default] [2013-05-16 12:22:25,728] debug - staxutils xmlstreamwriter org.apache.axiom.util.stax.dialect.woodstoxstreamwriterwr apper [2013-05-16 12:22:25,748] debug - mtomxmlstreamwriter calling mtomxmlstreamwriter.flush [2013-05-16 12:22:25,748] debug - staxutils xmlstreamreader org.apache.axiom.util.stax.dialect.woodstoxstreamreaderwr apper [2013-05-16 12:22:25,748] debug - staxutils xmlstreamwriter org.apache.axiom.util.stax.dialect.woodstoxstreamwriterwr apper [2013-05-16 12:22:25,758] debug - mtomxmlstreamwriter calling mtomxmlstreamwriter.flush [2013-05-16 12:22:26,738] debug - staxutils xmlstreamreader org.apache.axiom.util.stax.dialect.woodstoxstreamreaderwr apper [2013-05-16 12:22:26,758] debug - carboncontextdataholder completed setting authenticator configuration [2013-05-16 12:22:26,758] debug - carboncontextdataholder unload tenant task: org.wso2.carbon.context.internal.carboncon textdataholder$carboncontextcleanuptask registered. [2013-05-16 12:22:26,798] debug - carboncontextdataholder loading cache configuration [2013-05-16 12:22:26,808] debug - staxutils xmlstreamreader org.apache.axiom.util.stax.dialect.woodstoxstreamreaderwr apper [2013-05-16 12:22:26,818] debug - cacheconfiguration loaded cache configuration [2013-05-16 12:22:26,818] debug - carboncontextdataholder initializing cache manager [2013-05-16 12:22:26,818] debug - ehcachemanager cache manager initialized [2013-05-16 12:22:26,828] debug - carboncontextdataholder unload tenant task: org.wso2.carbon.context.internal.carboncon textdataholder$multitenantcarboncachemanager$cachecleanuptask registered. [2013-05-16 12:22:26,828] debug - carboncontextdataholder there can possibility of same class loading twice , trying reset initial context factory builder java.lang.runtimeexception: queue manager instance has been set. @ org.wso2.carbon.queuing.carbonqueuemanager.setinstance(carbonqueuemanager.java:47) @ org.wso2.carbon.context.internal.carboncontextdataholder.<clinit>(carboncontextdataholder.java:231) @ org.wso2.carbon.context.carboncontext.getthreadlocalcarboncontext(carboncontext.java:94) @ org.wso2.carbon.utils.logging.tenantawarepatternlayout$tenantawarepatternparser.<init>(tenantawarepatternlayo ut.java:110) @ org.wso2.carbon.utils.logging.tenantawarepatternlayout.createpatternparser(tenantawarepatternlayout.java:81) @ org.apache.log4j.patternlayout.<init>(patternlayout.java:435) @ org.apache.log4j.patternlayout.<init>(patternlayout.java:427) @ org.wso2.carbon.utils.logging.tenantawarepatternlayout.<init>(tenantawarepatternlayout.java:64) @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:57) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45) @ java.lang.reflect.constructor.newinstance(constructor.java:525) @ java.lang.class.newinstance0(class.java:372) @ java.lang.class.newinstance(class.java:325) @ org.apache.log4j.helpers.optionconverter.instantiatebyclassname(optionconverter.java:327) @ org.apache.log4j.helpers.optionconverter.instantiatebykey(optionconverter.java:120) @ org.apache.log4j.propertyconfigurator.parseappender(propertyconfigurator.java:641) @ org.apache.log4j.propertyconfigurator.parsecategory(propertyconfigurator.java:612) @ org.apache.log4j.propertyconfigurator.configurerootcategory(propertyconfigurator.java:509) @ org.apache.log4j.propertyconfigurator.doconfigure(propertyconfigurator.java:415) @ org.apache.log4j.propertyconfigurator.doconfigure(propertyconfigurator.java:441) @ org.apache.log4j.helpers.optionconverter.selectandconfigure(optionconverter.java:468) @ org.apache.log4j.logmanager.<clinit>(logmanager.java:122) @ org.slf4j.impl.log4jloggerfactory.getlogger(log4jloggerfactory.java:73) @ org.slf4j.loggerfactory.getlogger(loggerfactory.java:242) @ org.slf4j.loggerfactory.getlogger(loggerfactory.java:254) @ com.atomikos.logging.slf4jlogger.<init>(slf4jlogger.java:8) @ com.atomikos.logging.slf4jloggerfactorydelegate.createlogger(slf4jloggerfactorydelegate.java:7) @ com.atomikos.logging.loggerfactory.createlogger(loggerfactory.java:12) @ com.atomikos.logging.loggerfactory.<clinit>(loggerfactory.java:52) @ com.atomikos.transactions.internal.atomikosactivator.<clinit>(atomikosactivator.java:47) @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:57) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45) @ java.lang.reflect.constructor.newinstance(constructor.java:525) @ java.lang.class.newinstance0(class.java:372) @ java.lang.class.newinstance(class.java:325) @ org.eclipse.osgi.framework.internal.core.abstractbundle.loadbundleactivator(abstractbundle.java:166) @ org.eclipse.osgi.framework.internal.core.bundlecontextimpl.start(bundlecontextimpl.java:679) @ org.eclipse.osgi.framework.internal.core.bundlehost.startworker(bundlehost.java:381) @ org.eclipse.osgi.framework.internal.core.abstractbundle.resume(abstractbundle.java:389) @ org.eclipse.osgi.framework.internal.core.framework.resumebundle(framework.java:1130) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.resumebundles(startlevelmanager.java:559) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.resumebundles(startlevelmanager.java:544) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.incfwsl(startlevelmanager.java:457) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.dosetstartlevel(startlevelmanager.java:243) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.dispatchevent(startlevelmanager.java:438) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.dispatchevent(startlevelmanager.java:1) @ org.eclipse.osgi.framework.eventmgr.eventmanager.dispatchevent(eventmanager.java:230) @ org.eclipse.osgi.framework.eventmgr.eventmanager$eventthread.run(eventmanager.java:340) [2013-05-16 12:22:29,088] debug - staxutils xmlstreamreader org.apache.axiom.util.stax.dialect.woodstoxstreamreaderwr apper [2013-05-16 12:22:29,238] debug - staxutils xmlstreamreader org.apache.axiom.util.stax.dialect.woodstoxstreamreaderwr apper [2013-05-16 12:22:29,258] debug - staxutils xmlstreamwriter org.apache.axiom.util.stax.dialect.woodstoxstreamwriterwr apper [2013-05-16 12:22:29,268] debug - mtomxmlstreamwriter calling mtomxmlstreamwriter.flush [2013-05-16 12:22:29,378] info - carboncoreactivator starting wso2 carbon... [2013-05-16 12:22:29,378] info - carboncoreactivator operating system : windows 7 6.1, x86 [2013-05-16 12:22:29,378] info - carboncoreactivator java home : d:\eclipse\java\jdk1.7.0\jre [2013-05-16 12:22:29,388] info - carboncoreactivator java version : 1.7.0 [2013-05-16 12:22:29,388] info - carboncoreactivator java vm : java hotspot(tm) client vm 21.0-b17,oracle corp oration [2013-05-16 12:22:29,398] info - carboncoreactivator carbon home : d:\bpel_wip\wso2es~1.0\bin\.. [2013-05-16 12:22:29,398] info - carboncoreactivator java temp dir : d:\bpel_wip\wso2es~1.0\bin\..\tmp [2013-05-16 12:22:29,398] info - carboncoreactivator user : 313123, en-us, asia/calcutta [2013-05-16 12:22:29,608] warn - validationresultprinter ram size (mb): 2047 of system below recommended min imum size :2048 [2013-05-16 12:22:29,638] info - agentholder agent created ! [2013-05-16 12:22:29,788] info - agentds deployed agent client [2013-05-16 12:22:34,380] debug - staxutils xmlstreamreader org.apache.axiom.util.stax.dialect.woodstoxstreamreaderwr apper [2013-05-16 12:22:34,820] warn - configurationfactory no configuration found. configuring ehcache ehcache-failsafe .xml found in classpath: bundleresource://39.fwk15181810:1/ehcache-failsafe.xml [2013-05-16 12:22:34,830] debug - configurationfactory configuring ehcache url: bundleresource://39.fwk15181810:1/e hcache-failsafe.xml [2013-05-16 12:22:34,830] debug - configurationfactory configuring ehcache inputstream [2013-05-16 12:22:34,850] debug - beanhandler ignoring ehcache attribute xmlns:xsi [2013-05-16 12:22:34,850] debug - beanhandler ignoring ehcache attribute xsi:nonamespaceschemalocation [2013-05-16 12:22:34,860] debug - diskstoreconfiguration disk store path: d:\bpel_wip\wso2es~1.0\bin\..\tmp [2013-05-16 12:22:34,870] debug - cachemanager creating new cachemanager default config [2013-05-16 12:22:34,940] debug - propertyutil propertiesstring null. [2013-05-16 12:22:34,950] debug - configurationhelper no cachemanagereventlistenerfactory class specified. skipping... [2013-05-16 12:22:35,010] debug - cache no bootstrapcacheloaderfactory class specified. skipping... [2013-05-16 12:22:35,010] debug - cache cachewriter factory not configured. skipping... [2013-05-16 12:22:35,020] debug - configurationhelper no cacheexceptionhandlerfactory class specified. skipping... [2013-05-16 12:22:35,030] error - activator cannot start user manager core bundle java.lang.nosuchmethoderror: net.sf.ehcache.cachemanager.getjcache(ljava/lang/string;)lnet/sf/ehcache/jcache/jcache; @ org.wso2.carbon.caching.core.ehcache.ehcachemanager.getcache(ehcachemanager.java:54) @ org.wso2.carbon.context.internal.carboncontextdataholder$multitenantcarboncachemanager.getcache(carboncontext dataholder.java:719) @ org.wso2.carbon.caching.core.basecache.<init>(basecache.java:34) @ org.wso2.carbon.caching.core.realm.realmcache.<init>(realmcache.java:29) @ org.wso2.carbon.caching.core.realm.realmcache.getinstance(realmcache.java:39) @ org.wso2.carbon.user.core.common.defaultrealmservice.<init>(defaultrealmservice.java:62) @ org.wso2.carbon.user.core.common.defaultrealmservice.<init>(defaultrealmservice.java:116) @ org.wso2.carbon.user.core.internal.activator.startdeploy(activator.java:67) @ org.wso2.carbon.user.core.internal.bundlecheckactivator.start(bundlecheckactivator.java:61) @ org.eclipse.osgi.framework.internal.core.bundlecontextimpl$1.run(bundlecontextimpl.java:711) @ java.security.accesscontroller.doprivileged(native method) @ org.eclipse.osgi.framework.internal.core.bundlecontextimpl.startactivator(bundlecontextimpl.java:702) @ org.eclipse.osgi.framework.internal.core.bundlecontextimpl.start(bundlecontextimpl.java:683) @ org.eclipse.osgi.framework.internal.core.bundlehost.startworker(bundlehost.java:381) @ org.eclipse.osgi.framework.internal.core.abstractbundle.resume(abstractbundle.java:389) @ org.eclipse.osgi.framework.internal.core.framework.resumebundle(framework.java:1130) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.resumebundles(startlevelmanager.java:559) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.resumebundles(startlevelmanager.java:544) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.incfwsl(startlevelmanager.java:457) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.dosetstartlevel(startlevelmanager.java:243) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.dispatchevent(startlevelmanager.java:438) @ org.eclipse.osgi.framework.internal.core.startlevelmanager.dispatchevent(startlevelmanager.java:1) @ org.eclipse.osgi.framework.eventmgr.eventmanager.dispatchevent(eventmanager.java:230) @ org.eclipse.osgi.framework.eventmgr.eventmanager$eventthread.run(eventmanager.java:340) [2013-05-16 12:22:35,420] debug - jspruntimecontext parent class loader is: webappclassloader context: / delegate: false repositories: ----------> parent classloader: org.eclipse.osgi.internal.baseadaptor.defaultclassloader@1a39812 [2013-05-16 12:22:35,430] debug - jspruntimecontext compilation classpath initialized: d:\bpel_wip\wso2esb-4.6.0\lib\tom cat\work\catalina\localhost\_;null [2013-05-16 12:22:35,440] debug - jspservlet scratch dir jsp engine is: d:\bpel_wip\wso2esb-4.6.0\lib\tomcat\wor k\catalina\localhost\_ [2013-05-16 12:22:35,450] debug - jspservlet important: not modify generated servlets [2013-05-16 12:22:37,060] debug - updatechecker update check failed: java.net.connectexception: connection refused: connect @ java.net.dualstackplainsocketimpl.waitforconnect(native method) @ java.net.dualstackplainsocketimpl.socketconnect(dualstackplainsocketimpl.java:75) @ java.net.abstractplainsocketimpl.doconnect(abstractplainsocketimpl.java:337) @ java.net.abstractplainsocketimpl.connecttoaddress(abstractplainsocketimpl.java:198) @ java.net.abstractplainsocketimpl.connect(abstractplainsocketimpl.java:180) @ java.net.plainsocketimpl.connect(plainsocketimpl.java:157) @ java.net.sockssocketimpl.connect(sockssocketimpl.java:391) @ java.net.socket.connect(socket.java:579) @ sun.net.networkclient.doconnect(networkclient.java:175) @ sun.net.www.http.httpclient.openserver(httpclient.java:388) @ sun.net.www.http.httpclient.openserver(httpclient.java:483) @ sun.net.www.http.httpclient.<init>(httpclient.java:213) @ sun.net.www.http.httpclient.new(httpclient.java:300) @ sun.net.www.http.httpclient.new(httpclient.java:316) @ sun.net.www.protocol.http.httpurlconnection.getnewhttpclient(httpurlconnection.java:992) @ sun.net.www.protocol.http.httpurlconnection.plainconnect(httpurlconnection.java:928) @ sun.net.www.protocol.http.httpurlconnection.connect(httpurlconnection.java:846) @ sun.net.www.protocol.http.httpurlconnection.getinputstream(httpurlconnection.java:1296) @ net.sf.ehcache.util.updatechecker.getupdateproperties(updatechecker.java:108) @ net.sf.ehcache.util.updatechecker.docheck(updatechecker.java:72) @ net.sf.ehcache.util.updatechecker.checkforupdate(updatechecker.java:60) @ net.sf.ehcache.util.updatechecker.run(updatechecker.java:51) @ java.util.timerthread.mainloop(timer.java:555) @ java.util.timerthread.run(timer.java:505)
you cannot use 2 versions @ same time..remove 1 in plugin folder , edit bundle.info file remove particular line. , keep newer version jar in lib folder tried.
Comments
Post a Comment