You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Srinath Perera <he...@opensource.lk> on 2004/07/14 10:29:34 UTC

problem starting jetty as GBean stanalone

The code I was using to start jetty stand alone in AaxisGBean failing. It
works just few days ago.

in the HTTPConnector GBean the port is defined in the super class
sp they are not inherited?? may be this has something to done with this
but I am still not sure

Then I try  code to start the Jetty from ApplicationTest and it also fails
saying "port" is a attribute. If what I saying is true the test should be
failing in number of occasions.
Thanks
Srinath

trace
=====
javax.management.AttributeNotFoundException: Unknown attribute port
	at
org.apache.geronimo.gbean.jmx.GBeanMBean.getAttributeByName(GBeanMBean.java:736)
	at
org.apache.geronimo.gbean.jmx.GBeanMBean.setAttribute(GBeanMBean.java:674)
	at org.apache.geronimo.axis.AxisGBeanTest.setUp(AxisGBeanTest.java:112)



containerName = new ObjectName("geronimo.jetty:role=Container");
containerPatterns = Collections.singleton(containerName);
connectorName = new ObjectName("geronimo.jetty:role=Connector");
appName = new ObjectName("geronimo.jetty:app=test");

tmName = new ObjectName("geronimo.test:role=TransactionManager");
tcaName = new ObjectName("geronimo.test:role=ConnectionTrackingCoordinator");

kernel = new Kernel("test.kernel", "test");
kernel.boot();
mbServer = kernel.getMBeanServer();
container = new GBeanMBean(JettyContainerImpl.GBEAN_INFO);

connector = new GBeanMBean(HTTPConnector.GBEAN_INFO);
connector.setAttribute("port", new Integer(5678));
connector.setReferencePatterns("JettyContainer", containerPatterns);

start(containerName, container);
start(connectorName, connector);

tm = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO);
Set patterns = new HashSet();
patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*"));
tm.setReferencePatterns("resourceManagers", patterns);
start(tmName, tm);
ctc = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO);
start(tcaName, ctc);

Re: problem starting jetty as GBean stanalone

Posted by Srinath Perera <he...@opensource.lk>.
>> Anyway, I took a peek at the HTTPConnector code an what you have should
>> work.  Can you try hooking up a debugger to see what is in GBeanMBean
>> attributes map?
> I will try (not still sure how yet , but will find out) any way if there
> is a bug as I claimed the other peoples build of the maven should failed
> inside axis module tests.  It seems it is not the case.
> may be I have messs up something, any way plese let me check it, try to
> debug it and get back to you.
> Thanks
> Srinath
yes when I build all geronimo with tests off and then  build the axis
module back and in that case it works ok.
Srinath

