-
1. Re: Trouble running ESB component via JBoss Developer Studio: "The selection did not contain any resources that can run on a server"
tcunning Dec 13, 2012 10:45 PM (in response to bernhardh)I think you might be hitting https://issues.jboss.org/browse/JBDS-2365. You can work around this when you create your project by choosing "ESB 4.10" as the version for your project rather than 4.11.
You should be able to point at the AS + ESB 4.11 though.
-
2. Re: Trouble running ESB component via JBoss Developer Studio: "The selection did not contain any resources that can run on a server"
bernhardh Dec 18, 2012 4:28 AM (in response to tcunning)Hi Tom,
in jboss-esb.xml, all references are already made to "jbossesb-1.3.0.xsd".
I have noticed that when I mark the project as deployable I can add it to the server (but only through the server's "Add and Remove" form; "Run As -> Run on Server" still issues the same error as before). However, when I run the test application, it fails looking up the component with "javax.naming.NameNotFoundException: chapter3_Request_gw not bound".
Sure enough, when I look at JBoss' JMX Console, the component "queue/chapter3_Request_gw" is not listed.
This suggests that the component is in fact not deployed.
Note that I didn't (couldn't) add the JBoss ESB runtime to JBDS. I'm not sure if this is necessary.
What else should I investigate?
-
3. Re: Trouble running ESB component via JBoss Developer Studio: "The selection did not contain any resources that can run on a server"
tcunning Dec 19, 2012 12:16 PM (in response to bernhardh)Does your .esb archive contain any queue definition files (hornetq-jms.xml, jbm-queue-service.xml, etc)?
-
4. Re: Trouble running ESB component via JBoss Developer Studio: "The selection did not contain any resources that can run on a server"
bernhardh Dec 20, 2012 2:48 AM (in response to tcunning)It does contain a jbm-queue-service.xml, which looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.esb.book.samples.destination:service=Queue,name=chapter3_Request_esb"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.esb.book.samples.destination:service=Queue,name=chapter3_Request_gw"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
</server>
I don't find an .esb archive built anywhere. Specifically, my project does not have an .esb file in any of the jboss-5.1.0.GA/server folders.
I came across this post where it seems to be suggested that JBDS 6 does not yet support JBoss ESB. As I've mentioned before, I cannot download an earlier version of JBDS.
Any advice?
-
5. Re: Trouble running ESB component via JBoss Developer Studio: "The selection did not contain any resources that can run on a server"
tcunning Dec 21, 2012 10:15 AM (in response to bernhardh)Bernhard,
I understand now - sorry for the confusion. JBDS 4 and 5 do not seem to be available for free trial anymore, and the SOA Tools aren't working on JBDS 6 yet. What I'd suggest is downloading Eclipse Indigo, and then installing JBoss Tools and the JBoss SOA Tools on top of that (using Eclipse's "Install New Software" functionality).
http://marketplace.eclipse.org/node/121986#.UNR8vaX4Y20
http://download.jboss.org/jbosstools/updates/stable/indigo/soa-tooling/
-
6. Re: Trouble running ESB component via JBoss Developer Studio: "The selection did not contain any resources that can run on a server"
nvanevski Dec 22, 2012 9:07 AM (in response to tcunning)Hi,
Is there any estimate as to when SOA tooling will be working on JBDS 6?
Thanks!
-
7. Re: Trouble running ESB component via JBoss Developer Studio: "The selection did not contain any resources that can run on a server"
tcunning Jan 2, 2013 10:07 AM (in response to nvanevski)I know there's been some discussions of this lately, but I'm not sure on what the timeline is. Ask on the JBoss Tools forum, or open a customer case if you have a subscription.
-
8. Re: Trouble running ESB component via JBoss Developer Studio: "The selection did not contain any resources that can run on a server"
bernhardh Jan 9, 2013 3:47 AM (in response to bernhardh)Hi Tom,
thank you for your advice! I have installed Eclipse Indigo and the two add-ons. I registered JBoss ESB in the JBoss ESB Runtimes section in the Preferences.
I am still not sure if everything is set up properly, though. When I choose Run As -> Run on Server on that sample project, I get the error message "The selection did not contain any resources that can run on a server". However, I can deploy the project successfully via the server's "Add and Remove" form, so maybe that's fine. Judging by the server logs, it does look as though it actually deploys and when I check the JMS Management Console the following two entries appear under jboss.deployment:
- id="jboss.esb.book.samples.destination:name=chapter3_Request_esb,service=Queue",type=Component
- id="jboss.esb.book.samples.destination:name=chapter3_Request_gw,service=Queue",type=Component
When I run the test application, there is no longer an error. However, it is supposed to send a JSM message that prints to the logs via the SystemPrintln action, and I do not see that message in the server's log. The server's log ends with
10:18:59,028 INFO [QueueService] Queue[/queue/chapter3_Request_esb] started, fullSize=200000, pageSize=2000, downCacheSize=2000
10:18:59,028 INFO [QueueService] Queue[/queue/chapter3_Request_gw] started, fullSize=200000, pageSize=2000, downCacheSize=2000
It looks like the action is not executed, or am I missing something here?
Here is the jboss-esb.xml file:
<?xml version="1.0"?>
<jbossesb parameterReloadSecs="5"
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd">
<providers>
<jms-provider connection-factory="ConnectionFactory" name="JBossMQ">
<jms-bus busid="chapter3GwChannel">
<jms-message-filter dest-name="queue/chapter3_Request_gw" dest-type="QUEUE"/>
</jms-bus>
<jms-bus busid="chapter3EsbChannel">
<jms-message-filter dest-name="queue/chapter3_Request_esb" dest-type="QUEUE"/>
</jms-bus>
</jms-provider>
</providers>
<services>
<service category="Chapter3Sample"
description="A template for Chapter3" name="Chapter3Service">
<listeners>
<jms-listener busidref="chapter3GwChannel" is-gateway="true" name="Chapter3GwListener"/>
<jms-listener busidref="chapter3EsbChannel" name="Chapter3Listener"/>
</listeners>
<actions mep="OneWay">
<action class="org.jboss.soa.esb.actions.SystemPrintln" name="PrintBefore">
<property name="message"/>
<property name="printfull" value="true"/>
</action>
</actions>
</service>
</services>
</jbossesb>
And here is the code that sends the message:
package org.jboss.soa.esb.samples.chapter3.test;
import java.util.Properties;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Queue;
import javax.jms.QueueConnection;
import javax.jms.QueueConnectionFactory;
import javax.jms.QueueSender;
import javax.jms.QueueSession;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class SendJMSMessage {
QueueConnection conn;
QueueSession session;
Queue que;
public void setupConnection() throws JMSException, NamingException {
Properties properties1 = new Properties();
properties1.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties1.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
properties1.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
InitialContext iniCtx = new InitialContext(properties1);
Object tmp = iniCtx.lookup("ConnectionFactory");
QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
conn = qcf.createQueueConnection();
que = (Queue) iniCtx.lookup("queue/chapter3_Request_gw");
session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
conn.start();
System.out.println("Connection Started");
}
public void stop() throws JMSException {
conn.stop();
session.close();
conn.close();
}
public void sendAMessage(String msg) throws JMSException {
QueueSender send = session.createSender(que);
ObjectMessage tm = session.createObjectMessage(msg);
send.send(tm);
send.close();
System.out.println("Message sent!");
}
public static void main(String args[]) throws Exception
{
SendJMSMessage sm = new SendJMSMessage();
sm.setupConnection();
sm.sendAMessage("Chapter 3 says Hello!");
sm.stop();
}
}
-
9. Re: Trouble running ESB component via JBoss Developer Studio: "The selection did not contain any resources that can run on a server"
bernhardh Jan 25, 2013 12:45 AM (in response to bernhardh)1 of 1 people found this helpfulThis question is no longer relevant since I have started using the Windows Azure Service Bus instead. It was a much better fit for my need and was almost trivially simple to get going. Using JBoss ESB would have been overkill and too complicated.