WSO2 ESB on Carbon 4.2 - Did not find the desired phase 'Transport' while deploying handler 'POXSecurityHandler' - esb

I'm new to WSO2 ESB and would like to try it out for some external integrations.
I've installed the WSO2 Carbon 4.2 server and installed the ESB feature 4.8.1.
After a restart, I'm getting some errors as below.
Any tips or suggestions would be gratefully accepted.
Thanks.
[2014-03-06 10:01:08,521] INFO {org.wso2.carbon.mediation.initializer.ServiceBusInitializer} - Initializing Apache Synapse...
[2014-03-06 10:01:08,525] FATAL {org.wso2.carbon.mediation.initializer.ServiceBusInitializer} - Couldn't initialize the ESB...
org.apache.synapse.SynapseException: The synapse.xml location ././
./repository/deployment/server/synapse-configs
/default doesn't exist
at org.apache.synapse.SynapseControllerFactory.handleFatal(SynapseControllerFactory.java:121)
at org.apache.synapse.SynapseControllerFactory.validatePath(SynapseControllerFactory.java:113)
at org.apache.synapse.SynapseControllerFactory.validate(SynapseControllerFactory.java:88)
at org.apache.synapse.SynapseControllerFactory.createSynapseController(SynapseControllerFactory.java:44)
at org.apache.synapse.ServerManager.init(ServerManager.java:102)
at org.wso2.carbon.mediation.initializer.ServiceBusInitializer.initESB(ServiceBusInitializer.java:423)
at org.wso2.carbon.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
...
...
...
[2014-03-06 10:01:08,531] INFO {org.wso2.carbon.rule.kernel.internal.ds.RuleEngineConfigDS} - Successfully registered the Rule Config service
[2014-03-06 10:01:08,553] ERROR {org.wso2.carbon.security.internal.SecurityMgtServiceComponent} - Failed to activate SecurityMgtServiceComponent
org.apache.axis2.phaseresolver.PhaseException: Did not find the desired phase 'Transport' while deploying handler 'POXSecurityHandler'.
at org.apache.axis2.phaseresolver.PhaseHolder.addHandler(PhaseHolder.java:75)
at org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToFlow(PhaseResolver.java:68)
at org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToOperation(PhaseResolver.java:104)
at org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToOperation(PhaseResolver.java:110)
at org.apache.axis2.description.AxisOperation.onEngage(AxisOperation.java:152)
at org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.java:478)
at org.apache.axis2.description.AxisService.onEngage(AxisService.java:827)
at org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.java:478)
at org.apache.axis2.description.AxisServiceGroup.onEngage(AxisServiceGroup.java:134)

For the second exception -
"org.apache.axis2.phaseresolver.PhaseException: Did not find the desired phase 'Transport' while deploying handler 'POXSecurityHandler'."
This is because the 'Transport' phase is missing in the 'OutFaultFlow' of the axis2.xml. This is a recent addition hence it's missing when you did the feature installation. To fix this issue,
Search for the OutFaultFlow in the repository/conf/axis2/axis2.xml
In there, just after the 'Security' phase add the new entry 'Transport' as follows
.
<phase name="Transport"/>
Restart the server

Even though, WSO2 Carbon supports any feature installation via P2, there are some configurations not coming via the feature installation.
If you compare the ESB product with the customized product you have, you will see there are many differences in the config files. Please take a look at how ESB distribution is created.
There are two errors in your case.
org.apache.synapse.SynapseException: The synapse.xml location ././
./repository/deployment/server/synapse-configs/default doesn't exist
This means that it cannot find the synapse.xml in /repository/deployment/server/synapse-configs/default. This is missing as it comes via the product distribution.
org.apache.axis2.phaseresolver.PhaseException: Did not find the desired phase 'Transport' while deploying handler 'POXSecurityHandler'.
This probably means that Axis2 to cannot find the "Transport" phase required by a security component. The "Transport" phase is available in ESB 4.8.1 axis2.xml.
In summary, my personal opinion is that you should not try to install ESB features on WSO2 Carbon. If I need a product with multiple features, I would start with ESB first.
While feature installation provides you more flexibility, it will not always work smoothly. However there are many useful cases that we can install features on top of WSO2 Products.
I hope this helps.

For the first exception see the bug resolution comment at https://wso2.org/jira/browse/ESBJAVA-776
I also copied in the synapsis.xml file from the ESB distribution given by Isuru

Related

Service fabric upgrade failing due to change in namespace

