Issue Details (XML | Word | Printable)

Key: BAM-246
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Ben Kuo
Reporter: Mark Chaimungkalanont [Atlassian]
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Bamboo

Changing context path seems to cause installation to fail

Created: 21/Sep/06 06:00 PM   Updated: 08/Oct/06 08:13 PM
Component/s: Installation
Affects Version/s: 0.4
Fix Version/s: 0.5

Time Tracking:
Original Estimate: 4 hours
Original Estimate - 4 hours
Remaining Estimate: 4 hours
Remaining Estimate - 4 hours
Time Spent: Not Specified
Remaining Estimate - 4 hours

File Attachments: 1. Microsoft Word bambooinst.doc (137 kB)

Environment: Websphere 6.0.2.5

Participants: Ben Kuo, Mark Chaimungkalanont [Atlassian], Patt-Corner, Robert and Robert Patt-Corner
Since last comment: 2 years, 13 weeks, 2 days ago
Number of comments: 8
Internal Priority: 2. High
Labels:


 Description  « Hide
From:

http://forums.atlassian.com/thread.jspa?messageID=257234249&tstart=0#257234249

Renaming context root only made bamboo very unhappy. Renaming the project and EAR was successful but resulted in trace 2 behaviour – on running default.html a continued and apparently unsuccessful redirect to the /bootstrap/selectSetupStep.action page. See trace 2.

================ Trace 2======================

[9/21/06 14:43:44:483 EDT] 00000051 SystemOut O 2006-09-21 14:43:44,483 INFO [JohnsonFilter] The application is not yet setup. Redirecting request from '' to '/bootstrap/selectSetupStep.action'
[9/21/06 14:43:44:483 EDT] 00000042 SystemOut O 2006-09-21 14:43:44,483 INFO [JohnsonFilter] The application is not yet setup. Redirecting request from '' to '/bootstrap/selectSetupStep.action'
[9/21/06 14:43:44:483 EDT] 00000040 SystemOut O 2006-09-21 14:43:44,483 INFO [JohnsonFilter] The application is not yet setup. Redirecting request from '' to '/bootstrap/selectSetupStep.action'

and so on, forever.

This could be a WebSphere specific issue, since I'm pretty sure we install locally fine on a different context using Tomcat.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ben Kuo added a comment - 21/Sep/06 07:18 PM
Hi Robert,

I've tried reproducing the bug using Jetty but haven't had any luck.

Could you please outline the steps you took which led to the behaviour which generated trace 2?

Regards
Ben


Robert Patt-Corner added a comment - 22/Sep/06 12:02 PM
Original steps were somewhat convoluted, and are reproduced below.

See the next comment for a cleaner use case that has a similar but not identical result.

Steps are:

1. Import WAR to RAD 6 using defaults for WAR import
2. Web and EAR project created
3. Run WAR and EAR project; receive naming error:

[9/21/06 13:11:55:122 EDT] 00000142 SystemErr R java.io.IOException: URI length is greater than Windows limit of 259 characters. C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\profiles\RASMASDev\wstemp\10dd15c8615\workspace\cells\LS1257602DNode01Cell\applications\atlassian-bamboo-web-app-0_4EAR.ear\deployments\atlassian-bamboo-web-app-0_4EAR\atlassian-bamboo-web-app-0_4.war\META-INF\MANIFEST.MF

4. Attempt to resolve by shortening WAR name and context root. Application fails to start

5. Throw away web project and reimport WAR using old EAR as enclosure

6. Shorten URI by renaming Web Project only

7. Observe repeating call behaviour.


Robert Patt-Corner added a comment - 22/Sep/06 12:06 PM
See the attached document for a cleaner use case that imports with shorter names, working around the character length problem. The clean import also encounters problems at startup, although slightly different.

Gist of attachement is:

1. Import WAR to RAD, assigning shorter names at import
2. Enhance product with bamboo-init.properties per note on download WIKI
3. Install project on server without incident
4. Observe EAR start correctly
5. Access via browser
6. No return page. IE hangs indefinitely. Firefox gives a message:

The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

  • This problem can sometimes be caused by disabling or refusing to accept
    cookies.

Server log shows:

