History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CARGO-381
Type: Test Test
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: David J. M. Karlsen
Reporter: Vincent Massol
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Cargo

Test on JBoss 4.0.5

Created: 21/Jul/06 02:24 PM   Updated: 01/Jan/07 05:08 PM
Component/s: JBoss
Affects Version/s: 0.8
Fix Version/s: 0.9

Time Tracking:
Not Specified

File Attachments: 1. Text File CARGO-381-shutdown-authorisation.patch (3 kb)
2. Text File CARGO-381.patch (1 kb)

Issue Links:
Related
 

Complexity: Novice


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Vincent Siveton - 24/Jul/06 05:54 PM
Works a treat with jboss 4.0.2
Failed with 4.0.3SP1, 4.0.4.GA

Extrait from the test report:

<testcase classname="org.codehaus.cargo.sample.java.WarCapabilityContainerTest" name="testStartWithOneExpandedWarDeployed (jboss4x)" time="26.45">
    <failure message="expanded war not started. Failed to ping [http://localhost:8280/expanded-war/index.html], Reason = [/expanded-war/index.html], Body = [&lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/5.5 - Error report&lt;/title&gt;&lt;style&gt;&lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--&gt;&lt;/style&gt; &lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 404 - /expanded-war/index.html&lt;/h1&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;p&gt;&lt;b&gt;type&lt;/b&gt; Status report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt; &lt;u&gt;/expanded-war/index.html&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt; &lt;u&gt;The requested resource (/expanded-war/index.html) is not available.&lt;/u&gt;&lt;/p&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;h3&gt;Apache Tomcat/5.5&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;], Code = [404]" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: expanded war not started. Failed to ping [http://localhost:8280/expanded-war/index.html], Reason = [/expanded-war/index.html], Body = [&lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/5.5 - Error report&lt;/title&gt;&lt;style&gt;&lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--&gt;&lt;/style&gt; &lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 404 - /expanded-war/index.html&lt;/h1&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;p&gt;&lt;b&gt;type&lt;/b&gt; Status report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt; &lt;u&gt;/expanded-war/index.html&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt; &lt;u&gt;The requested resource (/expanded-war/index.html) is not available.&lt;/u&gt;&lt;/p&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;h3&gt;Apache Tomcat/5.5&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;], Code = [404]
	at org.codehaus.cargo.sample.java.PingUtils.assertPing(PingUtils.java:58)
	at org.codehaus.cargo.sample.java.PingUtils.assertPingTrue(PingUtils.java:80)
	at org.codehaus.cargo.sample.java.PingUtils.assertPingTrue(PingUtils.java:91)
	at org.codehaus.cargo.sample.java.AbstractWarCapabilityContainerTestCase.testStartWithOneExpandedWarDeployed(AbstractWarCapabilityContainerTestCase.java:74)
</failure>
  </testcase>

I Nyoman Winardi - 10/Aug/06 03:02 AM
http://jira.codehaus.org/browse/CARGO-286
http://jira.codehaus.org/browse/CARGO-373

All have the same issues with the expanded war.
Try to implement Julien Viet's suggestion and test it with 4.0.4.GA but not working.


Mikko Koponen - 07/Dec/06 06:04 AM
I've tested a JBoss 4.0.5 existing server & standalone configuration setup. One thing that has changed in at least JBoss 4.0.5 is that out-of-the-box, remote mbean-invocations require authentication, so the shutdown command fails.

"CARGO-381-shutdown-authorisation.patch" is a patch that uses RemotePropertySet.USERNAME and PASSWORD properties to supply the username and password to the shutdown command.


Vincent Massol - 07/Dec/06 01:45 PM
Hi Mikko,

The problem is that you're using a RemotePropertySet property for a local container. This isn't logical.

I think we have 2 options:
1) create local username/pwd properties
2) rename the remote username/pwd properties in username/password (without specifying whether they're local or remote). This means they could be used for both local and remote containers.

I think 2) is the best.

If you"re interested in taking this further I'd suggest creating a JIRA issue for renaming the remote username/password properties and fixing this first and then we could apply the fix for this issue.

WDYT?

Thanks
-Vincent


Mikko Koponen - 08/Dec/06 03:53 AM
Hi Vincent,

Yep, I was aware that the naming might be a bit confusing.

Problem was that RemotePropertySet is container-agnostic and used by at least Geronimo, JBoss and Tomcat. Without commit access, the patch would be pretty. And even more serious, would break all existing configs if I rename the property keys "cargo.remote.username" and "cargo.remote.password".

To preserve backward compatability, I suppose leaving RemotePropertySet user & pass in place would be OK?

As a more unintrusive fix, I could add something like "cargo.jboss.username" & "cargo.jboss.password" in JBossPropertySet, thereby making it JBoss specific? But then what about remote JBoss'es, should they also use these?

Now, what do you think?


Mikko Koponen - 08/Dec/06 03:56 AM
(Oh why doesn't jira allow comment editing...)

sed "s/"the patch would be pretty."/"the patch wouldn't be pretty."/g"


David J. M. Karlsen - 01/Jan/07 01:33 PM
Patch to:
  • use newer Jboss 4.0.5GA
  • add "normal" classloader to URLClassloader to fix testDeployEjbStatically

Vincent Massol - 01/Jan/07 05:07 PM
Applied (added modifications for the m1 build).

Vincent Massol - 01/Jan/07 05:08 PM
Mikko, let's continue the discussion on the cargo list (I know you've answered there and I haven't replied yet...). We'll create a new issue if need be.