Bug 778228 (SOA-731) - Deploy opensso.war in soa-p
Summary: Deploy opensso.war in soa-p
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-731
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: Deployment
Version: 4.3 IR3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.3 CP01
Assignee: Jeff Yu
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks: SOA-1068
TreeView+ depends on / blocked
 
Reported: 2008-09-03 02:17 UTC by Jeff Yu
Modified: 2013-07-02 01:34 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-03-16 13:51:27 UTC
Type: Task
Embargoed:


Attachments (Terms of Use)
opensso.aop.zip (1.49 MB, application/zip)
2008-12-04 09:14 UTC, Jeff Yu
no flags Details
server.log (105.61 KB, text/x-log)
2009-02-23 20:21 UTC, Len DiMaggio
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 778258 0 urgent CLOSED Deploy opensso.war into Tomcat 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker SOA-731 0 None None None Never

Internal Links: 778258

Description Jeff Yu 2008-09-03 02:17:12 UTC
Date of First Response: 2008-09-07 04:05:25
project_key: SOA

Currently, there are two issues of deploying opensso.war into soa-p.

1). When you deploy the exploded opensso.war into JBossAS on the fly (using ant unzip task), you will get  "java.lang.ClassNotFoundException:  com.sun.identity.wss.sts.STSContextListener". The cause for this is: The deployer is seeing the web.xml files before the classes have been copied across. Because the opensso.war is about 65M, and it takes time to unzip and copy it to the JBossAS through Ant script. And the reason for us to deploy exploded opensso.war instead of war file directly is that: You'll lose the install when you reboot or redeploy because jboss unpacks into temporary directories.

2) Once you have installed the opensso.war into soa-p, and run quick starts example with 'webservice', such as 'webservice_producer', you will get "Cannot create SOAPFault message  for: javax.xml.soap.SOAPException: java.lang.IllegalStateException: Failed to load javax.xml.soap.SOAPFactory:  com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl". This is because in the opensso servlet initializing, it sets system properties for the SOAP service configuration (that uses Metro one).  which They should not be doing this as it overrides the normal META-INF/services behaviour.

Comment 1 Jeff Yu 2008-09-03 02:26:27 UTC
For the 1st issue, we have a workaround is that: when we deploy the exploded opensso.war, make sure we stop the JBoss Server. 
For the 2nd issue, need to find a way to resolve it, Kevin mentioned we can use aop to accomplish this at least.

Comment 3 Mark Little 2008-09-07 08:05:25 UTC
Yes, this makes sense. But create a separate issue for OpenSSO in Tomcat, link it to this one (as related), move this one to 4.3 CP1 and leave the new one as a blocker against CR1.

Comment 4 Jeff Yu 2008-09-08 02:54:11 UTC
Link: Added: This issue related SOA-758


Comment 5 Jeff Yu 2008-09-08 06:55:57 UTC
Update the priority and fix version.

Comment 6 Jeff Yu 2008-12-04 09:14:51 UTC
Thanks Kevin for providing this work around.

As Kevin said in the email, following three issues has been addressed by the opensso.aop.zip file.

There are three issues fixed by this

- location of default directory is now under data/opensso
- disable setting of WS properties
- force registration of shutdown hook before shutdown called

Comment 7 Jeff Yu 2008-12-04 09:14:51 UTC
Attachment: Added: opensso.aop.zip


Comment 8 Jeff Yu 2008-12-08 08:40:10 UTC
It has been committed by rev 2419 of soa-p repo.

It should be distributed under soa-p/jboss-as/samples/quickstarts/opensso/opensso-ear

Comment 9 Jeff Yu 2008-12-08 10:23:54 UTC
Link: Added: This issue is a dependency of SOA-1068


Comment 10 Len DiMaggio 2009-02-20 16:37:54 UTC
What solution was implemented for this JIRA? The user still has to install/use Tomcat and deploy OpenSSO to it, yes?



