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?
Related
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?
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
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.
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
I am using bean validation in my application. When there is no constraint validation errors everything works nicely. Every time there is a validation error, Glassfish throws the following exception:
Caused by: java.lang.ClassNotFoundException: javax.validation.groups.Default: java.net.MalformedURLException: Unknown protocol: osgi
at com.sun.corba.ee.impl.util.JDKBridge.loadClassM(JDKBridge.java:325)
at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:228)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:640)
at com.sun.corba.ee.impl.util.RepositoryId.getClassFromType(RepositoryId.java:628)
at com.sun.corba.ee.impl.orbutil.RepIdDelegator.getClassFromType(RepIdDelegator.java:169)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readClass(CDRInputStream_1_0.java:1439)
The bean-validation.jar is present in glassfish/modules folder. The startup doesn't throw any exceptions regarding validation.
PS. Note that we are using remote beans with CORBA.
Reproducable on GlassFish 3.1.2.2 and 3.1.1.
I traced this problem to serialization of the ConstraintValidationException through CORBA. Somehow the bean-validation module is not loaded properly with osgi and the javax.validation.groups.Default class is missing. I made a quick workaround so that the ConstraintValidationException is intercepted and never sent through CORBA. Instead the validation error information is gathered in a custom Exception class that can be actually serialized through the services.