Errors during VM update, JBoss no longer starts

The following two files were missing:

  • /usr/lib/jvm/java-1.6.0/jre/lib/security/US_export_policy.jar
  • /usr/lib/jvm/java-1.6.0/jre/lib/security/local_policy.jar

Example error log snippet:

15 Mar 2012 21:19:27,768 ERROR AbstractKernelController : incrementState : 959 - Error installing to Start: name=WebServer state=Create
java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.SunJCE_b
at javax.crypto.Cipher.getInstance(DashoA13*..)
at com.sun.net.ssl.internal.ssl.JsseJce.getCipher(JsseJce.java:180)

Using Maven

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, March 15, 2012 10:40 AM
To: Ruckman, Maurice (HAL)
Cc: Fillman, Eric (HAL); Phatak, Sheetal (HAL); Thompson, Sonya (HAL); Bojja, Sridhar (HAL Contractor)
Subject: Re: FYI JBOSS - Almost as good as an exploded WAR

Exploded deployment and faster modify/test cycle will come as a side effect of the maven migration, currently in progress in the "goodbye-ant" feature branch. Anybody can try it by doing:

$ svn co http://halsvn01/svn/hal/branches/features/goodbye-ant hal $ cd hal $ mvn install

Guillaume

How to Install Eclipse and Create Projects

Pre-steps

Setup HAL Formatting
Turn off Project, Build Automatically

Start Project Setup via Repository

Open a Perspective "SVN Repository Explorer"

Right-click blank window, New, Respository Location
http://halsvn01/svn/hal

Go into preferences, search for Workspace and have it "Prompt for workspace on startup"
NOTE: When machines are currently imaged, the wrong default workspace is set

Right-click SVN Repositories
branchesfeaturesjboss-migration (current release candidate or the like)

and click "Checkout"
Use the wizard, "Check out as a project configured using the New Project Wizard", "Check out HEAD revision", "Allow unversioned obstructions" (defaults)
Click "Finish"

Wizards: Java Project, Next
Project Name: HAL, "Use default location" /home/jboss1/workspace/HAL, "Create separate folders for sources and class files"
Use an execution environment JRE: JavaSE-1.6
Click "Finish"

Click "OK" for Java Perspective
Click "OK" for confirm overwrite process

Right Click the project branch HAL, Build Path, Configure Build Path...
Source, Remove "HAL/src"
"Add Folder", Click "OK"
Check "HAL" and Click "OK"

Included: (All), Edit
"Add Multiple" "com" (com/)
Click "OK"
Click "Finish"

Click "OK"

Setup JBoss Server for Runtime and Debugging

File, New, Other, Server

Server, Next "jBoss AS 5.1"

server's host name "haldevjbs04.hq.halw.com"

Next

Name: JBoss Runtime

Home Directory: /home/jboss1/programs/jboss-eap-5.1/jboss-as

JRE: java-1.6.0-sun-1.6.0.31.x86_64

Directory: sever
and then highlight: "haldev-vm-template"

Then click "Finish"

Configure JBoss Server for Performance

Windows, Show View, Servers

Now you have a tab down in the lower window section

Double-click the "JBoss 5.1 Runtime Server [Stopped]" icon to open setup

"Open Launch Configuration" link

VM arguments: (need updated)

-Xmx768m -> -Xmx1024m

Scroll to the bottom, and add (preceed with a space)
-Djboss.jvmroute=haldevjbs04.hq.halw.com

Then click "OK" to finish the server configuration.

Complete Project Setup by Adding Jar Files

Right-click your project, in the Package Explorer

Configure build path, "Add Library" "Server Runtime", Next, "JBoss 5.1 Runtime"
Finish, and OK

Add Jars "Java Build Path", "Libraries", "Add JARs"
choose HAL project put *jar in the filter
expand all branches, and then select all of the jar files
Click "OK" once you have deselected all of the folder nodes

Post-steps

Turn on Project, Build Automatically
Install PMD

Looking at some JBOSS properties in jmx-console

Here's how to look at some JBOSS properties in the jmx-console

Note: You can change the current state of your server, but only during run time, configuration files are not updated. So, it's a nice way to look via a GUI and play a bit too.

http://haldevjbs##.hq.halw.com:8080/jmx-console/
where ## is your machine number

credentials:
admin/admin

Put jboss*:* in ObjectFilter name in upper right corner

Click on the link (search for):
name=SystemProperties,type=Service

Click on the "Invoke" button for showAll

You'll see all of the system properties

Another one to try (go back, and search)
Click on the link:
service=JNDIView

Click on the "Invoke" button for list

Another one to try:

Put jboss.system*:* in ObjectFilter name in upper right corner

Click on the link:
type=server

You'll see information about your server

Resolving conflict when merging

Today, we had a conflict when merging the jboss stabilization branch into the RC. Here are the steps I used to resolve it. The basic process was to first merge the RC into the jboss-stabilization branch, resolve the conflict and then merge the jboss-stabilization branch back into the RC:

552 svn co http://halsvn01/svn/hal/branches/features/jboss-stabilization
553 svn status
554 cd jboss-stabilization/
555 svn status
556 svn info
557 svn merge http://halsvn01/svn/hal/branches/RC/12.11-RC
558 svn status
559 svn resolve --accept=working halwebsite/com
560 svn status
561 svn commit -m "Sync jboss-stabilization branch with 12.11-RC"
562 ls
563 cd ..
564 rm -rf jboss-stabilization/
565 svn co http://halsvn01/svn/hal/branches/RC/12.11-RC
566 cd 12.11-RC/
567 svn merge --reintegrate http://halsvn01/svn/hal/branches/features/jboss-stabilization
568 svn status

-------------------------------------
Guillaume Radde
Senior Consultant, Red Hat Consulting
guillaume.radde@redhat.com
http://www.redhat.com
-------------------------------------

Installing Meld on RH for compares

Source: meld-1.4.0.tar

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, March 08, 2012 11:43 AM
To: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Thompson, Sonya (HAL)
Cc: Jeff Lindesmith
Subject: Merge tool

If you would like a graphical diff tool, you can download meld-1.4.0 to your vm in the programs folder. More recent version of Meld don't work because the version of Python on the vms is too old.

http://ftp.gnome.org/pub/GNOME/sources/meld/1.4/meld-1.4.0.tar.gz

Guillaume

-------------------------------------
Guillaume Radde
Senior Consultant, Red Hat Consulting
guillaume.radde@redhat.com
http://www.redhat.com
-------------------------------------

Encryption setup for bouncycastle

Location of file on VM:
/usr/lib/jvm/java-1.6.0-sun.x86_64/jre/lib/security/java.security
/usr/lib/jvm/java-1.6.0/jre/lib/security/java.security

Excerpt:

#
# List of providers and their preference orders (see above):
#
security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=com.sun.net.ssl.internal.ssl.Provider
security.provider.4=com.sun.crypto.provider.SunJCE
security.provider.5=sun.security.jgss.SunProvider
security.provider.6=com.sun.security.sasl.Provider
security.provider.7=org.jcp.xml.dsig.internal.dom.XMLDSigRI
security.provider.8=sun.security.smartcardio.SunPCSC
security.provider.9=org.bouncycastle.jce.provider.BouncyCastleProvider