I have a service fabric application stuck in "Upgrading" mode.
The exception is:
Could not load type 'DB.IAddUser' from assembly 'DB' at
WebApi.Startup.ConfigureServices(IServiceCollection services)
My change was that of renaming the name space, from 'DB' to 'DB.Interfaces'.
This class is only used as a constructor dependency, and registered as such
Startup.cs
services.AddSingleton<IAddUser, AddUser>();
UserController.cs
private IAddUser addUser;
public UserController(IAddUser addUser){
this.addUser = addUser;
}
Why would this cause SF to get stuck?
Additionally, it only got stuck on the last upgrade domain, and not on the others.
I might be mistaken but if upgrade was successful on other upgrade domains then it is not code related issue.
Try to rollback the application upgrade and upgrade again:
Start-ServiceFabricApplicationRollback -ApplicationName fabric:/MyApp
documentation
It turns out that this had nothing to do with service fabric (as expected and as #SteppingRazor said).
The problem seems to be related to MSBuild/Azure devops build task, I had upgraded nuget package
Microsoft.VisualStudio.Azure.Fabric.MSBuild
from 1.6.7 to 1.6.8 and it seems that the build was still using older code (confirmed via a decompiler).
Reverting back to 1.6.7 solved the issue (albeit its just a workaround)

JBPM: Add MySQL connector dependency to kie workbench [ver 6.2]

I'm trying to add mysql connector dependency to kie workbench. I added it by uploading the jar to the artifact repository and adding the dependency by going to project settings. When the service task that uses the connector executes, it's not able to load the mysql's Driver class. Here's more detail on how I'm using the service task - Service task using Hibernate
When the service task execute I get this message on the workbench - Unexpected error encountered : [com.sample.bpmn.hello:36 - GetData:3] -- Unable to build entity manager factory
When I look at wildfly's server.log, it seems the jar didn't get added properly - java.lang.ClassNotFoundException: Could not load requested class : com.mysql.jdbc.Driver
When I add the dependency on the workbench, I see the following warnings. I'm not able to figure out what they mean -
Verification of class com.mysql.jdbc.integration.c3p0.MysqlConnectionTester failed and will not be available for authoring. Please check the necessary external dependencies for this project are configured correctly.
Verification of class com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter failed and will not be available for authoring. Please check the necessary external dependencies for this project are configured correctly.
Verification of class com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker failed and will not be available for authoring. Please check the necessary external dependencies for this project are configured correctly.
Please let me know if more info is needed.
Much appreciated.
[PS] - I must say that I just got started with hibernate as well with no prior experience. So it could be a basic thing I'm missing there.

Play TypeSafe Activator fails to start - IllegalArgumentException "Failed to download new template catalog properties"

Moving from play 2.2.x to latest activator last night. Downloaded minimal 1.2.10, extracted it in program file (x86)\typesafe... and put the directory into the system path variable. cloned my repository, and when i executed activator run it downloaded the required modules and my app is up and running. All great so far. run works!
Then I tried to create a new app, and activator fails, with the following trace:
Checking for a newer version of Activator (current version 1.2.10)...
... our current version 1.2.10 looks like the latest.
Found previous process id: 9632
FOUND REPO = activator-local # file:////C:/Program%20Files%20(x86)/Typesafe/activator-1.2.10-minimal/repository
Play server process ID is 9760
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /127.0.0.1:8888
[info] a.e.s.Slf4jLogger - Slf4jLogger started
[WARN] [10/30/2014 10:47:13.972] [default-akka.actor.default-dispatcher-2] [ActorSystem(default)] Failed to download new template ca
talog properties: java.lang.IllegalArgumentException: requirement failed: Source file 'C:\Users\admin\.activator\1.2.10\templates\in
dex.db_6e0565f0c8826b17.tmp' is a directory.
[ERROR] [10/30/2014 10:47:13.972] [default-akka.actor.default-dispatcher-2] [akka://default/user/template-cache] Could not find a te
mplate catalog. (activator.templates.repository.RepositoryException: We don't have C:\Users\admin\.activator\1.2.10\templates\cache.
properties with an index hash in it, even though we should have downloaded one
activator.templates.repository.RepositoryException: We don't have C:\Users\admin\.activator\1.2.10\templates\cache.properties with a
n index hash in it, even though we should have downloaded one
at activator.cache.TemplateCacheActor.preStart(TemplateCacheActor.scala:184)
at akka.actor.Actor$class.aroundPreStart(Actor.scala:470)
at activator.cache.TemplateCacheActor.aroundPreStart(TemplateCacheActor.scala:25)
at akka.actor.ActorCell.create(ActorCell.scala:580)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
I've taken a look at several similar issues on SO and elsewhere. I've deleted .activator directory and retried, I've tried this process from behind a proxy and not, as well as offline (surely offline should work!), but it consistently gives the above error. activator ui gives the same error. I'm stuck and any suggestions would be appreciated. (Edit. tried with full activator download, rather than minimal, and I get the same error.)
Look for reasons it might be impossible to create or access 'C:\Users\admin.activator\1.2.10\templates\in
dex.db_6e0565f0c8826b17.tmp' ... maybe a permissions issue?
The failed check is for "is a directory" but that also fails if it just doesn't exist or can't be accessed.

How to configure Hudson base distribution?

I am a total newbie to the Hudson administration, so my question is very 101:
I downloaded hudson-3.0.0.war, which is said to be just the Hudson Core without any plugins included, and deployed it on my Apache Tomcat 7.0 server.
So Hudson as a web app is up, I can browse it, manage plugins via UI and so on.
But when I try to create my very first job as Build a free-style software project, I get the following exception:
HTTP Status 500 - java.lang.NoClassDefFoundError: org/eclipse/hudson/utils/tasks/MetaProject
type Exception report
message java.lang.NoClassDefFoundError: org/eclipse/hudson/utils/tasks/MetaProject
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/eclipse/hudson/utils/tasks/MetaProject
I assume that a certain plugin is missing (although I would expect that even the base distribution included such a basic task, but never mind...).
I cannot figure out which plugin I have to install in order to enable the job creation between all available plugins.
I am really hoping to any assistance with this issue, which I shall appreciate very much.
It looks like you are missing a dependency. Add to the pom.xml the dependency:
<dependency>
    <groupId>org.eclipse.hudson</groupId>
    <artifactId>hudson-plugin-utils</artifactId>
    <version>3.0.1</version>
</dependency>

"File not found Exception" at runtime in Glassfish ESB 2.1

Good wishes of the day..!
In production we have Glassfish 2.1 server hosting ESB Applications in two instances each under two Linux Boxes. Functionality of the ESB app to takes client request and transform to destination, again receive the response and sent back to the client.
From past few days we are seeing "File not found Exception" in the logs throwing by WsdlQueryHelper of HTTP BC. We analyzed the logs and came to know that it is happening for only one instance (Instance 2 of Server 1), that to for few requests in that instance. We checked the service of that instance from SOAP tool and it is giving appropriate response, Understood that WsdlQueryHelper failed to process few requests at runtime. Below exception details for the same in logs,
*[#|2012-12-13T18:29:24.526+1100|FINE|sun-appserver2.1|com.sun.jbi.httpsoapbc.WsdlQueryHelper|_ThreadID=319;_ThreadName=httpWorkerThread-7092-0;ClassName=com.sun.jbi.httpsoapbc.WsdlQueryHelper;MethodName=;_RequestID=6fdd0535-24d4-4878-8c98-b48e2dea39eb;|init
query helper failed. javax.wsdl.WSDLException: WSDLException (at
/definitions/types/xsd:schema): faultCode=OTHER_ERROR: An error
occurred trying to resolve schema referenced at 'RouterSchema_v4.xsd',
relative to ''.: java.io.FileNotFoundException: This file was not
found:
file:/home/glassfish/GlassFishESBv21/glassfish/nodeagents/GLASSFISH-001-NA/GLASSFISH-001-instB/RouterSchema_v4.xsd
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:918)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:678)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(WSDLReaderImpl.java:639)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:339)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2324)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2288)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2341)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2362)
at com.sun.jbi.httpsoapbc.WsdlQueryHelper.(WsdlQueryHelper.java:105)
at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.processSynchronousQueryResource(JAXWSGrizzlyRequestProcessor.java:293)
at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.service(JAXWSGrizzlyRequestProcessor.java:217)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
at com.sun.jbi.httpsoapbc.embedded.JBIGrizzlyAsyncFilter.doFilter(JBIGrizzlyAsyncFilter.java:95)
at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)
at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)
at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
Caused by: java.io.FileNotFoundException: This file was not found:
file:/home/glassfish/GlassFishESBv21/glassfish/nodeagents/GFESB_ASPAC_001-NA/GFESB_ASPAC_001-instB/RouterSchema_v4.xsd
at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(StringUtils.java:199)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:840)
... 17 more |#]*
Could you please help us to resolve the issue.
Regards,
Ram