Mule Database endpoint JDBC test connection - mule

I have created a database endpoint. But while testing the connection I am getting the following error:
Test connection failed: Error creating bean with name '_muleSimpleRegistryBootstrap' defined in URL [jar:file:/D:/MuleStudio/plugins/org.mule.tooling.server.3.4.0.ee_3.4.0.201305131832/mule/mule/mule-module-spring-config-3.4.0.jar!/default-mule-config.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/mule/security/oauth/processor/AbstractExpressionEvaluator (org.mule.api.lifecycle.InitialisationException)
org.mule.common.MuleArtifactFactoryException: Error initializing
at org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.doGetArtifact(SpringXmlConfigurationMuleArtifactFactory.java:149)
at org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.getArtifact(SpringXmlConfigurationMuleArtifactFactory.java:49)
at org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.getArtifact(SpringXmlConfigurationMuleArtifactFactory.java:39)
at org.mule.tooling.metadata.api.utils.ConnectionTester.internalTestConnection(ConnectionTester.java:72)
at org.mule.tooling.metadata.api.utils.ConnectionTester.testConnectionFor(ConnectionTester.java:108)
at org.mule.tooling.messageflow.action.TestConnectorConnectionFromMuleConfigAction$1$1.run(TestConnectorConnectionFromMuleConfigAction.java:72)
at java.lang.Thread.run(Unknown Source)

Do you happen to have a Cloud Connector for Mule 3.5 in your project?
If yes, it's a well-known issue: https://www.mulesoft.org/jira/browse/STUDIO-3831

Related

JasperReports Server 6.1.1 LDAP SSO

I tried this tutorial, to get SSO working with JasperReports Server (JRS) 6.1.1 but I get the following Error in the JRS log:
2017-01-10 15:04:11,174 ERROR ContextLoader,localhost-startStop-1:331 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterChainProxy' defined in ServletContext resource
[/WEB-INF/applicationContext-security-web.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError:
com/jaspersoft/jasperserver/multipleTenancy/DefaultMultiTenancyConfiguration
I don't know exactly what multi tenancy means, something like I could use several domains?
And the JRS won't start anymore, what did I wrong?

Generating OAuth Key in distributed deployment of WSO2 API Manager 1.10.0

Our setup:
WSO2 API Manager: 1.10.0
MySQL: 5.7.12
WSO2 API DAS: 3.0.1
OS: Ubuntu 14.04 LTS
We are using a distributed setup of the api manager with no load balancer (temporarily), based on the configuration and files of this GitHub site:
https://github.com/nuwanbando/wso2-apim-distributed-deployment
but whenever we try to generate an Application Key from a subscribed API, we get the following error:
From the logs of the Gateway we get (I have organized the logs in order to show the most important aspects):
ERROR - AMDefaultKeyManagerImpl Can not create OAuth application : coreApp_PRODUCTION
org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceAPIManagementException: APIKeyMgtSubscriberServiceAPIManagementException
ERROR - APIUtil Error occurred while executing SubscriberKeyMgtClient.
org.wso2.carbon.apimgt.api.APIManagementException: Can not create OAuth application : coreApp_PRODUCTION
Caused by: org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceAPIManagementException: APIKeyMgtSubscriberServiceAPIManagementException
ERROR - ApplicationRegistrationSimpleWorkflowExecutor Error occured when updating the status of the Application creation process
org.wso2.carbon.apimgt.api.APIManagementException: Error occurred while executing SubscriberKeyMgtClient.
Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Can not create OAuth application : coreApp_PRODUCTION
Caused by: org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceAPIManagementException: APIKeyMgtSubscriberServiceAPIManagementException
ERROR - APIConsumerImpl Could not execute Workflow
org.wso2.carbon.apimgt.impl.workflow.WorkflowException: Error occured when updating the status of the Application creation process
Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Error occurred while executing SubscriberKeyMgtClient.
Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Can not create OAuth application : coreApp_PRODUCTION
Caused by: org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceAPIManagementException: APIKeyMgtSubscriberServiceAPIManagementException
ERROR - APIStoreHostObject Error while obtaining the application access token for the application:coreApp
org.wso2.carbon.apimgt.api.APIManagementException: Could not execute Workflow
Caused by: org.wso2.carbon.apimgt.impl.workflow.WorkflowException: Error occured when updating the status of the Application creation process
Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Error occurred while executing SubscriberKeyMgtClient.
Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Can not create OAuth application : coreApp_PRODUCTION
Caused by: org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceAPIManagementException: APIKeyMgtSubscriberServiceAPIManagementException
ERROR - subscription-add:jag org.jaggeryjs.scriptengine.exceptions.ScriptException: Error while obtaining the application access token for the application:coreApp
And the logs of the Key-Manager (I have organized them too):
ERROR - CarbonContextDataHolder Cannot retrieve UserRealm for tenant -1
org.wso2.carbon.user.core.UserStoreException: Error occurred while getting tenant user realm for tenant id : -1
Caused by: java.lang.IllegalStateException: Tenant ID cannot be -1
ERROR - APIUtil Error occurred while creating OAuthApp admin_coreApp_PRODUCTION
java.lang.NullPointerException
at org.wso2.carbon.identity.application.mgt.ApplicationMgtUtil.createAppRole(ApplicationMgtUtil.java:142)
at org.wso2.carbon.identity.application.mgt.ApplicationManagementServiceImpl.createApplication(ApplicationManagementServiceImpl.java:129)
at org.wso2.carbon.apimgt.keymgt.service.APIKeyMgtSubscriberService.createOAuthApplicationByApplicationInfo(APIKeyMgtSubscriberService.java:137)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
What shall we do in order to fix this issue?
We need to configure the Keymanager host and port in the following location
/repository/deployment/server/synapse-configs/default/api
AuthorizeAPI.xml
RevokeAPI.xml
TokenAPI.xml

IBM Worklight - Custom Authentication

When trying to authenticate an adapter using custom authenticator and login module, I am facing the following exception.
[ERROR ] FWLST0003E: ========= Failed starting project /CustomAuth [project CustomAuth]
Error creating bean with name 'taskManager' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Cannot resolve reference to bean 'worklightAuthenticationService' while setting bean property 'authenticationService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklightAuthenticationService' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Cannot create inner bean 'com.worklight.core.auth.impl.LoginConfigurationServiceBean#7cffa209' of type [com.worklight.core.auth.impl.LoginConfigurationServiceBean] while setting bean property 'loginConfigurationService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.worklight.core.auth.impl.LoginConfigurationServiceBean#7cffa209' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
[AUDIT ] CWWKZ0001I: Application CustomAuth started in 0.948 seconds.
[ERROR ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
at com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized(AuthenticationFilter.java:300)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:111)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
Caused by: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
... 5 more
Could you help me?
Seems that your project war does not contain your java classes for some reason. I am not sure why, need more information on that, but I think that by deleting your bin folder and rebuilding all artifact you will be able to solve this issue.
Look your JDK version between your generated binary app and your Worklight server version. You can check if the binary is generated in Windows or Unix based operative system and redeploy your app taking the server operative system as a base for your binary app.
Need to write their own java class for custom authentication. These java class will act like authenticator and challenger while writing a custom authentication method.
Please find the documentation for the HTTP based custom authentication.

JBoss AS7 Hornetq - RemoteConenctionFactory lookup fails with RoundRobinConnectionLoadBalancingPolicy NotSerializableException

I'm using JBoss AS 7 Hornetq. Our standalone java application interacts with a queue and sends messages. We had the entire environment setup and it was working pretty smoothly. Suddenly, one fine day, our standalone application failed with the below exception:
Caused by: java.io.NotSerializableException: org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy
Detailed exception stack trace is below
javax.naming.NamingException: Failed to lookup [Root exception is java.io.NotSerializableException: org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy]
at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)
at org.jboss.naming.remote.protocol.v1.Protocol$1.execute(Protocol.java:104)
at org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1.lookup(RemoteNamingStoreV1.java:79)
at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:79)
at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:83)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.infosys.lbs.publishing.LocationProcessor.postMessageInQueue(LocationProcessor.java:377)
at com.infosys.lbs.publishing.LocationProcessor.process(LocationProcessor.java:69)
at com.infosys.lbs.publishing.main.Publisher.main(Publisher.java:34)
Caused by: java.io.NotSerializableException: org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:891)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1063)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:885)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1063)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:998)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:885)
at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)
at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:119)
at org.jboss.naming.remote.protocol.v1.Protocol$1$2.write(Protocol.java:138)
at org.jboss.naming.remote.protocol.v1.WriteUtil.write(WriteUtil.java:61)
at org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:128)
at org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:73)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: an exception which occurred:
in field loadBalancingPolicy
in field serverLocator
in object org.hornetq.jms.client.HornetQJMSConnectionFactory#ea074d
Exception was happening when the app was trying to lookup the connection factory
QueueConnectionFactory qcf = (QueueConnectionFactory)context.lookup("jms/RemoteConnectionFactory");
Below are the steps on how we resolved the issue
There was almost zero help for resolving this issue. A web search on this exception returned next to nothing. However, this particular thread on JBoss AS Dev site spinned a thought in my head: RemoteConnectionFactory is not found when looking up in a remote client
The scenario mentioned in this thread was not same as ours. (In our app this is the first and the only lookup happening.) This thread got me thinking towards a possible connection factory initialization issue. While there is nothing I could do to debug or find the issue around it, I thought that if I could reinitialize it, that would help.
So I tried lookup with java:jboss/exported/jms/RemoteConnectionFactory As expected it failed with a NamingException. Hoping that this naming syntax (using java:/) would have resulted in a reinitialization, I tried lookup again with jms/RemoteConnectionFactory. And bingo!!! it worked!
Unfortunately, we still don't know why it happened, and if it is just a one-off case! Documenting it here just in case some mortal soul hits this issue.

Exception: java.lang.reflect.InvocationTargetException Message:

I'm trying to create a web service on eclipse using Axis, Apache tomcat 7.0 and Hibernate for mapping . I added a call for the class DAO (xxxHome.java generated by hibernate) to some method in my service class. when I trued to test the web service client it generate the following error:
Exception: java.lang.reflect.InvocationTargetException Message:
java.lang.reflect.InvocationTargetException
Can any one please help me?