[JBoss Web Services] - Deployment exception when injecting WebServiceContext
by Nicolas Bielza
Nicolas Bielza [http://community.jboss.org/people/nicolas.bielza] created the discussion
"Deployment exception when injecting WebServiceContext"
To view the discussion, visit: http://community.jboss.org/message/596378#596378
--------------------------------------------------------------
Hello All,
Using: JBoss AS 6.0.0.Final and JBoss-WS Metro 3.3.1.GA
I'm trying to use the WebServiceContext to access the client SSL certificate that was used during SSL handshake.
My endpoint looks like this:
@WebService(serviceName = "purchaseorderprocessin3", portName = "SalesOrderProcessingOrderingOutPort", endpointInterface = "com.alligacom.bydesign.SalesOrderProcessingOrderingOut", targetNamespace = "http://sap.com/xi/AP/CRM/Global", wsdlLocation = "WEB-INF/wsdl/SalesOrderProcessingOrderingOutWrapper.wsdl")
public class SalesOrderProcessingOrderingOutImpl implements
SalesOrderProcessingOrderingOut {
@Resource WebServiceContext webServiceContext;
public void confirmSalesOrder(
PurchaseOrderConfirmationMessage purchaseOrderConfirmation) {
if(purchaseOrderConfirmation == null) {
throw new IllegalArgumentException("purchaseOrderConfirmation is required");
}
...
When trying to deploy the service I get the following exception:
16:32:37,386 WARN [org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect] Unable to resolve SPI for type: class com.sun.xml.ws.api.pipe.TubelineAssemblerFactory
16:32:37,391 WARN [org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect] Unable to resolve SPI for type: class com.sun.xml.ws.assembler.ServerPipelineHook
16:32:37,402 INFO [org.jboss.wsf.framework.management.DefaultEndpointRegistry] remove: jboss.ws:context=sap/bc/srt/scs/srmap,endpoint=SalesOrderProcessingOrderingOut
16:32:37,403 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Real: name=vfs:///E:/ChuckNorris/JBoss/jboss-6.0.0.Final/server/default/deploy/POAck.war state=PreReal mode=Manual requiredState=Real: org.jboss.deployers.spi.DeploymentException: Failed to create web module
at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:487) [:6.0.0.Final]
at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:122) [:6.0.0.Final]
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [:1.6.0_23]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source) [:1.6.0_23]
at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [:1.6.0_23]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source) [:1.6.0_23]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source) [:1.6.0_23]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [:1.6.0_23]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_23]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_23]
at java.lang.Thread.run(Unknown Source) [:1.6.0_23]
Caused by: org.jboss.deployers.spi.DeploymentException: Error creating web module vfs:///E:/ChuckNorris/JBoss/jboss-6.0.0.Final/server/default/deploy/POAck.war
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]
at org.jboss.web.deployers.AbstractWarDeployer.deployWebModule(AbstractWarDeployer.java:812) [:6.0.0.Final]
at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:483) [:6.0.0.Final]
... 41 more
Caused by: java.lang.NullPointerException
at org.jboss.web.deployers.AbstractWarDeployer.createInjectorBMD(AbstractWarDeployer.java:928) [:6.0.0.Final]
at org.jboss.web.deployers.AbstractWarDeployer.deployWebModule(AbstractWarDeployer.java:769) [:6.0.0.Final]
... 42 more
When I omit the WebServiceContext injection, the service works just fine.
Is there another way to access the WebServiceContext ?
Thanks,
Nicolas.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/596378#596378]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[JBoss Messaging] - Queue stops working under load without error
by Michal Glowacki
Michal Glowacki [http://community.jboss.org/people/mglowacki] created the discussion
"Queue stops working under load without error"
To view the discussion, visit: http://community.jboss.org/message/587645#587645
--------------------------------------------------------------
hi,
I created queue to put incoming requests into LinkedList, so I can process them one by one. It works perfect, until for example 10 requests come exactly same time. Then my queue just freezes. Any new request is not processed, I can't see any errors in the logs. I have to redeploy my MDB jar file in order to get it working again. However all messages are lost. I checked via JMX console state of the queue when it's broken, everything looks fine, DLQ is empty. Do you know where I could look for an error?
here's jms-destination-service.xml
<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.messaging.destination:service=Queue,name=ProcessingQueue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<attribute name="RedeliveryDelay">3000</attribute> <!-- those 2 I added later, but also did not help -->
<attribute name="MaxDeliveryAttempts">3</attribute>
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
and beginning of my MDB class:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(
propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(
propertyName = "destination", propertyValue = "/queue/ProcessingQueue"),
@ActivationConfigProperty(
propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")
})
@org.jboss.ejb3.annotation.Depends("org.hornetq:module=JMS,name=\"ProcessingQueue\",type=Queue")
Thanks,
Michal
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/587645#587645]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[Beginner's Corner] - Migrating from JBoss AS 4.2.1 to 5.1.0
by Michael Huang
Michael Huang [http://community.jboss.org/people/yuanlinh] created the discussion
"Migrating from JBoss AS 4.2.1 to 5.1.0"
To view the discussion, visit: http://community.jboss.org/message/594898#594898
--------------------------------------------------------------
I am migrating from 4.2.1 from 5.1.0. The ear file works fine with 4.2.1, after changing xml descriptor files to new xsd and migrating to 5.1.0, still got the follwoing issue. Seems to to a application.xml issue. But I checked application.xml, there seems to be no issue with it. Could anyone point me to the right direction? Many thanks.
15:52:10,405 INFO [LogNotificationListener] Adding notification listener for logging mbean "jboss.system:service=Logging,type=Log4jService" to server mailto:org.jboss.mx.server.MBeanServerImpl@5b78cf org.jboss.mx.server.MBeanServerImpl@5b78cf[ defaultDomain='jboss' ]
15:52:11,061 ERROR [ProfileDeployAction] Failed to add deployment: acesEar.ear
org.jboss.deployers.spi.DeploymentException: Exception determining structure: AbstractVFSDeployment(acesEar.ear)
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:85)
at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:1004)
at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeploymentContext(MainDeployerImpl.java:440)
at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:390)
at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:300)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.addDeployment(MainDeployerAdapter.java:86)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:61)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Error determining structure: acesEar.ear
at org.jboss.deployment.EARStructure.determineStructure(EARStructure.java:293)
at org.jboss.deployers.vfs.plugins.structure.StructureDeployerWrapper.determineStructure(StructureDeployerWrapper.java:73)
at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.doDetermineStructure(VFSStructuralDeployersImpl.java:196)
at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:221)
at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:77)
... 21 more
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}application not found as a child of { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}application in unordered_sequence: { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}module* { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}security-role* { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}library-directory? {all { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}descriptionGroup}?
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:183)
at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:161)
at org.jboss.deployment.EARStructure.determineStructure(EARStructure.java:160)
... 25 more
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}application not found as a child of { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}application in unordered_sequence: { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}module* { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}security-role* { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}library-directory? {all { http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee}descriptionGroup}?
at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:383)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
... 28 more
===========application.xml below=============
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" version="5"
xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/application_5.xsd http://java.sun.com/xml/ns/javaee/application_5.xsd">
<application>
<display-name>xxxEar</display-name>
<module>
<java>common.jar</java>
</module>
<module>
<java>commonLib.jar</java>
</module>
............
<module>
<web>
<web-uri>xxxWebApp.war</web-uri>
<context-root>/</context-root>
</web>
</module>
..........................
<security-role>
<description>XXXXX</description>
<role-name>XXXX</role-name>
</security-role>
</application>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594898#594898]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[jBPM] - Re: jbpm, process definitions, jboss - looking for knowledge
by Matus Majchrak
Matus Majchrak [http://community.jboss.org/people/dekadence] created the discussion
"Re: jbpm, process definitions, jboss - looking for knowledge"
To view the discussion, visit: http://community.jboss.org/message/596844#596844
--------------------------------------------------------------
Hi Piotr,
First things first, In order to access process definitions you have to have access to the guvnor repository(or fake it as Jbpm5 demo does using -Djbpm.console.directory)
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("Guvnor default");
kagent.applyChangeSet(ResourceFactory.newClassPathResource("ChangeSet.xml"));
kagent.monitorResourceChangeEvents(false);
KnowledgeBase kbase = kagent.getKnowledgeBase();
ChangeSet.xml file will direct the knowledge agent to resources it should care about. For example:
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...' >
<add>
<resource source='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defa...' type='PKG' basicAuthentication="enabled" username="admin" password="admin" />
</add>
</change-set>
This will tell your agent to look for your localhost's repository default package.
Try to deploy some processes into default package so that you have something to work with: http://people.redhat.com/kverlaen/jBPM5-guvnor-integration.swf http://people.redhat.com/kverlaen/jBPM5-guvnor-integration.swf
You can now test it by listing deployed processes:
for (Process process : kbase.getProcesses()) {
System.out.println("I found process in Guvnor: " + process.getId());
}
Now for the knowledgeSession.Depending on where does your application run, you have to obtain an EntityManagerFactory for drools persistence.
See the persistence.xml in jbpm5-installers/db folder.
EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.drools.persistence.jpa");
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
Properties properties = new Properties();
properties.put("drools.processInstanceManagerFactory","org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory","org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
kSession = JPAKnowledgeService.loadStatefulKnowledgeSession(1, kbase, config, env);
The above code will try to load an existing Statefull knowledge session. If this does not exsit you will receive an error and you have to create a fresh kSession like this:
env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
kSession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env);
And thats basicaly it. You can now get a list of processes:
knowledgeSession.getKnowledgeBase().getProcesses()
register a ProcessEventListener to intercept process lifecycle events:
knowledgeSession.addEventListener(... your class implementing ProcessEventListener)
or get list of process instances:
knowledgeSession.getProcessInstances();
So basicaly you have to hook up your application to guvnor to access process related resources and obtain JPA entity management factory to be able to construct or obtain knowledge session. After that, you should have all the thigs you need to fulfill your tasks.
regards
matus
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/596844#596844]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years