Comment 11 Jeff Yu 2009-02-21 06:06:08 UTC
We have provide a workaround in the 4.3 CP01, which is installing the opensso as ear in the soa-p. So, NO, users don't have to use the Tomcat and deploy the opensso.

Comment 12 Len DiMaggio 2009-02-23 20:02:55 UTC
See the attached server.log - opensso.ear builds cleanly, but class not found exceptions are raised when it's installed:

2009-02-23 14:59:22,346 INFO  [org.jboss.deployment.EARDeployer] Init J2EE application: file:/jboss/local/43_CP01_CR2/jboss-soa-p.4.3.0/jboss-as/server/production/deploy/opensso-1.0.ear
2009-02-23 14:59:27,117 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.iplanet.services.comm.server.PLLRequestServlet
2009-02-23 14:59:27,122 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.sun.identity.setup.AMSetupServlet
2009-02-23 14:59:27,127 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.sun.identity.cli.WebCLI
2009-02-23 14:59:27,141 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.iplanet.services.cdc.CDCServlet
2009-02-23 14:59:27,151 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.sun.identity.setup.SetSetupProgress
2009-02-23 14:59:27,162 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.sun.identity.password.ui.PWResetServlet
2009-02-23 14:59:27,170 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.iplanet.dpro.session.service.GetHttpSession
2009-02-23 14:59:27,173 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.sun.identity.authentication.UI.LoginLogoutMapping
2009-02-23 14:59:27,177 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.sun.identity.idsvcs.rest.IdentityServicesHandler
2009-02-23 14:59:27,195 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.sun.identity.wss.sts.SecurityTokenService
2009-02-23 14:59:27,196 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.sun.identity.policy.util.Gateway
2009-02-23 14:59:27,198 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.sun.identity.idsvcs.IdentityServicesServlet
2009-02-23 14:59:27,199 WARN  [org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE] Cannot load servlet class: com.sun.identity.authentication.UI.LoginServlet
2009-02-23 14:59:27,230 INFO  [org.jboss.web.tomcat.service.TomcatDeployer] deploy, ctxPath=/opensso, warUrl=.../tmp/deploy/tmp21448opensso-1.0.ear-contents/opensso-exp.war/
2009-02-23 14:59:27,486 ERROR [org.apache.catalina.core.ContainerBase] Error configuring application listener of class com.sun.identity.wss.sts.STSContextListener
java.lang.ClassNotFoundException: com.sun.identity.wss.sts.STSContextListener


Comment 13 Len DiMaggio 2009-02-23 20:03:18 UTC
Server log file

Comment 14 Len DiMaggio 2009-02-23 20:03:18 UTC
Attachment: Added: server.log.gz


