私はクラス メディエーターを作成し、ehcache-core-2.6.6 jar を使用する wso2 esb で使用したので、この jar を \esb_home\repository\components\lib フォルダーに配置しましたが、ここにひねりがあります。ehcache_1 として jar があります。 esb_home\repository\components\plugins の .5.0.wso2v3 jar。この jar には wso2 esb が付属しています。クラスメディエーターを含むプロキシを実行すると、ehcache-core-2.6.6 jar ではなく ehcache_1.5.0.wso2v3 jar の参照が必要になるため、次のようなエラーが発生します。
[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;
at tempuri.data.cachable.CacheData.cacheData(CacheData.java:32)
at tempuri.data.cachable.CacheData.mediate(CacheData.java:26)
at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:78)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:223)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:443)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:217)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
それで、私の質問は、プロキシを実行するときにjar ehcache_1.5.0.wso2v3をバイパスし、参照する必要があるjar ehcache-core-2.6.6を参照するにはどうすればよいですか?あなたの答えを楽しみにしています. 前もって感謝します
この質問への返信でrathaが言及したことに従いましたが、これらの手順を実行した後、このエラーが発生し、esbが開始されません:
JAVA_HOME environment variable is set to D:\eclipse\java\jdk1.7.0
CARBON_HOME environment variable is set to D:\BPEL_wip\WSO2ES~1.0\bin\..
[2013-05-16 12:22:25,438] DEBUG - CarbonContextDataHolder Started Setting up Authenticator Configuration
[2013-05-16 12:22:25,498] DEBUG - StAXUtils About to create XMLInputFactory implementation with classloader=org.eclipse.
core.runtime.internal.adaptor.ContextFinder@2413d9
[2013-05-16 12:22:25,498] DEBUG - StAXUtils The classloader for javax.xml.stream.XMLInputFactory is: null
[2013-05-16 12:22:25,518] DEBUG - StAXDialectDetector StAX implementation at 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 with 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 for this configuration = 1
[2013-05-16 12:22:25,538] DEBUG - StAXUtils Configurations for which factories have been cached = [DEFAULT]
[2013-05-16 12:22:25,578] DEBUG - StAXUtils XMLStreamReader is org.apache.axiom.util.stax.dialect.WoodstoxStreamReaderWr
apper
[2013-05-16 12:22:25,678] DEBUG - MiscellaneousUtil The name with ' secret.manager.conf ' cannot be found. Using default
value secret-manager.properties
[2013-05-16 12:22:25,678] DEBUG - SecretManager Configuration properties can not be loaded form : secret-manager.propert
ies Will use synapse properties
[2013-05-16 12:22:25,678] DEBUG - SecretManager No global secret provider is 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 About to create XMLOutputFactory implementation with classloader=org.eclipse
.core.runtime.internal.adaptor.ContextFinder@2413d9
[2013-05-16 12:22:25,708] DEBUG - StAXUtils The classloader for 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 for 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 for this configuration = 1
[2013-05-16 12:22:25,708] DEBUG - StAXUtils Configurations for which factories have been cached = [DEFAULT]
[2013-05-16 12:22:25,728] DEBUG - StAXUtils XMLStreamWriter is 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 is org.apache.axiom.util.stax.dialect.WoodstoxStreamReaderWr
apper
[2013-05-16 12:22:25,748] DEBUG - StAXUtils XMLStreamWriter is 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 is org.apache.axiom.util.stax.dialect.WoodstoxStreamReaderWr
apper
[2013-05-16 12:22:26,758] DEBUG - CarbonContextDataHolder Completed Setting up Authenticator Configuration
[2013-05-16 12:22:26,758] DEBUG - CarbonContextDataHolder Unload Tenant Task: org.wso2.carbon.context.internal.CarbonCon
textDataHolder$CarbonContextCleanupTask was registered.
[2013-05-16 12:22:26,798] DEBUG - CarbonContextDataHolder Loading Cache Configuration
[2013-05-16 12:22:26,808] DEBUG - StAXUtils XMLStreamReader is org.apache.axiom.util.stax.dialect.WoodstoxStreamReaderWr
apper
[2013-05-16 12:22:26,818] DEBUG - CacheConfiguration Successfully 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 was registered.
[2013-05-16 12:22:26,828] DEBUG - CarbonContextDataHolder there can be a possibility of the same class loading twice and
then trying to reset the initial context factory builder
java.lang.RuntimeException: A queue manager instance has already been set.
at org.wso2.carbon.queuing.CarbonQueueManager.setInstance(CarbonQueueManager.java:47)
at org.wso2.carbon.context.internal.CarbonContextDataHolder.<clinit>(CarbonContextDataHolder.java:231)
at org.wso2.carbon.context.CarbonContext.getThreadLocalCarbonContext(CarbonContext.java:94)
at org.wso2.carbon.utils.logging.TenantAwarePatternLayout$TenantAwarePatternParser.<init>(TenantAwarePatternLayo
ut.java:110)
at org.wso2.carbon.utils.logging.TenantAwarePatternLayout.createPatternParser(TenantAwarePatternLayout.java:81)
at org.apache.log4j.PatternLayout.<init>(PatternLayout.java:435)
at org.apache.log4j.PatternLayout.<init>(PatternLayout.java:427)
at org.wso2.carbon.utils.logging.TenantAwarePatternLayout.<init>(TenantAwarePatternLayout.java:64)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:327)
at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:120)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:641)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:468)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254)
at com.atomikos.logging.Slf4jLogger.<init>(Slf4jLogger.java:8)
at com.atomikos.logging.Slf4JLoggerFactoryDelegate.createLogger(Slf4JLoggerFactoryDelegate.java:7)
at com.atomikos.logging.LoggerFactory.createLogger(LoggerFactory.java:12)
at com.atomikos.logging.LoggerFactory.<clinit>(LoggerFactory.java:52)
at com.atomikos.transactions.internal.AtomikosActivator.<clinit>(AtomikosActivator.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:166)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1130)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
[2013-05-16 12:22:29,088] DEBUG - StAXUtils XMLStreamReader is org.apache.axiom.util.stax.dialect.WoodstoxStreamReaderWr
apper
[2013-05-16 12:22:29,238] DEBUG - StAXUtils XMLStreamReader is org.apache.axiom.util.stax.dialect.WoodstoxStreamReaderWr
apper
[2013-05-16 12:22:29,258] DEBUG - StAXUtils XMLStreamWriter is 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 the system is below the 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 Successfully deployed Agent Client
[2013-05-16 12:22:34,380] DEBUG - StAXUtils XMLStreamReader is org.apache.axiom.util.stax.dialect.WoodstoxStreamReaderWr
apper
[2013-05-16 12:22:34,820] WARN - ConfigurationFactory No configuration found. Configuring ehcache from ehcache-failsafe
.xml found in the classpath: bundleresource://39.fwk15181810:1/ehcache-failsafe.xml
[2013-05-16 12:22:34,830] DEBUG - ConfigurationFactory Configuring ehcache from URL: bundleresource://39.fwk15181810:1/e
hcache-failsafe.xml
[2013-05-16 12:22:34,830] DEBUG - ConfigurationFactory Configuring ehcache from 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 with default config
[2013-05-16 12:22:34,940] DEBUG - PropertyUtil propertiesString is 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;
at org.wso2.carbon.caching.core.ehcache.EhcacheManager.getCache(EhcacheManager.java:54)
at org.wso2.carbon.context.internal.CarbonContextDataHolder$MultitenantCarbonCacheManager.getCache(CarbonContext
DataHolder.java:719)
at org.wso2.carbon.caching.core.BaseCache.<init>(BaseCache.java:34)
at org.wso2.carbon.caching.core.realm.RealmCache.<init>(RealmCache.java:29)
at org.wso2.carbon.caching.core.realm.RealmCache.getInstance(RealmCache.java:39)
at org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:62)
at org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:116)
at org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:67)
at org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1130)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at 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 for the 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: Do not modify the generated servlets
[2013-05-16 12:22:37,060] DEBUG - UpdateChecker Update check failed:
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:483)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:213)
at sun.net.www.http.HttpClient.New(HttpClient.java:300)
at sun.net.www.http.HttpClient.New(HttpClient.java:316)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:992)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:928)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:846)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1296)
at net.sf.ehcache.util.UpdateChecker.getUpdateProperties(UpdateChecker.java:108)
at net.sf.ehcache.util.UpdateChecker.doCheck(UpdateChecker.java:72)
at net.sf.ehcache.util.UpdateChecker.checkForUpdate(UpdateChecker.java:60)
at net.sf.ehcache.util.UpdateChecker.run(UpdateChecker.java:51)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)