[9/22/06 12:52:22:028 EDT] 00000028 WebGroup A SRVE0169I: Loading Web Module: Bamboo.
[9/22/06 12:52:23:881 EDT] 00000028 CollectionFac I org.springframework.core.CollectionFactory <clinit> JDK 1.4+ collections available
[9/22/06 12:52:24:071 EDT] 00000028 CollectionFac I org.springframework.core.CollectionFactory <clinit> Commons Collections 3.x available
[9/22/06 12:52:24:211 EDT] 00000028 XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from class path resource [applicationContextBootstrap.xml]
[9/22/06 12:52:24:602 EDT] 00000028 ClassPathXmlA I org.springframework.context.support.AbstractRefreshableApplicationContext refreshBeanFactory Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=630885779]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [homeLocator,applicationConfig,setupPersister,upgradeManager,bootstrapManager,hibernateConfig,hibernateConfigurator,bambooLicenseManager]; root of BeanFactory hierarchy
[9/22/06 12:52:24:662 EDT] 00000028 ClassPathXmlA I org.springframework.context.support.AbstractApplicationContext refresh 8 beans defined in application context [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=630885779]
[9/22/06 12:52:24:752 EDT] 00000028 ClassPathXmlA I org.springframework.context.support.AbstractApplicationContext initMessageSource Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@1b23cd86]
[9/22/06 12:52:24:802 EDT] 00000028 ClassPathXmlA I org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@579d8d86]
[9/22/06 12:52:24:812 EDT] 00000028 DefaultListab I org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [homeLocator,applicationConfig,setupPersister,upgradeManager,bootstrapManager,hibernateConfig,hibernateConfigurator,bambooLicenseManager]; root of BeanFactory hierarchy]
[9/22/06 12:52:26:735 EDT] 00000028 ServletWrappe A SRVE0242I: [BambooEAR] [/Bamboo] [displayChart]: Initialization successful.
[9/22/06 12:52:26:925 EDT] 00000028 DispatcherUti I com.opensymphony.webwork.dispatcher.DispatcherUtils init Could not load portlet-api, disabling webwork's portlet support.
[9/22/06 12:52:26:935 EDT] 00000028 ServletWrappe A SRVE0242I: [BambooEAR] [/Bamboo] [action]: Initialization successful.
[9/22/06 12:52:26:945 EDT] 00000028 VirtualHost I SRVE0250I: Web Module Bamboo has been bound to default_host[*:9081,*:80,*:9444].
[9/22/06 12:52:27:126 EDT] 00000028 ApplicationMg A WSVR0221I: Application started: BambooEAR
[9/22/06 12:53:42:858 EDT] 00000031 WebApp A SRVE0180I: [Bamboo] [/Bamboo] [Servlet.LOG]: [CompressingFilter/1.4] CompressingFilter has initialized
[9/22/06 12:53:42:999 EDT] 00000031 FlushingSprin I org.springframework.web.filter.GenericFilterBean init Initializing filter 'sessioninview'
[9/22/06 12:53:43:089 EDT] 00000031 FlushingSprin I org.springframework.web.filter.GenericFilterBean init Filter 'sessioninview' configured successfully


Robert Patt-Corner added a comment - 22/Sep/06 12:07 PM
Use case 2 screenshots, as summarized

Mark Chaimungkalanont [Atlassian] added a comment - 26/Sep/06 12:08 AM
Robert,

Sorry for the delay here.

Looking at the "trace 2" and the code more closely, the problem seems to be from Websphere always returning a '' for request.getServletPath.

We're currently trying to setup a Websphere 6 environment running Bamboo, to see if we can try to get it working.

If you could possiby use the standalone zip version in the mean time, that'd be great.

Thanks for your screenshots, by the way.

Cheers,

Mark C


Patt-Corner, Robert added a comment - 26/Sep/06 12:47 PM
No problem using standalone ... figured on that, but wanted to be of
assistance with WS.

I'll look into the servletPath issue from my end as well, as that's
probably settable

R.


Mark Chaimungkalanont [Atlassian] added a comment - 26/Sep/06 06:46 PM
Robert,

Thanks for the help!

I did manage to hunt down some code in WebWork that deals with differences in Servlet 2.2 & 2.3 for getServletPath. We'll try to use this code for 0.5 release as opposed to the standard getServletPath call. So you should be able to check it out in the 0.5 release.

Cheers

Mark C

/**
     * Retrieves the current request servlet path.
     * Deals with differences between servlet specs (2.2 vs 2.3+)
     * 
     * @param request the request
     * @return the servlet path
     */
    public static String getServletPath(HttpServletRequest request) {
        String servletPath = request.getServletPath();
        
        if (null != servletPath && !"".equals(servletPath)) {
            return servletPath;
        }
        
        String requestUri = request.getRequestURI();
        int startIndex = request.getContextPath().equals("") ? 0 : request.getContextPath().length();
        int endIndex = request.getPathInfo() == null ? requestUri.length() : requestUri.lastIndexOf(request.getPathInfo());
        
        if (startIndex > endIndex) { // this should not happen
            endIndex = startIndex;
        }
        
        return requestUri.substring(startIndex, endIndex);
    }

Ben Kuo added a comment - 08/Oct/06 08:13 PM
Hi Robert,

For 0.5 we've updated Bamboo with the Webwork code to hopefully resolve this issue.
Hopefully 0.5 will be released very shortly and if you could try it out and see if it resolve the issue, that'll be great.

Thanks for reporting and let us know if you still run into any problems.

Ben