[JBoss AS Documentation] - How can I resolve "org.apache.cxf.service.factory.ServiceConstructionException"?
by Carlos Bejarano
Carlos Bejarano [https://community.jboss.org/people/cbejarano] created the discussion
"How can I resolve "org.apache.cxf.service.factory.ServiceConstructionException"?"
To view the discussion, visit: https://community.jboss.org/message/783338#783338
--------------------------------------------------------------
Hi,
I am using Jboss 6.1.0 Final and Jboss-cxf 3.4.1 GA...
I have problems with my application(this app consume a WS to send SMS), but when I run it, the console show this:
Here my console output:
[#|Preparing to sms send. Subscriber: 340677]
URL WSDL :::> http://192.168.164.153:8011/platform/MessagingService?WSDL http://192.168.164.153:8011/platform/MessagingService?WSDL
-- Enviar SMS a Destino -- 50494540128
Inicializar Servicio :::> http://192.168.164.153:8011/platform/MessagingService?WSDL http://192.168.164.153:8011/platform/MessagingService?WSDL
Estado Servicio :::> hn.com.tigo.corporatesms.negocio.wsclient.MessagingServiceHttpBindingQSService@545eb748
hn.com.tigo.corporatesms.negocio.wsclient.SendMessageTechnicalExceptionMsg: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:332)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:317)
at javax.xml.ws.Service.getPort(Unknown Source)
at hn.com.tigo.corporatesms.negocio.wsclient.MessagingServiceHttpBindingQSService.getMessagingServiceHttpBindingQSPort(MessagingServiceHttpBindingQSService.java:61)
at hn.com.tigo.corporatesms.negocio.wsclient.facade.SendSMSWSClientFacade.sendSMS(SendSMSWSClientFacade.java:79)
at hn.com.tigo.corporatesms.negocio.wsclient.facade.SendSMSWSClientFacade.sendSMSToMSISDN(SendSMSWSClientFacade.java:136)
at hn.com.tigo.corporatesms.negocio.sms.SendSMS.send(SendSMS.java:120)
at hn.com.tigo.corporatesms.negocio.sms.SendSMS.send(SendSMS.java:98)
at hn.com.tigo.corporatesms.negocio.motor.tarea.TareaMotor02.sendSubscriberList(TareaMotor02.java:324)
at hn.com.tigo.corporatesms.negocio.motor.tarea.TareaMotor02.doTask(TareaMotor02.java:256)
at hn.com.tigo.corporatesms.negocio.motor.tarea.TareaMotor02.ejecutarTarea(TareaMotor02.java:91)
at hn.com.tigo.corporatesms.negocio.timer.TareaGeneral.run(TareaGeneral.java:132)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:97)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:117)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:124)
at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:463)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:330)
... 12 more
Caused by: org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/ws/2004/09/policy http://schemas.xmlsoap.org/ws/2004/09/policy registered.
at org.apache.cxf.binding.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:120)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:115)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
... 16 more
[#|SMS not sended]
and here my client code:
private GeneralResponse sendSMS(MobileMessage pMobileMessage)
throws SendMessageTechnicalExceptionMsg {
try {
System.out.println("Inicializar Servicio :::> " + this.urlWSDL);
MessagingServiceHttpBindingQSService servicio = new MessagingServiceHttpBindingQSService(
new URL(this.urlWSDL));
System.out.println("Estado Servicio :::> " + servicio);
MessagingService port = servicio
.getMessagingServiceHttpBindingQSPort(); // and this point my code dies
Map<String, Object> ctx = ((BindingProvider) port)
.getRequestContext();
ctx.put("ws-security.username", userName);
ctx.put("ws-security.password", password);
System.out.println("Port :::> " + port);
printXMLRequest(pMobileMessage);
GeneralResponse response = port.sendMessage(pMobileMessage);
printXMLResponse(response);
return response;
} catch (MalformedURLException ex) {
SendMessageTechnicalExceptionMsg sendEX = new SendMessageTechnicalExceptionMsg(
ex.getMessage(), ex.getCause());
sendEX.setStackTrace(ex.getStackTrace());
throw sendEX;
} catch (Exception e) {
SendMessageTechnicalExceptionMsg sendEX = new SendMessageTechnicalExceptionMsg(
e.getMessage(), e.getCause());
sendEX.setStackTrace(e.getStackTrace());
throw sendEX;
}
}
the next code is from MessagingServiceHttpBindingQSService class, where the code explodes in the method getMessagingServiceHttpBindingQSPort
/*
*
*/
package hn.com.tigo.corporatesms.negocio.wsclient;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
/**
* This class was generated by Apache CXF 2.3.1
* Wed Sep 14 12:03:15 CST 2011
* Generated source version: 2.3.1
*
*/
@WebServiceClient(name = "MessagingServiceHttpBindingQSService",
wsdlLocation = "http://osb.celtel.net:8001/platform/MessagingService?wsdl",
targetNamespace = "http://tigo.hn/platform/messaging")
public class MessagingServiceHttpBindingQSService extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://tigo.hn/platform/messaging", "MessagingServiceHttpBindingQSService");
public final static QName MessagingServiceHttpBindingQSPort = new QName("http://tigo.hn/platform/messaging", "MessagingServiceHttpBindingQSPort");
static {
URL url = null;
try {
url = new URL("http://osb.celtel.net:8001/platform/MessagingService?wsdl");
} catch (MalformedURLException e) {
System.err.println("Can not initialize the default wsdl from http://osb.celtel.net:8001/platform/MessagingService?wsdl");
// e.printStackTrace();
}
WSDL_LOCATION = url;
}
public MessagingServiceHttpBindingQSService(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}
public MessagingServiceHttpBindingQSService(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public MessagingServiceHttpBindingQSService() {
super(WSDL_LOCATION, SERVICE);
}
/**
*
* @return
* returns MessagingService
*/
@WebEndpoint(name = "MessagingServiceHttpBindingQSPort")
public MessagingService getMessagingServiceHttpBindingQSPort() {
return super.getPort(MessagingServiceHttpBindingQSPort, MessagingService.class); //Other point with problems
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns MessagingService
*/
@WebEndpoint(name = "MessagingServiceHttpBindingQSPort")
public MessagingService getMessagingServiceHttpBindingQSPort(WebServiceFeature... features) {
return super.getPort(MessagingServiceHttpBindingQSPort, MessagingService.class, features);
}
}
Thanks a lot for your help
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/783338#783338]
Start a new discussion in JBoss AS Documentation at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - Security Exception, org.drools.base.evaluators.EqualityEvaluatorsDefinition, signer information
by Megan Woods
Megan Woods [https://community.jboss.org/people/mwtoll] created the discussion
"Security Exception, org.drools.base.evaluators.EqualityEvaluatorsDefinition, signer information"
To view the discussion, visit: https://community.jboss.org/message/783176#783176
--------------------------------------------------------------
Hi,
Normally we work with the commercial API however in this instance I am reviewing JBPM-5.4.0
I am getting the following security exception when I try to load a package from Guvnor.
Libraries used in test application: *JBPM-5.4.0.Final-bin.zip*
Guvnor: *jbpm-5.4.0.Final-installer-full.zip*
Cheers Megan Woods
Exception in thread "main" java.lang.SecurityException: class "org.drools.base.evaluators.EqualityEvaluatorsDefinition"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:258)
at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
at org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.drools.base.evaluators.EvaluatorRegistry.addEvaluatorDefinition(EvaluatorRegistry.java:132)
at org.drools.compiler.PackageBuilderConfiguration.buildEvaluatorRegistry(PackageBuilderConfiguration.java:550)
at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:196)
at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:170)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:300)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:228)
at org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilder(KnowledgeBuilderFactoryServiceImpl.java:34)
at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:46)
at org.tollgroup.cl.jBPM.guvnor.experiment.Main.linearProcess(Main.java:48)
at org.tollgroup.cl.jBPM.guvnor.experiment.Main.<init>(Main.java:42)
at org.tollgroup.cl.jBPM.guvnor.experiment.Main.main(Main.java:37)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/783176#783176]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[IronJacamar] - Jackrabbit shows 'Destroying connection that could not successfully matched' warnings and runs out of connections
by Marcus Bauer
Marcus Bauer [https://community.jboss.org/people/mabako] created the discussion
"Jackrabbit shows 'Destroying connection that could not successfully matched' warnings and runs out of connections"
To view the discussion, visit: https://community.jboss.org/message/782996#782996
--------------------------------------------------------------
Hey,
I've recently written a small application which's storing things in the Content Repository provided by JackRabbit. Since I ran into the bug described in https://issues.apache.org/jira/browse/JCR-3425 JCR-3425, I'm using a recent 2.6-SNAPSHOT release built directly from source, deployed as *.rar. The whole thing runs on JBoss AS 7.1.1.
My code is the following, with exception handling stripped:
Repository repo = (Repository) new InitialContext().lookup("java:/project/jcr");
Session session = repo.login(new SimpleCredentials(user, "*".toCharArray()));
Node dir = session.getRootNode();
doSomethingWithTheInputStream(dir.getNode(...).getNode(Property.JCR_CONTENT).getProperty(Property.JCR_DATA).getBinary().getStream());
session.logout();
Upon calling session.logout, the following message appears in my log file whatsoever:
09:10:00,701 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http--127.0.0.1-8000-14) IJ000612: Destroying connection that could not be successfully matched: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@6710ee[state=NORMAL managed connection=org.apache.jackrabbit.jca.JCAManagedConnection@13ccdd8 connection handles=0 lastUse=1355299797231 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@1b24dbd pool internal context=SemaphoreArrayListManagedConnectionPool@6afb99[pool=jackrabbit-jca-pool] xaResource=XAResourceWrapperImpl@ee436b[xaResource=session-anonym-148 pad=false overrideRmValue=false productName=Jackrabbit productVersion=2.6-SNAPSHOT jndiName=java:/themis/jcr] txSync=null
And eventually, the following (may or may not have to do with how many connections I open) problem occurs.
09:11:37,141 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/project].[Faces Servlet]] (http--127.0.0.1-8000-14) Servlet.service() for servlet Faces Servlet threw exception: javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (30000 [ms])
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:377)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
at org.apache.jackrabbit.jca.JCARepositoryHandle.login(JCARepositoryHandle.java:75)
at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)
*Is there any way to avoid aforementioned warnings/exception?*
The Jackrabbit resource adapter is configured as follows:
<subsystem xmlns="urn:jboss:domain:jca:1.1">
<archive-validation enabled="false" fail-on-error="true" fail-on-warn="false"/>
<bean-validation enabled="true"/>
<default-workmanager>
<short-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</short-running-threads>
<long-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</long-running-threads>
</default-workmanager>
<cached-connection-manager debug="false" error="false"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>
jackrabbit-jca-2.6-SNAPSHOT.rar
</archive>
<transaction-support>XATransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="org.apache.jackrabbit.jca.JCAManagedConnectionFactory" jndi-name="java:/project/jcr" enabled="true" use-java-context="true" pool-name="jackrabbit-jca-pool" use-ccm="true">
<config-property name="ConfigFile">
${jboss.server.config.dir}${/}jackrabbit.xml
</config-property>
<config-property name="BindSessionToTransaction">
false
</config-property>
<config-property name="HomeDir">
${jboss.server.data.dir}${/}jackrabbit${/}
</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
</resource-adapters>
</subsystem>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/782996#782996]
Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years