I am following the developer guide for amazon web service IoT, but I have run into some beginner problems and I don't know what to do to solve them. I been sitting for two days. This is what has happened (I am using mac):
1st problem:
In this guide: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
I can see and edit my profile by calling "$ was configure" in the terminal. If I call "ls ~/.aws" I can see the config and the credentials folder. But if i call: "~/.aws/credentials" or "~/.aws/config", I get the following error: -bash: /Users/christopher/.aws/credentials: Permission denied.
If i search in finder no file names aws is found.
2nd Problem:
On the next page of the guide, at number 11. i can't get the dot go green cause I get an error when I press connect. The MQTT.fx tool says that it can't find the rootCA.pem file, in the Log. Like this:
2015-11-10 09:55:48,330 INFO --- ScriptsController : Clear console.
2015-11-10 09:55:48,332 INFO --- MqttFX ClientModel : MqttClient with ID fc47354d17e84b6c8507eb1accb61560 assigned.
2015-11-10 09:55:48,340 ERROR --- MqttFX ClientModel : Error when connecting
java.io.FileNotFoundException: rootCA.pem (No such file or directory)
at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_60]
at java.io.FileInputStream.open(FileInputStream.java:195) ~[?:1.8.0_60]
at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[?:1.8.0_60]
at java.io.FileInputStream.<init>(FileInputStream.java:93) ~[?:1.8.0_60]
at de.jensd.mqttfx.ssl.SSLFellow.loadX509CertificatePem(SSLFellow.java:173) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.ssl.SSLFellow.createSSLSocketFactory(SSLFellow.java:51) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.model.MqttFXClientModel.getMqttConnectOptions(MqttFXClientModel.java:713) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.model.MqttFXClientModel.connect(MqttFXClientModel.java:420) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.services.BrokerConnectService$1.call(BrokerConnectService.java:68) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.services.BrokerConnectService$1.call(BrokerConnectService.java:65) ~[MQTT.fx-jfx.jar:?]
at javafx.concurrent.Task$TaskCallable.call(Task.java:1423) ~[jfxrt.jar:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_60]
at javafx.concurrent.Service.lambda$null$493(Service.java:725) ~[jfxrt.jar:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_60]
at javafx.concurrent.Service.lambda$executeTask$494(Service.java:724) ~[jfxrt.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_60]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]
2015-11-10 09:55:48,563 INFO --- ScriptsController : Clear console.
2015-11-10 09:55:48,563 ERROR --- BrokerConnectService : FileNotFoundException: rootCA.pem (No such file or directory)
When i click the "..." button next to the certificate I Notice two things.
1. The certificates here created in my user folder, not in the aws? config folder.
2. No rootCA.pem certificate have been created.
I followed this tutorial to sign my own rootCA.pem certificate: http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/
Then in the MQTT.fx tool I press the "..." buttons again next to each certificate to manually select each certificate. The path to each one is displayed, like this: /Users/christopher/cert.pem
When I try to connect again i get the following error in the MQTT.fx tool:
2015-11-09 17:00:30,634 INFO --- ScriptsController : Clear console.
2015-11-09 17:00:30,635 ERROR --- BrokerConnectService : NullPointerException: null
2015-11-09 17:43:17,544 INFO --- BrokerConnectorController : onConnect
2015-11-09 17:43:17,592 INFO --- ScriptsController : Clear console.
2015-11-09 17:43:17,595 INFO --- MqttFX ClientModel : MqttClient with ID fc47354d17e84b6c8507eb1accb61560 assigned.
2015-11-09 17:43:17,661 ERROR --- MqttFX ClientModel : Error when connecting
java.lang.NullPointerException
at de.jensd.mqttfx.ssl.SSLFellow.loadPem(SSLFellow.java:221) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.ssl.SSLFellow.loadPrivateKeyPem(SSLFellow.java:184) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.ssl.SSLFellow.createSSLSocketFactory(SSLFellow.java:55) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.model.MqttFXClientModel.getMqttConnectOptions(MqttFXClientModel.java:713) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.model.MqttFXClientModel.connect(MqttFXClientModel.java:420) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.services.BrokerConnectService$1.call(BrokerConnectService.java:68) ~[MQTT.fx-jfx.jar:?]
at de.jensd.mqttfx.services.BrokerConnectService$1.call(BrokerConnectService.java:65) ~[MQTT.fx-jfx.jar:?]
at javafx.concurrent.Task$TaskCallable.call(Task.java:1423) ~[jfxrt.jar:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_60]
at javafx.concurrent.Service.lambda$null$493(Service.java:725) ~[jfxrt.jar:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_60]
at javafx.concurrent.Service.lambda$executeTask$494(Service.java:724) ~[jfxrt.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_60]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]
2015-11-09 17:43:18,472 INFO --- ScriptsController : Clear console.
2015-11-09 17:43:18,473 ERROR --- BrokerConnectService : NullPointerException: null
I can see on the aws IoT site (the console?) that the certificate, the policy and the lightbulb are all connected just like in the tutorial. But the rest is a mystery.
I would be so happy for all help I can get. Thank you!
You have to sign your own CA when you use your own domain name. Location of the original root certificate can be found at http://docs.aws.amazon.com/iot/latest/developerguide/verify-pub-sub.html
The root CA certificate is not created for you, rather it is linked somewhere in the AWS IoT documentation and is the same for all.
See first parapgraph here:
http://docs.aws.amazon.com/iot/latest/developerguide/verify-pub-sub.html
The is the root CA:
https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem
Related
I was trying to configure Business network Operator services in my solution by adding the toolkit provided by r3 as corrdapp dependancy in my application.I am able to build the application but when I runnodes i am getting error for Notary
UPDATE
I am adding the log
[ERROR] 2020-09-04T14:21:15,399Z [main] internal.Node. - Unable to install Corda service com.r3.businessnetworks.membership.flows.bno.service.BNOConfigurationService - [errorCode=dfc7g6, moreInformationAt=https://errors.corda.net/OS/4.5/dfc7g6]
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_201]
[...]
at net.corda.node.Corda.main(Corda.kt:13) ~[corda-node-4.5.jar:?]
Caused by: java.lang.NullPointerException
at com.r3.businessnetworks.membership.flows.ConfigUtils.loadConfig(ConfigUtils.kt:16) ~[?:?]
at com.r3.businessnetworks.membership.flows.bno.service.BNOConfigurationService.<init>(BNOConfigurationService.kt:21) ~[?:?]
... 33 more
[ERROR] 2020-09-04T14:21:15,458Z [main] internal.NodeStartupLogging. - Exception during node startup - [errorCode=dfc7g6, moreInformationAt=https://errors.corda.net/OS/4.5/dfc7g6]
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_201]
[...]
at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:89) ~[corda-tools-cliutils-4.5.jar:?]
at net.corda.node.Corda.main(Corda.kt:13) ~[corda-node-4.5.jar:?]
Caused by: java.lang.NullPointerException
at com.r3.businessnetworks.membership.flows.ConfigUtils.loadConfig(ConfigUtils.kt:16) ~[?:?]
at com.r3.businessnetworks.membership.flows.bno.service.BNOConfigurationService.<init>(BNOConfigurationService.kt:21) ~[?:?]
... 33 more
You are missing the configuration file of this CorDapp as explained here; you must:
Create a config folder inside your node's cordapps folder (i.e. node-folder/cordapps/config).
Inside that folder create a membership-service.conf file.
Inside that file add:
// Whitelist of accepted BNOs. Attempt to communicate to not whitelisted
// BNO would result into an exception
bnoWhitelist = ["O=BNO,L=New York,C=US", "O=BNO,L=London,C=GB"]
// Name of the notary to use for BNO transactions such as membership approval
notaryName = "O=Notary,L=Longon,C=GB"
The CorDapp that you're using relies on a configuration file (the above 3 steps create that file) and it causes the NullPointerException when it's missing. To understand more about CorDapp configuration files, read my article.
On a side note, according to this; the CorDapp that you're using will be deprecated on 31 September 2020.
2018-03-08 16:36:16,775 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService: Downloading public rsrc:{ hdfs://mycluster/user/abc_user/udf/pig_udf-1.5.7_handle_input_error.jar, 1516336589685, FILE, null }
2018-03-08 16:36:16,775 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService: Failed to download resource { { hdfs://mycluster/user/oozie/share/lib/lib_20171215093741/pig/libgplcompression.so.0.0.0, 1513307849411, FILE, null },pending,[(container_1519371600813_0002_02_000001)],8140205165392614,DOWNLOADING}
java.lang.IllegalArgumentException: java.net.UnknownHostException: mycluster
at org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:406)
at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:310)
at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:176)
at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:728)
at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:671)
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:155)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2815)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:98)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2852)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2834)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:387)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296)
at org.apache.hadoop.yarn.util.FSDownload.copy(FSDownload.java:249)
at org.apache.hadoop.yarn.util.FSDownload.call(FSDownload.java:356)
at org.apache.hadoop.yarn.util.FSDownload.call(FSDownload.java:60)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecumytor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.UnknownHostException: mycluster
Yarn-nodemanager service and Data-node service is on the same machine
Yarn-resource-manager service and NameNode in on the same machine
When run a simple pig script load data and print . I met above error .
Before add standby Namnode everything work well.
How can I config yarn to understand my NameNode Cluster
Thanks you
After check again hdfs-site.xml on 2 DataNode where Yarn Node Manager stand on , I see that the hdfs-site file missing this line when compare with the hdfs-site on Name Node
<property>
<name>dfs.client.failover.proxy.provider.mycluster</name>
<value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
</property>
It working now
I have defined a KafkaReceiver usind WSO2-CEP in management console.
It doesn't work and I can read this error on server-console log
[2016-02-26 10:17:25,412] INFO {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} - Connecting receiver kafkaReceiver
[2016-02-26 10:17:25,415] ERROR {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} - Error initializing Input Adapter 'kafkaReceiver, hence this will be suspended indefinitely, Cannot access kafka context due to missing jars
org.wso2.carbon.event.input.adapter.core.exception.InputEventAdapterRuntimeException: Cannot access kafka context due to missing jars
at org.wso2.carbon.event.input.adapter.kafka.KafkaEventAdapter.createConsumerConfig(KafkaEventAdapter.java:114)
at org.wso2.carbon.event.input.adapter.kafka.KafkaEventAdapter.createKafkaAdaptorListener(KafkaEventAdapter.java:132)
at org.wso2.carbon.event.input.adapter.kafka.KafkaEventAdapter.connect(KafkaEventAdapter.java:66)
at org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime.start(InputAdapterRuntime.java:72)
at org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime.startPolling(InputAdapterRuntime.java:62)
at org.wso2.carbon.event.input.adapter.core.internal.CarbonInputEventAdapterService.startPolling(CarbonInputEventAdapterService.java:187)
at org.wso2.carbon.event.receiver.core.internal.CarbonEventReceiverService.startPolling(CarbonEventReceiverService.java:620)
at org.wso2.carbon.event.receiver.core.internal.CarbonEventReceiverManagementService.startPolling(CarbonEventReceiverManagementService.java:99)
at org.wso2.carbon.event.processor.manager.core.internal.CarbonEventManagementService$2.run(CarbonEventManagementService.java:184)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: kafka/consumer/ConsumerConfig
at org.wso2.carbon.event.input.adapter.kafka.KafkaEventAdapter.createConsumerConfig(KafkaEventAdapter.java:112)
... 15 more
Caused by: java.lang.ClassNotFoundException: kafka.consumer.ConsumerConfig cannot be found by org.wso2.carbon.event.input.adapter.kafka_5.0.3
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 16 more
If we read the class source at this link https://github.com/wso2/carbon-analytics-common/blob/master/components/event-receiver/event-input-adapters/org.wso2.carbon.event.input.adapter.kafka/src/main/java/org/wso2/carbon/event/input/adapter/kafka/KafkaEventAdapter.java
I read that the error is in ConsumerConfig creation
In order to use kafka you need to add kafka download and copy following client JAR files to /repository/components/lib/ directory
kafka_2.10-0.8.2.1.jar
zkclient-0.3.jar
scala-library-2.10.4.jar
zookeeper-3.4.6.jar
metrics-core-2.2.0.jar
kafka-clients-0.8.2.1.jar
[1]. https://docs.wso2.com/display/CEP400/Supporting+Different+Transports#SupportingDifferentTransports-KafkaTransport
I have a BPEL deployed on WSO2 BPS 3.2.0 that invokes a webservice from w3schools.com and returns the result back to the BPEL invoker. When executing the BPEL service through SoapUI, i received a Timeout Exception, however upon close observation in the logs, i came across this error
TID: [0] [BPS] [2014-08-19 19:04:02,827] ERROR {org.apache.ode.jacob.vpu.JacobVPU} - Method "run" in class "org.apache.ode.bpel.runtime.INVOKE" threw an unexpected exception. {org.apache.ode.jacob.vpu.JacobVPU}
java.lang.NoClassDefFoundError: org/apache/synapse/core/axis2/SOAPUtils
at org.wso2.carbon.unifiedendpoint.core.UnifiedEndpointHandler.handleMessageOutput(UnifiedEndpointHandler.java:105)
at org.wso2.carbon.unifiedendpoint.core.UnifiedEndpointHandler.invoke(UnifiedEndpointHandler.java:59)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:426)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.wso2.carbon.bpel.core.ode.integration.utils.AxisServiceUtils.invokeService(AxisServiceUtils.java:305)
at org.wso2.carbon.bpel.core.ode.integration.PartnerService.invoke(PartnerService.java:324)
at org.wso2.carbon.bpel.core.ode.integration.BPELMessageExchangeContextImpl.invokePartner(BPELMessageExchangeContextImpl.java:43)
at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.invoke(BpelRuntimeContextImpl.java:793)
at org.apache.ode.bpel.runtime.INVOKE.run(INVOKE.java:140)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)
at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:898)
at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:208)
at org.apache.ode.bpel.engine.BpelProcess$1.invoke(BpelProcess.java:283)
at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:224)
at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:279)
at org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.java:434)
at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:558)
at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:467)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:536)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:530)
at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:280)
at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:235)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:530)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:514)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: org.apache.synapse.core.axis2.SOAPUtils
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 37 more
Upon close inspection , it seems that the %CARBON_HOME%/repository/components/plugins folder doesnt contain the
synapse-core_2.1.2.wso2v4.jar
I tried placing the jar file directly in the folder, and have also tried using the patch mechansim
Created a folder patch0006 in %CARBON_HOME%/repository/components/patches
Place the jar file in this new folder
Restart the server
Patch Mechanism successfully places the file in %CARBON_HOME%/repository/components/plugins folder.
But to no avail, the server still is unable to find the SOAPUtils class file. Any ideas, how to proceed further ?
I am trying to setup a proxy service that hides the security of a back end service, following the tutorial found here.
For the password callback handler I follow the instructions found here.
All pretty basic and straightforward.
I compiled the PWCBHandler class into a JAR file and put it in the esbhome\repository\components\lib folder together with all the JAR files from wss4j-1.6.15\lib.
I see no warnings or errors during startup of the ESB. However when I test the proxy service, I get the following error in the log:
org.apache.axis2.AxisFault: Error in obtaining a token
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:76)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
...
Caused by: org.apache.rampart.RampartException: Error in obtaining a token
at org.apache.rampart.util.RampartUtil.getToken(RampartUtil.java:779)
at org.apache.rampart.util.RampartUtil.getIssuedToken(RampartUtil.java:675)
...
Caused by: org.apache.rampart.RampartException: Cannot load password callback class: PWCBHandler
at org.apache.rampart.util.RampartUtil.getPasswordCB(RampartUtil.java:144)
at org.apache.rampart.util.RampartUtil.getPasswordCB(RampartUtil.java:118)
at org.apache.rampart.util.RampartUtil.getToken(RampartUtil.java:723)
...
... 26 more
Caused by: java.lang.ClassNotFoundException: PWCBHandler
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
... 26 more
Caused by: java.lang.ClassNotFoundException: PWCBHandler
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.apache.ws.security.util.Loader.loadClass(Loader.java:200)
at org.apache.ws.security.util.Loader.loadClass(Loader.java:163)
at org.apache.rampart.util.RampartUtil.getPasswordCB(RampartUtil.java:142)
... 28 more
[2014-06-16 15:56:23,103] WARN - FaultHandler ERROR_CODE : 0
[2014-06-16 15:56:23,103] WARN - FaultHandler ERROR_MESSAGE : Unexpected error during sending message out
[2014-06-16 15:56:23,103] WARN - FaultHandler ERROR_DETAIL : org.apache.synapse.SynapseException: Unexpected error during sending message out
at org.apache.synapse.core.axis2.Axis2Sender.handleException(Axis2Sender.java:170)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:69)
...
In other words, the ESB and Rampart know about the PWCBHandler class but it cannot load / access it.
At this point I have no ideas where to look further. Is there a way where I can check which JAR files were loaded during startup? What might prohibit the loading of the PWCBHandler JAR?
Thanks for your feedback,
Olivier
Thanks to the answer from Rajeev I got confirmation the class was not loading.
I recreated the JAR file with the class added to a package and after restarting the server a bundle for the JAR was created.
It looks like custom classes need to be added to a package for Carbon to create a bundle from it.
I know, I know, classes should always be added to a package, but I am not a Java hero and did not want to bother with the dirs and such.
Lessons learned! :)