>
>
>> On Jul 14, 2004, at 1:29 AM, Srinath Perera wrote:
>>
>>> The code I was using to start jetty stand alone in AaxisGBean failing.
>>> It
>>> works just few days ago.
>>>
>>> in the HTTPConnector GBean the port is defined in the super class
>>> sp they are not inherited?? may be this has something to done with this
>>> but I am still not sure
>>>
>>> Then I try  code to start the Jetty from ApplicationTest and it also
>>> fails
>>> saying "port" is a attribute. If what I saying is true the test should
>>> be
>>> failing in number of occasions.
>>> Thanks
>>> Srinath
>>>
>>> trace
>>> =====
>>> javax.management.AttributeNotFoundException: Unknown attribute port
>>> 	at
>>> org.apache.geronimo.gbean.jmx.GBeanMBean.getAttributeByName(GBeanMBean.
>>> java:736)
>>> 	at
>>> org.apache.geronimo.gbean.jmx.GBeanMBean.setAttribute(GBeanMBean.java:
>>> 674)
>>> 	at
>>> org.apache.geronimo.axis.AxisGBeanTest.setUp(AxisGBeanTest.java:112)
>>>
>>>
>>>
>>> containerName = new ObjectName("geronimo.jetty:role=Container");
>>> containerPatterns = Collections.singleton(containerName);
>>> connectorName = new ObjectName("geronimo.jetty:role=Connector");
>>> appName = new ObjectName("geronimo.jetty:app=test");
>>>
>>> tmName = new ObjectName("geronimo.test:role=TransactionManager");
>>> tcaName = new
>>> ObjectName("geronimo.test:role=ConnectionTrackingCoordinator");
>>>
>>> kernel = new Kernel("test.kernel", "test");
>>> kernel.boot();
>>> mbServer = kernel.getMBeanServer();
>>> container = new GBeanMBean(JettyContainerImpl.GBEAN_INFO);
>>>
>>> connector = new GBeanMBean(HTTPConnector.GBEAN_INFO);
>>> connector.setAttribute("port", new Integer(5678));
>>> connector.setReferencePatterns("JettyContainer", containerPatterns);
>>>
>>> start(containerName, container);
>>> start(connectorName, connector);
>>>
>>> tm = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO);
>>> Set patterns = new HashSet();
>>> patterns.add(ObjectName.getInstance("geronimo.server:
>>> j2eeType=JCAManagedConnectionFactory,*"));
>>> tm.setReferencePatterns("resourceManagers", patterns);
>>> start(tmName, tm);
>>> ctc = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO);
>>> start(tcaName, ctc);
>>
>>
>>
>
>
> ------------------------------------
> Lanka Sofware Foundation
> ------------------------------------
>
>


------------------------------------
Lanka Sofware Foundation
------------------------------------

Re: problem starting jetty as GBean stanalone

Posted by Srinath Perera <he...@opensource.lk>.
> In the future can you start with a fresh email message instead of
> replying to an existing message on the mailing list.  On most email
> clients if you reply to a message and change the subject it still
> groups the response with the original thread.  BTW this is called
> "thread hijacking".
thanks for let me know. will make sure that wan't happen agien :)


> Anyway, I took a peek at the HTTPConnector code an what you have should
> work.  Can you try hooking up a debugger to see what is in GBeanMBean
> attributes map?
I will try (not still sure how yet , but will find out) any way if there
is a bug as I claimed the other peoples build of the maven should failed
inside axis module tests.  It seems it is not the case.
may be I have messs up something, any way plese let me check it, try to
debug it and get back to you.
Thanks
Srinath



> On Jul 14, 2004, at 1:29 AM, Srinath Perera wrote:
>
>> The code I was using to start jetty stand alone in AaxisGBean failing.
>> It
>> works just few days ago.
>>
>> in the HTTPConnector GBean the port is defined in the super class
>> sp they are not inherited?? may be this has something to done with this
>> but I am still not sure
>>
>> Then I try  code to start the Jetty from ApplicationTest and it also
>> fails
>> saying "port" is a attribute. If what I saying is true the test should
>> be
>> failing in number of occasions.
>> Thanks
>> Srinath
>>
>> trace
>> =====
>> javax.management.AttributeNotFoundException: Unknown attribute port
>> 	at
>> org.apache.geronimo.gbean.jmx.GBeanMBean.getAttributeByName(GBeanMBean.
>> java:736)
>> 	at
>> org.apache.geronimo.gbean.jmx.GBeanMBean.setAttribute(GBeanMBean.java:
>> 674)
>> 	at
>> org.apache.geronimo.axis.AxisGBeanTest.setUp(AxisGBeanTest.java:112)
>>
>>
>>
>> containerName = new ObjectName("geronimo.jetty:role=Container");
>> containerPatterns = Collections.singleton(containerName);
>> connectorName = new ObjectName("geronimo.jetty:role=Connector");
>> appName = new ObjectName("geronimo.jetty:app=test");
>>
>> tmName = new ObjectName("geronimo.test:role=TransactionManager");
>> tcaName = new
>> ObjectName("geronimo.test:role=ConnectionTrackingCoordinator");
>>
>> kernel = new Kernel("test.kernel", "test");
>> kernel.boot();
>> mbServer = kernel.getMBeanServer();
>> container = new GBeanMBean(JettyContainerImpl.GBEAN_INFO);
>>
>> connector = new GBeanMBean(HTTPConnector.GBEAN_INFO);
>> connector.setAttribute("port", new Integer(5678));
>> connector.setReferencePatterns("JettyContainer", containerPatterns);
>>
>> start(containerName, container);
>> start(connectorName, connector);
>>
>> tm = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO);
>> Set patterns = new HashSet();
>> patterns.add(ObjectName.getInstance("geronimo.server:
>> j2eeType=JCAManagedConnectionFactory,*"));
>> tm.setReferencePatterns("resourceManagers", patterns);
>> start(tmName, tm);
>> ctc = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO);
>> start(tcaName, ctc);
>
>
>


------------------------------------
Lanka Sofware Foundation
------------------------------------

Re: problem starting jetty as GBean stanalone

Posted by Dain Sundstrom <da...@coredevelopers.net>.
In the future can you start with a fresh email message instead of  
replying to an existing message on the mailing list.  On most email  
clients if you reply to a message and change the subject it still  
groups the response with the original thread.  BTW this is called  
"thread hijacking".


Anyway, I took a peek at the HTTPConnector code an what you have should  
work.  Can you try hooking up a debugger to see what is in GBeanMBean  
attributes map?

-dain

On Jul 14, 2004, at 1:29 AM, Srinath Perera wrote:

> The code I was using to start jetty stand alone in AaxisGBean failing.  
> It
> works just few days ago.
>
> in the HTTPConnector GBean the port is defined in the super class
> sp they are not inherited?? may be this has something to done with this
> but I am still not sure
>
> Then I try  code to start the Jetty from ApplicationTest and it also  
> fails
> saying "port" is a attribute. If what I saying is true the test should  
> be
> failing in number of occasions.
> Thanks
> Srinath
>
> trace
> =====
> javax.management.AttributeNotFoundException: Unknown attribute port
> 	at
> org.apache.geronimo.gbean.jmx.GBeanMBean.getAttributeByName(GBeanMBean. 
> java:736)
> 	at
> org.apache.geronimo.gbean.jmx.GBeanMBean.setAttribute(GBeanMBean.java: 
> 674)
> 	at  
> org.apache.geronimo.axis.AxisGBeanTest.setUp(AxisGBeanTest.java:112)
>
>
>
> containerName = new ObjectName("geronimo.jetty:role=Container");
> containerPatterns = Collections.singleton(containerName);
> connectorName = new ObjectName("geronimo.jetty:role=Connector");
> appName = new ObjectName("geronimo.jetty:app=test");
>
> tmName = new ObjectName("geronimo.test:role=TransactionManager");
> tcaName = new  
> ObjectName("geronimo.test:role=ConnectionTrackingCoordinator");
>
> kernel = new Kernel("test.kernel", "test");
> kernel.boot();
> mbServer = kernel.getMBeanServer();
> container = new GBeanMBean(JettyContainerImpl.GBEAN_INFO);
>
> connector = new GBeanMBean(HTTPConnector.GBEAN_INFO);
> connector.setAttribute("port", new Integer(5678));
> connector.setReferencePatterns("JettyContainer", containerPatterns);
>
> start(containerName, container);
> start(connectorName, connector);
>
> tm = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO);
> Set patterns = new HashSet();
> patterns.add(ObjectName.getInstance("geronimo.server: 
> j2eeType=JCAManagedConnectionFactory,*"));
> tm.setReferencePatterns("resourceManagers", patterns);
> start(tmName, tm);
> ctc = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO);
> start(tcaName, ctc);