[EJB3] - Exposing an EJB through multiple views
by Lars Åslin
Lars Åslin [https://community.jboss.org/people/aslin] created the discussion
"Exposing an EJB through multiple views"
To view the discussion, visit: https://community.jboss.org/message/758605#758605
--------------------------------------------------------------
Hi,
I'm trying to expose an EJB through both a local business interface and a JAX-RS interface, but are getting the following error:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."finance.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."finance.war".PARSE: Failed to process phase PARSE of deployment "finance.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
Caused by: java.lang.IllegalArgumentException: JBAS011046: A component named 'FileServiceImpl' is already defined in this module
at org.jboss.as.ee.component.EEModuleDescription.addComponent(EEModuleDescription.java:137)
at org.jboss.as.ejb3.deployment.processors.EJBComponentDescriptionFactory.addComponent(EJBComponentDescriptionFactory.java:60)
at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processSessionBeans(SessionBeanComponentDescriptionFactory.java:157)
at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processAnnotations(SessionBeanComponentDescriptionFactory.java:86)
at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:58)
at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:81)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
<code>
public interface FileService {
...
}
public interface FileServiceLocalBusiness extends FileService {
...
}
@Path("file")
@Consumes({ "application/json" })
@Produces({ "application/json" })
public interface FileServiceWs extends FileService {
...
}
</code>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/758605#758605]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[jBPM] - Boolean Process Variables are not mapped in Users Tasks?
by Christian Witschel
Christian Witschel [https://community.jboss.org/people/cwitschel] created the discussion
"Boolean Process Variables are not mapped in Users Tasks?"
To view the discussion, visit: https://community.jboss.org/message/757452#757452
--------------------------------------------------------------
Dear All,
I am facing another issue, this time in the process variables and users forms area.
I have declared a Boolean process variable approveBusiness.
This variable is not present or represented in the process startup form, of course because first someone needs to make his request and then it is approve in a second step.
So next after the process started it comes to a user task with a form called BusinessApproval. the Atuomatically generated form works nice, it recognized the boolean and created a checkbox.
I created the Output variable Approve of type Boolean and in Assinments i have Approve is mapped to approveBusiness.
However after the User Task of Approval is completed approveBusiness is not existing at all.
Next i tried to include approveBusiness as a hidden input in the process startup form with a default of false. Now there is a process variable called approveBusiness, but it will stay false and is of type String no matter what happens in the approval user form.
What Am I doing wrong?
BPMN is attached.
Also I found that whatever form variables are in the process startup form will become process instance variables, even if they were not declared.
Cheers
Christian Witschel
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/757452#757452]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[JBoss Tools] - BrowserSim FAQ
by Yahor Radtsevich
Yahor Radtsevich [https://community.jboss.org/people/yradtsevich] modified the document:
"BrowserSim FAQ"
To view the document, visit: https://community.jboss.org/docs/DOC-18100
--------------------------------------------------------------
*Q: What is BrowserSim ?*
*A:* BrowserSim is a Browser Simulator which primarily is intended for having a quick, easy and multi-platform way of testing if your webapp will render and behave correctly on a mobile device.
*Q: How does BrowserSim works ?*
*A:* It wraps a webkit browser and makes it respond and send work like a mobile browser by spoofing content and media request headers.
*
Q: What do I need to run BrowserSim?*
*A:* The requirements for different platforms are as listed below:
* Windows:* Only 32-bit Eclipse/JBDS is supported;
* Apple http://www.apple.com/quicktime/download/ QuickTime or http://www.apple.com/itunes/download/ iTunes must be installed (they contain Apple Application Support which provides WebKit engine for BrowserSim).
* Linux:* WebKitGTK 1.2.0 or newer must be installed and available in the library load path.
* This should be available on RHEL and Ubuntu by default, if not use your package manager to install libwebkitgtk
* Mac OS X* It just works.
*Q: How to add BrowserSim to the toolbar?*
*A:* Go to Window → Customize Perspective and select "BrowserSim" under "Command Groups Availability". Then it becomes available in the global toolbar via the "phone" icon:
https://community.jboss.org/servlet/JiveServlet/showImage/102-18100-12-18... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-18100-1...
*Q: Can I use the browser as a replacement for testing on a real phone or emulator?*
*A:* Browsersim make it easy to test basic layout questions/issues on any platform without having to install a platform specifc emulator or manually try use a phone.
That said it is not 100% reliable since there are so many different brands/versions of phones there will be differences in behavior, thus no, BrowserSim does not replace real or emulated phone testing.
For full verfication/testing you should test on a real phone.
*Q: BrowserSim shows an error message saying that JRE 7 is not supported on Windows and does not run (with JBoss Tools 4.0.0.Alpha2 and above).*
*A:* There is an incompatibility between some versions of JRE 7 and BrowserSim on Windows. To workaround this, please do the following:
1. Install JRE/JDK 6 or JDK 7 (but not JRE 7).
2. Add the next lines at the beginning of your eclipse.ini or jbdevstudio.ini:
-vm
PATH_TO_JAVA_INSTALLATION_DIRECTORY\bin\javaw.exe
*Q: BrowserSim shows the *"No more handles [Failed to load the swt-webkit library]"* error message and does not run (with JBoss Tools *4.0.0.Alpha*1 and below).*
*A:* There is an incompatibility between some versions of JRE/JDK 7 and BrowserSim on Windows. To workaround this, please do the following:
1. Install JRE/JDK 6 (but not JRE/JDK 7).
2. Add the next lines at the beginning of your eclipse.ini or jbdevstudio.ini:
-vm
PATH_TO_JAVA_INSTALLATION_DIRECTORY\bin\javaw.exe
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-18100]
Create a new document in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 6 months
[Datasource Configuration] - JBoss 7 Without XA Data Sources
by Randy Layman
Randy Layman [https://community.jboss.org/people/randy.layman] created the discussion
"JBoss 7 Without XA Data Sources"
To view the discussion, visit: https://community.jboss.org/message/758435#758435
--------------------------------------------------------------
I am porting our application from JBoss 4 to JBoss 7 and have run into a snag. For a few very specific use cases we use two data sources within the same JTA transaction context (manged via Spring's TransactionProxyFactoryBean). We want transactions on one data source to not impact the other. In JBoss 4 we accomplished this by not using XA Data Sources. This seems to have caused JTA to commit one transaction after the other independently. For all other use cases, we use a single Data Source and therefore don't need XA functionality.
In moving to JBoss 7, I initially configured the same way -- non-XA data sources. However when the second data source was first referenced I got a an error message that meant you can't have two non-XA data sources in the same transaction. Configuring with XA data sources does allow the application to function, but now the two transactions are married together.
Is there anyway to configure JBoss 7 to not use XA transactions in JTA managed transactions?
For the curious, here is our main use case: In the course of fulfilling an order from customers we charge their credit card and we configure their newly purchased service. We never, ever, want the bank to have a record of a credit card transaction that we don't. So we have a seperate database (and thus data source) for the credit card transactions. And we want those transactions to always commit, regardless of any issues we might have configuring their service that causes a rollback.
If it is relevant we are using JBoss 7.1.1-Final connecting to Postgres 8 (with the Postgres 9 database driver) running on JDK 1.6.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/758435#758435]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[JBoss Web Services] - Problem using xsd:import in WSDL (JBoss 7.2.0 Alpha1)
by Timo Hirt
Timo Hirt [https://community.jboss.org/people/timo.hirt] created the discussion
"Problem using xsd:import in WSDL (JBoss 7.2.0 Alpha1)"
To view the discussion, visit: https://community.jboss.org/message/758066#758066
--------------------------------------------------------------
Currently I attempt to define some common types to be used in multiple WSLDs into a xsd file WorkPackageServiceTypes.xsd as follows:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.com/Common/WorkPackageServiceTypes"
xmlns:tns="http://www.example.com/Common/WorkPackageServiceTypes"
elementFormDefault="qualified">
<complexType name="WorkPackageType">
<sequence>
<element name="Id" type="long"
maxOccurs="1" minOccurs="1">
</element>
<element name="StartDate" type="dateTime"
maxOccurs="1" minOccurs="1">
</element>
<element name="EndDate" type="dateTime"
maxOccurs="1" minOccurs="1"></element>
</sequence>
</complexType>
</schema>
I import this XSD into the WSDL of a service.
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.example.org/WorkPackageService/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="WorkPackageService" targetNamespace="http://www.example.org/WorkPackageService/">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pref="http://www.example.com/Common/WorkPackageServiceTypes"
targetNamespace="http://www.example.org/WorkPackageService/">
<xsd:import schemaLocation="WorkPackageServiceTypes.xsd"
namespace="http://www.example.com/Common/WorkPackageServiceTypes"></xsd:import>
..
</wsdl:types>
</wsdl:definitions>
Both WSDL and XSD are located into the same folder (META-INF/wsdl/). wsconsume as well as the maven codegen plugin from the CXF project created all classes and stubs as expected. The web service is implemented as stateless session bean. If I deploy it to JBoss AS the following exception occurs during deployment.
15:38:03,890 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."Demo Project-0.0.1.ear"."webservices-ejb-layer-0.0.1.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."Demo Project-0.0.1.ear"."webservices-ejb-layer-0.0.1.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "webservices-ejb-layer-0.0.1.jar" of deployment "Demo Project-0.0.1.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_27]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_27]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_27]
Caused by: java.lang.RuntimeException: Cannot publish wsdl to: D:\dev\jboss-as-7.2.0.Alpha1-SNAPSHOT\standalone\data\wsdl\Demo Project-0.0.1.ear\webservices-ejb-layer-0.0.1.jar\WorkPackageService.wsdl
at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:107)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.publishContractToFilesystem(EndpointImpl.java:133)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:75)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:246)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:525)
at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:119)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:129)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:68)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
... 5 more
Caused by: java.io.IOException: JBAS015526: Child 'META-INF/wsdl/wsdl/Demo%20Project-0.0.1.ear/webservices-ejb-layer-0.0.1.jar/WorkPackageServiceTypes.xsd' not found for VirtualFile: "/D:/dev/jboss-as-7.2.0.Alpha1-SNAPSHOT/bin/content/Demo Project-0.0.1.ear/webservices-ejb-layer-0.0.1.jar"
at org.jboss.as.webservices.util.VirtualFileAdaptor.findChild(VirtualFileAdaptor.java:62)
at org.jboss.ws.common.deployment.ResourceResolverImpl.resolve(ResourceResolverImpl.java:79)
at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:223)
at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:249)
at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:249)
at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:94)
... 14 more
Is this a bug or am I doing anything wrong?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/758066#758066]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months