-
1. Re: How do I import "quickstart" projects into jBoss Dev Studio?
kcbabo Apr 9, 2013 9:02 AM (in response to puttime)Have you installed the SY tooling following these instructions?
https://docs.jboss.org/author/display/SWITCHYARD/Installing+Eclipse+Tooling
Once that's done, the SY projects are imported as an Existing Maven project as documented here:
https://docs.jboss.org/author/display/SWITCHYARD/Quickstarts
-
2. Re: How do I import "quickstart" projects into jBoss Dev Studio?
puttime Apr 10, 2013 1:05 AM (in response to kcbabo)I tried importing "jca-inflow-hornetq" project into jBoss Dev Studio. I could do it, yay.
But when I build the package, I get this error:
Description Resource Path Location Type Required transformation missing: from="java:java.lang.String" to="java:org.switchyard.quickstarts.jca.inflow.Person". switchyard.xml /switchyard-quickstart-jca-inflow-hornetq/src/main/resources/META-INF Unknown SwitchYard -
3. Re: How do I import "quickstart" projects into jBoss Dev Studio?
puttime Apr 10, 2013 1:28 AM (in response to puttime)Even with the above mentioned error, I was able to deploy the package on the server. But of course it didn't work.
Here's the server log: (main error log line is in bold)
10:53:46,788 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "switchyard-quickstart-jca-inflow-hornetq.jar"
10:53:46,845 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016002: Processing weld deployment switchyard-quickstart-jca-inflow-hornetq.jar
10:53:46,862 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016005: Starting Services for CDI deployment: switchyard-quickstart-jca-inflow-hornetq.jar
10:53:46,862 INFO [org.switchyard] (MSC service thread 1-2) Deploying SwitchYard application 'switchyard-quickstart-jca-inflow-hornetq.jar'
10:53:46,862 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016008: Starting weld service for deployment switchyard-quickstart-jca-inflow-hornetq.jar
10:53:46,895 INFO [org.switchyard] (MSC service thread 1-3) Starting SwitchYard service
10:53:46,895 INFO [org.apache.camel.management.ManagementStrategyFactory] (MSC service thread 1-3) JMX enabled.
10:53:46,895 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-3) Apache Camel 0.8.0.Final (CamelContext: camel-6) is starting
10:53:46,895 INFO [org.apache.camel.management.DefaultManagementLifecycleStrategy] (MSC service thread 1-3) StatisticsLevel at All so enabling load performance statistics
10:53:46,921 INFO [org.apache.camel.impl.converter.DefaultTypeConverter] (MSC service thread 1-3) Loaded 179 type converters
10:53:46,926 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-3) Total 0 routes, of which 0 is started.
10:53:46,927 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-3) Apache Camel 0.8.0.Final (CamelContext: camel-6) started in 0.031 seconds
10:53:47,138 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-3) Route: direct:{urn:switchyard-quickstart:jca-inflow-hornetq:0.1.0}GreetingService started and consuming from: Endpoint[direct://%7Burn:switchyard-quickstart:jca-inflow-hornetq:0.1.0%7DGreetingService]
10:53:47,138 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-3) Apache Camel 0.8.0.Final (CamelContext: camel-6) is shutting down
10:53:47,138 INFO [org.apache.camel.impl.DefaultShutdownStrategy] (MSC service thread 1-3) Starting to graceful shutdown 1 routes (timeout 300 seconds)
10:53:47,138 INFO [org.apache.camel.impl.DefaultShutdownStrategy] (Camel (camel-6) thread #6 - ShutdownTask) Route: direct:{urn:switchyard-quickstart:jca-inflow-hornetq:0.1.0}GreetingService shutdown complete, was consuming from: Endpoint[direct://%7Burn:switchyard-quickstart:jca-inflow-hornetq:0.1.0%7DGreetingService]
10:53:47,138 INFO [org.apache.camel.impl.DefaultShutdownStrategy] (MSC service thread 1-3) Graceful shutdown of 1 routes completed in 0 seconds
10:53:47,138 INFO [org.apache.camel.impl.converter.DefaultTypeConverter] (MSC service thread 1-3) TypeConverterRegistry utilization[attempts=0, hits=0, misses=0, failures=0] mappings[total=179, misses=0]
10:53:47,154 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-3) Apache Camel 0.8.0.Final (CamelContext: camel-6) is shutdown in 0.016 seconds. Uptime 0.259 seconds.
10:53:47,154 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."switchyard-quickstart-jca-inflow-hornetq.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."switchyard-quickstart-jca-inflow-hornetq.jar".SwitchYardService: java.lang.IllegalArgumentException: Unique key for ResourceAdapter 'hornetq-ra.rar' couldn't be found.
at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:85)
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(Unknown Source) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_17]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_17]
Caused by: java.lang.IllegalArgumentException: Unique key for ResourceAdapter 'hornetq-ra.rar' couldn't be found.
at org.switchyard.component.jca.deploy.JCAActivator.handleServiceBinding(JCAActivator.java:116)
at org.switchyard.component.jca.deploy.JCAActivator.activateBinding(JCAActivator.java:90)
at org.switchyard.deploy.internal.Deployment.deployServiceBindings(Deployment.java:515)
at org.switchyard.deploy.internal.Deployment.start(Deployment.java:141)
at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:106)
at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:78)
... 5 more
10:53:47,154 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "switchyard-quickstart-jca-inflow-hornetq.jar" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"switchyard-quickstart-jca-inflow-hornetq.jar\".SwitchYardService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"switchyard-quickstart-jca-inflow-hornetq.jar\".SwitchYardService: java.lang.IllegalArgumentException: Unique key for ResourceAdapter 'hornetq-ra.rar' couldn't be found."}}
10:53:47,154 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016009: Stopping weld service for deployment switchyard-quickstart-jca-inflow-hornetq.jar
10:53:47,154 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment switchyard-quickstart-jca-inflow-hornetq.jar in 6ms
10:53:47,154 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."switchyard-quickstart-jca-inflow-hornetq.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."switchyard-quickstart-jca-inflow-hornetq.jar".SwitchYardService: java.lang.IllegalArgumentException: Unique key for ResourceAdapter 'hornetq-ra.rar' couldn't be found.
10:53:47,169 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"switchyard-quickstart-jca-inflow-hornetq.jar\".SwitchYardService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"switchyard-quickstart-jca-inflow-hornetq.jar\".SwitchYardService: java.lang.IllegalArgumentException: Unique key for ResourceAdapter 'hornetq-ra.rar' couldn't be found."}}}}
How do I fix this error???
-
4. Re: How do I import "quickstart" projects into jBoss Dev Studio?
igarashitm Apr 10, 2013 2:34 AM (in response to puttime)1 of 1 people found this helpfulHi Put,
Did you start the AS7 instance with standalone-full.xml profile? The default profile doesn't include HornetQ.
./standalone.sh -server-config standalone-full.xml
You may want to take a look at Readme.md in the jca-inflow-hornetq quickstart so you can see the steps to test out.
Thanks,
Tomo
-
5. Re: How do I import "quickstart" projects into jBoss Dev Studio?
puttime Apr 10, 2013 4:34 AM (in response to igarashitm)Thanks, that worked. But I still get this error:
If I run the jca-inflow-hornet test, with a wrong password, the I get this error:
Exception in thread "main" javax.jms.InvalidDestinationException: Destination GreetingServiceQueue does not exist
at org.hornetq.jms.client.HornetQSession.createProducer(HornetQSession.java:337)
at org.switchyard.quickstarts.camel.jms.binding.HornetQClient.main(HornetQClient.java:71)
Now if I run the same test with a right password, then I get this error:
Exception in thread "main" java.lang.RuntimeException: javax.jms.JMSSecurityException: Unable to validate user: guest
at org.switchyard.component.test.mixins.hornetq.HornetQMixIn.createJMSSession(HornetQMixIn.java:361)
at org.switchyard.quickstarts.camel.jms.binding.HornetQClient.main(HornetQClient.java:70)
Caused by: javax.jms.JMSSecurityException: Unable to validate user: guest
at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:312)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:780)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:279)
at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:601)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:684)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:119)
at org.switchyard.component.test.mixins.hornetq.HornetQMixIn.createJMSSession(HornetQMixIn.java:355)
... 1 more
Caused by: HornetQException[errorCode=105 message=Unable to validate user: guest]
... 8 more
Any idea why?
-
6. Re: How do I import "quickstart" projects into jBoss Dev Studio?
igarashitm Apr 10, 2013 6:42 AM (in response to puttime)I guess you didn't add user and deploy the destination as described in Readme.md
-
7. Re: How do I import "quickstart" projects into jBoss Dev Studio?
kcbabo Apr 10, 2013 6:43 AM (in response to puttime)Put Time wrote:
Even with the above mentioned error, I was able to deploy the package on the server. But of course it didn't work.
I'm not sure how to interpret the comment "But of course it didn't work", but let's review a few things here:
1) Members of the community are helping you with your questions quickly.
2) All of the answers given so far are present in the readme for the projects you are trying to run.
Your most recent issue in this thread about "Unable to validate user: guest", may have something to do with step 3 in the Readme for jca-inflow-hornetq:
Add JMS user using add-user.sh with username=guest, password=guestp, Realm=ApplicationRealm, role=guest ./add-user.sh
If there's a gap in the instructions, definitely let us know.
-
8. Re: How do I import "quickstart" projects into jBoss Dev Studio?
puttime Apr 10, 2013 11:21 AM (in response to kcbabo)The user creation step was done as part of the application server (AS) install itself.
I had created an application user by name "guest" and password as "guestp".
I tried a lot but couldn't get it to work.
Then I deleted the AS instance, extracted a fresh one, and installed it.
And then it worked. So not sure what actually went wrong.