Showing posts with label AIX. Show all posts
Showing posts with label AIX. Show all posts

Thursday, November 25, 2010

Deploy Axis2 on AIX

On WebLogic running on AIX, you will need to package the webservice into a .aar file before Axis2 can recognize the web service. On other operating systems like Windows, packaging the war file without the .aar file works fine!

Here's how you do it:
1. In Eclipse, navigate to the services directory via:
Project Name>WebContent>WEB-INF>services>


2. Right click on the service and click on Export


3. Choose General>Archive File and click on Next


4. Uncheck the service directory but ensure that all the subdirectories are checked. Make sure the file has the extension .aar and choose Finish.



5. Choose the overwrite the file if asked:


6. Next, export the service as a war for deployment. Right click on the project and choose Export


7. Choose war file to export


8. Specify the destination folder and click on Finish


9. Once the export to war is complete, deploy it on your App Server.

Thursday, May 21, 2009

Installing Glassfish on AIX

At this point in time, V3 is not available on AIX, so I will be using 2.1

1. Install JDK 1.5 or 1.6. You can download this from IBM AIX website.


2. Download Glassfish bundle from here. For AIX, downloaded glassfish-installer-v2.1-b60e-aix.jar size (61M). Note: ml stands for multi-language

3. Run the following command

% java -Xmx256m -jar glassfish-installer-v2.1-b60e-aix.jar


This command will unbundle GlassFish and create a new directory structure rooted under a directory named 'glassfish'.


4. CD to the glassfish subdirectory.

% cd glassfish

5. Set the execute permission for the Ant binaries that are included with the GlassFish bundle.

% chmod -R +x lib/ant/bin

% lib/ant/bin/ant -f setup.xml


6. On AIX, you may run into the following error:

create.domain:
[exec] Using port 4848 for Admin.
[exec] Using port 8080 for HTTP Instance.
[exec] Using port 7676 for JMS.
[exec] Using port 3700 for IIOP.
[exec] Using port 8181 for HTTP_SSL.
[exec] Using default port 3820 for IIOP_SSL.
[exec] Using default port 3920 for IIOP_MUTUALAUTH.
[exec] Using default port 8686 for JMX_ADMIN.
[exec] Domain being created with profile:developer, as specified by variable AS_ADMIN_PROFILE in configuration file.
[exec] ------ Using Profile [developer] to create the domain ------
[exec] XML processing for profile: Base document [/home/affinium7/mas/glassfish/lib/install/templates/default-domain.xml.template]. Profile name
property [domain.xml.style-sheets].
[exec] Security Store uses: JKS
[exec] File {0} not found.
[exec] CLI130 Could not create domain, domain1
BUILD FAILED
/home/affinium7/mas/glassfish/setup.xml:177: The following error occurred while executing this line:
/home/affinium7/mas/glassfish/setup.xml:607: exec returned: 1
Total time: 53 seconds


7. If you get the above error, it means .asadmintruststore was not created during installation and you will need to generate a new key. For full discussion on this, visit this post.

8. Run the following commmand to solve the problem:

keytool -genkey -keyalg RSA -keystore ~/.asadmintruststore -alias junk


9. Your actions will be as follows:
mclaren> keytool -genkey -keyalg RSA -keystore ~/.asadmintruststore -alias junk
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: XXX
What is the name of your organizational unit?
[Unknown]: Consumer Marketing
What is the name of your organization?
[Unknown]: XXX
What is the name of your City or Locality?
[Unknown]: Singapore
What is the name of your State or Province?
[Unknown]: Singapore
What is the two-letter country code for this unit?
[Unknown]: SG
Is CN=XXX, OU=Consumer Marketing, O=XXX, L=Singapore, ST=Singapore, C=SG correct? (type "yes" or "no")
[no]: yes
Enter key password for :
(RETURN if same as keystore password):
mclaren>


10. Once that is done, re-run the setup and your BUILD should be successful:
create.domain:
[exec] Using port 4848 for Admin.
[exec] Using port 8080 for HTTP Instance.
[exec] Using port 7676 for JMS.
[exec] Using port 3700 for IIOP.
[exec] Using port 8181 for HTTP_SSL.
[exec] Using default port 3820 for IIOP_SSL.
[exec] Using default port 3920 for IIOP_MUTUALAUTH.
[exec] Using default port 8686 for JMX_ADMIN.
[exec] Domain being created with profile:developer, as specified by variable AS_ADMIN_PROFILE in configuration file.
[exec] ------ Using Profile [developer] to create the domain ------
[exec] XML processing for profile: Base document [/home/affinium7/mas/glassfish/lib/install/templates/default-domain.xml.template]. Profile name [developer]. Processing property [domain.xml.style-sheets].
[exec] Security Store uses: JKS
[exec] Domain domain1 created.
[exec] Login information relevant to admin user name [admin] for this domain [domain1] stored at [/home/affinium7/.asadminpass] successfully.
[exec] Make sure that this file remains protected. Information stored in this file will be used by asadmin commands to manage this domain.
[delete] Deleting: /home/affinium7/mas/glassfish/passfile
BUILD SUCCESSFUL
Total time: 36 seconds


11. To start the app server:
cd glassfish/bin
asadmin start-domain

Domain domain1 is ready to receive client requests. Additional services are being started in background.
Domain [domain1] is running [Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs)] with its configuration and logs at: [/home/affinium7/mas/glassfish/domains].
Admin Console is available at [http://localhost:4848].
Use the same port [4848] for "asadmin" commands.
User web applications are available at these URLs:
[http://localhost:8080 https://localhost:8181 ].
Following web-contexts are available:
[/web1 /__wstx-services HelloWorldService ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://mclaren:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[8080 8181 4848 3700 3820 3920 8686 ].
Domain does not support application server clusters and other standalone instances.


12. The default ports are:
admin port: 4848
app port: 8080

13. The default login to the admin server is
User: admin
Password: adminamin


Here's another good link that documents the installation/configuration of Glassfish. Click here.