I have created two projects on Eclipse JEE:
1) Connector-ra.rar : this project has java class and ra.xml.
This is my resource adapter ra.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE connector PUBLIC '-//Sun Microsystems, Inc.//DTD Connector 1.0//EN' 'http://java.sun.org/j2ee/dtds/connector_1_0.dtd'>
<connector>
<display-name>Connector-jca-1</display-name>
<vendor-name>Volkswagen AG</vendor-name>
<spec-version>1.0</spec-version>
<eis-type>Prop</eis-type>
<version>1.0</version>
<resourceadapter>
<managedconnectionfactory-class>com.eis.hw.ManagedConnectionFactoryImpl</managedconnectionfactory-class>
<connectionfactory-interface>com.eis.hw.HelloWorldConnectionFactory</connectionfactory-interface>
<connectionfactory-impl-class>com.eis.hw.HelloWorldConnectionFactoryImpl</connectionfactory-impl-class>
<connection-interface>com.eis.hw.HelloWorldConnection</connection-interface>
<connection-impl-class>com.eis.hw.HelloWorldConnectionImpl</connection-impl-class>
<transaction-support>NoTransaction</transaction-support>
<config-property>
<config-property-name>HostURL</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>127.0.0.1</config-property-value>
</config-property>
<authentication-mechanism>
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
<credential-interface>javax.resource.security.PasswordCredential</credential-interface>
</authentication-mechanism>
<reauthentication-support>false</reauthentication-support>
</resourceadapter>
</connector>
2) On my Web project i try to call:
import java.io.IOException;
import java.io.PrintWriter;
import javax.annotation.Resource;
import javax.resource.ResourceException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.eis.hw.HelloWorldConnection;
import com.eis.hw.HelloWorldConnectionFactory;
#WebServlet("/JCAServlet")
public class TestRA extends HttpServlet {
private static final long serialVersionUID = 1L;
#Resource(lookup="eis/ECI")
private HelloWorldConnectionFactory connectionFactory;
public TestRA() {
super();
}
/**
* #see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String result = " ";
HelloWorldConnection connection = null;
try {
connection = connectionFactory.getConnection();
result = connection.helloWorldCall();
} catch (ResourceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
PrintWriter out = response.getWriter();
out.println(result + "Application test");
out.flush();
// connection.close();
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
I am configuring a JCA and resource adapter on liberty server.
here is my server.xml on liberty server :
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>adminCenter-1.0</feature>
<feature>javaee-7.0</feature>
<feature>jaxws-2.2</feature>
<feature>jca-1.7</feature>
<feature>jndi-1.0</feature>
<feature>localConnector-1.0</feature>
<feature>webProfile-7.0</feature>
<!--<feature>ejbRemote-3.2</feature>-->
</featureManager>
<!--The location of the cicseci.rar needs to be updated to the full path-->
<resourceAdapter autoStart="true" id="eciResourceAdapter" location="C:/Users/Connector-ra.rar"/>
<connectionFactory id="eciTest" jndiName="eis/ECI">
<!--The properties need to be updated to the location of the CICS Transaction Gateway-->
<properties.eciResourceAdapter connectionUrl="tcp://localhost" portNumber="2006"/>
</connectionFactory>
<webApplication id="Connector-web" location="Connector-web-0.0.1-SNAPSHOT.war" name="Connector-web">
<classloader classProviderRef="eciResourceAdapter"/>
</webApplication>
</server>
My problem is :
[ERROR ] SRVE0319E: For the [com.sample.TestRA] servlet, com.sample.TestRA servlet class was found, but a resource injection failure has occurred. CWNEN0030E: The server was unable to obtain an object instance for the java:comp/env/com.sample.TestRA/connectionFactory reference. The exception message was: CWNEN1003E: The server was unable to find the eis/ECI binding with the com.eis.hw.HelloWorldConnectionFactory type for the java:comp/env/com.sample.TestRA/connectionFactory reference.
messages.log
[08/11/18 14:15:18:991 CET] 00000011 com.ibm.ws.sib.utils.ras.SibMessage I CWSID0108I: JMS server has started.
[08/11/18 14:15:19:101 CET] 00000011 com.ibm.ws.security.jaspi.AuthConfigFactoryWrapper I CWWKS1655I: The default Java Authentication SPI for Containers (JASPIC) AuthConfigFactory class com.ibm.ws.security.jaspi.ProviderRegistry is being used because the Java security property authconfigprovider.factory is not set.
[08/11/18 14:15:19:971 CET] 0000002e om.ibm.ws.app.manager.rar.internal.RARApplicationHandlerImpl I J2CA7018I: Installing resource adapter eciResourceAdapter.
[08/11/18 14:15:21:570 CET] 00000019 com.ibm.ws.webcontainer.osgi.webapp.WebGroup I SRVE0169I: Loading Web Module: The Liberty Explore Tool.
[08/11/18 14:15:21:572 CET] 00000019 com.ibm.ws.webcontainer I SRVE0250I: Web Module The Liberty Explore Tool has been bound to default_host.
[08/11/18 14:15:21:568 CET] 0000001c com.ibm.ws.webcontainer.osgi.webapp.WebGroup I SRVE0169I: Loading Web Module: The Liberty Admin Center.
[08/11/18 14:15:21:575 CET] 0000001c com.ibm.ws.webcontainer I SRVE0250I: Web Module The Liberty Admin Center has been bound to default_host.
[08/11/18 14:15:21:574 CET] 00000019 com.ibm.ws.http.internal.VirtualHostImpl A CWWKT0016I: Web application available (default_host): http://localhost:9086/ibm/adminCenter/explore-1.0/
[08/11/18 14:15:21:570 CET] 0000001f com.ibm.ws.webcontainer.osgi.webapp.WebGroup I SRVE0169I: Loading Web Module: ibm/api.
[08/11/18 14:15:21:579 CET] 0000001f com.ibm.ws.webcontainer I SRVE0250I: Web Module ibm/api has been bound to default_host.
[08/11/18 14:15:21:571 CET] 00000032 com.ibm.ws.webcontainer.osgi.webapp.WebGroup I SRVE0169I: Loading Web Module: The Liberty Server Config Tool.
[08/11/18 14:15:21:571 CET] 0000002d com.ibm.ws.webcontainer.osgi.webapp.WebGroup I SRVE0169I: Loading Web Module: IBMJMXConnectorREST.
[08/11/18 14:15:21:581 CET] 00000032 com.ibm.ws.webcontainer I SRVE0250I: Web Module The Liberty Server Config Tool has been bound to default_host.
[08/11/18 14:15:21:581 CET] 0000002d com.ibm.ws.webcontainer I SRVE0250I: Web Module IBMJMXConnectorREST has been bound to default_host.
[08/11/18 14:15:21:587 CET] 0000001f com.ibm.ws.http.internal.VirtualHostImpl A CWWKT0016I: Web application available (default_host): http://localhost:9086/ibm/api/
[08/11/18 14:15:21:588 CET] 0000001c com.ibm.ws.http.internal.VirtualHostImpl A CWWKT0016I: Web application available (default_host): http://localhost:9086/adminCenter/
[08/11/18 14:15:21:594 CET] 0000002d com.ibm.ws.http.internal.VirtualHostImpl A CWWKT0016I: Web application available (default_host): http://localhost:9086/IBMJMXConnectorREST/
[08/11/18 14:15:21:618 CET] 0000002e org.jboss.weld.Version I WELD-000900: 2.4.5 (Final)
[08/11/18 14:15:21:666 CET] 0000002d com.ibm.ws.jmx.connector.server.rest.RESTAppListener I CWWKX0103I: The JMX REST connector is running and is available at the following service URL: service:jmx:rest://localhost:9543/IBMJMXConnectorREST
[08/11/18 14:15:21:718 CET] 00000021 com.ibm.ws.session.WASSessionCore I SESN8501I: The session manager did not find a persistent storage location; HttpSession objects will be stored in the local application server's memory.
[08/11/18 14:15:21:746 CET] 0000002d com.ibm.ws.jmx.connector.server.rest.RESTAppListener I CWWKX0103I: The JMX REST connector is running and is available at the following service URL: service:jmx:rest://localhost:9543/IBMJMXConnectorREST
[08/11/18 14:15:21:747 CET] 00000020 com.ibm.ws.session.WASSessionCore I SESN0176I: A new session context will be created for application key default_host/ibm/api
[08/11/18 14:15:21:746 CET] 00000021 com.ibm.ws.session.WASSessionCore I SESN0176I: A new session context will be created for application key default_host/ibm/adminCenter/explore-1.0
[08/11/18 14:15:21:748 CET] 0000002c com.ibm.ws.session.WASSessionCore I SESN0176I: A new session context will be created for application key default_host/adminCenter
[08/11/18 14:15:21:767 CET] 00000032 com.ibm.ws.http.internal.VirtualHostImpl A CWWKT0016I: Web application available (default_host): http://localhost:9086/ibm/adminCenter/serverConfig-1.0/
[08/11/18 14:15:21:785 CET] 00000032 com.ibm.ws.session.WASSessionCore I SESN0176I: A new session context will be created for application key default_host/ibm/adminCenter/serverConfig-1.0
[08/11/18 14:15:21:788 CET] 00000020 com.ibm.ws.util I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
[08/11/18 14:15:21:820 CET] 00000032 com.ibm.ws.util I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
[08/11/18 14:15:21:824 CET] 00000021 com.ibm.ws.util I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
[08/11/18 14:15:21:826 CET] 0000002c com.ibm.ws.util I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
[08/11/18 14:15:21:851 CET] 0000002d com.ibm.ws.session.WASSessionCore I SESN0176I: A new session context will be created for application key default_host/IBMJMXConnectorREST
[08/11/18 14:15:21:852 CET] 0000002d com.ibm.ws.util I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
[08/11/18 14:15:22:113 CET] 0000002c com.ibm.ws.cache.CacheServiceImpl I DYNA1056I: Dynamic Cache (object cache) initialized successfully.
[08/11/18 14:15:22:543 CET] 0000002d com.ibm.ws.webcontainer.servlet I SRVE0242I: [com.ibm.ws.jmx.connector.server.rest] [/IBMJMXConnectorREST] [JMXRESTProxyServlet]: Initialization successful.
[08/11/18 14:15:22:808 CET] 0000002e om.ibm.ws.app.manager.rar.internal.RARApplicationHandlerImpl A J2CA7001I: Resource adapter eciResourceAdapter installed in 2.837 seconds.
[08/11/18 14:15:22:915 CET] 0000001f com.ibm.ws.app.manager.AppMessageHelper I CWWKZ0018I: Starting application informationrequest-ui.
[08/11/18 14:15:22:928 CET] 00000019 com.ibm.ws.app.manager.AppMessageHelper I CWWKZ0018I: Starting application SoapApp0.
[08/11/18 14:15:22:937 CET] 0000002e com.ibm.ws.app.manager.AppMessageHelper I CWWKZ0018I: Starting application Connector-web.
[08/11/18 14:15:23:311 CET] 0000001f com.ibm.ws.webcontainer.osgi.webapp.WebGroup I SRVE0169I: Loading Web Module: informationrequest-ui.
[08/11/18 14:15:23:312 CET] 0000001f com.ibm.ws.webcontainer I SRVE0250I: Web Module informationrequest-ui has been bound to default_host.
[08/11/18 14:15:23:314 CET] 0000001f com.ibm.ws.http.internal.VirtualHostImpl A CWWKT0016I: Web application available (default_host): http://localhost:9086/informationrequest-ui/
[08/11/18 14:15:23:315 CET] 0000001f com.ibm.ws.app.manager.AppMessageHelper A CWWKZ0001I: Application informationrequest-ui started in 0.400 seconds.
[08/11/18 14:15:23:342 CET] 00000021 com.ibm.ws.session.WASSessionCore I SESN0176I: A new session context will be created for application key default_host/informationrequest-ui
[08/11/18 14:15:23:342 CET] 00000021 com.ibm.ws.util I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
[08/11/18 14:15:23:690 CET] 0000001c com.ibm.ws.webcontainer.osgi.mbeans.PluginGenerator I SRVE9103I: A configuration file for a web server plugin was automatically generated for this server at C:\Users\abdelkarim.chokri\Desktop\ELSA\Tools\wlp-webProfile7-17.0.0.4\wlp\usr\servers\defaultServer\logs\state\plugin-cfg.xml.
[08/11/18 14:15:24:418 CET] 00000020 com.ibm.ws.webcontainer.osgi.mbeans.PluginGenerator I SRVE9103I: A configuration file for a web server plugin was automatically generated for this server at C:\Users\abdelkarim.chokri\Desktop\ELSA\Tools\wlp-webProfile7-17.0.0.4\wlp\usr\servers\defaultServer\logs\state\plugin-cfg.xml.
[08/11/18 14:15:28:602 CET] 0000002e com.ibm.ws.webcontainer.osgi.webapp.WebGroup I SRVE0169I: Loading Web Module: Connector-web.
[08/11/18 14:15:28:602 CET] 0000002e com.ibm.ws.webcontainer I SRVE0250I: Web Module Connector-web has been bound to default_host.
[08/11/18 14:15:28:603 CET] 0000002e com.ibm.ws.http.internal.VirtualHostImpl A CWWKT0016I: Web application available (default_host): http://localhost:9086/Connector-web/
[08/11/18 14:15:28:607 CET] 0000002e com.ibm.ws.app.manager.AppMessageHelper A CWWKZ0001I: Application Connector-web started in 5.668 seconds.
[08/11/18 14:15:28:963 CET] 00000032 com.ibm.ws.webcontainer.osgi.mbeans.PluginGenerator I SRVE9103I: A configuration file for a web server plugin was automatically generated for this server at C:\Users\abdelkarim.chokri\Desktop\ELSA\Tools\wlp-webProfile7-17.0.0.4\wlp\usr\servers\defaultServer\logs\state\plugin-cfg.xml.
[08/11/18 14:15:29:066 CET] 0000001f com.ibm.ws.session.WASSessionCore I SESN0176I: A new session context will be created for application key default_host/Connector-web
[08/11/18 14:15:29:067 CET] 0000001f com.ibm.ws.util I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
[08/11/18 14:15:31:183 CET] 00000019 com.ibm.ws.webcontainer.osgi.webapp.WebGroup I SRVE0169I: Loading Web Module: SoapApp0.
[08/11/18 14:15:31:183 CET] 00000019 com.ibm.ws.webcontainer I SRVE0250I: Web Module SoapApp0 has been bound to default_host.
[08/11/18 14:15:31:183 CET] 00000019 com.ibm.ws.http.internal.VirtualHostImpl A CWWKT0016I: Web application available (default_host): http://localhost:9086/SoapApp0/
[08/11/18 14:15:31:187 CET] 00000019 com.ibm.ws.app.manager.AppMessageHelper A CWWKZ0001I: Application SoapApp0 started in 8.259 seconds.
[08/11/18 14:15:31:319 CET] 00000018 com.ibm.ws.kernel.feature.internal.FeatureManager A CWWKF0012I: The server installed the following features: [servlet-3.1, beanValidation-1.1, ssl-1.0, jndi-1.0, jca-1.7, jms-2.0, ejbPersistentTimer-3.2, appSecurity-2.0, j2eeManagement-1.1, jdbc-4.1, jaxrs-2.0, wasJmsServer-1.0, javaMail-1.5, adminCenter-1.0, cdi-1.2, webProfile-7.0, jpa-2.1, jcaInboundSecurity-1.0, jsp-2.3, ejbLite-3.2, managedBeans-1.0, jsf-2.2, ejbHome-3.2, jaxws-2.2, localConnector-1.0, jsonp-1.0, restConnector-1.0, el-3.0, jaxrsClient-2.0, concurrent-1.0, appClientSupport-1.0, ejbRemote-3.2, javaee-7.0, jaxb-2.2, mdb-3.2, jacc-1.5, batch-1.0, ejb-3.2, json-1.0, jaspic-1.1, jpaContainer-2.1, distributedMap-1.0, websocket-1.1, wasJmsSecurity-1.0, wasJmsClient-2.0].
[08/11/18 14:15:31:319 CET] 00000018 com.ibm.ws.kernel.feature.internal.FeatureManager I CWWKF0008I: Feature update completed in 34.273 seconds.
[08/11/18 14:15:31:320 CET] 00000018 com.ibm.ws.kernel.feature.internal.FeatureManager A CWWKF0011I: The server defaultServer is ready to run a smarter planet.
[08/11/18 14:15:31:470 CET] 0000002d com.ibm.ws.session.WASSessionCore I SESN0176I: A new session context will be created for application key default_host/SoapApp0
[08/11/18 14:15:31:471 CET] 0000002d com.ibm.ws.util I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
[08/11/18 14:15:31:742 CET] 00000019 com.ibm.ws.webcontainer.osgi.mbeans.PluginGenerator I SRVE9103I: A configuration file for a web server plugin was automatically generated for this server at C:\Users\abdelkarim.chokri\Desktop\ELSA\Tools\wlp-webProfile7-17.0.0.4\wlp\usr\servers\defaultServer\logs\state\plugin-cfg.xml.
[08/11/18 14:15:31:961 CET] 0000002d com.ibm.ws.webcontainer.servlet I SRVE0242I: [SoapApp0] [/SoapApp0] [AdminServlet]: Initialization successful.
[08/11/18 14:15:34:040 CET] 0000001f com.ibm.ws.jca.internal.BootstrapContextImpl W J2CA8501E: Property portNumber of configuration element eis/ECI cannot be set because it is not found on the class com.eis.hw.ManagedConnectionFactoryImpl.
[08/11/18 14:15:34:135 CET] 0000001f com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl I CWRLS0010I: Performing recovery processing for local WebSphere server (defaultServer).
[08/11/18 14:15:37:437 CET] 0000001f com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl I CWRLS0012I: All persistent services have been directed to perform recovery processing for this WebSphere server (defaultServer).
[08/11/18 14:15:37:438 CET] 00000049 com.ibm.tx.jta.impl.RecoveryManager I WTRN0135I: Transaction service recovering no transactions.
[08/11/18 14:15:37:620 CET] 0000001f com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "java.lang.IllegalArgumentException: Can not set com.eis.hw.HelloWorldConnectionFactory field com.sample.TestRA.connectionFactory to com.eis.hw.HelloWorldConnectionFactoryImpl com.ibm.wsspi.injectionengine.InjectionTarget.inject 140" at ffdc_18.11.08_14.15.37.0.log
[08/11/18 14:15:38:379 CET] 0000001f com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "com.ibm.wsspi.injectionengine.InjectionException: CWNEN0074E: The com.eis.hw.HelloWorldConnectionFactoryImpl type of the object instance obtained for the java:comp/env/com.sample.TestRA/connectionFactory reference is incompatible with the type of the private com.eis.hw.HelloWorldConnectionFactory com.sample.TestRA.connectionFactory member. com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet 228" at ffdc_18.11.08_14.15.37.1.log
[08/11/18 14:15:38:380 CET] 0000001f com.ibm.ws.webcontainer.servlet E SRVE0319E: For the [com.sample.TestRA] servlet, com.sample.TestRA servlet class was found, but a resource injection failure has occurred. CWNEN0074E: The com.eis.hw.HelloWorldConnectionFactoryImpl type of the object instance obtained for the java:comp/env/com.sample.TestRA/connectionFactory reference is incompatible with the type of the private com.eis.hw.HelloWorldConnectionFactory com.sample.TestRA.connectionFactory member.
[08/11/18 14:15:38:986 CET] 0000001f com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "javax.servlet.UnavailableException: SRVE0319E: For the [com.sample.TestRA] servlet, com.sample.TestRA servlet class was found, but a resource injection failure has occurred. CWNEN0074E: The com.eis.hw.HelloWorldConnectionFactoryImpl type of the object instance obtained for the java:comp/env/com.sample.TestRA/connectionFactory reference is incompatible with the type of the private com.eis.hw.HelloWorldConnectionFactory com.sample.TestRA.connectionFactory member. com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest() 302" at ffdc_18.11.08_14.15.38.0.log
[08/11/18 14:15:39:081 CET] 0000001f com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "javax.servlet.UnavailableException: SRVE0319E: For the [com.sample.TestRA] servlet, com.sample.TestRA servlet class was found, but a resource injection failure has occurred. CWNEN0074E: The com.eis.hw.HelloWorldConnectionFactoryImpl type of the object instance obtained for the java:comp/env/com.sample.TestRA/connectionFactory reference is incompatible with the type of the private com.eis.hw.HelloWorldConnectionFactory com.sample.TestRA.connectionFactory member. com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter 144" at ffdc_18.11.08_14.15.38.1.log
[08/11/18 14:15:39:222 CET] 0000001f com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "javax.servlet.UnavailableException: SRVE0319E: For the [com.sample.TestRA] servlet, com.sample.TestRA servlet class was found, but a resource injection failure has occurred. CWNEN0074E: The com.eis.hw.HelloWorldConnectionFactoryImpl type of the object instance obtained for the java:comp/env/com.sample.TestRA/connectionFactory reference is incompatible with the type of the private com.eis.hw.HelloWorldConnectionFactory com.sample.TestRA.connectionFactory member. com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters 1064" at ffdc_18.11.08_14.15.39.0.log
[08/11/18 14:15:39:222 CET] 0000001f com.ibm.ws.webcontainer.webapp E SRVE0315E: An exception occurred: java.lang.Throwable: javax.servlet.UnavailableException: SRVE0319E: For the [com.sample.TestRA] servlet, com.sample.TestRA servlet class was found, but a resource injection failure has occurred. CWNEN0074E: The com.eis.hw.HelloWorldConnectionFactoryImpl type of the object instance obtained for the java:comp/env/com.sample.TestRA/connectionFactory reference is incompatible with the type of the private com.eis.hw.HelloWorldConnectionFactory com.sample.TestRA.connectionFactory member.
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:5006)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.handleRequest(DynamicVirtualHost.java:314)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:995)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:279)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:957)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:357)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:316)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:499)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:433)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:313)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:284)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:165)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:74)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:501)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:571)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:926)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1015)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.servlet.UnavailableException: SRVE0319E: For the [com.sample.TestRA] servlet, com.sample.TestRA servlet class was found, but a resource injection failure has occurred. CWNEN0074E: The com.eis.hw.HelloWorldConnectionFactoryImpl type of the object instance obtained for the java:comp/env/com.sample.TestRA/connectionFactory reference is incompatible with the type of the private com.eis.hw.HelloWorldConnectionFactory com.sample.TestRA.connectionFactory member.
at com.ibm.ws.webcontainer.servlet.ServletWrapper$1.run(ServletWrapper.java:1602)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:1503)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:587)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:440)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:143)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
at com.ibm.ws.security.jaspi.JaspiServletFilter.doFilter(JaspiServletFilter.java:56)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:86)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:995)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1124)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1004)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1414)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:171)
at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:790)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:143)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
at com.ibm.ws.security.jaspi.JaspiServletFilter.doFilter(JaspiServletFilter.java:56)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:86)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:995)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1124)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4962)
... 19 more
Please help me to solve this problem or at least to debug this issue to proceed further. There is no much information in Google as well since I'm trying to use IBM Liberty.
Looking at the log I see the following issues:
J2CA8501E: Property portNumber of configuration element eis/ECI cannot be set because it is not found on the class com.eis.hw.ManagedConnectionFactoryImpl.
looks like configuration/implementation issue
and
CWNEN0074E: The com.eis.hw.HelloWorldConnectionFactoryImpl type of the object
instance obtained for the java:comp/env/com.sample.TestRA/connectionFactory reference is
incompatible with the type of the private com.eis.hw.HelloWorldConnectionFactory
com.sample.TestRA.connectionFactory member.
So you have some classloader issues, make sure you dont have any resource adapter related classes in the application itself, as jar/rar included in WEB-INF/lib or anywhere else.
Related
I was following one of the tutorials from WSO2's learning website and tried to setup the Analytics server 3.1.0 with APIM 3.1.0. I followed the below sequence of starting the servers.
APIM Analytics worker profile
APIM server
APIM Analytics dashboard profile
The APIM Analytics worker profile and the APIM server started without any issue.
But on starting the Analytics dashboard profile, I am getting the below error though i can see message at the last that APIM Analytics Server started.
**ERROR** {msf4j-core} - [SCR] Error while trying to bind reference Reference[name = microservice, interface = org.wso2.msf4j.Microservice, policy = dynamic, cardinality = 0..n, target = null, bind = addService, unbind = removeService]
Details:
Problematic reference = Reference[name = microservice, interface = org.wso2.msf4j.Microservice, policy = dynamic, cardinality = 0..n, target = null, bind = addService, unbind = removeService]
of service component = org.wso2.msf4j.internal.MicroServicesServerSC
component implementation class = org.wso2.msf4j.internal.MicroservicesServerSC
located in bundle with symbolic name = msf4j-core
bundle location = reference:file:../lib/plugins/msf4j-core_2.7.7.jar java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:376)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:444)
at org.eclipse.equinox.internal.ds.InstanceProcess.dynamicBind(InstanceProcess.java:416)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:334)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:915)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:999)
at org.wso2.carbon.uiserver.internal.deployment.msf4j.MicroservicesRegistrar.register(MicroservicesRegistrar.java:154)
at org.wso2.carbon.uiserver.internal.deployment.msf4j.MicroservicesRegistrar.lambda$register$3(MicroservicesRegistrar.java:144)
at org.wso2.carbon.uiserver.internal.deployment.msf4j.MicroservicesRegistrar$$Lambda$282.00000000160C0730.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1556)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:496)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:486)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.wso2.carbon.uiserver.internal.deployment.msf4j.MicroservicesRegistrar.register(MicroservicesRegistrar.java:145)
at org.wso2.carbon.uiserver.internal.deployment.listener.AppTransportBinder.appDeploymentEvent(AppTransportBinder.java:76)
at org.wso2.carbon.uiserver.internal.io.deployment.ArtifactAppDeployer.publishAppDeploymentEvent(ArtifactAppDeployer.java:154)
at org.wso2.carbon.uiserver.internal.io.deployment.ArtifactAppDeployer.deploy(ArtifactAppDeployer.java:103)
at org.wso2.carbon.deployment.engine.internal.DeploymentEngine.lambda$deployArtifacts$0(DeploymentEngine.java:291)
at org.wso2.carbon.deployment.engine.internal.DeploymentEngine$$Lambda$237.0000000015F30F90.accept(Unknown Source)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.wso2.carbon.deployment.engine.internal.DeploymentEngine.deployArtifacts(DeploymentEngine.java:282)
at org.wso2.carbon.deployment.engine.internal.RepositoryScanner.sweep(RepositoryScanner.java:112)
at org.wso2.carbon.deployment.engine.internal.RepositoryScanner.scan(RepositoryScanner.java:68)
at org.wso2.carbon.deployment.engine.internal.DeploymentEngine.start(DeploymentEngine.java:121)
at org.wso2.carbon.deployment.engine.internal.DeploymentEngineListenerComponent.onAllRequiredCapabilitiesAvailable(DeploymentEngineListenerComponent.java:216)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.lambda$notifySatisfiableComponents$7(StartupComponentManager.java:266)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager$$Lambda$159.0000000013DAFD90.accept(Unknown Source)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.notifySatisfiableComponents(StartupComponentManager.java:252)
at org.wso2.carbon.kernel.internal.startupresolver.StartupOrderResolver$1.run(StartupOrderResolver.java:204)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.NoClassDefFoundError: org.wso2.msf4j.util.RuntimeAnnotations (initialization failure)
at java.lang.J9VMInternals.initializationAlreadyFailed(J9VMInternals.java:96)
at org.wso2.msf4j.internal.MicroservicesServerSC.addMicroserviceToRegistry(MicroservicesServerSC.java:421)
at org.wso2.msf4j.internal.MicroservicesServerSC.addService(MicroservicesServerSC.java:108)
... 49 more
Caused by: java.lang.IllegalStateException: java.lang.ClassNotFoundException: java.lang.Class$Atomic
at org.wso2.msf4j.util.RuntimeAnnotations.<clinit>(RuntimeAnnotations.java:110)
at org.wso2.msf4j.internal.MicroservicesServerSC.addMicroserviceToRegistry(MicroservicesServerSC.java:421)
at org.wso2.msf4j.internal.MicroservicesServerSC.addService(MicroservicesServerSC.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
... 48 more
Caused by: java.lang.ClassNotFoundException: java.lang.Class$Atomic
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:332)
at org.wso2.msf4j.util.RuntimeAnnotations.<clinit>(RuntimeAnnotations.java:58)
... 52 more
[2020-07-22 21:36:30,653] INFO {org.wso2.carbon.uiserver.internal.deployment.listener.AppTransportBinder} - Web app 'policies' is available at 'https://10.184.69.117:9643/policies'.
[2020-07-22 21:36:30,662] INFO {org.wso2.carbon.kernel.internal.CarbonStartupHandler} - **WSO2 API Manager Analytics Server started in 10.285 sec**
And, when I try to open the link : https://localhost:9643/analytics-dashboard/ , it gives an error which says: "Problem accessing: /analytics-dashboard/. Reason: Not Found".
Need help with this issue.
What version of Java are you using?
According to the error, you are looking for a class that does not exist, it may be a standard class that only has one version, I recommend using Java 11 for this version.
We are hosting a web service (JAX-WS) exposing services via Apache CXF 3.0.1. We have deployed it successfully on IBM WebSphere v8.5.5.5 with the following suggestions:
Class loading is set to PARENT_LAST = true
DisableIBMJAXWSEngine = true
An excerpt from the bean definition file is as follows:
<jaxws:endpoint id="VPMSWebService"
implementor="com.xxxxx.CustomServiceImpl" address="/vWebService">
<jaxws:features>
<wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing" />
</jaxws:features>
<jaxws:properties>
<entry key="jaxb-validation-event-handler">
<bean class="com.xxxxx.CXFValidationEventHandler" />
</entry>
</jaxws:properties>
<jaxws:inInterceptors>
<bean class="com.xxxxxx.IncomingAuthenticationInterceptor"/>
</jaxws:inInterceptors>
<jaxws:inFaultInterceptors>
<bean class="com.xxxxx.IncomingAuthenticationFaultInterceptor"/>
</jaxws:inFaultInterceptors>
<jaxws:handlers>
<bean class="com.xxxxxxx.interceptors.AuthenticationHandler"/>
</jaxws:handlers>
</jaxws:endpoint>
Basic Authentication is being introduced in a declarative manner inside the deployment descriptor as follows:
<security-constraint>
<web-resource-collection>
<web-resource-name>web service resource</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>SvcLayerUser</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-role>
<role-name>SvcLayerUser</role-name>
</security-role>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Authentication</realm-name>
</login-config>
When the service is invoked using SOAPUI as a client with correct username/password pair, the invocation is normal and proper SOAP response is returned to the calling program. If the issue lies with the XML, SOAP Fault is returned respectively. With Debugging ON, we can navigate the complete flow of the application.
Problem arises when we pass either a wrong username or wrong password. Then the WebSphere container simply handles the authentication, passes a 401 HTTP status code to SOAPUI with no contents. None of the CXF based interceptors or handlers ever get invoked.
[9/18/18 4:23:05:439 EDT] 00000082 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on E:\WAS8.5\IBM\WebSphere\AppServer\profiles\AppSrv20\logs\ffdc\server1_4c0ec188_18.09.18_04.23.05.3929133721879993856345.txt com.ibm.websphere.security.PasswordCheckFailedException 190
[9/18/18 4:23:05:454 EDT] 00000082 DMAdapter I com.ibm.ws.ffdc.impl.DMAdapter getAnalysisEngine FFDC1009I: Analysis Engine using data base: E:\WAS8.5\IBM\WebSphere\AppServer\properties\logbr\ffdc\adv\ffdcdb.xml
[9/18/18 4:23:05:470 EDT] 00000082 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on E:\WAS8.5\IBM\WebSphere\AppServer\profiles\AppSrv20\logs\ffdc\server1_4c0ec188_18.09.18_04.23.05.3924076528169475779324.txt com.ibm.ws.security.ltpa.LTPAServerObject.authenticate 1020
[9/18/18 4:23:05:470 EDT] 00000082 LTPAServerObj E SECJ0369E: Authentication failed when using LTPA. The exception is com.ibm.websphere.wim.exception.PasswordCheckFailedException: CWWIM4513E The password match failed for the 'bob' principal name..
[9/18/18 4:23:05:485 EDT] 00000082 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on E:\WAS8.5\IBM\WebSphere\AppServer\profiles\AppSrv20\logs\ffdc\server1_4c0ec188_18.09.18_04.23.05.4701707172482039548991.txt com.ibm.websphere.security.auth.WSLoginFailedException 250
[9/18/18 4:23:05:485 EDT] 00000082 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on E:\WAS8.5\IBM\WebSphere\AppServer\profiles\AppSrv20\logs\ffdc\server1_4c0ec188_18.09.18_04.23.05.4703645264312534190424.txt com.ibm.ws.security.server.lm.ltpaLoginModule.login 452
[9/18/18 4:23:05:485 EDT] 00000082 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on E:\WAS8.5\IBM\WebSphere\AppServer\profiles\AppSrv20\logs\ffdc\server1_4c0ec188_18.09.18_04.23.05.4859153488925589622788.txt com.ibm.ws.security.server.lm.wsMapDefaultInboundLoginModule.login 860
[9/18/18 4:23:05:501 EDT] 00000082 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on E:\WAS8.5\IBM\WebSphere\AppServer\profiles\AppSrv20\logs\ffdc\server1_4c0ec188_18.09.18_04.23.05.4853176694169720358643.txt com.ibm.ws.security.auth.JaasLoginHelper.jaas_login 503
[9/18/18 4:23:05:501 EDT] 00000082 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on E:\WAS8.5\IBM\WebSphere\AppServer\profiles\AppSrv20\logs\ffdc\server1_4c0ec188_18.09.18_04.23.05.5012191986958630799174.txt com.ibm.ws.security.auth.ContextManagerImpl.login 4948
[9/18/18 4:23:05:641 EDT] 00000082 LTPAServerObj E SECJ0369E: Authentication failed when using LTPA. The exception is com.ibm.websphere.wim.exception.PasswordCheckFailedException: CWWIM4513E The password match failed for the 'bob' principal name..
Ffdc log file has
[9/18/18 4:23:05:470 EDT] FFDC Exception:com.ibm.websphere.security.auth.WSLoginFailedException SourceId:com.ibm.ws.security.server.lm.ltpaLoginModule.login ProbeId:452 Reporter:com.ibm.ws.security.server.lm.ltpaLoginModule#a2cacf0e
com.ibm.websphere.wim.exception.PasswordCheckFailedException: CWWIM4513E The password match failed for the 'bob' principal name.
at com.ibm.ws.wim.adapter.file.was.FileAdapter.login(FileAdapter.java:2455)
at com.ibm.ws.wim.ProfileManager.loginImpl(ProfileManager.java:3859)
at com.ibm.ws.wim.ProfileManager.genericProfileManagerMethod(ProfileManager.java:360)
at com.ibm.ws.wim.ProfileManager.login(ProfileManager.java:468)
at com.ibm.websphere.wim.ServiceProvider.login(ServiceProvider.java:545)
at com.ibm.ws.wim.registry.util.LoginBridge.checkPassword(LoginBridge.java:194)
at com.ibm.ws.wim.registry.WIMUserRegistry$1.run(WIMUserRegistry.java:270)
at com.ibm.ws.wim.registry.WIMUserRegistry$1.run(WIMUserRegistry.java:262)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5554)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5680)
at com.ibm.ws.wim.security.authz.jacc.JACCSecurityManager.runAsSuperUser(JACCSecurityManager.java:438)
at com.ibm.ws.wim.env.was.JACCAuthorizationService.runAsSuperUser(JACCAuthorizationService.java:1086)
at com.ibm.ws.wim.security.authz.ProfileSecurityManager.runAsSuperUser(ProfileSecurityManager.java:285)
at com.ibm.ws.wim.registry.WIMUserRegistry.checkPassword(WIMUserRegistry.java:261)
at com.ibm.ws.security.registry.UserRegistryImpl.checkPassword(UserRegistryImpl.java:394)
at com.ibm.ws.security.ltpa.LTPAServerObject.authenticate(LTPAServerObject.java:997)
at com.ibm.ws.security.server.lm.ltpaLoginModule.login(ltpaLoginModule.java:660)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:781)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:215)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:706)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:704)
at java.security.AccessController.doPrivileged(AccessController.java:488)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:703)
at javax.security.auth.login.LoginContext.login(LoginContext.java:609)
at com.ibm.ws.security.auth.JaasLoginHelper.jaas_login(JaasLoginHelper.java:491)
at com.ibm.ws.security.auth.ContextManagerImpl.login(ContextManagerImpl.java:4892)
at com.ibm.ws.security.auth.ContextManagerImpl.login(ContextManagerImpl.java:4494)
at com.ibm.ws.security.auth.ContextManagerImpl.login(ContextManagerImpl.java:4490)
at com.ibm.ws.security.web.WebAuthenticator.basicAuthenticate(WebAuthenticator.java:3722)
at com.ibm.ws.security.web.WebAuthenticator.handleBasicAuth(WebAuthenticator.java:2869)
at com.ibm.ws.security.web.WebAuthenticator.authenticate(WebAuthenticator.java:3235)
at com.ibm.ws.security.web.WebCollaborator.SetAuthenticatedSubjectIfNeeded(WebCollaborator.java:3232)
at com.ibm.ws.security.web.WebCollaborator.authorize(WebCollaborator.java:716)
at com.ibm.ws.security.web.EJSWebCollaborator.preInvoke(EJSWebCollaborator.java:446)
at com.ibm.ws.webcontainer.collaborator.WebAppSecurityCollaboratorImpl.preInvoke(WebAppSecurityCollaboratorImpl.java:230)
at com.ibm.wsspi.webcontainer.collaborator.CollaboratorHelper.preInvokeCollaborators(CollaboratorHelper.java:436)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1089)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4028)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1016)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Main Questions are:
How come our CXF based components are not getting invoked when an
exception happens for bad username or bad password? Why WebSphere
container raises an exception and return controls back to caller
directly?
What changes we should make on our EAR to handle the above WAS
container exception so we can make it a detailed SOAP fault and
return to the caller with more information?
As you are doing the basic authentication, it is checked at server infrastructure even before it reaches webcontainer, and since container already knows that your user is not authenticated, it doesn't even call web service engine.
You would need to customize login process to intercept that request (e.g custom login module), or implement whole login logic in your handler (e.g. calling WSLogin), both are too broad to discussed here.
For a start you can check this page Advanced authentication in WebSphere Application Server
Both are complex solutions, so I'd strongly advise against it, as currently, you are returning clear message that request was not authenticated any way, and as it is WS call, you really dont need to provide any custom, human readable message for that. Moreover, revealing more details "why authentication failed" weakens your security, gives more information to the attacker and is in general not recommended.
I have an application migrating from Java 5 to Java 7 and Websphere 6 to 8.5.
This application have some web services developed through AXIS2 1.3.
When launching in Websphere the ear give me this error.
[] 00000088 WarBasedAxisC I org.apache.axis2.deployment.WarBasedAxisConfigurator <init> Could not find axis2.xml, loading default org/apache/axis2/deployment/axis2_default.xml from classpath
[] 00000088 DeploymentEng I org.apache.axis2.deployment.DeploymentEngine prepareRepository No modules directory was found under /apps/WebSphere85/profiles/node/installedApps/s00va9943461Network/NAME.ear/a_NAME.war/WEB-INF.
[] 00000088 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper init Uncaught.init.exception.thrown.by.servlet
[] 00000088 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /apps/WebSphere85/profiles/node/logs/ffdc/sa-iNAME-biz-1_83a50d9f_15.12.22_13.03.50.8155934160160475396565.txt com.ibm.ws.webcontainer.servlet.ServletWrapperImpl 272
[] 00000088 WarBasedAxisC I org.apache.axis2.deployment.WarBasedAxisConfigurator <init> Could not find axis2.xml, loading default org/apache/axis2/deployment/axis2_default.xml from classpath
[] 00000088 DeploymentEng I org.apache.axis2.deployment.DeploymentEngine prepareRepository No modules directory was found under /apps/WebSphere85/profiles/node/installedApps/s00va9943461Network/NAME.ear/a_NAME.war/WEB-INF.
[] 00000088 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper init Uncaught.init.exception.thrown.by.servlet
[] 00000088 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /apps/WebSphere85/profiles/node/logs/ffdc/sa-iNAME-biz-1_83a50d9f_15.12.22_13.03.50.8778098661991316840273.txt com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter 82
[] 00000088 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /apps/WebSphere85/profiles/node/logs/ffdc/sa-iNAME-biz-1_83a50d9f_15.12.22_13.03.50.8947148831197547706091.txt com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters -SE 1078
[] 00000088 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[AxisServlet]: java.lang.NoClassDefFoundError: org.apache.woden.resolver.URIResolver
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:93)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:170)
at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:62)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:815)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:391)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:144)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:283)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:569)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:457)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:342)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:634)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3923)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:986)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by: java.lang.ClassNotFoundException: org.apache.woden.resolver.URIResolver
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:703)
... 42 more
What I've tried:
Set the parent last parameter in WebSphere
Rebuilding ear and webservices
The services are deployed on was6 (evidently application not working because was6 doesn't support java 7)
Tomcat run war without any problems.
Probably in websphere is configured JAX-WS/AXIS2 1.3 is correct with websphere 8.5? I've supposed that is related to the axis2 version because this error happen in [Axis Servlet].
I'm a newbie on Websphere, but I have the necessity to make working this ear, thank you for help.
Mine deployement.xml:
<?xml version="1.0" encoding="UTF-8"?>
<appdeployment:Deployment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:appdeployment="http://www.ibm.com/websphere/appserver/schemas/5.0/appdeployment.xmi" xmi:id="Deployment_1449152598274">
<deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1449152598274" deploymentId="0" startingWeight="1" binariesURL="$(APP_INSTALL_ROOT)/s0000000001Network/App_NAME.ear" useMetadataFromBinaries="false" enableDistribution="true" createMBeansForResources="true" reloadEnabled="false" appContextIDForSecurity="href:s00000000001Network/App_NAME" filePermission=".*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755" allowDispatchRemoteInclude="false" allowServiceRemoteInclude="false" asyncRequestDispatchType="DISABLED" standaloneModule="false" enableClientModule="false">
<targetMappings xmi:id="DeploymentTargetMapping_1449152598274" enable="true" target="ServerTarget_1449152598274"/>
<targetMappings xmi:id="DeploymentTargetMapping_1449152598275" enable="true" target="ServerTarget_1449152598275"/>
<classloader xmi:id="Classloader_1449152598274" mode="PARENT_FIRST"/>
<modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1449152598274" deploymentId="1" startingWeight="10000" uri="APP_NAME.war" containsEJBContent="0">
<targetMappings xmi:id="DeploymentTargetMapping_1449152598276" target="ServerTarget_1449152598274"/>
<targetMappings xmi:id="DeploymentTargetMapping_1449152598277" target="ServerTarget_1449152598275"/>
<classloader xmi:id="Classloader_1449152598275"/>
</modules>
<properties xmi:id="Property_1449152598274" name="metadata.complete" value="true"/>
</deployedObject>
<deploymentTargets xmi:type="appdeployment:ServerTarget" xmi:id="ServerTarget_1449152598274" name="sa-App_NAME-biz-1" nodeName="s00000000001"/>
<deploymentTargets xmi:type="appdeployment:ServerTarget" xmi:id="ServerTarget_1449152598275" name="sw-App_NAME-biz-1" nodeName="s00000000001"/>
</appdeployment:Deployment>
Class Loader correctly setted
If you are bundling axis2 engine with your application, you have to disable WebSphere JAX-WS runtime. You need to :
configure your web moudle to PARENT LAST classloader
set DisableIBMJAXWSEngine: true in the META-INF/MANIFEST.MF of a WAR file
Or migrate your application to use web service engine provided by WAS 8.5.5 (which supports JAX-WS).
For more details check - Using a third-party JAX-WS web services engine
I getting error below while deploying the Web service war file in Websphere 7. This web service war file is created using Axis2 and contain a Very basic Service (Hello World!). Can some one point me what could be issue?
[6/25/14 17:10:42:132 IST] 0000000f SystemOut O [ERROR] loading constraint violation: loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader#679e679e" previously initiated loading for a different type with name "org/apache/axiom/soap/SOAPFactory" defined by loader "com/ibm/ws/classloader/CompoundClassLoader#71817181"
java.lang.LinkageError: loading constraint violation: loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader#679e679e" previously initiated loading for a different type with name "org/apache/axiom/soap/SOAPFactory" defined by loader "com/ibm/ws/classloader/CompoundClassLoader#71817181"
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:265)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:160)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:520)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:451)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassName(ClasspathManager.java:430)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:334)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:386)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:347)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:154)
at org.apache.rampart.RampartMessageData.(RampartMessageData.java:270)
at org.apache.rampart.RampartEngine.process(RampartEngine.java:60)
at org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
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:262)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
Refer the this article which has details about running Axis2 and resolving error in Websphere with Axis2
http://zacktutorials.blogspot.ca/2014/04/axis2-installation-in-websphere-80-to.html
Problem: java.lang.VerifyError: class loading constraint violated (class: org/apache/xerces/dom/CoreDocumentImpl method: getDomConfig()Lorg/w3c/dom/DOMConfiguration;) at pc: 0
Solution : (FIX for "java.lang.VerifyError: JVMVRFY013 class loading constraint violated" )
In the xmlbeans-2.3.0.jar à remove org.dom package
http://www-01.ibm.com/support/docview.wss?uid=nas8N1011249
I'm developing a sample application with Google App Engine over Java that uses Web Services.
Everything works well when I work in the local enviroment, the server service is deployed in my google account and the client is deployed in my local environment.
The problem comes when I deploy the application on Google App Engine and try to execute it. An exception occurs when the backing bean tries to create an instance of the server client:
This is the exception I get:
javax.el.ELException: /home.xhtml at line 20 and column 64 action="#{bergeData.obtenerListado}": java.lang.ExceptionInInitializerError
Caused by:
java.security.AccessControlException - access denied ("java.lang.RuntimePermission" "getClassLoader")
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:370)
at java.lang.Class.newInstance(Class.java:323)
at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:49)
at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:134)
at javax.xml.ws.spi.Provider.provider(Provider.java:127)
at javax.xml.ws.Service.<init>(Service.java:77)
at com.beeva.client.gen.AutomovilServerAPIService.<init>(AutomovilServerAPIService.java:46)
at com.beeva.controller.AutomovilServletClient.<init>(AutomovilServletClient.java:35)
at com.beeva.gae.BergeData.obtenerListado(BergeData.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:45)
at org.apache.el.parser.AstValue.invoke(AstValue.java:191)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at org.apache.myfaces.view.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:83)
at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:88)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:100)
at javax.faces.component.UICommand.broadcast(UICommand.java:120)
at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:937)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:271)
at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1249)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:675)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:34)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:171)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:480)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:487)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:774)
at com.google.tracing.TraceContext$DoInTraceContext.runInContext(TraceContext.java:751)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:342)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:334)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:484)
... 1 more
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")
at com.google.appengine.runtime.Request.process-98b41701563e1bbd(Request.java)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:375)
at java.security.AccessController.checkPermission(AccessController.java:564)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1479)
at com.sun.xml.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:519)
at com.sun.xml.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:58)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:249)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:100)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:81)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:209)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:95)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:81)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:315)
at com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:92)
at com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:69)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:58)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:51)
at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:74)
at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:77)
at java.util.AbstractList$Itr.next(AbstractList.java:358)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:255)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:100)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:81)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:209)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:95)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:81)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:315)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:330)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:466)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:302)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1140)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:253)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:240)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:440)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:637)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:220)
at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:218)
at java.security.AccessController.doPrivileged(AccessController.java:34)
at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:217)
at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88)
... 55 more
`
The trace of the exception starts in this line of code:
AutomovilServletClient clienteService = new AutomovilServletClient();
AutomovilServletClient has a constructor which initializes the API service:
public AutomovilServletClient() {
this.automovilAPI = new AutomovilServerAPIService().getAutomovilServerAPIPort();
}
First goes to the constructor of AutomovilServerAPIService:
#WebServiceClient(name = "AutomovilServerAPIService", targetNamespace = "http://server.beeva.com/", wsdlLocation = "http://1.XXXX.appspot.com/AutomovilServerAPIService.wsdl")
public class AutomovilServerAPIService
extends Service
{
private final static URL AUTOMOVILSERVERAPISERVICE_WSDL_LOCATION;
private final static Logger logger = Logger.getLogger(com.beeva.client.gen.AutomovilServerAPIService.class.getName());
static {
URL url = null;
try {
URL baseUrl;
baseUrl = com.beeva.client.gen.AutomovilServerAPIService.class.getResource(".");
url = new URL(baseUrl, "http://1.XXXX.appspot.com/AutomovilServerAPIService.wsdl");
} catch (MalformedURLException e) {
logger.warning("Failed to create URL for the wsdl Location: 'http://1.XXXX.appspot.com/AutomovilServerAPIService.wsdl', retrying as a local file");
logger.warning(e.getMessage());
}
AUTOMOVILSERVERAPISERVICE_WSDL_LOCATION = url;
}
public AutomovilServerAPIService() {
super(AUTOMOVILSERVERAPISERVICE_WSDL_LOCATION, new QName("http://server.beeva.com/", "AutomovilServerAPIService"));
}
}
In the method AutomovilServerAPIService() is where I lose track of the execution. I have checked the content of the constant AUTOMOVILSERVERAPISERVICE_WSDL_LOCATION and it's correct.
Anyone has an idea of why it happens when it is deployed up to Google App Engine?
Thanks in advance
UPDATE: Trying the SOAP example of Google Developers I have found that the problem comes with use of Java Server Faces Servlet. My project is a Google Web Application Project with JSF capabilities. So this line in the web.xml is what causes the problem:
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
However, I have no idea how to fix it :(
UPDATE 2:
SOLVED!! I have found that the problem is a incompatiblity of GAE with Apache MyFaces JSF-Core 2.0. When adding JSF Capabilities via properties/Project Facets, select JSF 2.0 (Mojarra 2.Z.X-FCS) instead of Apache MyFaces
I tried example at https://developers.google.com/appengine/articles/soap and it is working both locally and online.
The changes i made before online deployment were:
For Server application changed url in wsdl file
For client application changed url in SOAPService.java
I think second change you have already done.
Can you confirm whether you have updated WSDL file before deploying online?
<service name="TestSOAPService">
<port name="TestSOAPPort" binding="tns:TestSOAPPortBinding">
<soap:address location="**http://CHANGE_TO_ONLINEID.appspot.com**/testsoap"/>
</port>
</service>