Can't run wso2 esb after doing wso2 mb tutorial - wso2

I'm trying to catch up with the new realease of the wso2ei 7 and 'm following the new tutorial but I keep getting an error when I start the esb again with the following error
Store [PaymentRequestMessageStore]. Could not initialize JMS Message Store. Error:Failed to create InitialContext using factory specified in hash table.. Initial Context Factory:[org.wso2.andes.jndi.PropertiesFileInitialContextFactory]; Provider URL:[null]; Connection Factory:[null]. javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hash table. [Root exception is java.lang.ClassNotFoundException: class org.wso2.andes.jndi.PropertiesFileInitialContextFactory not found]
at org.wso2.micro.core.context.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:301)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.init(InitialContext.java:244)
at javax.naming.InitialContext.(InitialContext.java:216)
...
Can anyone help me with that?
[EDIT]
I started the esb from the cmd and i got a diferent error, I don't know if helps or not...
ERROR {org.apache.axis2.transport.jms.JMSConnectionFactoryManager} - Error setting up connection factory : myQueueSender org.apache.axis2.transport.jms.AxisJMSException: Cannot acquire JNDI context, JMS Connection factory : QueueConnectionFactory or default destination : null for JMS CF : myQueueSender using : {transport.jms.CacheLevel=producer, broker_name=wso2mb, transport.jms.ConnectionFactoryType=queue, java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory, java.naming.provider.url=conf/jndi.properties}
at org.apache.axis2.transport.jms.JMSConnectionFactory.initJMSConnectionFactory(JMSConnectionFactory.java:188)
at org.apache.axis2.transport.jms.JMSConnectionFactory.(JMSConnectionFactory.java:152)
at org.apache.axis2.transport.jms.JMSConnectionFactoryManager.loadConnectionFactoryDefinitions(JMSConnectionFactoryManager.java:89)
...

While working through the EI Asynchronous Messaging tutorial, you will get this ClassNotFound exception if you don't do the following first:
Download WSO2 Message Broker. The path to this folder is referred to as MB_HOME throughout this tutorial.
Add the following JAR files from the MB_HOME/wso2/broker/client-lib/ directory to the MI_TOOLING_HOME/Contents/Eclipse/runtime/microesb/lib/ (in MacOS) or MI_TOOLING_HOME/runtime/microesb/lib (in Windows) directory.
andes-client-*.jar
geronimo-jms_1.1_spec-*.jar
org.wso2.securevault-*.jar
For me on OSX, the MI_TOOLING_HOME is /Applications/IntegrationStudio.app.

Related

Micro integrator using connector