Comment 15 Len DiMaggio 2009-02-23 20:04:48 UTC
We will also have to update the readme.txt fle - steps 1-6 refer to installing opensso with Tomcat:


  1. Download the Tomcat version 6 or greater from the apache
     site. For example: 
     http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.14/bin/apache-tomcat-6.0.14.tar.gz

  2. Untar it to a directory for example: /opt/tomcat6.0.14

  3. Open up tomcat /opt/tomcat6.0.14/bin/catalina.sh (catalina.bat
     for windows) Add max size to the JAVA_OPTS.

           Before Editing:
              JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"

           After Editing:
              JAVA_OPTS="$JAVA_OPTS "-Xmx1G" "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"

  4. Copy the opensso.war to /opt/tomcat6.0.14/webapps/

  5. If you want to deploy the soa-p and tomcat in the same machine,
     for simplicity, you can update tomcat port in
     $tomcat/conf/server.xml as below:

      <Connector port="8090" protocol="HTTP/1.1"....
      <Connector port="8099" protocol="AJP/1.3" redirectPort="8443" />

  6. Start tomcat by running /opt/tomcat6.0.14/bin/startup.sh
     (startup.bat for windows)

  7. Open http://tomcatHost.example.com:8090/opensso in a browser.

  8. Click on "Create Default Configuration". This causes OpenSSO to
     configure itself.

  9. Enter 'adminpass' for the "Default User[amAdmin]" and 'ldappass'
     for "Default Agent [amldapuser]"

 10. Visit http://tomcatHost.example.com:8090/opensso again. Log in
     using the proper credentials. User Name is amAdmin and Password
     is the password you chose to go with amAdmin.
 
 


  1. Download the Tomcat version 6 or greater from the apache
     site. For example: 
     http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.14/bin/apache-tomcat-6.0.14.tar.gz

  2. Untar it to a directory for example: /opt/tomcat6.0.14

  3. Open up tomcat /opt/tomcat6.0.14/bin/catalina.sh (catalina.bat
     for windows) Add max size to the JAVA_OPTS.

           Before Editing:
              JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"

           After Editing:
              JAVA_OPTS="$JAVA_OPTS "-Xmx1G" "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"

  4. Copy the opensso.war to /opt/tomcat6.0.14/webapps/

  5. If you want to deploy the soa-p and tomcat in the same machine,
     for simplicity, you can update tomcat port in
     $tomcat/conf/server.xml as below:

      <Connector port="8090" protocol="HTTP/1.1"....
      <Connector port="8099" protocol="AJP/1.3" redirectPort="8443" />

  6. Start tomcat by running /opt/tomcat6.0.14/bin/startup.sh
     (startup.bat for windows)

  7. Open http://tomcatHost.example.com:8090/opensso in a browser.

  8. Click on "Create Default Configuration". This causes OpenSSO to
     configure itself.

  9. Enter 'adminpass' for the "Default User[amAdmin]" and 'ldappass'
     for "Default Agent [amldapuser]"

 10. Visit http://tomcatHost.example.com:8090/opensso again. Log in
     using the proper credentials. User Name is amAdmin and Password
     is the password you chose to go with amAdmin.
 


Comment 16 Len DiMaggio 2009-02-23 20:20:17 UTC
Attachment: Removed: server.log.gz 


Comment 17 Len DiMaggio 2009-02-23 20:21:08 UTC
Server log

Note - the steps I followed were to:

1) deploy the .ear
2) start the server (in this case, the embedded server, production profile)



Comment 18 Len DiMaggio 2009-02-23 20:21:08 UTC
Attachment: Added: server.log


Comment 19 Jeff Yu 2009-02-25 09:56:46 UTC
Hi Len, 

For the readme.txt file update, do you mean add the 'steps 1-6 refer to installing opensso with Tomcat: ' sentence in the file?


Comment 20 Jeff Yu 2009-02-26 05:26:05 UTC
Add this link for tracking in the opensso community. https://opensso.dev.java.net/issues/show_bug.cgi?id=4321

Comment 21 Jeff Yu 2009-02-26 05:39:14 UTC
Fix has been committed at rev 25& 26. Also add the following content in the readme.txt file.
"
* Note: the opensso-1.0.ear is meant for demonstration purpose only, such as running this quickstart,
            but we do not recommend the workaround for production.
"

Thanks Len for point this out.

Comment 22 Jehudi Castro Sierra 2009-02-27 13:48:35 UTC
the problem still on 4.3.0.CR2

Comment 23 Jeff Yu 2009-02-27 15:12:58 UTC
Yes, Len reported it as 4.3.0.CR2, the fix should be included in the next build. 

Comment 24 Dana Mison 2009-03-13 08:26:04 UTC
Release Note:
SOA-731
The opensso quickstart has had an EAR build added for demonstration purposes.  It is not supported or recommended for deployment in a production environment.

Comment 25 Len DiMaggio 2009-03-16 13:51:27 UTC
Verified in SOA 4.3 CP01 CR4


Note You need to log in before you can comment on or make changes to this bug.