I'm trying to run the WSO2 Micro integrator on docker. When not using any form of connector this seems to work. However I now have need for the amazon sqs connector.
When using the Intergration studio 7.0.0, I have successfully imported the connector from the store and used the in one of my sequences. It shows up in the Design-mode of the studio.
I used the SQS version like so:
<amazonsqs.init>
<accessKeyId>MYKEYHERE</accessKeyId>
<secretAccessKey>SECRETKEYHERE</secretAccessKey>
<version>2009-02-01</version>
<region>eu-west-1</region>
<enableSSL>false</enableSSL>
<blocking>false</blocking>
</amazonsqs.init>
When I run the package on the micro intergrator I keep getting the same error:
[2020-04-02 10:39:36,257] ERROR {org.apache.synapse.deployers.SequenceDeployer} - Sequence Deployment from the file : /home/ludo/development/wso2_studio_700/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1585816776255TestCompositeApplication_1.0.0.car/seq_msg_to_sqs_1.0.0/seq_msg_to_sqs-1.0.0.xml : Failed. org.apache.synapse.SynapseException: Unknown mediator referenced by configuration element : {http://ws.apache.org/ns/synapse}amazonsqs
followed in the same stack trace by:
Caused by: org.apache.synapse.SynapseException: Unknown mediator referenced by configuration element : {http://ws.apache.org/ns/synapse}amazonsqs
According to the documentation I could find, this was all I needed to do. What am I doing wrong?
FYI:
I get this result when running directly on the micro-integrator from studio, as well as using the docker version I made earlier.
Finally found it (after searching well over a day)....
The connector needs to be packaged within your project as well. You can do so by following this guide:
WSO2 make CAR with connector
Now to figure out the next of the errors.

WSO2SP as analytics for APIM and EI

I'm trying to use WSO2SP-4.3.0 as analytics for both WSO2AM-2.6.0 and WSO2EI-6.4.0 (integrator). The only reference I found for this options is mentioned here https://docs.wso2.com/display/SP430/Analytics+Solutions
Setting up ports and solutions map:
analytics.solutions:
APIM-analytics.enabled: true
EI-analytics.enabled: true
running a worker and dashboard of the SP
Seems the stream definitions for loganalyzer is not loaded, worker throws following exceptions:
ERROR {org.wso2.carbon.databridge.core.internal.queue.QueueWorker} - Dropping wrongly formatted event sent
org.wso2.carbon.databridge.core.exception.EventConversionException: Error when converting loganalyzer:1.0.0 of event bundle with events 1
...
Caused by: org.wso2.carbon.databridge.core.exception.EventConversionException:
No StreamDefinition for streamId loganalyzer:1.0.0 present in cache
...
...
I haven't find source of the loganalyzer stream definition (even in the original ws2am-analytics-2.6.0 package).
Any help is appreciated (or shall I just disable the DAS_AGENT from APIM)?
This seems like a configuration issue. It might be easier to try one at a time to narrow down the problem. I suggest you follow [EI-Analytics] Configure WSO2 SP for WSO2 EI to configure EI analytics with SP with enabling EI analytics first.

WSO2 Carbon: get local entry remotely

I have Local Entry on WSO2 ESB 4.6.0.
Is it possible to fetch it remotely?(I mean outside of Synapse; like it is possible to get Resources/Collection from Registry with RemoteRegistry).
P.S. I've tried with LocalEntryAdmin, but it fetches entries from synapseConfiguration.
I'm trying to get registry (to get then local entry) from standalone Java app with WSRegistryServiceClient.
I copied jks and axis2repo but still get:
org.wso2.carbon.registry.core.exceptions.RegistryException: Failed to perform get operation. at org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient.get(WSRegistryServiceClient.java:247)
org.apache.axis2.AxisFault: The input stream for an incoming message is null.
Should I use WSRegistryServiceClient only from Carbon environment?
You should be able to get it from Registry. Using registry API, get the Localregistry and try to read it as a resource;
localRegistry().get("testLocalentry");

Error while testing BPEL project

Running Netbeans 6.5.1 with OpenESB (Glassfish-full-installer-windows2.1).
I'm using this tutorial (http://www.youtube.com/watch?v=a76RxkzB4Bg) as reference to orchestrate web services by calling a local WSDL that invokes an external WSDL (http://www.webservicex.net/CreditCard.asmx?WSDL). I have my BPEL ready
and my Composite Application created, it automatically binds a SOAP call from my local WSDL to the BPEL (Consumer to Producer), I had to drag and drop another SOAP object and configure it with the same interface as my local WSDL to receive the output from the invoke action (is that correct?).
When I run my test case selecting the operation from my local WSDL, I get the following SoapResponse:
<SOAP-ENV:Fault>
<faultcode xmlns="">SOAP-ENV:Server</faultcode>
<faultstring xmlns="">BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is &a....Sending errors for the pending requests in the process scope before terminating the process instance</faultstring>
<faultactor xmlns="">sun-bpel-engine</faultactor>
<detail xmlns="">
<detailText>BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is &a... Sending errors for the pending requests in the process scope before terminating the process instance
Caused by: BPCOR-6131: An Error status was received while doing an invoke (partnerLink=externalBPELImplementation, portType={http://www.webservicex.net}CCCheckerSoap, operation=ValidateCardNumber)
BPCOR-6129: Line Number is 37
BPCOR-6130: Activity Name is Invoke1
Caused by: HTTP Status-Code 404: Not Found - Not Found</detailText>
</detail>
I've created a separated project to test the external WSDL and it is validating credit card numbers as expected, there's something wrong with my BPEL or my Composite Application.
If I create another test case and select the local port that is created when I drag and drop the Soap object into the Comp. App. Design interface, I get a different error:
Dec 24, 2012 12:54:11 AM com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection call
SEVERE: SAAJ0006: Bad URL (endPoint instance of String)
java.net.MalformedURLException: no protocol:
any ideas?
Your process seams to be correct (at the first look).
It looks like your process can't find the service you ask:
BPCOR-6130: Activity Name is Invoke1 - Caused by: HTTP Status-Code 404: Not Found - Not Found
Is your "soap adress" in the wsdl you imported correct ?
Have you try to overload the url in the bpel mapping ? (Properties -> SOAP HTTP BC -> Outbound -> UR)
There is also something strnage in your CASA: If you are trying to consume "localCreditCard_WSDLPort" and expose in OpenESB "casaPort1", the SOAP Binding are inversed. The arrow should start from casaPort1 and finish at localCreditCard_WSDLPort.
I hope this could help you,
Simon
According to #brasseld from www.open-esb.net
In fact, you've made two mistake :
The first one, for your unit test, you have to use the good WSDL which come from the BPEL because you've created a concrete SOAP WSDL
(CreditCard_WSDL.wsdl).
Then, when you create a new port in your composite application for your plnk externalServiceCard_WSDL, you have to set the soap address
location by right-click > properties. By default, this one is set to
localhost:${HttpDefaultPort}/compositeapp/casaportX?wsdl that's why
you encounter your errors (404 or bad url error).
Based on his suggestions, I've decided to document the development process step-by-step, here's the result:
http://www.youtube.com/watch?v=-1W1xR3-iJQ

Spring is ignoring commons-logging.jar

I am trying to publish my webservice using CXF 2.6.0. While starting tomcat server I am getting following exception:
org.springframework.beans.BeanInstantiationException : Could not instantiate bean class [org.springframework.web.context.support.XmlWebApplicationContext]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
No need to say that I already have common-logging-1.1.1.jar in my classpath. What else am I missing?
Pls check if the LogFactory is loaded multiple times during publish. This might occur if there are jar conflicts loading the same class.