Tag: ejb3

Accessing EJB3 Remotely over SSL in JBossAS7.1.1.Final

Hi,

In our previous demos we have already seen that how to remotely access the EJBs deployed on “JBoss AS 7.1.1.Final”. So in this example we will see how to invoke an EJB in a Secured manner over SSL (Secure Socket Layer). Here we will use the “jboss-ejb3.xml” file which is a new container specific deployment descriptor for the EJBs. Also we will an alternative option of defining the security domain for our ejbs using annotation “@org.jboss.ejb3.annotation.SecurityDomain”. Additionally we will create SSL Certificates and configure the JBoss Remoting to use the SSL so that the EJB communitation between client and JBossAS7.1.1.Final will be done in Secured Manner.

In this article we are going to see an easiest way to lookup a Secured EJBs remotely in >”JBoss AS7.1.1.Final”

Point-1). We will see How to create SSL Certificates and How to add the Client’s Public certificate/key in Server’s keyStore and how to store Server’s Public Certificate/Key on Client’s Keystore (truststore). And How to configure it in JBossAS7 configuration.

Point-2). How to create a separate Security Realm for our EJBs inside “standalone-full.xml”.

Point-3). How to create a separate Security Domain for our EJBs inside “standalone-full.xml”.

Point-4). How to use the “jboss-ejb3.xml” file inside the EJB jar file in order to associate it with the security domain?

Point-5). How to use the annotation “@org.jboss.ejb3.annotation.SecurityDomain” sothat we will not need to write the addiaional deployment descriptor “jboss-ejb3.xml”

Point-6). A properties file need to be placed in the Clients CLASSPATH with name “jboss-ejb-client.properties”, with some additional properties.

The whole article will be divided into two Parts 1) the Server side configuration and 2). the Application Level Settings from the Client side.

Source Code (Git Repo) Source Code for this Demo Can be downloaded from GIT Repository:
https://github.com/jaysensharma/MiddlewareMagicDemos/tree/master/EJB3_Over_SSL_JBossAS711

JBossAS7 side configuration changes

Here we will first see what all changes are required from the JBoss side in order to create a separate Security Realm and Security Domain for our EJBs.

Step-1). Open a command prompt and make sure that the JDK bin directory is present in the classpath, because the “keytool” which we are going to use in order to create certificate is present in the PATH and then run the following command to create JBoss Keystore.

For Unix Based OS:
export PATH=/home/userone/jdk1.6.0_21/bin:$PATH

For Windows Based OS:
set PATH=C:/jdk1.6.0_21/bin;%PATH%

As the PATH is set properly so we will create the Server and clients certificate as following:

# Create Server Key Store
keytool -genkey -v -alias jbossalias -keyalg RSA -keysize 1024 -keystore jbossServer.keystore -validity 3650 -keypass JBossPassword -storepass JBossPassword -dname "CN=localhost, OU=JBoss Unit, O=JBoss, L=Pune, S=Maharashtra, C=IN"

# Exporting Server's Public Key
keytool -export -keystore jbossServer.keystore -alias jbossalias -file serverPublicKey.cer -keypass JBossPassword -storepass JBossPassword


# Create Client Key Store
keytool -genkey -v -alias clientalias -keyalg RSA -keysize 1024 -keystore jbossClient.keystore -validity 3650 -keypass clientPassword -storepass clientPassword -dname "CN=localhost, OU=Client Unit, O=JBoss, L=Pune, S=Maharashtra, C=IN"


# Exporting Client's Public Key
keytool -export -keystore jbossClient.keystore -alias clientalias -file clientPublicKey.cer -keypass clientPassword -storepass clientPassword

Above commands will create the following files:
“jbossServer.keystore” == This is Server’s keystore which we need to place inside “$JBOSS_HOME/standaone/configuration/” directory.

“serverPublicKey.cer” == This is the Server’s public key which later Client will import in their Client Keystore.

“jbossClient.keystore” == This is Client’s keystore which we need to place on the client side and will pass it to the Client program using JAVA_OPTIONS “-Djavax.net.ssl.trustStore=certificates/jbossClient.keystore”

“clientPublicKey.cer” == This is the Clients’s public key which later Server will import in their Server Keystore.

Step-2). Now we we created the Server / Client Keystore and their Public Keys so we will not run the following commands in order to Import Client’s Public Key on Server’s Keystore and Server’s Public Key on Client’s Keystore as following:

# Importing Client's Public key into server's truststore
keytool -import -v -trustcacerts -alias clientalias -file clientPublicKey.cer -keystore jbossServer.keystore -keypass JBossPassword -storepass JBossPassword

__________
OUTPUT
__________
Owner: CN=localhost, OU=Client Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
Issuer: CN=localhost, OU=Client Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
Serial number: 4fef590d
Valid from: Sun Jul 01 01:22:45 IST 2012 until: Wed Jun 29 01:22:45 IST 2022
Certificate fingerprints:
	 MD5:  9B:4A:A2:5D:7C:15:8A:B8:01:00:84:69:C3:8C:66:5B
	 SHA1: 9C:C1:05:34:EE:D9:6C:A2:6D:85:97:EA:52:F4:7D:E5:2C:B9:DB:04
	 Signature algorithm name: SHA1withRSA
	 Version: 3
Trust this certificate? [no]:  yes
Certificate was added to keystore
[Storing jbossServer.keystore]

And

# Importing Server's Public key into client's truststore
keytool -import -v -trustcacerts -alias jbossalias -file serverPublicKey.cer -keystore jbossClient.keystore -keypass clientPassword -storepass  clientPassword

__________
OUTPUT
__________
Owner: CN=localhost, OU=JBoss Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
Issuer: CN=localhost, OU=JBoss Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
Serial number: 4fef590c
Valid from: Sun Jul 01 01:22:44 IST 2012 until: Wed Jun 29 01:22:44 IST 2022
Certificate fingerprints:
	 MD5:  BD:0C:57:5D:26:64:EE:F4:6E:7E:E6:9C:E7:D0:DD:46
	 SHA1: BF:DF:22:29:54:80:BF:9B:7E:F5:48:7F:02:D5:76:9A:84:D4:09:BE
	 Signature algorithm name: SHA1withRSA
	 Version: 3
Trust this certificate? [no]:  yes
Certificate was added to keystore
[Storing jbossClient.keystore]

Step-3). Open the “$JBOSS_HOME/standaone/configuration/standalone-full.xml” file and then add a new Security Realm there inside the tag as following:

  <security-realm name="EJBRealm">
    <server-identities>
      <ssl>
        <keystore path="jbossServer.keystore" relative-to="jboss.server.config.dir" password="JBossPassword"/>
      </ssl>
    </server-identities>
    <authentication>
      <jaas name="ejb-security-domain"/>
    </authentication>
  </security-realm>

If you are using JBossAS7.1.2 or higher then rather than using [password=”JBossPassword”] you will need to use [keystore-password=”JBossPassword”] as the keystore Tag’s attribute is changed.

Step-4). As the above Security Realm is pointing to a security Domain “ejb-security-domain” so let’s create a new Security Realm inside the [subsystem xmlns=”urn:jboss:domain:security:1.1″] subsystem as following:

     <security-domain name="ejb-security-domain" cache-type="default">
         <authentication>
           <login-module code="Remoting" flag="optional">
             <module-option name="password-stacking" value="useFirstPass"/>
           </login-module>
           <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
             <module-option name="defaultUsersProperties" value="${jboss.server.config.dir}/ejb-users.properties"/>
             <module-option name="defaultRolesProperties" value="${jboss.server.config.dir}/ejb-roles.properties"/>
             <module-option name="usersProperties" value="${jboss.server.config.dir}/ejb-users.properties"/>
             <module-option name="rolesProperties" value="${jboss.server.config.dir}/ejb-roles.properties"/>
             <module-option name="password-stacking" value="useFirstPass"/>
           </login-module>
         </authentication>
     </security-domain>

Step-5). Also as we know that the EJBs are accessed remotely using the JBoss Remoting so we will need to make sure that the remoting subsystem is also using the Security Realm (EJBRealm) which we created as following:

    <subsystem xmlns="urn:jboss:domain:remoting:1.1">
       <connector name="remoting-connector" socket-binding="remoting" security-realm="EJBRealm"/>
    </subsystem>

Step-6). As our Security domain is using two properties file so we will need to create those properties file as well inside “$JBOSS_HOME/standaone/configuration/” as following:

ejb-users.properties

ejbUser=ejbPassword

ejb-roles.properties

ejbUser=ejbRole

Step-7). *** NOTE: Before running your Server make sure that you have copied the “jbossServer.keystore” file inside “$JBOSS_HOME/standaone/configuration/” directory. . Now start the JBoss AS7.1.1.Final as following:

./standalone.sh -c standalone-full.xml

Developing Secure EJB3 Application

As the Server side configurations are done so now we will proceed with developing the Secure EJB3 application.

Step-8). Create a directory somewhere in your file system like “/home/userone/EJB3_Over_SSL” and then create another directory with name “src” inside the “/home/userone/EJB3_Over_SSL” directory.

Step-9). Write the EJB Stateless Bean class “CallerBean.java” as following inside the directory “/home/userone/EJB3_Over_SSL/src”:

package remote;
import javax.ejb.*;
import javax.naming.*;
import java.util.*;
import javax.annotation.Resource;
import javax.annotation.security.DeclareRoles;
import javax.annotation.security.RolesAllowed;
import javax.ejb.LocalBean;
import javax.ejb.SessionContext;

@Stateless  
@Remote(CallerRemote.class)

/*
   If you dont want to use "META-INF/jboss-ejb3.xml" then you can use 
   the following annotation to defing your security-domain
   @org.jboss.ejb3.annotation.SecurityDomain("ejb-security-domain")
*/

public class CallerBean implements CallerRemote
 {
     @Resource
     private SessionContext sessionContext;

     @RolesAllowed("ejbRole")
     public String testMethod(String name)
	    {
		   System.out.println("nntBean's testMethod(String name) called....");
                   System.out.println("nntUserName: '" + sessionContext.getCallerPrincipal().getName() + "' is able to access testMethod()");
                   if (sessionContext.isCallerInRole("ejbRole"))
                         System.out.println("tUser is in   "ejbRole"   ");
                   else
                         System.out.println("tUser is NOT in an allowed role");
		   return "[CallerBean] testMethod() returned Hello "+name;
	    }


     public String commonMethod(String name)
	    {
		   System.out.println("nntBean's commonMethod(String name) called....");
                   System.out.println("nnUser " + sessionContext.getCallerPrincipal().getName() + " is able to access commonMethod()");
                   if (sessionContext.isCallerInRole("ejbRole"))
                         System.out.println("t##### commonMethod()  User is in ejbRole");
                   else
                         System.out.println("t##### commonMethod()  User is NOT in ejbRole");
		   return "[CallerBean] commonMethod() returned Hello "+name;
	    }
 }

Step-10). Write the EJB Remote Interface “CallerRemote.java” as following inside the directory “/home/userone/EJB3_Over_SSL/src”:

package remote;
public interface CallerRemote
{
     public String testMethod(String name);
     public String commonMethod(String name);
}

Step-11). In order to secure the EJB we will define the security domain inside the “jboss-ejb3.xml” file. Spo create a file with this name inside “/home/userone/EJB3_Over_SSL/src” as following:


<?xml version="1.0"?>  
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
   xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:s="urn:security"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd
   http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
   version="3.1"
   impl-version="2.0">
  <assembly-descriptor>
    <s:security>
      <ejb-name>*</ejb-name>
          <s:security-domain>ejb-security-domain</s:security-domain>
    </s:security>
  </assembly-descriptor>

</jboss:ejb-jar>

Step-12). As we are going to create an EAR file containing the above Stateless Session Bean so We will write the “application.xml” as following inside the directory “/home/userone/EJB3_Over_SSL/src”:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" id="Application_ID" version="5">
  <module>
    <ejb>remoteEJB.jar</ejb>
  </module>
</application>

Developing EJB3 Remote Client

Step-13). Now we will write the Client side code to access the Above mentioned EJB Remotely so create a class “TestRemoteClientA.java” as following inside the directory “/home/userone/EJB3_Over_SSL/src”:

package client;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.util.Properties;
import remote.CallerRemote;
public class TestRemoteClientA
  {
      public static void main(String ar[]) throws Exception 
       {
          Context context=null;
       try
         {
                Properties props = new Properties();
                props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
                props.put(Context.PROVIDER_URL, "remote://localhost:4447"); 
                props.put(Context.SECURITY_PRINCIPAL, "ejbUser");
                props.put(Context.SECURITY_CREDENTIALS, "ejbPassword");

                props.put("jboss.naming.client.remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED","true");
                props.put("jboss.naming.client.connect.options.org.xnio.Options.SSL_STARTTLS","true");

                props.put("jboss.naming.client.ejb.context", true);
                props.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
                context = new InitialContext(props);	
	        System.out.println("nt--------------------------nGot initial Context: "+context);		
         }
       catch (Exception e)
         {
                e.printStackTrace();
          }

         // Lookup Format will be 
         // <app-name>/<module-name>/<distinct-name>/<bean-name>!<fully-qualified-classname-of-the-remote-interface>
   
         CallerRemote remote=(CallerRemote)context.lookup("TestRemoteEJBEAR/remoteEJB//CallerBean!remote.CallerRemote");
         //System.out.println("nt remote.testMethod("Common-MiddlewareMagic") = "+remote.commonMethod("Common-MiddlewareMagic"));

         System.out.println("nt remote.testMethod("MiddlewareMagic") = "+remote.testMethod("MiddlewareMagic"));
       }
  }

Step-14). Now we will need to create a properties file “jboss-ejb-client.properties” as following inside the directory “/home/userone/EJB3_Over_SSL/src”:


remote.connections=testEJB
remote.connection.testEJB.port=4447
remote.connection.testEJB.host=localhost
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=true
remote.connection.testEJB.connect.options.org.xnio.Options.SSL_STARTTLS=true
remote.connection.testEJB.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=true
remote.connection.testEJB.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT=false
remote.connection.testEJB.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS=JBOSS-LOCAL-USER

NOTE: The above properties file need to be present inside the client’s classpath. In our case we are going to put this file inside a JAR file “remoteEJBClient.jar” and then we will add this JAR inside the client’s classpath.

Step-15). Almost everything is done, so we will create a client side logging file sothat we will get the desired logging at the Remote EJB Client side. So lets create a file “logging.properties” inside “/home/userone/EJB3_Over_SSL/src” as following:


# Logging
handlers =  java.util.logging.ConsoleHandler
.level = ALL
INFO

# Console Logging
java.util.logging.ConsoleHandler.level=SEVERE

Step-16). Now the most important part of building / deploying and running the application so in order to achieve that we will create a simple ant build script, So Create a “build.xml” file inside the “/home/userone/EJB3_Over_SSL” directory as following:

<project name="EJB3_SSLBased_SecurityDomain_Service" default="all">
<property name="jboss.home" value="/NotBackedUp/JBoss_All/jboss-as-7.1.1.Final" />
<property name="jboss.module.dir" value="${jboss.home}/modules" />
<property name="basedir" value="." />
<property name="tmp.dir" value="tmp" />
<property name="src.dir" value="src" />
<property name="output.dir" value="build" />
<property name="ear.name" value="TestRemoteEJBEAR.ear" />
<property name="ejb.jar" value="remoteEJB.jar" />
<property name="client.jar.name" value="remoteEJBClient.jar" />

        <path id="jboss.classpath">
           <fileset dir="${jboss.module.dir}">
               <include name="**/*.jar"/>
           </fileset>  
        </path>

        <!-- Client Needs the following Jar to be present in the CLASSPATH including -->
        <path id="jboss.new.client.classpath">
          <!-- <fileset dir="${jboss.home}/bin/client">  -->
           <fileset dir="${jboss.home}/bin/client" >
               <include name="jboss-client.jar" />
           </fileset>  
           <fileset dir="/NotBackedUp/MyJdks/jdk1.6.0_21/jre/lib">
               <include name="rt.jar" />
           </fileset>  
        </path>
	 
        <target name="all" depends="deploy" />

        <target name="build_ear">
           <delete dir="${tmp.dir}" />
           <mkdir dir="${tmp.dir}/META-INF" />
           <javac srcdir="${src.dir}" destdir="${tmp.dir}"  includes="*.java" excludes="TestRemoteClientA.java" classpathref="jboss.classpath"/>
           <copy file="${src.dir}/jboss-ejb3.xml" todir="${tmp.dir}/META-INF"/>
           <jar jarfile="${tmp.dir}/${ejb.jar}" basedir="${tmp.dir}" compress="true" />

           <delete file="${tmp.dir}/ejb-users.properties"/>
           <delete file="${tmp.dir}/ejb-roles.properties"/>
           <delete file="${tmp.dir}/META-INF/jboss-ejb3.xml"/>

           <delete includeEmptyDirs="true">
              <fileset dir="${tmp.dir}/remote"/>
           </delete> 
           <mkdir dir="${tmp.dir}/META-INF"/>
           <copy todir="${tmp.dir}/META-INF">
                <fileset dir="${src.dir}/">
                  <include name="application.xml"/> 
                </fileset>
           </copy>           
           <jar jarfile="${tmp.dir}/${ear.name}" basedir="${tmp.dir}" compress="true" />
           <delete includeEmptyDirs="true">
              <fileset dir="${tmp.dir}/META-INF"/>
           </delete> 
           <delete file="${tmp.dir}/${ejb.jar}"/>

           <copy file="${tmp.dir}/${ear.name}" tofile="${output.dir}/${ear.name}"/>
           <delete file="${tmp.dir}/${ear.name}"/>
        </target>


        <target name="deploy" depends="build_ear">
            <echo message="*******************  Deploying the EAR file ${ear.name} *********************" />  
            <echo message="********** ${output.dir}/${ear.name} to ${jboss.home}/standalone/deployments **********" />  
            <copy todir="${jboss.home}/standalone/deployments/">
                <fileset dir="${output.dir}/">
                  <include name="${ear.name}"/> 
                </fileset>
            </copy>
            <echo message="*******************  Deployed Successfully   *********************" />  
        </target>


        <target name="run">
           <delete dir="${tmp.dir}" />
           <mkdir dir="${tmp.dir}" />
           <copy file="${src.dir}/jboss-ejb-client.properties" toDir="${tmp.dir}"/> 

           <javac srcdir="${src.dir}" destdir="${tmp.dir}"  includes="CallerRemote.java,TestRemoteClientA.java" classpathref="jboss.classpath"/>          
           <jar jarfile="${output.dir}/${client.jar.name}" basedir="${tmp.dir}" compress="true" />
           <delete dir="${tmp.dir}"/>

           <java classname="client.TestRemoteClientA" fork="true">
               <classpath>
                  <pathelement location="${output.dir}/${client.jar.name}"/>
                  <path refid="jboss.new.client.classpath"/>
               </classpath>

               <sysproperty key="java.util.logging.manager" value="java.util.logging.LogManager"/>
               <sysproperty key="java.util.logging.config.file" value="logging.properties"/>
               <sysproperty key="java.util.logging.ConsoleHandler.level" value="TRACE" />

               <!-- SSL Related System Properties -->
               <sysproperty key="javax.net.ssl.trustStore" value="certificates/jbossClient.keystore"/>
               <sysproperty key="javax.net.ssl.trustStorePassword" value="clientPassword"/>
               <sysproperty key="javax.net.debug" value="all"/>

           </java>
        </target>        
    
</project>


NOTE: The only change in the above file you need to do is to change the “jboss.home” directory path in the second line of the above script to point to your own JBoss AS7 directory.

Step-17). Now before running your ANT script to build and deploy the above webapplication you should have the ANT as well as JAVA set in the $PATH variable of the Shell / command prompt as following:

For Unix Based OS:
export PATH=/home/userone/jdk1.6.0_21/bin:/home/userone/org.apache.ant_1.6.5/bin:$PATH

For Windows Based OS:
set PATH=C:/jdk1.6.0_21/bin;C:/org.apache.ant_1.6.5/bin;%PATH%

Step-18). Now once the PATH is set In the command/Shell prompt you can move inside the directory “/home/userone/EJB3_Over_SSL” and then run the ant to build and deploy the EJB based EAR applicationon your JBoss Standalone full profile, by running the command “ant deploy”

[userone@localhost EJB3_Over_SSL]$ ant deploy
Buildfile: build.xml

build_ear:
    [mkdir] Created dir: /home/userone/EJB3_Over_SSL/tmp/META-INF
    [javac] Compiling 2 source files to /home/userone/EJB3_Over_SSL/tmp
     [copy] Copying 1 file to /home/userone/EJB3_Over_SSL/tmp/META-INF
      [jar] Building jar: /home/userone/EJB3_Over_SSL/tmp/remoteEJB.jar
   [delete] Deleting: /home/userone/EJB3_Over_SSL/tmp/META-INF/jboss-ejb3.xml
     [copy] Copying 1 file to /home/userone/EJB3_Over_SSL/tmp/META-INF
      [jar] Building jar: /home/userone/EJB3_Over_SSL/tmp/TestRemoteEJBEAR.ear
   [delete] Deleting: /home/userone/EJB3_Over_SSL/tmp/remoteEJB.jar
     [copy] Copying 1 file to /home/userone/EJB3_Over_SSL/build
   [delete] Deleting: /home/userone/EJB3_Over_SSL/tmp/TestRemoteEJBEAR.ear

deploy:
     [echo] *******************  Deploying the EAR file TestRemoteEJBEAR.ear *********************
     [echo] ********** build/TestRemoteEJBEAR.ear to /home/userone/jboss-as-7.1.1.Final//standalone/deployments **********
     [copy] Copying 1 file to /home/userone/jboss-as-7.1.1.Final//standalone/deployments
     [echo] *******************  Deployed Successfully   *********************

all:

BUILD SUCCESSFUL
Total time: 2 seconds

Step-19). NOTE: Before running the program make sure that the “jbossClient.keystore” is placed inside the “/home/userone/EJB3_Over_SSL/certificates” directory. Now we will try to compile and run the EJB3 remote Client application by running the command “ant run”

[userone@localhost EJB3_Over_SSL]$ ant run
Buildfile: build.xml

run:
   [delete] Deleting directory /home/userone/EJB3_Over_SSL/tmp
    [mkdir] Created dir: /home/userone/EJB3_Over_SSL/tmp
     [copy] Copying 1 file to /home/userone/EJB3_Over_SSL/tmp
    [javac] Compiling 2 source files to /home/userone/EJB3_Over_SSL/tmp
      [jar] Building jar: /home/userone/EJB3_Over_SSL/build/remoteEJBClient.jar
   [delete] Deleting directory /home/userone/EJB3_Over_SSL/tmp
      
      	--------------------------
      Got initial Context: javax.naming.InitialContext@5ff3ce5c
      
      	 remote.testMethod("MiddlewareMagic") = [CallerBean] testMethod() returned Hello MiddlewareMagic

BUILD SUCCESSFUL
Total time: 3 seconds

Debugging SSL Communication

If you want to debug the SSL Communication then enable the “<sysproperty key=”javax.net.debug” value=”all”/>” system property in the Client “run” task in “build.xml” . then while starting the client program you will see the following kind of SSL Communication.

[userone@localhost EJB3_Over_SSL]$ ant run
ant run
Buildfile: build.xml

run:
   [delete] Deleting directory /home/userone/EJB3_Over_SSL/tmp
    [mkdir] Created dir: /home/userone/EJB3_Over_SSL/tmp
     [copy] Copying 1 file to /home/userone/EJB3_Over_SSL/tmp
    [javac] Compiling 2 source files to /home/userone/EJB3_Over_SSL/tmp
      [jar] Building jar: /home/userone/EJB3_Over_SSL/build/remoteEJBClient.jar
   [delete] Deleting directory /home/userone/EJB3_Over_SSL/tmp


      keyStore is : 
      keyStore type is : jks
      keyStore provider is : 
      init keystore
      init keymanager of type SunX509
      trustStore is: certificates/jbossClient.keystore
      trustStore type is : jks
      trustStore provider is : 
      init truststore
      adding as trusted cert:
        Subject: CN=localhost, OU=JBoss Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
        Issuer:  CN=localhost, OU=JBoss Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
        Algorithm: RSA; Serial number: 0x4fef590c
        Valid from Sun Jul 01 01:22:44 IST 2012 until Wed Jun 29 01:22:44 IST 2022
      
      adding as trusted cert:
        Subject: CN=localhost, OU=Client Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
        Issuer:  CN=localhost, OU=Client Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
        Algorithm: RSA; Serial number: 0x4fef590d
        Valid from Sun Jul 01 01:22:45 IST 2012 until Wed Jun 29 01:22:45 IST 2022
      
      trigger seeding of SecureRandom
      done seeding SecureRandom
      Using SSLEngineImpl.
      %% No cached client session
      *** ClientHello, TLSv1
      RandomCookie:  GMT: 1324357980 bytes = { 110, 34, 249, 61, 71, 63, 18, 48, 41, 193, 247, 1, 150, 204, 40, 254, 85, 104, 159, 105, 26, 29, 243, 75, 81, 145, 157, 145 }
      Session ID:  {}
      Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
      Compression Methods:  { 0 }
      ***
      [write] MD5 and SHA1 hashes:  len = 73
      0000: 01 00 00 45 03 01 4F F0   19 5C 6E 22 F9 3D 47 3F  ...E..O..n".=G?
      0010: 12 30 29 C1 F7 01 96 CC   28 FE 55 68 9F 69 1A 1D  .0).....(.Uh.i..
      0020: F3 4B 51 91 9D 91 00 00   1E 00 04 00 05 00 2F 00  .KQ.........../.
      0030: 33 00 32 00 0A 00 16 00   13 00 09 00 15 00 12 00  3.2.............
      0040: 03 00 08 00 14 00 11 01   00                       .........
      Remoting "config-based-naming-client-endpoint" read-1, WRITE: TLSv1 Handshake, length = 73
      [write] MD5 and SHA1 hashes:  len = 98
      0000: 01 03 01 00 39 00 00 00   20 00 00 04 01 00 80 00  ....9... .......
      0010: 00 05 00 00 2F 00 00 33   00 00 32 00 00 0A 07 00  ..../..3..2.....
      0020: C0 00 00 16 00 00 13 00   00 09 06 00 40 00 00 15  ............@...
      0030: 00 00 12 00 00 03 02 00   80 00 00 08 00 00 14 00  ................
      0040: 00 11 4F F0 19 5C 6E 22   F9 3D 47 3F 12 30 29 C1  ..O..n".=G?.0).
      0050: F7 01 96 CC 28 FE 55 68   9F 69 1A 1D F3 4B 51 91  ....(.Uh.i...KQ.
      0060: 9D 91                                              ..
      Remoting "config-based-naming-client-endpoint" read-1, WRITE: SSLv2 client hello message, length = 98
      [Raw write]: length = 100
      0000: 80 62 01 03 01 00 39 00   00 00 20 00 00 04 01 00  .b....9... .....
      0010: 80 00 00 05 00 00 2F 00   00 33 00 00 32 00 00 0A  ....../..3..2...
      0020: 07 00 C0 00 00 16 00 00   13 00 00 09 06 00 40 00  ..............@.
      0030: 00 15 00 00 12 00 00 03   02 00 80 00 00 08 00 00  ................
      0040: 14 00 00 11 4F F0 19 5C   6E 22 F9 3D 47 3F 12 30  ....O..n".=G?.0
      0050: 29 C1 F7 01 96 CC 28 FE   55 68 9F 69 1A 1D F3 4B  ).....(.Uh.i...K
      0060: 51 91 9D 91                                        Q...
      [Raw read]: length = 5
      0000: 16 03 01 02 A9                                     .....
      [Raw read]: length = 681
      0000: 02 00 00 46 03 01 4F F0   19 5C 6A F6 F0 B2 5A B1  ...F..O..j...Z.
      0010: 13 57 19 92 A7 4A D2 CF   57 FF 54 EB 72 DC 94 D9  .W...J..W.T.r...
      0020: 20 92 41 1A 1C 1D 20 4F   F0 19 5C D0 F5 36 B9 F4   .A... O....6..
      0030: A7 AD FE C7 9C 83 64 74   BA 73 5C D1 01 08 B5 B4  ......dt.s.....
      0040: 88 98 D4 71 51 D0 A8 00   04 00 0B 00 02 57 00 02  ...qQ........W..
      0050: 54 00 02 51 30 82 02 4D   30 82 01 B6 A0 03 02 01  T..Q0..M0.......
      0060: 02 02 04 4F EF 59 0C 30   0D 06 09 2A 86 48 86 F7  ...O.Y.0...*.H..
      0070: 0D 01 01 05 05 00 30 6B   31 0B 30 09 06 03 55 04  ......0k1.0...U.
      0080: 06 13 02 49 4E 31 14 30   12 06 03 55 04 08 13 0B  ...IN1.0...U....
      0090: 4D 61 68 61 72 61 73 68   74 72 61 31 0D 30 0B 06  Maharashtra1.0..
      00A0: 03 55 04 07 13 04 50 75   6E 65 31 0E 30 0C 06 03  .U....Pune1.0...
      00B0: 55 04 0A 13 05 4A 42 6F   73 73 31 13 30 11 06 03  U....JBoss1.0...
      00C0: 55 04 0B 13 0A 4A 42 6F   73 73 20 55 6E 69 74 31  U....JBoss Unit1
      00D0: 12 30 10 06 03 55 04 03   13 09 6C 6F 63 61 6C 68  .0...U....localh
      00E0: 6F 73 74 30 1E 17 0D 31   32 30 36 33 30 31 39 35  ost0...120630195
      00F0: 32 34 34 5A 17 0D 32 32   30 36 32 38 31 39 35 32  244Z..2206281952
      0100: 34 34 5A 30 6B 31 0B 30   09 06 03 55 04 06 13 02  44Z0k1.0...U....
      0110: 49 4E 31 14 30 12 06 03   55 04 08 13 0B 4D 61 68  IN1.0...U....Mah
      0120: 61 72 61 73 68 74 72 61   31 0D 30 0B 06 03 55 04  arashtra1.0...U.
      0130: 07 13 04 50 75 6E 65 31   0E 30 0C 06 03 55 04 0A  ...Pune1.0...U..
      0140: 13 05 4A 42 6F 73 73 31   13 30 11 06 03 55 04 0B  ..JBoss1.0...U..
      0150: 13 0A 4A 42 6F 73 73 20   55 6E 69 74 31 12 30 10  ..JBoss Unit1.0.
      0160: 06 03 55 04 03 13 09 6C   6F 63 61 6C 68 6F 73 74  ..U....localhost
      0170: 30 81 9F 30 0D 06 09 2A   86 48 86 F7 0D 01 01 01  0..0...*.H......
      0180: 05 00 03 81 8D 00 30 81   89 02 81 81 00 8A B8 1B  ......0.........
      0190: C9 3E 28 C0 D0 3B 35 78   27 73 CC EE F0 03 5F 39  .>(..;5x's...._9
      01A0: A4 8D 35 B9 DB 45 CB B4   C2 18 57 7B 5C 12 E0 6A  ..5..E....W...j
      01B0: 1E 19 5C ED 0E B5 AB 21   B1 99 5C D6 32 32 75 BA  ......!...22u.
      01C0: D4 D4 B3 BE BF F4 FF 41   53 6F B3 1A 59 CF 8F F6  .......ASo..Y...
      01D0: 28 36 E8 DA 5F 72 1D B5   3B 27 39 7C B4 AE AF C5  (6.._r..;'9.....
      01E0: 19 17 86 10 F2 94 5C F6   24 45 9D F7 A7 7D CE 1D  .......$E......
      01F0: 45 CD D8 0B 92 8C 61 38   0C 03 2A 6E C3 70 A7 49  E.....a8..*n.p.I
      0200: F3 39 32 E6 D2 42 55 69   34 6F DD 45 B9 02 03 01  .92..BUi4o.E....
      0210: 00 01 30 0D 06 09 2A 86   48 86 F7 0D 01 01 05 05  ..0...*.H.......
      0220: 00 03 81 81 00 03 A2 ED   32 FC 46 69 3C 24 13 D2  ........2.Fi<$..
      0230: DA A9 EC 16 CB C0 12 D1   8D 1A D0 A1 AC EB 10 2E  ................
      0240: E0 24 60 5A D5 7B 57 5B   85 ED FF 34 73 E8 0D 42  .$`Z..W[...4s..B
      0250: F3 BC F1 B4 BB C3 22 5F   C8 84 AB D7 65 C8 B1 A4  ......"_....e...
      0260: 59 39 96 06 AE 44 19 0F   0F 85 BC 6D 22 B6 DD EC  Y9...D.....m"...
      0270: 63 31 59 8A 86 6A A1 66   73 C0 CD 78 EB D0 F6 B4  c1Y..j.fs..x....
      0280: 96 02 FF 8D E0 EF D6 63   91 7C 41 01 46 E9 1A 4A  .......c..A.F..J
      0290: 07 61 A1 17 48 2D B3 A5   EB 57 D8 1B 1A FF 67 1D  .a..H-...W....g.
      02A0: 75 2C 97 61 D5 0E 00 00   00                       u,.a.....
      Remoting "config-based-naming-client-endpoint" write-1, READ: TLSv1 Handshake, length = 681
      *** ServerHello, TLSv1
      RandomCookie:  GMT: 1324357980 bytes = { 106, 246, 240, 178, 90, 177, 19, 87, 25, 146, 167, 74, 210, 207, 87, 255, 84, 235, 114, 220, 148, 217, 32, 146, 65, 26, 28, 29 }
      Session ID:  {79, 240, 25, 92, 208, 245, 54, 185, 244, 167, 173, 254, 199, 156, 131, 100, 116, 186, 115, 92, 209, 1, 8, 181, 180, 136, 152, 212, 113, 81, 208, 168}
      Cipher Suite: SSL_RSA_WITH_RC4_128_MD5
      Compression Method: 0
      ***
      %% Created:  [Session-1, SSL_RSA_WITH_RC4_128_MD5]
      ** SSL_RSA_WITH_RC4_128_MD5
      [read] MD5 and SHA1 hashes:  len = 74
      0000: 02 00 00 46 03 01 4F F0   19 5C 6A F6 F0 B2 5A B1  ...F..O..j...Z.
      0010: 13 57 19 92 A7 4A D2 CF   57 FF 54 EB 72 DC 94 D9  .W...J..W.T.r...
      0020: 20 92 41 1A 1C 1D 20 4F   F0 19 5C D0 F5 36 B9 F4   .A... O....6..
      0030: A7 AD FE C7 9C 83 64 74   BA 73 5C D1 01 08 B5 B4  ......dt.s.....
      0040: 88 98 D4 71 51 D0 A8 00   04 00                    ...qQ.....
      *** Certificate chain
      chain [0] = [
      [
        Version: V3
        Subject: CN=localhost, OU=JBoss Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
        Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
      
        Key:  Sun RSA public key, 1024 bits
        modulus: 97411916696004455715650884036315912728020904800771557030856740440315088203408504305929172442979068191350480416459422711766442170797911249673086293976645998139784138189674783077479005052825438145063261803343060485911264409807373232121906144287123313814508797496513262971443028578702660792151284744100478010809
        public exponent: 65537
        Validity: [From: Sun Jul 01 01:22:44 IST 2012,
                     To: Wed Jun 29 01:22:44 IST 2022]
        Issuer: CN=localhost, OU=JBoss Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
        SerialNumber: [    4fef590c]
      
      ]
        Algorithm: [SHA1withRSA]
        Signature:
      0000: 03 A2 ED 32 FC 46 69 3C   24 13 D2 DA A9 EC 16 CB  ...2.Fi<$.......
      0010: C0 12 D1 8D 1A D0 A1 AC   EB 10 2E E0 24 60 5A D5  ............$`Z.
      0020: 7B 57 5B 85 ED FF 34 73   E8 0D 42 F3 BC F1 B4 BB  .W[...4s..B.....
      0030: C3 22 5F C8 84 AB D7 65   C8 B1 A4 59 39 96 06 AE  ."_....e...Y9...
      0040: 44 19 0F 0F 85 BC 6D 22   B6 DD EC 63 31 59 8A 86  D.....m"...c1Y..
      0050: 6A A1 66 73 C0 CD 78 EB   D0 F6 B4 96 02 FF 8D E0  j.fs..x.........
      0060: EF D6 63 91 7C 41 01 46   E9 1A 4A 07 61 A1 17 48  ..c..A.F..J.a..H
      0070: 2D B3 A5 EB 57 D8 1B 1A   FF 67 1D 75 2C 97 61 D5  -...W....g.u,.a.
      
      ]
      ***
      Found trusted certificate:
      [
      [
        Version: V3
        Subject: CN=localhost, OU=JBoss Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
        Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
      
        Key:  Sun RSA public key, 1024 bits
        modulus: 97411916696004455715650884036315912728020904800771557030856740440315088203408504305929172442979068191350480416459422711766442170797911249673086293976645998139784138189674783077479005052825438145063261803343060485911264409807373232121906144287123313814508797496513262971443028578702660792151284744100478010809
        public exponent: 65537
        Validity: [From: Sun Jul 01 01:22:44 IST 2012,
                     To: Wed Jun 29 01:22:44 IST 2022]
        Issuer: CN=localhost, OU=JBoss Unit, O=JBoss, L=Pune, ST=Maharashtra, C=IN
        SerialNumber: [    4fef590c]
      
      ]
        Algorithm: [SHA1withRSA]
        Signature:
      0000: 03 A2 ED 32 FC 46 69 3C   24 13 D2 DA A9 EC 16 CB  ...2.Fi<$.......
      0010: C0 12 D1 8D 1A D0 A1 AC   EB 10 2E E0 24 60 5A D5  ............$`Z.
      0020: 7B 57 5B 85 ED FF 34 73   E8 0D 42 F3 BC F1 B4 BB  .W[...4s..B.....
      0030: C3 22 5F C8 84 AB D7 65   C8 B1 A4 59 39 96 06 AE  ."_....e...Y9...
      0040: 44 19 0F 0F 85 BC 6D 22   B6 DD EC 63 31 59 8A 86  D.....m"...c1Y..
      0050: 6A A1 66 73 C0 CD 78 EB   D0 F6 B4 96 02 FF 8D E0  j.fs..x.........
      0060: EF D6 63 91 7C 41 01 46   E9 1A 4A 07 61 A1 17 48  ..c..A.F..J.a..H
      0070: 2D B3 A5 EB 57 D8 1B 1A   FF 67 1D 75 2C 97 61 D5  -...W....g.u,.a.
      
      ]
      [read] MD5 and SHA1 hashes:  len = 603
      0000: 0B 00 02 57 00 02 54 00   02 51 30 82 02 4D 30 82  ...W..T..Q0..M0.
      0010: 01 B6 A0 03 02 01 02 02   04 4F EF 59 0C 30 0D 06  .........O.Y.0..
      0020: 09 2A 86 48 86 F7 0D 01   01 05 05 00 30 6B 31 0B  .*.H........0k1.
      0030: 30 09 06 03 55 04 06 13   02 49 4E 31 14 30 12 06  0...U....IN1.0..
      0040: 03 55 04 08 13 0B 4D 61   68 61 72 61 73 68 74 72  .U....Maharashtr
      0050: 61 31 0D 30 0B 06 03 55   04 07 13 04 50 75 6E 65  a1.0...U....Pune
      0060: 31 0E 30 0C 06 03 55 04   0A 13 05 4A 42 6F 73 73  1.0...U....JBoss
      0070: 31 13 30 11 06 03 55 04   0B 13 0A 4A 42 6F 73 73  1.0...U....JBoss
      0080: 20 55 6E 69 74 31 12 30   10 06 03 55 04 03 13 09   Unit1.0...U....
      0090: 6C 6F 63 61 6C 68 6F 73   74 30 1E 17 0D 31 32 30  localhost0...120
      00A0: 36 33 30 31 39 35 32 34   34 5A 17 0D 32 32 30 36  630195244Z..2206
      00B0: 32 38 31 39 35 32 34 34   5A 30 6B 31 0B 30 09 06  28195244Z0k1.0..
      00C0: 03 55 04 06 13 02 49 4E   31 14 30 12 06 03 55 04  .U....IN1.0...U.
      00D0: 08 13 0B 4D 61 68 61 72   61 73 68 74 72 61 31 0D  ...Maharashtra1.
      00E0: 30 0B 06 03 55 04 07 13   04 50 75 6E 65 31 0E 30  0...U....Pune1.0
      00F0: 0C 06 03 55 04 0A 13 05   4A 42 6F 73 73 31 13 30  ...U....JBoss1.0
      0100: 11 06 03 55 04 0B 13 0A   4A 42 6F 73 73 20 55 6E  ...U....JBoss Un
      0110: 69 74 31 12 30 10 06 03   55 04 03 13 09 6C 6F 63  it1.0...U....loc
      0120: 61 6C 68 6F 73 74 30 81   9F 30 0D 06 09 2A 86 48  alhost0..0...*.H
      0130: 86 F7 0D 01 01 01 05 00   03 81 8D 00 30 81 89 02  ............0...
      0140: 81 81 00 8A B8 1B C9 3E   28 C0 D0 3B 35 78 27 73  .......>(..;5x's
      0150: CC EE F0 03 5F 39 A4 8D   35 B9 DB 45 CB B4 C2 18  ...._9..5..E....
      0160: 57 7B 5C 12 E0 6A 1E 19   5C ED 0E B5 AB 21 B1 99  W...j......!..
      0170: 5C D6 32 32 75 BA D4 D4   B3 BE BF F4 FF 41 53 6F  .22u........ASo
      0180: B3 1A 59 CF 8F F6 28 36   E8 DA 5F 72 1D B5 3B 27  ..Y...(6.._r..;'
      0190: 39 7C B4 AE AF C5 19 17   86 10 F2 94 5C F6 24 45  9............$E
      01A0: 9D F7 A7 7D CE 1D 45 CD   D8 0B 92 8C 61 38 0C 03  ......E.....a8..
      01B0: 2A 6E C3 70 A7 49 F3 39   32 E6 D2 42 55 69 34 6F  *n.p.I.92..BUi4o
      01C0: DD 45 B9 02 03 01 00 01   30 0D 06 09 2A 86 48 86  .E......0...*.H.
      01D0: F7 0D 01 01 05 05 00 03   81 81 00 03 A2 ED 32 FC  ..............2.
      01E0: 46 69 3C 24 13 D2 DA A9   EC 16 CB C0 12 D1 8D 1A  Fi<$............
      01F0: D0 A1 AC EB 10 2E E0 24   60 5A D5 7B 57 5B 85 ED  .......$`Z..W[..
      0200: FF 34 73 E8 0D 42 F3 BC   F1 B4 BB C3 22 5F C8 84  .4s..B......"_..
      0210: AB D7 65 C8 B1 A4 59 39   96 06 AE 44 19 0F 0F 85  ..e...Y9...D....
      0220: BC 6D 22 B6 DD EC 63 31   59 8A 86 6A A1 66 73 C0  .m"...c1Y..j.fs.
      0230: CD 78 EB D0 F6 B4 96 02   FF 8D E0 EF D6 63 91 7C  .x...........c..
      0240: 41 01 46 E9 1A 4A 07 61   A1 17 48 2D B3 A5 EB 57  A.F..J.a..H-...W
      0250: D8 1B 1A FF 67 1D 75 2C   97 61 D5                 ....g.u,.a.
      *** ServerHelloDone
      [read] MD5 and SHA1 hashes:  len = 4
      0000: 0E 00 00 00                                        ....
      *** ClientKeyExchange, RSA PreMasterSecret, TLSv1
      [write] MD5 and SHA1 hashes:  len = 134
      0000: 10 00 00 82 00 80 03 04   43 75 EF 72 2E 07 4A ED  ........Cu.r..J.
      0010: 2E 78 00 13 6B 8C C3 A3   88 56 E0 71 3C 3A 68 AE  .x..k....V.q<:h.
      0020: A8 B0 CA F9 CB 27 0F 01   DB 55 F9 B1 9E 99 EC 5E  .....'...U.....^
      0030: 31 BB FB 94 FE A2 7C F5   8F 8D 49 EF 01 F7 AE 69  1.........I....i
      0040: 0B 84 5B 43 7A 7C 47 B3   A0 CE 46 8C 06 B0 36 76  ..[Cz.G...F...6v
      0050: C7 30 42 B1 B9 DC 84 07   DA AC 5F 89 C1 6F 2C D5  .0B......._..o,.
      0060: CF 99 AC B3 E8 AC C6 79   83 E1 58 6C D6 55 86 2B  .......y..Xl.U.+
      0070: 84 D6 3A D0 F9 6B 46 FC   F6 F9 47 A8 E2 41 82 5F  ..:..kF...G..A._
      0080: 95 02 1E AE 4E E0                                  ....N.
      Remoting "config-based-naming-client-endpoint" write-1, WRITE: TLSv1 Handshake, length = 134
      SESSION KEYGEN:
      PreMaster Secret:
      0000: 03 01 AC 7D FE 2C DE E8   96 19 47 B0 9C 36 2B 11  .....,....G..6+.
      0010: D7 83 58 D5 FF FE 2C AE   E0 20 95 B1 B0 9A EC 68  ..X...,.. .....h
      0020: 82 51 BA 98 4B 94 C4 E4   E7 EF FC B6 68 18 F6 FD  .Q..K.......h...
      CONNECTION KEYGEN:
      Client Nonce:
      0000: 4F F0 19 5C 6E 22 F9 3D   47 3F 12 30 29 C1 F7 01  O..n".=G?.0)...
      0010: 96 CC 28 FE 55 68 9F 69   1A 1D F3 4B 51 91 9D 91  ..(.Uh.i...KQ...
      Server Nonce:
      0000: 4F F0 19 5C 6A F6 F0 B2   5A B1 13 57 19 92 A7 4A  O..j...Z..W...J
      0010: D2 CF 57 FF 54 EB 72 DC   94 D9 20 92 41 1A 1C 1D  ..W.T.r... .A...
      Master Secret:
      0000: 35 92 7D A3 EE 1F BB 07   76 8A FF 49 52 F9 0D 6E  5.......v..IR..n
      0010: D6 03 08 2C D3 1D F8 4B   E5 A8 1A 22 FA 20 A0 56  ...,...K...". .V
      0020: 69 18 08 57 99 A0 8B 9F   CA 32 1A 09 9D E9 49 BA  i..W.....2....I.
      Client MAC write Secret:
      0000: 16 22 37 98 C8 87 48 6A   C1 CE 7F 9D 6F A6 39 52  ."7...Hj....o.9R
      Server MAC write Secret:
      0000: 68 5B 59 12 54 C5 1B 29   2B D2 86 22 10 F8 CC D1  h[Y.T..)+.."....
      Client write key:
      0000: 67 7B BE 89 EB 94 C5 AA   B8 44 C5 53 80 F0 D9 0D  g........D.S....
      Server write key:
      0000: C9 E5 5C 60 CC 2E DE 19   B6 07 1F 0E B6 B8 01 9D  ..`............
      ... no IV used for this cipher
      Remoting "config-based-naming-client-endpoint" write-1, WRITE: TLSv1 Change Cipher Spec, length = 1
      *** Finished
      verify_data:  { 230, 49, 107, 73, 219, 244, 8, 157, 183, 78, 144, 252 }
      ***
      [write] MD5 and SHA1 hashes:  len = 16
      0000: 14 00 00 0C E6 31 6B 49   DB F4 08 9D B7 4E 90 FC  .....1kI.....N..
      Padded plaintext before ENCRYPTION:  len = 32
      0000: 14 00 00 0C E6 31 6B 49   DB F4 08 9D B7 4E 90 FC  .....1kI.....N..
      0010: 36 64 83 45 B7 B1 E6 7A   04 16 B3 C1 CE CC 9A FA  6d.E...z........
      Remoting "config-based-naming-client-endpoint" write-1, WRITE: TLSv1 Handshake, length = 32
      [Raw write]: length = 139
      0000: 16 03 01 00 86 10 00 00   82 00 80 03 04 43 75 EF  .............Cu.
      0010: 72 2E 07 4A ED 2E 78 00   13 6B 8C C3 A3 88 56 E0  r..J..x..k....V.
      0020: 71 3C 3A 68 AE A8 B0 CA   F9 CB 27 0F 01 DB 55 F9  q<:h......'...U.
      0030: B1 9E 99 EC 5E 31 BB FB   94 FE A2 7C F5 8F 8D 49  ....^1.........I
      0040: EF 01 F7 AE 69 0B 84 5B   43 7A 7C 47 B3 A0 CE 46  ....i..[Cz.G...F
      0050: 8C 06 B0 36 76 C7 30 42   B1 B9 DC 84 07 DA AC 5F  ...6v.0B......._
      0060: 89 C1 6F 2C D5 CF 99 AC   B3 E8 AC C6 79 83 E1 58  ..o,........y..X
      0070: 6C D6 55 86 2B 84 D6 3A   D0 F9 6B 46 FC F6 F9 47  l.U.+..:..kF...G
      0080: A8 E2 41 82 5F 95 02 1E   AE 4E E0                 ..A._....N.
      [Raw write]: length = 6
      0000: 14 03 01 00 01 01                                  ......
      [Raw write]: length = 37
      0000: 16 03 01 00 20 68 AB F3   1F E7 E5 35 EB FF 43 D4  .... h.....5..C.
      0010: C5 00 12 62 C4 9F 8D 3E   DB 53 78 F5 01 0C 92 29  ...b...>.Sx....)
      0020: 79 B8 0D AA 18                                     y....
      [Raw read]: length = 5
      0000: 14 03 01 00 01                                     .....
      [Raw read]: length = 1
      0000: 01                                                 .
      Remoting "config-based-naming-client-endpoint" read-1, READ: TLSv1 Change Cipher Spec, length = 1
      [Raw read]: length = 5
      0000: 16 03 01 00 20                                     .... 
      [Raw read]: length = 32
      0000: 93 FC D6 43 CF 74 1C 77   26 A8 C6 6A 2E F8 2D 25  ...C.t.w&..j..-%
      0010: 48 DE FB 5F B0 70 32 C2   DD A9 CC 67 23 E9 3C 57  H.._.p2....g#.<W
      Remoting "config-based-naming-client-endpoint" read-1, READ: TLSv1 Handshake, length = 32
      Padded plaintext after DECRYPTION:  len = 32
      0000: 14 00 00 0C 4E 55 64 B3   2B BF E4 AB 01 B5 AB 14  ....NUd.+.......
      0010: 10 0C EC 73 84 96 22 FD   DA 4C 37 6F A6 5E E1 72  ...s.."..L7o.^.r
      *** Finished
      verify_data:  { 78, 85, 100, 179, 43, 191, 228, 171, 1, 181, 171, 20 }
      ***
      %% Cached client session: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
      [read] MD5 and SHA1 hashes:  len = 16
      0000: 14 00 00 0C 4E 55 64 B3   2B BF E4 AB 01 B5 AB 14  ....NUd.+.......
      Padded plaintext before ENCRYPTION:  len = 61
      0000: 00 00 00 29 01 00 01 01   03 23 63 6F 6E 66 69 67  ...).....#config
      0010: 2D 62 61 73 65 64 2D 6E   61 6D 69 6E 67 2D 63 6C  -based-naming-cl
      0020: 69 65 6E 74 2D 65 6E 64   70 6F 69 6E 74 82 E7 C1  ient-endpoint...
      0030: AE CB 87 4C 26 91 ED FC   F0 7B 47 27 B7           ...L&.....G'.
      Remoting "config-based-naming-client-endpoint" write-1, WRITE: TLSv1 Application Data, length = 45
      [Raw write (bb)]: length = 66
      0000: 17 03 01 00 3D 75 A4 86   C8 2D 71 32 D5 2C 6F 2D  ....=u...-q2.,o-
      0010: C0 DD 74 78 3A BF 10 84   3D 4C CE D7 E1 67 1A C2  ..tx:...=L...g..
      0020: 16 80 78 E8 37 ED 63 37   42 98 AC 8C CB 29 04 34  ..x.7.c7B....).4
      0030: 2C 2E 75 CD BA 2F F9 A6   32 3B 41 23 9E 09 72 F3  ,.u../..2;A#..r.
      0040: 41 AE                                              A.
      [Raw read (bb)]: length = 65
      0000: 17 03 01 00 3C D8 96 6A   48 29 96 07 23 07 5C 2C  ....<..jH)..#.,
      0010: 06 78 1B 5F B5 F5 0A EF   57 05 91 06 60 FC A1 C3  .x._....W...`...
      0020: CC EB 2A D8 60 90 1A 96   9A 0C 13 53 FE 4B 4B 51  ..*.`......S.KKQ
      0030: 67 32 1D 3C B9 3B 8F 35   15 E0 86 88 47 2A C6 BA  g2.<.;.5....G*..
      0040: B8                                                 .
      Padded plaintext after DECRYPTION:  len = 60
      0000: 00 00 00 28 01 00 01 01   03 09 6C 6F 63 61 6C 68  ...(......localh
      0010: 6F 73 74 01 10 4A 42 4F   53 53 2D 4C 4F 43 41 4C  ost..JBOSS-LOCAL
      0020: 2D 55 53 45 52 01 05 50   4C 41 49 4E 3D A2 00 21  -USER..PLAIN=..!
      0030: BF 3B 29 F3 4D C7 CD BA   5A EF 9E F0              .;).M...Z...
      Padded plaintext before ENCRYPTION:  len = 39
      0000: 00 00 00 13 02 10 4A 42   4F 53 53 2D 4C 4F 43 41  ......JBOSS-LOCA
      0010: 4C 2D 55 53 45 52 00 3F   95 38 E7 C9 B4 83 AF B2  L-USER.?.8......
      0020: 8B 85 96 18 B7 0D 24                               ......$
      Remoting "config-based-naming-client-endpoint" task-1, WRITE: TLSv1 Application Data, length = 23
      [Raw write (bb)]: length = 44
      0000: 17 03 01 00 27 FF 53 BE   A9 F8 ED 6F 4B A1 0E 5B  ....'.S....oK..[
      0010: DB 78 8E 8A 86 F1 83 6D   9B 5E AD A0 A6 C5 3E 60  .x.....m.^....>`
      0020: 4D 3F 12 2A 23 F7 C6 4A   8E CF 05 8C              M?.*#..J....
      [Raw read (bb)]: length = 107
      0000: 17 03 01 00 66 A4 08 16   81 D7 16 83 1A FC 7C E5  ....f...........
      0010: C2 10 CD 2B 82 86 56 D0   DF 4E BA A9 76 AC 3A 9C  ...+..V..N..v.:.
      0020: B6 D0 57 27 27 EC 1F DB   0B 6B FB A5 B3 9C 28 38  ..W''....k....(8
      0030: C3 FD BC B4 62 B2 93 07   BD 10 79 B9 17 24 D9 ED  ....b.....y..$..
      0040: B1 07 4D 0D E7 9B 35 98   60 9A CF C5 1D 57 AB 46  ..M...5.`....W.F
      0050: E4 36 B1 5B 74 09 D1 6A   A4 4B 22 3E 3F DD 15 24  .6.[t..j.K">?..$
      0060: 12 89 CF 8D 91 82 72 4E   BB 0C 2E                 ......rN...
      Padded plaintext after DECRYPTION:  len = 102
      0000: 00 00 00 52 03 2F 4E 6F   74 42 61 63 6B 65 64 55  ...R./NotBackedU
      0010: 70 2F 4A 42 6F 73 73 5F   41 6C 6C 2F 6A 62 6F 73  p/JBoss_All/jbos
      0020: 73 2D 61 73 2D 37 2E 31   2E 31 2E 46 69 6E 61 6C  s-as-7.1.1.Final
      0030: 2F 73 74 61 6E 64 61 6C   6F 6E 65 2F 74 6D 70 2F  /standalone/tmp/
      0040: 61 75 74 68 2F 63 68 61   6C 6C 65 6E 67 65 2D 37  auth/challenge-7
      0050: 31 32 31 33 33 38 A6 85   E0 13 12 99 64 8E 55 DE  121338......d.U.
      0060: 72 E0 02 57 03 EA                                  r..W..
      Padded plaintext before ENCRYPTION:  len = 37
      0000: 00 00 00 11 04 27 5C AF   3C 2F F7 0E DF 65 6A 62  .....'.</...ejb
      0010: 55 73 65 72 00 E7 D1 02   83 DD 0A 00 76 F4 FF 8B  User........v...
      0020: 37 D7 5A 37 19                                     7.Z7.
      Remoting "config-based-naming-client-endpoint" task-2, WRITE: TLSv1 Application Data, length = 21
      [Raw write (bb)]: length = 42
      0000: 17 03 01 00 25 DF 28 09   7B FA 47 98 07 46 14 18  ....%.(...G..F..
      0010: BE DD 48 0F AE 89 1B CB   25 A9 14 06 F7 5E B5 0C  ..H.....%....^..
      0020: 5B 24 4E CA 59 51 38 EE   6F 7F                    [$N.YQ8.o.
      [Raw read (bb)]: length = 26
      0000: 17 03 01 00 15 21 39 4C   83 1A EA 6E 4F 8A 52 A8  .....!9L...nO.R.
      0010: F5 97 65 A7 B6 EC 3A FA   93 02                    ..e...:...
      Padded plaintext after DECRYPTION:  len = 21
      0000: 00 00 00 01 06 E1 D7 97   B8 A5 FE FE C8 B3 59 E5  ..............Y.
      0010: 5B C0 59 E5 C4                                     [.Y..
      Padded plaintext before ENCRYPTION:  len = 61
      0000: 00 00 00 29 01 00 01 01   03 23 63 6F 6E 66 69 67  ...).....#config
      0010: 2D 62 61 73 65 64 2D 6E   61 6D 69 6E 67 2D 63 6C  -based-naming-cl
      0020: 69 65 6E 74 2D 65 6E 64   70 6F 69 6E 74 A0 47 BB  ient-endpoint.G.
      0030: 8A 13 06 99 29 6B 29 F5   A0 5C D4 C8 0B           ....)k).....
      Remoting "config-based-naming-client-endpoint" read-1, WRITE: TLSv1 Application Data, length = 45
      [Raw write (bb)]: length = 66
      0000: 17 03 01 00 3D 78 F6 AF   0E AC 21 D7 35 0A AC 0B  ....=x....!.5...
      0010: C1 E2 1B BF DB 40 AE 0A   30 35 6F 8F 33 4E 0E 7D  .....@..05o.3N..
      0020: 7B FA 3E 5F 84 DF 59 E6   2B DC 6A 27 08 63 1B 3D  ..>_..Y.+.j'.c.=
      0030: 12 CB F8 5B 46 60 F5 4D   17 C3 86 0B 28 C8 EF C5  ...[F`.M....(...
      0040: 09 BD                                              ..
      [Raw read (bb)]: length = 65
      0000: 17 03 01 00 3C BB 3D 70   B6 2C DE 60 98 50 B2 47  ....<.=p.,.`.P.G
      0010: 6F 3A 7F 71 13 34 C8 A1   61 9C EB 0E 3C DA 7A 93  o:.q.4..a...<.z.
      0020: F4 BD 73 DC 82 16 43 9E   4B 47 CE 15 D9 F3 1D ED  ..s...C.KG......
      0030: 83 DF 5C 12 E6 9B B6 E0   80 42 A0 65 A2 3E A4 42  ........B.e.>.B
      0040: 5B                                                 [
      Padded plaintext after DECRYPTION:  len = 60
      0000: 00 00 00 28 01 00 01 01   03 09 6C 6F 63 61 6C 68  ...(......localh
      0010: 6F 73 74 01 10 4A 42 4F   53 53 2D 4C 4F 43 41 4C  ost..JBOSS-LOCAL
      0020: 2D 55 53 45 52 01 05 50   4C 41 49 4E 9E 62 E4 4A  -USER..PLAIN.b.J
      0030: 3F 42 22 C1 85 70 1B DF   B9 80 B2 E9              ?B"..p......
      Padded plaintext before ENCRYPTION:  len = 47
      0000: 00 00 00 1B 02 05 50 4C   41 49 4E 00 65 6A 62 55  ......PLAIN.ejbU
      0010: 73 65 72 00 65 6A 62 50   61 73 73 77 6F 72 64 F0  ser.ejbPassword.
      0020: 6B EB 0A 8B 7E E6 41 FB   DB CD D4 B1 A2 46 79     k.....A......Fy
      Remoting "config-based-naming-client-endpoint" task-3, WRITE: TLSv1 Application Data, length = 31
      [Raw write (bb)]: length = 52
      0000: 17 03 01 00 2F B2 75 CA   90 12 CC BA A2 51 C8 82  ..../.u......Q..
      0010: 2A 12 BB 12 4A 81 2B 9D   8B F3 DD C8 A0 BC 23 12  *...J.+.......#.
      0020: D3 0B B9 81 6E E8 7B C4   F5 41 E0 47 0A 0C DA 8D  ....n....A.G....
      0030: 61 CD FF 49                                        a..I
      [Raw read (bb)]: length = 26
      0000: 17 03 01 00 15 EB F5 9F   8F 1D 42 41 A5 A7 0D FF  ..........BA....
      0010: 3A A1 F7 10 BD 69 8B 89   2A 94                    :....i..*.
      Padded plaintext after DECRYPTION:  len = 21
      0000: 00 00 00 01 05 CF 4F B1   73 4C 25 16 6B 44 C8 1B  ......O.sL%.kD..
      0010: 46 C0 2B 8F D6                                     F.+..
      Padded plaintext before ENCRYPTION:  len = 54
      0000: 00 00 00 22 10 89 FB 8F   55 01 06 6E 61 6D 69 6E  ..."....U..namin
      0010: 67 80 04 00 00 40 00 81   02 00 50 82 04 7F FF FF  g....@....P.....
      0020: FF 83 02 FF FF 00 21 92   8C 03 7D F4 0A 46 55 0A  ......!......FU.
      0030: F1 87 84 8D E6 C8                                  ......
      main, WRITE: TLSv1 Application Data, length = 38
      [Raw write (bb)]: length = 59
      0000: 17 03 01 00 36 9F E0 0B   F0 2D 06 09 EC 25 C7 80  ....6....-...%..
      0010: FD A3 DA AD 0E B8 6D 07   70 3F 37 88 28 3E 7B 25  ......m.p?7.(>.%
      0020: EA AF 4F 93 A9 74 A6 09   00 96 25 A5 46 E7 14 29  ..O..t....%.F..)
      0030: FF F6 A9 83 96 58 56 7E   71 81 34                 .....XV.q.4
      [Raw read (bb)]: length = 41
      0000: 17 03 01 00 24 A1 AE 75   CA 78 DC EA 21 DD 6E B9  ....$..u.x..!.n.
      0010: BE F5 4A E1 31 ED 4D 05   A9 DE F8 75 5E 2D D0 61  ..J.1.M....u^-.a
      0020: 91 24 10 BA 76 DE 4E FD   F1                       .$..v.N..
      Padded plaintext after DECRYPTION:  len = 36
      0000: 00 00 00 10 11 09 FB 8F   55 80 04 00 00 40 00 81  ........U....@..
      0010: 02 00 50 00 FE 8D 7C A1   A3 8A F2 B1 1B 80 50 06  ..P...........P.
      0020: 57 3F 5B D7                                        W?[.
      [Raw read (bb)]: length = 41
      0000: 17 03 01 00 24 7E 57 CA   E6 5C BC 3E B4 A9 87 F9  ....$.W...>....
      0010: BC 62 E1 BE A3 7E FD 70   F2 A3 B5 A9 81 A9 48 B4  .b.....p......H.
      0020: 99 DF 62 97 CE 00 85 2E   A2                       ..b......
      Padded plaintext after DECRYPTION:  len = 36
      0000: 00 00 00 10 30 09 FB 8F   55 69 72 02 6E 61 6D 69  ....0...Uir.nami
      0010: 6E 67 01 01 06 41 C1 F3   2E B0 A9 CF B8 F0 92 75  ng...A.........u
      0020: DE 6E 34 2D                                        .n4-
      [Raw read (bb)]: length = 33
      0000: 17 03 01 00 1C AF 18 D2   55 55 95 27 1A 93 00 97  ........UU.'....
      0010: 92 74 2E FA 26 65 96 47   F0 ED 83 76 7C 0F CF 31  .t..&e.G...v...1
      0020: C4                                                 .
      Padded plaintext after DECRYPTION:  len = 28
      0000: 00 00 00 08 30 09 FB 8F   55 69 72 01 EB 9A 2F 82  ....0...Uir.../.
      0010: BE C3 91 92 A6 0B 2B C1   17 49 F5 11              ......+..I..
      Padded plaintext before ENCRYPTION:  len = 31
      0000: 00 00 00 0B 31 89 FB 8F   55 69 72 00 00 00 10 21  ....1...Uir....!
      0010: 44 FF 52 8E 51 EE AB 75   37 78 1F 29 3C CA 85     D.R.Q..u7x.)<..
      Remoting "config-based-naming-client-endpoint" task-1, WRITE: TLSv1 Application Data, length = 15
      [Raw write (bb)]: length = 36
      0000: 17 03 01 00 1F 13 DD DD   ED 67 B3 9D 70 51 4A 1A  .........g..pQJ.
      0010: B2 02 F1 1B ED 37 F1 DA   58 0C 43 66 A0 33 74 48  .....7..X.Cf.3tH
      0020: FB F5 F8 15                                        ....
      Padded plaintext before ENCRYPTION:  len = 35
      0000: 00 00 00 0F 30 89 FB 8F   55 6A E0 02 6E 61 6D 69  ....0...Uj..nami
      0010: 6E 67 01 5D C1 D3 D3 15   5D B2 71 D8 C8 F3 B8 F1  ng.]....].q.....
      0020: DB 83 DB                                           ...
      main, WRITE: TLSv1 Application Data, length = 19
      [Raw write (bb)]: length = 40
      0000: 17 03 01 00 23 97 D9 7C   15 4E 92 1F BA D9 46 BA  ....#....N....F.
      0010: 99 4E 57 35 33 1B 44 7B   40 2E 8F 5E E2 B9 2D 82  .NW53.D.@..^..-.
      0020: 70 BA 0D 9E 3C F4 81 BB                            p...<...
      Padded plaintext before ENCRYPTION:  len = 28
      0000: 00 00 00 08 30 89 FB 8F   55 6A E0 01 10 D4 FD A2  ....0...Uj......
      0010: 33 C8 42 16 32 EB 84 89   7F F8 29 5D              3.B.2.....)]
      main, WRITE: TLSv1 Application Data, length = 12
      [Raw write (bb)]: length = 33
      0000: 17 03 01 00 1C DC B6 87   31 40 6F B8 95 89 CF C8  ........1@o.....
      0010: 30 F0 09 DB CE CA 3D A3   01 92 65 D2 8E 8D CE F2  0.....=...e.....
      0020: 3C                                                 <
      [Raw read (bb)]: length = 36
      0000: 17 03 01 00 1F 55 F2 3F   1B 5B 01 AC 0E 15 00 02  .....U.?.[......
      0010: 3D 92 E8 17 98 7C 96 C1   13 1C 27 B6 CE 91 F8 DA  =.........'.....
      0020: 41 AB BB 22                                        A.."
      Padded plaintext after DECRYPTION:  len = 31
      0000: 00 00 00 0B 31 09 FB 8F   55 6A E0 00 00 00 0F 7F  ....1...Uj......
      0010: 9A 0D 99 A8 64 40 D1 DE   39 CF 96 16 A4 83 77     ....d@..9.....w
      Using SSLEngineImpl.
      %% Client cached [Session-1, SSL_RSA_WITH_RC4_128_MD5]
      %% Try resuming [Session-1, SSL_RSA_WITH_RC4_128_MD5] from port -1
      *** ClientHello, TLSv1
      RandomCookie:  GMT: 1324357980 bytes = { 130, 188, 205, 110, 140, 21, 112, 88, 211, 129, 209, 98, 71, 129, 207, 70, 168, 102, 10, 186, 64, 77, 105, 50, 96, 173, 151, 226 }
      Session ID:  {79, 240, 25, 92, 208, 245, 54, 185, 244, 167, 173, 254, 199, 156, 131, 100, 116, 186, 115, 92, 209, 1, 8, 181, 180, 136, 152, 212, 113, 81, 208, 168}
      Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
      Compression Methods:  { 0 }
      ***
      [write] MD5 and SHA1 hashes:  len = 105
      0000: 01 00 00 65 03 01 4F F0   19 5C 82 BC CD 6E 8C 15  ...e..O.....n..
      0010: 70 58 D3 81 D1 62 47 81   CF 46 A8 66 0A BA 40 4D  pX...bG..F.f..@M
      0020: 69 32 60 AD 97 E2 20 4F   F0 19 5C D0 F5 36 B9 F4  i2`... O....6..
      0030: A7 AD FE C7 9C 83 64 74   BA 73 5C D1 01 08 B5 B4  ......dt.s.....
      0040: 88 98 D4 71 51 D0 A8 00   1E 00 04 00 05 00 2F 00  ...qQ........./.
      0050: 33 00 32 00 0A 00 16 00   13 00 09 00 15 00 12 00  3.2.............
      0060: 03 00 08 00 14 00 11 01   00                       .........
      Remoting "config-based-ejb-client-endpoint" read-1, WRITE: TLSv1 Handshake, length = 105
      [Raw write]: length = 110
      0000: 16 03 01 00 69 01 00 00   65 03 01 4F F0 19 5C 82  ....i...e..O...
      0010: BC CD 6E 8C 15 70 58 D3   81 D1 62 47 81 CF 46 A8  ..n..pX...bG..F.
      0020: 66 0A BA 40 4D 69 32 60   AD 97 E2 20 4F F0 19 5C  f..@Mi2`... O..
      0030: D0 F5 36 B9 F4 A7 AD FE   C7 9C 83 64 74 BA 73 5C  ..6........dt.s
      0040: D1 01 08 B5 B4 88 98 D4   71 51 D0 A8 00 1E 00 04  ........qQ......
      0050: 00 05 00 2F 00 33 00 32   00 0A 00 16 00 13 00 09  .../.3.2........
      0060: 00 15 00 12 00 03 00 08   00 14 00 11 01 00        ..............
      [Raw read]: length = 5
      0000: 16 03 01 00 4A                                     ....J
      [Raw read]: length = 74
      0000: 02 00 00 46 03 01 4F F0   19 5C E3 AE A8 26 DF 91  ...F..O.....&..
      0010: D2 6F 29 26 F5 FA EC 94   58 BE 2B C3 AE B3 13 4E  .o)&....X.+....N
      0020: 4B 5F 3D 82 D9 30 20 4F   F0 19 5C D0 F5 36 B9 F4  K_=..0 O....6..
      0030: A7 AD FE C7 9C 83 64 74   BA 73 5C D1 01 08 B5 B4  ......dt.s.....
      0040: 88 98 D4 71 51 D0 A8 00   04 00                    ...qQ.....
      Remoting "config-based-ejb-client-endpoint" write-1, READ: TLSv1 Handshake, length = 74
      *** ServerHello, TLSv1
      RandomCookie:  GMT: 1324357980 bytes = { 227, 174, 168, 38, 223, 145, 210, 111, 41, 38, 245, 250, 236, 148, 88, 190, 43, 195, 174, 179, 19, 78, 75, 95, 61, 130, 217, 48 }
      Session ID:  {79, 240, 25, 92, 208, 245, 54, 185, 244, 167, 173, 254, 199, 156, 131, 100, 116, 186, 115, 92, 209, 1, 8, 181, 180, 136, 152, 212, 113, 81, 208, 168}
      Cipher Suite: SSL_RSA_WITH_RC4_128_MD5
      Compression Method: 0
      ***
      CONNECTION KEYGEN:
      Client Nonce:
      0000: 4F F0 19 5C 82 BC CD 6E   8C 15 70 58 D3 81 D1 62  O.....n..pX...b
      0010: 47 81 CF 46 A8 66 0A BA   40 4D 69 32 60 AD 97 E2  G..F.f..@Mi2`...
      Server Nonce:
      0000: 4F F0 19 5C E3 AE A8 26   DF 91 D2 6F 29 26 F5 FA  O.....&...o)&..
      0010: EC 94 58 BE 2B C3 AE B3   13 4E 4B 5F 3D 82 D9 30  ..X.+....NK_=..0
      Master Secret:
      0000: 35 92 7D A3 EE 1F BB 07   76 8A FF 49 52 F9 0D 6E  5.......v..IR..n
      0010: D6 03 08 2C D3 1D F8 4B   E5 A8 1A 22 FA 20 A0 56  ...,...K...". .V
      0020: 69 18 08 57 99 A0 8B 9F   CA 32 1A 09 9D E9 49 BA  i..W.....2....I.
      Client MAC write Secret:
      0000: 88 A4 AF 0D DE 12 24 F9   56 FE 54 B5 0D 29 35 96  ......$.V.T..)5.
      Server MAC write Secret:
      0000: 3E 4C 99 6E 80 54 11 73   EA 36 0E 20 9F 51 75 FE  >L.n.T.s.6. .Qu.
      Client write key:
      0000: FD 0D DE 0D 47 15 A1 25   33 CB 01 F4 FA F5 D9 36  ....G..%3......6
      Server write key:
      0000: 5B 25 61 41 A1 18 73 52   A3 4D 24 97 11 DC 46 DB  [%aA..sR.M$...F.
      ... no IV used for this cipher
      %% Server resumed [Session-1, SSL_RSA_WITH_RC4_128_MD5]
      [read] MD5 and SHA1 hashes:  len = 74
      0000: 02 00 00 46 03 01 4F F0   19 5C E3 AE A8 26 DF 91  ...F..O.....&..
      0010: D2 6F 29 26 F5 FA EC 94   58 BE 2B C3 AE B3 13 4E  .o)&....X.+....N
      0020: 4B 5F 3D 82 D9 30 20 4F   F0 19 5C D0 F5 36 B9 F4  K_=..0 O....6..
      0030: A7 AD FE C7 9C 83 64 74   BA 73 5C D1 01 08 B5 B4  ......dt.s.....
      0040: 88 98 D4 71 51 D0 A8 00   04 00                    ...qQ.....
      [Raw read]: length = 5
      0000: 14 03 01 00 01                                     .....
      [Raw read]: length = 1
      0000: 01                                                 .
      Remoting "config-based-ejb-client-endpoint" read-1, READ: TLSv1 Change Cipher Spec, length = 1
      [Raw read]: length = 5
      0000: 16 03 01 00 20                                     .... 
      [Raw read]: length = 32
      0000: CB 86 E3 2D 78 29 48 B5   DC E5 E2 C6 24 3C 01 0E  ...-x)H.....$<..
      0010: 8A 2C B4 B2 1B BD 93 F6   C3 ED AE 0C 3B 8D 16 40  .,..........;..@
      Remoting "config-based-ejb-client-endpoint" read-1, READ: TLSv1 Handshake, length = 32
      Padded plaintext after DECRYPTION:  len = 32
      0000: 14 00 00 0C A6 54 14 92   28 D8 C9 42 A0 DE 85 86  .....T..(..B....
      0010: CB D6 E6 65 17 C4 CE 01   7A 5D 8F 01 77 98 BD 79  ...e....z]..w..y
      *** Finished
      verify_data:  { 166, 84, 20, 146, 40, 216, 201, 66, 160, 222, 133, 134 }
      ***
      [read] MD5 and SHA1 hashes:  len = 16
      0000: 14 00 00 0C A6 54 14 92   28 D8 C9 42 A0 DE 85 86  .....T..(..B....
      Remoting "config-based-ejb-client-endpoint" read-1, WRITE: TLSv1 Change Cipher Spec, length = 1
      *** Finished
      verify_data:  { 117, 252, 119, 85, 231, 194, 129, 157, 212, 138, 87, 19 }
      ***
      [write] MD5 and SHA1 hashes:  len = 16
      0000: 14 00 00 0C 75 FC 77 55   E7 C2 81 9D D4 8A 57 13  ....u.wU......W.
      Padded plaintext before ENCRYPTION:  len = 32
      0000: 14 00 00 0C 75 FC 77 55   E7 C2 81 9D D4 8A 57 13  ....u.wU......W.
      0010: 6F CD B0 E6 95 CC 44 F9   57 C9 8F FC 1B 5D CA B8  o.....D.W....]..
      Remoting "config-based-ejb-client-endpoint" read-1, WRITE: TLSv1 Handshake, length = 32
      [Raw write]: length = 6
      0000: 14 03 01 00 01 01                                  ......
      [Raw write]: length = 37
      0000: 16 03 01 00 20 27 82 C7   5C C8 10 23 18 69 25 7A  .... '....#.i%z
      0010: 9C DB C1 7B A1 9F E7 57   25 DC 19 96 77 AD BA BB  .......W%...w...
      0020: A3 77 FB B5 23                                     .w..#
      Padded plaintext before ENCRYPTION:  len = 58
      0000: 00 00 00 26 01 00 01 01   03 20 63 6F 6E 66 69 67  ...&..... config
      0010: 2D 62 61 73 65 64 2D 65   6A 62 2D 63 6C 69 65 6E  -based-ejb-clien
      0020: 74 2D 65 6E 64 70 6F 69   6E 74 F4 3D E2 3A 6C E1  t-endpoint.=.:l.
      0030: 01 AE AF 29 6B 7B 4F 6A   8F 21                    ...)k.Oj.!
      Remoting "config-based-ejb-client-endpoint" write-1, WRITE: TLSv1 Application Data, length = 42
      [Raw write (bb)]: length = 63
      0000: 17 03 01 00 3A 32 64 61   53 71 1E C4 34 DB 3F C8  ....:2daSq..4.?.
      0010: 4A 06 04 4D 1D BC 45 6F   22 49 58 C0 37 57 84 DD  J..M..Eo"IX.7W..
      0020: 17 ED 6D 2B A1 70 66 53   5C 34 A5 C0 A8 83 00 CA  ..m+.pfS4......
      0030: EF F3 E2 B5 00 11 44 36   93 2E 16 9C 3A 58 4A     ......D6....:XJ
      [Raw read (bb)]: length = 65
      0000: 17 03 01 00 3C 64 50 68   29 8E 9B 76 65 5F 82 92  ....<dPh)..ve_..
      0010: 17 9D CE 0D 34 14 15 CA   0B 06 C3 9E E4 28 68 31  ....4........(h1
      0020: 03 D8 16 63 86 F4 A9 B1   D0 FD 4F 48 8D AB D6 BD  ...c......OH....
      0030: 4D C5 DA 60 12 FD 04 97   A2 63 D0 90 12 13 65 34  M..`.....c....e4
      0040: AD                                                 .
      Padded plaintext after DECRYPTION:  len = 60
      0000: 00 00 00 28 01 00 01 01   03 09 6C 6F 63 61 6C 68  ...(......localh
      0010: 6F 73 74 01 10 4A 42 4F   53 53 2D 4C 4F 43 41 4C  ost..JBOSS-LOCAL
      0020: 2D 55 53 45 52 01 05 50   4C 41 49 4E F0 EA 13 28  -USER..PLAIN...(
      0030: C3 98 14 5F 2C C8 8C F7   35 7B B8 60              ..._,...5..`
      Jul 1, 2012 3:03:16 PM org.jboss.remoting3.remote.RemoteConnection handleException
      ERROR: JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Cannot get userid/password [Caused by javax.security.auth.callback.UnsupportedCallbackException]
      Remoting "config-based-ejb-client-endpoint" read-1, called closeInbound()
      Remoting "config-based-ejb-client-endpoint" read-1, fatal error: 80: Inbound closed before receiving peer's close_notify: possible truncation attack?
      javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
      %% Invalidated:  [Session-1, SSL_RSA_WITH_RC4_128_MD5]
      Remoting "config-based-ejb-client-endpoint" read-1, SEND TLSv1 ALERT:  fatal, description = internal_error
      Padded plaintext before ENCRYPTION:  len = 18
      0000: 02 50 A8 09 37 E3 6B D0   95 39 50 3B 5E A8 95 FD  .P..7.k..9P;^...
      0010: 09 6D                                              .m
      Remoting "config-based-ejb-client-endpoint" read-1, WRITE: TLSv1 Alert, length = 18
      Padded plaintext before ENCRYPTION:  len = 57
      0000: 00 00 00 25 10 BD B6 21   6F 01 09 6A 62 6F 73 73  ...%...!o..jboss
      0010: 2E 65 6A 62 80 04 00 00   40 00 81 02 00 50 82 04  .ejb....@....P..
      0020: 7F FF FF FF 83 02 FF FF   00 FA 9E 75 C7 C5 02 96  ...........u....
      0030: BA F6 8D 4D 82 0F E2 33   34                       ...M...34
      main, WRITE: TLSv1 Application Data, length = 41
      [Raw write (bb)]: length = 62
      0000: 17 03 01 00 39 65 24 10   57 64 42 BB 44 00 AF 82  ....9e$.WdB.D...
      0010: 70 CE B7 9B 90 38 72 A5   6F D4 7A 5E BC 28 1B FC  p....8r.o.z^.(..
      0020: CE 88 FF C4 DA 25 7E 40   75 CA 10 EF BC 29 06 AC  .....%.@u....)..
      0030: 42 8E B0 52 15 E7 DF 0E   EE E7 1E 17 E5 19        B..R..........
      [Raw read (bb)]: length = 41
      0000: 17 03 01 00 24 C4 BF BF   15 67 2E C4 F6 D1 F2 3E  ....$....g.....>
      0010: 22 D5 9F 0D 8A 5F B5 E9   2D 0D AB CC 9A 03 C8 0F  "...._..-.......
      0020: 75 A6 D6 51 31 8C AD FD   9E                       u..Q1....
      Padded plaintext after DECRYPTION:  len = 36
      0000: 00 00 00 10 11 3D B6 21   6F 80 04 00 00 40 00 81  .....=.!o....@..
      0010: 02 00 50 00 F0 4C 13 50   F7 6C 9D D4 43 6F BF 1B  ..P..L.P.l..Co..
      0020: 2A 34 0E 36                                        *4.6
      [Raw read (bb)]: length = 42
      0000: 17 03 01 00 25 CF 0E 4D   E1 2F DD 8F 6A 47 87 F1  ....%..M./..jG..
      0010: DC 75 68 78 C1 93 29 A7   B2 45 10 E9 01 1E B5 3B  .uhx..)..E.....;
      0020: 53 F1 81 DC 41 32 EC E4   55 21                    S...A2..U!
      Padded plaintext after DECRYPTION:  len = 37
      0000: 00 00 00 11 30 3D B6 21   6F 93 64 02 01 01 00 05  ....0=.!o.d.....
      0010: 72 69 76 65 72 B7 8A 2F   AA 47 B8 2C 0B 61 8C 40  river../.G.,.a.@
      0020: DB A4 B7 72 90                                     ...r.
      [Raw read (bb)]: length = 33
      0000: 17 03 01 00 1C A2 36 DA   89 9A 66 06 CB 44 CE 99  ......6...f..D..
      0010: 77 C4 05 3A 61 A5 8F EC   CA F6 73 C9 08 DC 2A 30  w..:a.....s...*0
      0020: FF                                                 .
      Padded plaintext after DECRYPTION:  len = 28
      0000: 00 00 00 08 30 3D B6 21   6F 93 64 01 E0 96 EB B5  ....0=.!o.d.....
      0010: B6 F5 7C ED 94 54 93 38   06 97 5C 0E              .....T.8...
      Padded plaintext before ENCRYPTION:  len = 31
      0000: 00 00 00 0B 31 BD B6 21   6F 93 64 00 00 00 11 3B  ....1..!o.d....;
      0010: B4 B4 47 F1 D2 C5 33 AC   42 B2 9F 6F F8 B7 70     ..G...3.B..o..p
      Remoting "config-based-naming-client-endpoint" task-3, WRITE: TLSv1 Application Data, length = 15
      [Raw write (bb)]: length = 36
      0000: 17 03 01 00 1F 8B 71 8F   FA 1C FC AC C4 7B D7 CF  ......q.........
      0010: 23 92 CB 64 C7 B9 15 9A   B0 EF 7E 13 4A 73 FE A1  #..d........Js..
      0020: DA BD 0D 55                                        ...U
      Padded plaintext before ENCRYPTION:  len = 36
      0000: 00 00 00 10 30 BD B6 21   6F 68 A2 02 01 00 05 72  ....0..!oh.....r
      0010: 69 76 65 72 AC C6 BF FE   A2 FC 7F 7E 95 5E 08 80  iver.........^..
      0020: 5D B5 5B 75                                        ].[u
      Remoting "config-based-naming-client-endpoint" task-3, WRITE: TLSv1 Application Data, length = 20
      [Raw write (bb)]: length = 41
      0000: 17 03 01 00 24 EE 99 F6   8E 1E ED 1B B3 30 92 6C  ....$........0.l
      0010: B5 AF 21 7E 41 38 4A 87   78 43 7A 65 A4 D6 CD 21  ..!.A8J.xCze...!
      0020: D4 01 51 57 97 35 50 61   B3                       ..QW.5Pa.
      [Raw read (bb)]: length = 36
      0000: 17 03 01 00 1F 85 30 13   2D A8 38 28 34 DE 8B 7A  ......0.-.8(4..z
      0010: DB 15 26 33 44 A4 87 BB   FB 0C 30 D8 C8 75 0E 32  ..&3D.....0..u.2
      0020: 00 D2 17 3C                                        ...<
      Padded plaintext after DECRYPTION:  len = 31
      0000: 00 00 00 0B 31 3D B6 21   6F 68 A2 00 00 00 10 03  ....1=.!oh......
      0010: BC 8F 14 E1 B5 DE BB BD   BC 58 70 80 BC 0D 3B     .........Xp...;
      Padded plaintext before ENCRYPTION:  len = 28
      0000: 00 00 00 08 30 BD B6 21   6F 68 A2 01 1D BF 50 2A  ....0..!oh....P*
      0010: 81 79 C9 0E 69 E0 14 D2   EF 6E 0C 4D              .y..i....n.M
      Remoting "config-based-naming-client-endpoint" task-3, WRITE: TLSv1 Application Data, length = 12
      [Raw write (bb)]: length = 33
      0000: 17 03 01 00 1C 08 ED 9C   D1 93 8F B2 D5 35 68 57  .............5hW
      0010: E3 29 F2 F8 46 9E 9A 0E   AB D0 3D 66 76 17 1A E9  .)..F.....=fv...
      0020: 6A                                                 j
      [Raw read (bb)]: length = 219
      0000: 17 03 01 00 D6 24 6F D6   81 4E F9 CC F9 F2 09 DF  .....$o..N......
      0010: 70 52 CD 12 19 BE DB 6C   99 DD 4D 65 BD 5A 29 B7  pR.....l..Me.Z).
      0020: DB DE BF 27 F5 09 1A 0C   ED D4 D1 E7 C5 64 01 F5  ...'.........d..
      0030: 33 B1 06 DD A0 47 88 1F   CC 66 12 12 47 BA 87 B0  3....G...f..G...
      0040: E5 0A D2 27 E4 5A 03 99   EE 79 BB 29 68 AE C6 46  ...'.Z...y.)h..F
      0050: 6F 9C 32 F8 03 6F FB 42   B7 88 EE 33 2E 06 1E 29  o.2..o.B...3...)
      0060: 98 AC 2F C2 13 61 9D F8   79 0C 72 ED 8D 71 6B 5D  ../..a..y.r..qk]
      0070: 46 15 C7 2F F8 E0 F3 54   A4 AD 74 A8 21 02 E1 CB  F../...T..t.!...
      0080: 6B 44 E4 E4 01 6B ED DA   18 E9 EE 3C E7 2A B3 04  kD...k.....<.*..
      0090: 37 1F 87 E5 84 35 4E 70   84 74 F5 F9 11 D3 B9 80  7....5Np.t......
      00A0: DD EA CD 18 A0 19 D5 E7   D4 59 1C 07 EE C8 81 7D  .........Y......
      00B0: 21 A1 91 48 5D B0 D4 2E   21 74 28 0E E4 F3 4C F6  !..H]...!t(...L.
      00C0: 86 FB A1 DF 7B 38 86 85   24 91 13 33 94 29 D5 A0  .....8..$..3.)..
      00D0: EA DE 9B AB 24 33 6F 5D   A4 D7 B5                 ....$3o]...
      Padded plaintext after DECRYPTION:  len = 214
      0000: 00 00 00 C2 30 3D B6 21   6F 68 4E 02 08 06 00 00  ....0=.!ohN.....
      0010: 00 19 4A 50 41 5F 57 69   74 68 5F 4A 41 58 52 53  ..JPA_With_JAXRS
      0020: 5F 42 41 53 49 43 5F 44   65 6D 6F 00 00 00 00 00  _BASIC_Demo.....
      0030: 17 41 70 70 6C 69 63 61   74 69 6F 6E 4C 65 76 65  .ApplicationLeve
      0040: 6C 4A 4D 53 44 65 6D 6F   00 00 00 06 6A 73 72 2D  lJMSDemo....jsr-
      0050: 37 37 00 06 6A 73 72 2D   37 37 00 00 00 10 54 65  77..jsr-77....Te
      0060: 73 74 52 65 6D 6F 74 65   45 4A 42 45 41 52 00 10  stRemoteEJBEAR..
      0070: 54 65 73 74 52 65 6D 6F   74 65 45 4A 42 45 41 52  TestRemoteEJBEAR
      0080: 00 00 00 10 54 65 73 74   52 65 6D 6F 74 65 45 4A  ....TestRemoteEJ
      0090: 42 45 41 52 00 09 72 65   6D 6F 74 65 45 4A 42 00  BEAR..remoteEJB.
      00A0: 00 00 00 00 1F 6D 79 73   71 6C 2D 63 6F 6E 6E 65  .....mysql-conne
      00B0: 63 74 6F 72 2D 6A 61 76   61 2D 35 2E 31 2E 31 33  ctor-java-5.1.13
      00C0: 2D 62 69 6E 00 00 E7 3A   39 59 F9 59 6C 75 B4 D9  -bin...:9Y.Ylu..
      00D0: 0A 9D EA 59 E3 40                                  ...Y.@
      [Raw read (bb)]: length = 33
      0000: 17 03 01 00 1C 83 19 A5   9A 47 E6 B6 2B 8B 70 AB  .........G..+.p.
      0010: DF BF 50 92 1D 7C 43 C4   BA E2 B3 F1 EC FD 98 54  ..P...C........T
      0020: 66                                                 f
      Padded plaintext after DECRYPTION:  len = 28
      0000: 00 00 00 08 30 3D B6 21   6F 68 4E 01 D0 8E E4 B2  ....0=.!ohN.....
      0010: BC 45 6B FA 6B 01 C1 5C   BE 08 FF 52              .Ek.k.....R
      [Raw read (bb)]: length = 33
      0000: 17 03 01 00 1C 12 20 03   68 C3 9E 74 07 1B BA 21  ...... .h..t...!
      0010: 06 AE 3F C7 EB 38 9B E8   5D 09 8D AB 4E 13 21 09  ..?..8..]...N.!.
      0020: E8                                                 .
      Padded plaintext after DECRYPTION:  len = 28
      0000: 00 00 00 08 30 3D B6 21   6F 33 AA 02 4F 99 C5 C4  ....0=.!o3..O...
      0010: AC D5 C9 16 51 2E 1D 61   6A 97 30 CB              ....Q..aj.0.
      [Raw read (bb)]: length = 33
      0000: 17 03 01 00 1C 70 6A E2   C8 13 80 34 D4 A6 DD 84  .....pj....4....
      0010: FD 4D F8 42 50 AE 61 6D   5B B5 1D 23 DA 2B E7 B1  .M.BP.am[..#.+..
      0020: BE                                                 .
      Padded plaintext after DECRYPTION:  len = 28
      0000: 00 00 00 08 30 3D B6 21   6F 33 AA 01 1D 07 77 8D  ....0=.!o3....w.
      0010: 75 A8 BC 66 A0 5A AB EA   BA 8C 72 BF              u..f.Z....r.
      Padded plaintext before ENCRYPTION:  len = 31
      0000: 00 00 00 0B 31 BD B6 21   6F 68 4E 00 00 00 C2 31  ....1..!ohN....1
      0010: 35 7D 34 B2 0D A9 28 8F   DF 5F D1 41 A4 51 27     5.4...(.._.A.Q'
      Remoting "config-based-naming-client-endpoint" task-4, WRITE: TLSv1 Application Data, length = 15
      [Raw write (bb)]: length = 36
      0000: 17 03 01 00 1F CA E5 C2   92 8F D3 05 0B 0B 67 20  ..............g 
      0010: 75 6E D1 91 F3 59 EA F0   90 32 87 6E FD 94 9D E1  un...Y...2.n....
      0020: 15 F9 82 0A                                        ....
      Padded plaintext before ENCRYPTION:  len = 27
      0000: 00 00 00 07 32 BD B6 21   6F 68 4E 0D 41 22 CB 26  ....2..!ohN.A".&
      0010: 67 1F D6 72 AC 68 B3 04   35 16 56                 g..r.h..5.V
      Remoting "config-based-naming-client-endpoint" task-4, WRITE: TLSv1 Application Data, length = 11
      [Raw write (bb)]: length = 32
      0000: 17 03 01 00 1B 66 A4 F8   9F 70 A5 35 8F 31 6E CE  .....f...p.5.1n.
      0010: D8 4D F4 23 81 48 B6 73   E0 0E 55 F4 91 8D 8A 93  .M.#.H.s..U.....


      
      	--------------------------
      Got initial Context: javax.naming.InitialContext@214a7a12



      Padded plaintext before ENCRYPTION:  len = 149
      0000: 00 00 00 81 30 89 FB 8F   55 C6 F2 02 01 00 00 00  ....0...U.......
      0010: 01 02 00 04 38 00 00 00   1A 6A 61 76 61 78 2E 6E  ....8....javax.n
      0020: 61 6D 69 6E 67 2E 43 6F   6D 70 6F 73 69 74 65 4E  aming.CompositeN
      0030: 61 6D 65 17 25 1A 4B 93   D6 7A FE 00 00 00 00 16  ame.%.K..z......
      0040: 32 04 00 00 00 04 3E 10   54 65 73 74 52 65 6D 6F  2.....>.TestRemo
      0050: 74 65 45 4A 42 45 41 52   3E 09 72 65 6D 6F 74 65  teEJBEAR>.remote
      0060: 45 4A 42 3D 3E 1E 43 61   6C 6C 65 72 42 65 61 6E  EJB=>.CallerBean
      0070: 21 72 65 6D 6F 74 65 2E   43 61 6C 6C 65 72 52 65  !remote.CallerRe
      0080: 6D 6F 74 65 35 B7 90 36   A1 60 3E 4B 30 5B 74 7E  mote5..6.`>K0[t.
      0090: 6D 2E 61 1E E4                                     m.a..
      main, WRITE: TLSv1 Application Data, length = 133
      [Raw write (bb)]: length = 154
      0000: 17 03 01 00 95 44 79 98   7B 5F 40 57 7D 86 DA B7  .....Dy.._@W....
      0010: 83 E9 68 C4 C2 DA 13 30   07 06 1B DA 55 2E E9 2E  ..h....0....U...
      0020: 17 69 00 F2 E7 27 3B B0   6D 0B 06 A7 3A 19 12 32  .i...';.m...:..2
      0030: 26 EF 9E 20 5D 7C 85 47   7C 1E E8 D3 F5 35 45 68  &.. ]..G.....5Eh
      0040: D1 D6 72 E0 D3 83 C2 CA   AD C9 5E 3B 48 26 BE C3  ..r.......^;H&..
      0050: B3 70 62 3E 78 A9 C1 D9   2B 63 0E 9D BE F2 1C 4D  .pb>x...+c.....M
      0060: 0C DE 29 33 31 59 B5 47   99 F2 FB A7 31 18 97 74  ..)31Y.G....1..t
      0070: A8 D4 CD B4 15 E3 99 BA   E3 57 42 C0 D7 81 96 D4  .........WB.....
      0080: CF EF 33 3B EF 77 2F BA   C3 9B 3B 8E E0 9F 2B 92  ..3;.w/...;...+.
      0090: 43 8C 65 4D 15 63 5F DF   87 60                    C.eM.c_..`
      Padded plaintext before ENCRYPTION:  len = 28
      0000: 00 00 00 08 30 89 FB 8F   55 C6 F2 01 DD 66 08 5B  ....0...U....f.[
      0010: 62 AA 8D CD 24 1D DB BE   74 55 D4 93              b...$...tU..
      main, WRITE: TLSv1 Application Data, length = 12
      [Raw write (bb)]: length = 33
      0000: 17 03 01 00 1C 46 59 2C   19 D8 EF F1 49 E1 45 23  .....FY,....I.E#
      0010: B6 AB 60 BB F6 77 10 AF   82 57 5C F5 AD C4 00 E8  ..`..w...W.....
      0020: 83                                                 .
      [Raw read (bb)]: length = 36
      0000: 17 03 01 00 1F F5 D3 5D   94 7C 7C 73 8B E1 6C 7C  .......]...s..l.
      0010: AE AE 6E FB 1C 88 91 06   AB DC 25 E5 BA 53 AA 05  ..n.......%..S..
      0020: CA 29 09 C4                                        .)..
      Padded plaintext after DECRYPTION:  len = 31
      0000: 00 00 00 0B 31 09 FB 8F   55 C6 F2 00 00 00 81 ED  ....1...U.......
      0010: E4 16 A1 5E CD 6D 16 1D   85 71 37 BC 97 C8 F7     ...^.m...q7....
      [Raw read (bb)]: length = 506
      0000: 17 03 01 01 F5 26 C1 8C   8A EF 94 85 F0 30 2E 14  .....&.......0..
      0010: 55 3D D8 2E D3 8E CB 70   49 5F 2B 94 49 47 6D 6D  U=.....pI_+.IGmm
      0020: 70 95 9B CB F8 88 00 37   60 CD B6 35 1F 5B 34 6D  p......7`..5.[4m
      0030: 80 3C 52 32 60 92 49 CD   B5 FB 0E 31 06 12 10 42  .<R2`.I....1...B
      0040: F5 92 ED 89 B1 D7 F4 F6   16 52 0A 76 93 7D 23 4F  .........R.v..#O
      0050: 4D 42 A4 5D 0C 45 E2 97   24 FD A4 12 94 73 C1 17  MB.].E..$....s..
      0060: 55 2D CC 95 AC AB 8C 5F   83 9C 3D 64 51 7E 86 0F  U-....._..=dQ...
      0070: F8 CD 1D 3C 43 BA 43 AC   36 57 DD E4 E9 E1 6D D4  ...<C.C.6W....m.
      0080: 03 08 61 8D 9B F5 41 C2   DF 20 08 31 12 F9 63 36  ..a...A.. .1..c6
      0090: A5 D2 9D 8E B7 F9 A1 80   49 B8 54 CC F9 FA 70 DF  ........I.T...p.
      00A0: 36 19 E1 CE 5F 96 ED 90   CF 12 3A 51 7D 80 E8 E2  6..._.....:Q....
      00B0: CA 72 A5 3E 5A A2 25 D3   1C A8 85 A4 73 23 2C 6D  .r.>Z.%.....s#,m
      00C0: 1D AD 1D A2 6B CF 4B AB   1B 45 67 A1 48 4A 6D F0  ....k.K..Eg.HJm.
      00D0: 2A 13 5D 2B 9F 76 28 67   3C BC 23 3D A5 E4 E6 C9  *.]+.v(g<.#=....
      00E0: F2 DD 0F 65 92 F3 06 4E   C8 F8 C5 93 2E 9A 05 CB  ...e...N........
      00F0: 3A 61 68 D8 72 02 AE BD   3F 5F 43 02 CE 2D 91 23  :ah.r...?_C..-.#
      0100: 12 EE 36 E1 14 24 26 28   56 FD 3C 27 F5 47 FD B7  ..6..$&(V.<'.G..
      0110: 66 8A 08 A2 4B F3 31 C1   CE 00 CF F5 03 2E 21 1F  f...K.1.......!.
      0120: 9E 05 DF 75 61 29 7D 6F   19 7E 68 2B 12 A3 2E 31  ...ua).o..h+...1
      0130: A1 2B C3 C2 5C 32 38 46   03 4E 1D 0F 62 21 4B 3E  .+..28F.N..b!K>
      0140: 63 9C 40 F5 A9 41 B2 D6   45 D4 EA 82 F9 32 80 39  c.@..A..E....2.9
      0150: 26 05 57 61 A5 0C EF CF   D1 91 C8 6D A9 91 73 7B  &.Wa.......m..s.
      0160: F9 16 CD 04 D4 55 4C 7D   4C 26 DE 98 81 B8 ED AF  .....UL.L&......
      0170: C5 03 C9 00 82 B7 E9 3E   F9 AB 00 E4 3B 9A 8C F1  .......>....;...
      0180: DD 9F BE A0 86 DF 94 B9   6F 8F 45 41 68 E0 F0 11  ........o.EAh...
      0190: 18 7A AA 8F F1 07 7F 66   A5 01 3E 22 63 5C 19 2E  .z.....f..>"c..
      01A0: 66 0C BC 37 80 13 30 ED   94 32 35 A2 FA B5 A2 5C  f..7..0..25....
      01B0: 6D 12 F1 E4 E6 81 A5 73   0E 81 73 D5 8F 43 6B C6  m......s..s..Ck.
      01C0: 8C AF F5 A6 B2 48 92 60   4C 1F D3 88 B6 EF C7 FB  .....H.`L.......
      01D0: A1 92 FE 55 27 C4 35 CA   B6 B0 D2 A0 00 D8 2C 47  ...U'.5.......,G
      01E0: C7 3B D1 16 84 70 62 E8   C0 1B B7 64 DF 07 BE 20  .;...pb....d... 
      01F0: 95 03 4C DE 54 BF 36 5D   E9 59                    ..L.T.6].Y
      Padded plaintext after DECRYPTION:  len = 501
      0000: 00 00 01 E1 30 09 FB 8F   55 47 5C 02 01 00 00 00  ....0...UG.....
      0010: 01 00 01 02 04 08 00 00   00 01 00 00 00 13 72 65  ..............re
      0020: 6D 6F 74 65 2E 43 61 6C   6C 65 72 52 65 6D 6F 74  mote.CallerRemot
      0030: 65 04 0A 00 00 00 33 6F   72 67 2E 6A 62 6F 73 73  e.....3org.jboss
      0040: 2E 65 6A 62 2E 63 6C 69   65 6E 74 2E 53 65 72 69  .ejb.client.Seri
      0050: 61 6C 69 7A 65 64 45 4A   42 49 6E 76 6F 63 61 74  alizedEJBInvocat
      0060: 69 6F 6E 48 61 6E 64 6C   65 72 DF 1B 78 98 5F 16  ionHandler..x._.
      0070: BB E4 04 09 00 00 00 28   6F 72 67 2E 6A 62 6F 73  .......(org.jbos
      0080: 73 2E 65 6A 62 2E 63 6C   69 65 6E 74 2E 53 74 61  s.ejb.client.Sta
      0090: 74 65 6C 65 73 73 45 4A   42 4C 6F 63 61 74 6F 72  telessEJBLocator
      00A0: D5 CF 9C 76 5F F2 DB 52   00 00 00 00 09 00 00 00  ...v_..R........
      00B0: 1F 6F 72 67 2E 6A 62 6F   73 73 2E 65 6A 62 2E 63  .org.jboss.ejb.c
      00C0: 6C 69 65 6E 74 2E 45 4A   42 4C 6F 63 61 74 6F 72  lient.EJBLocator
      00D0: 9A 9A F5 E4 24 8F EC 1C   00 00 00 06 00 00 00 08  ....$...........
      00E0: 61 66 66 69 6E 69 74 79   09 00 00 00 1D 6F 72 67  affinity.....org
      00F0: 2E 6A 62 6F 73 73 2E 65   6A 62 2E 63 6C 69 65 6E  .jboss.ejb.clien
      0100: 74 2E 41 66 66 69 6E 69   74 79 D6 92 81 EA 9B 17  t.Affinity......
      0110: 7C F3 00 00 00 00 16 00   00 00 00 07 61 70 70 4E  ............appN
      0120: 61 6D 65 14 00 00 00 00   08 62 65 61 6E 4E 61 6D  ame......beanNam
      0130: 65 14 00 00 00 00 0C 64   69 73 74 69 6E 63 74 4E  e......distinctN
      0140: 61 6D 65 14 00 00 00 00   0A 6D 6F 64 75 6C 65 4E  ame......moduleN
      0150: 61 6D 65 14 00 00 00 00   08 76 69 65 77 54 79 70  ame......viewTyp
      0160: 65 15 00 16 04 09 00 00   00 28 6F 72 67 2E 6A 62  e........(org.jb
      0170: 6F 73 73 2E 65 6A 62 2E   63 6C 69 65 6E 74 2E 41  oss.ejb.client.A
      0180: 66 66 69 6E 69 74 79 24   4E 6F 41 66 66 69 6E 69  ffinity$NoAffini
      0190: 74 79 E3 83 D7 FB CD 1D   A3 64 00 00 00 00 3B FE  ty.......d....;.
      01A0: 3E 10 54 65 73 74 52 65   6D 6F 74 65 45 4A 42 45  >.TestRemoteEJBE
      01B0: 41 52 3E 0A 43 61 6C 6C   65 72 42 65 61 6E 3D 3E  AR>.CallerBean=>
      01C0: 09 72 65 6D 6F 74 65 45   4A 42 04 15 07 00 00 00  .remoteEJB......
      01D0: 13 72 65 6D 6F 74 65 2E   43 61 6C 6C 65 72 52 65  .remote.CallerRe
      01E0: 6D 6F 74 65 35 1C 38 19   31 AC D0 1E 09 22 D9 DE  mote5.8.1...."..
      01F0: 19 17 F3 64 9C                                     ...d.
      [Raw read (bb)]: length = 33
      0000: 17 03 01 00 1C 38 60 9F   87 E1 25 46 D1 5C FE 37  .....8`...%F..7
      0010: E0 A1 EF 65 C3 C9 2F 6A   D2 76 98 44 D4 DA 77 E1  ...e../j.v.D..w.
      0020: 4F                                                 O
      Padded plaintext after DECRYPTION:  len = 28
      0000: 00 00 00 08 30 09 FB 8F   55 47 5C 01 5B 9B 83 37  ....0...UG.[..7
      0010: 72 9F 11 14 92 D6 95 01   0F 5D D1 73              r........].s
      Padded plaintext before ENCRYPTION:  len = 31
      0000: 00 00 00 0B 31 89 FB 8F   55 47 5C 00 00 01 E1 43  ....1...UG....C
      0010: 02 71 58 93 8E BD D0 5A   DC 7C A8 51 48 70 6A     .qX....Z...QHpj
      naming-client-message-receiver-1-thread-1, WRITE: TLSv1 Application Data, length = 15
      [Raw write (bb)]: length = 36
      0000: 17 03 01 00 1F CB B0 45   F0 FE 66 22 CC 4F 4E 9B  .......E..f".ON.
      0010: 12 9F 40 F8 EA 07 BC B4   B4 9A 30 D1 71 93 F4 5E  ..@.......0.q..^
      0020: 05 9D 6F 3D                                        ..o=
      Padded plaintext before ENCRYPTION:  len = 163
      0000: 00 00 00 8F 30 BD B6 21   6F 8E E0 03 03 00 00 00  ....0..!o.......
      0010: 0A 74 65 73 74 4D 65 74   68 6F 64 00 10 6A 61 76  .testMethod..jav
      0020: 61 2E 6C 61 6E 67 2E 53   74 72 69 6E 67 02 3E 10  a.lang.String.>.
      0030: 54 65 73 74 52 65 6D 6F   74 65 45 4A 42 45 41 52  TestRemoteEJBEAR
      0040: 3E 09 72 65 6D 6F 74 65   45 4A 42 3D 3E 0A 43 61  >.remoteEJB=>.Ca
      0050: 6C 6C 65 72 42 65 61 6E   04 10 02 10 00 16 03 01  llerBean........
      0060: 39 FC 39 FE 3D 39 FD 04   15 07 00 00 00 13 72 65  9.9.=9........re
      0070: 6D 6F 74 65 2E 43 61 6C   6C 65 72 52 65 6D 6F 74  mote.CallerRemot
      0080: 65 3E 0F 4D 69 64 64 6C   65 77 61 72 65 4D 61 67  e>.MiddlewareMag
      0090: 69 63 00 49 9B 7E 78 77   8D 6C DA 1D 7E 38 1F 02  ic.I..xw.l...8..
      00A0: 71 79 6E                                           qyn
      main, WRITE: TLSv1 Application Data, length = 147
      [Raw write (bb)]: length = 168
      0000: 17 03 01 00 A3 B1 A6 99   93 12 98 81 2B E5 8E F7  ............+...
      0010: 94 2E E5 1A 89 B6 92 A4   2E 85 8C AA 92 DD 38 09  ..............8.
      0020: EF 06 EE 2F C2 97 57 DE   82 15 A8 6E DE 77 F1 F6  .../..W....n.w..
      0030: 2D 6D 71 1B D8 F1 65 F5   20 80 12 BA 4A D1 2E 74  -mq...e. ...J..t
      0040: 5F EB 2F 72 5D 4A 3B 49   67 C7 B4 1B F3 8E 3C 6F  _./r]J;Ig.....<o
      0050: D1 87 EF 65 3A 8B 14 E0   74 77 66 D6 20 0F 0E B4  ...e:...twf. ...
      0060: 2C 34 35 F6 AF 43 0F EB   44 4C FE 65 E7 21 85 F4  ,45..C..DL.e.!..
      0070: 92 3C DF 15 F3 7F 71 49   9C 5C 32 DC 0D 04 51 4B  .<....qI.2...QK
      0080: 90 83 5B 1C AD F8 8F A5   9D 89 5D 70 B8 BA FD 8D  ..[.......]p....
      0090: 5B 20 11 C1 F7 9E F5 E9   1F C3 C6 B1 E1 A3 68 87  [ ............h.
      00A0: 2B 12 F3 E1 40 28 D9 20                            +...@(. 
      [Raw read (bb)]: length = 36
      0000: 17 03 01 00 1F 4C F2 AD   06 0D 28 4A A0 86 A4 FE  .....L....(J....
      0010: 94 D8 0D 64 D0 06 F9 FC   E6 C3 22 2B 62 03 FC 9E  ...d......"+b...
      0020: 70 E0 1F E2                                        p...
      Padded plaintext after DECRYPTION:  len = 31
      0000: 00 00 00 0B 31 3D B6 21   6F 8E E0 00 00 00 8F CD  ....1=.!o.......
      0010: 05 3B 87 AD E1 47 09 86   EC 79 86 AF 4D 2A 6B     .;...G...y..M*k
      [Raw read (bb)]: length = 96
      0000: 17 03 01 00 5B A9 AC 91   5F 8B 52 95 60 B7 52 8D  ....[..._.R.`.R.
      0010: 60 F8 CD 2E 78 ED C3 12   BC 52 BB BA 48 27 0C A7  `...x....R..H'..
      0020: CE 7E 1A 02 C6 C2 C3 4D   70 B2 FF A2 63 7F DC B7  .......Mp...c...
      0030: 25 2C 55 E1 4B 73 3C 3F   EF 16 A5 E5 0B 8A 6A 65  %,U.Ks<?......je
      0040: 7C BA 37 E2 23 B2 4C 38   6F 2F 76 97 AE 6D DC D8  ..7.#.L8o/v..m..
      0050: 35 91 F4 9E C7 C2 99 B5   14 21 70 C2 E7 9D 7C 0D  5........!p.....
      Padded plaintext after DECRYPTION:  len = 91
      0000: 00 00 00 47 30 3D B6 21   6F 30 28 02 05 00 00 02  ...G0=.!o0(.....
      0010: 3E 38 5B 43 61 6C 6C 65   72 42 65 61 6E 5D 20 74  >8[CallerBean] t
      0020: 65 73 74 4D 65 74 68 6F   64 28 29 20 72 65 74 75  estMethod() retu
      0030: 72 6E 65 64 20 48 65 6C   6C 6F 20 4D 69 64 64 6C  rned Hello Middl
      0040: 65 77 61 72 65 4D 61 67   69 63 00 1F 6B D4 71 EA  ewareMagic..k.q.
      0050: 70 D3 E9 21 E4 9B B2 98   9D BD 50                 p..!......P
      [Raw read (bb)]: length = 33
      0000: 17 03 01 00 1C ED D6 DC   6B C7 7D 02 82 42 83 39  ........k....B.9
      0010: D7 B1 99 8F 33 6C B1 AE   42 6E 24 A0 C9 47 C8 36  ....3l..Bn$..G.6
      0020: 11                                                 .
      Padded plaintext after DECRYPTION:  len = 28
      0000: 00 00 00 08 30 3D B6 21   6F 30 28 01 05 E0 4B C3  ....0=.!o0(...K.
      0010: 02 B9 7C 9F 9E 49 57 B2   DF 53 C7 26              .....IW..S.&
      Padded plaintext before ENCRYPTION:  len = 31
      0000: 00 00 00 0B 31 BD B6 21   6F 30 28 00 00 00 47 17  ....1..!o0(...G.
      0010: 3C 86 72 1B F6 5B A4 85   77 F4 CD C7 7A F4 66     <.r..[..w...z.f
      main, WRITE: TLSv1 Application Data, length = 15
      [Raw write (bb)]: length = 36
      0000: 17 03 01 00 1F BC 11 5E   8B 5B 80 45 77 BA BA D8  .......^.[.Ew...
      0010: 00 B8 33 56 2A C9 7E 17   68 F3 93 0C 92 78 AE F5  ..3V*...h....x..
      0020: 2E 12 F2 35                                        ...5


      
      	 remote.testMethod("MiddlewareMagic") = [CallerBean] testMethod() returned Hello MiddlewareMagic




      Padded plaintext before ENCRYPTION:  len = 21
      0000: 00 00 00 01 FF 6E 9D 38   AE 68 B7 24 3D 4B EF F6  .....n.8.h.$=K..
      0010: 1C 60 6E 5A A1                                     .`nZ.
      Thread-1, WRITE: TLSv1 Application Data, length = 5
      [Raw write (bb)]: length = 26
      0000: 17 03 01 00 15 DD A3 60   0C F1 FF 4C 02 39 37 B2  .......`...L.97.
      0010: DC 02 35 54 C7 F1 5F 51   54 FA                    ..5T.._QT.
      Thread-1, called closeOutbound()
      Thread-1, closeOutboundInternal()
      Thread-1, SEND TLSv1 ALERT:  warning, description = close_notify
      Padded plaintext before ENCRYPTION:  len = 18
      0000: 01 00 BE E2 AF A9 25 00   1B E1 4D 5E 96 94 31 3E  ......%...M^..1>
      0010: D4 5D                                              .]
      Thread-1, WRITE: TLSv1 Alert, length = 18
      [Raw write]: length = 23
      0000: 15 03 01 00 12 41 91 C7   E8 FC ED 72 7A 48 3A 84  .....A.....rzH:.
      0010: C3 1F AD 31 0F 91 A4                               ...1...
      [Raw read (bb)]: length = 26
      0000: 17 03 01 00 15 00 6F 70   FC E5 99 D2 D3 A5 EB 12  ......op........
      0010: B3 D4 C6 9C F4 F7 DA 23   3F 68                    .......#?h
      Padded plaintext after DECRYPTION:  len = 21
      0000: 00 00 00 01 FF E5 6D 43   49 4B 74 D5 5E 90 8A 7A  ......mCIKt.^..z
      0010: D7 1B 0A 79 CB                                     ...y.
      [Raw read]: length = 5
      0000: 15 03 01 00 12                                     .....
      [Raw read]: length = 18
      0000: 82 B9 69 EA A4 F3 9C 6E   18 9E 5F D6 E5 99 08 00  ..i....n.._.....
      0010: 9D 4B                                              .K
      Remoting "config-based-naming-client-endpoint" read-1, READ: TLSv1 Alert, length = 18
      Padded plaintext after DECRYPTION:  len = 18
      0000: 01 00 88 AF 54 6A 19 F4   56 80 9B 0F 40 45 20 0C  ....Tj..V...@E .
      0010: 0F 6D                                              .m
      Remoting "config-based-naming-client-endpoint" read-1, RECV TLSv1 ALERT:  warning, close_notify
      Remoting "config-based-naming-client-endpoint" read-1, closeInboundInternal()
      Remoting "config-based-naming-client-endpoint" read-1, closeOutboundInternal()

BUILD SUCCESSFUL
Total time: 5 seconds

.
.
Thanks πŸ™‚
Middleware Magic Team


Custom Security-Domain and RolesAllowed EJB3 on JBossAS7.1.1Final

Hi,

In our previous demos we have already seen that how to remotely access the EJBs deployed on “JBoss AS 7.1.1.Final”. So in this example we will see how to invoke an EJB which is secured. Here we will use the “jboss-ejb3.xml” file which is a new container specific deployment descriptor for the EJBs. Also we will an alternative option of defining the security domain for our ejbs using annotation “@org.jboss.ejb3.annotation.SecurityDomain”

In this article we are going to see an easiest way to lookup a Secured EJBs remotely in >”JBoss AS7.1.1.Final”

Point-1). How to create a separate Security Realm for our EJBs inside “standalone-full.xml”.

Point-2). How to create a separate Security Domain for our EJBs inside “standalone-full.xml”.

Point-3). How to use the “jboss-ejb3.xml” file inside the EJB jar file in order to associate it with the security domain?

Point-4). How to use the annotation “@org.jboss.ejb3.annotation.SecurityDomain” sothat we will not need to write the addiaional deployment descriptor “jboss-ejb3.xml”

Point-5). A properties file need to be placed in the Clients CLASSPATH with name “jboss-ejb-client.properties”, with some additional properties.

The whole article will be divided into two Parts 1) the Server side configuration and 2). the Application Level Settings from the Client side.

Source Code (Git Repo) Source Code for this Demo Can be downloaded from GIT Repository:
https://github.com/jaysensharma/MiddlewareMagicDemos/tree/master/Custom_SecurtyDomain_EJB3_AS711

JBossAS7 side configuration changes

Here we will first see what all changes are required from the JBoss side in order to create a separate Security Realm and Security Domain for our EJBs.
Step-1). Open the “$JBOSS_HOME/standaone/configuration/standalone-full.xml” file and then add a new Security Realm there inside the tag as following:

   <security-realm name="EJBRealm">
      <authentication>
         <jaas name="ejb-security-domain"/>
      </authentication>
   </security-realm>

Step-2). As the above Security Realm is pointing to a security Domain “ejb-security-domain” so let’s create a new Security Realm inside the [subsystem xmlns=”urn:jboss:domain:security:1.1″] subsystem as following:

     <security-domain name="ejb-security-domain" cache-type="default">
         <authentication>
           <login-module code="Remoting" flag="optional">
             <module-option name="password-stacking" value="useFirstPass"/>
           </login-module>
           <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
             <module-option name="defaultUsersProperties" value="${jboss.server.config.dir}/ejb-users.properties"/>
             <module-option name="defaultRolesProperties" value="${jboss.server.config.dir}/ejb-roles.properties"/>
             <module-option name="usersProperties" value="${jboss.server.config.dir}/ejb-users.properties"/>
             <module-option name="rolesProperties" value="${jboss.server.config.dir}/ejb-roles.properties"/>
             <module-option name="password-stacking" value="useFirstPass"/>
           </login-module>
         </authentication>
     </security-domain>

Step-3). Also as we know that the EJBs are accessed remotely using the JBoss Remoting so we will need to make sure that the remoting subsystem is also using the Security Realm (EJBRealm) which we created as following:

    <subsystem xmlns="urn:jboss:domain:remoting:1.1">
       <connector name="remoting-connector" socket-binding="remoting" security-realm="EJBRealm"/>
    </subsystem>

Step-4). As our Security domain is using two properties file so we will need to create those properties file as well inside “$JBOSS_HOME/standaone/configuration/” as following:

ejb-users.properties

ejbUser=ejbPassword

ejb-roles.properties

ejbUser=ejbRole

Step-5). Now start the JBoss AS7.1.1.Final as following:

./standalone.sh -c standalone-full.xml

Developing Secure EJB3 Application

As the Server side configurations are done so now we will proceed with developing the Secure EJB3 application.

Step-6). Create a directory somewhere in your file system like “/home/userone/Custom_SecurtyDomain_EJB3_AS711” and then create another directory with name “src” inside the “/home/userone/Custom_SecurtyDomain_EJB3_AS711” directory.

Step-7). Write the EJB Stateless Bean class “CallerBean.java” as following inside the directory “/home/userone/Custom_SecurtyDomain_EJB3_AS711/src”:

package remote;
import javax.ejb.*;
import javax.naming.*;
import java.util.*;
import javax.annotation.Resource;
import javax.annotation.security.DeclareRoles;
import javax.annotation.security.RolesAllowed;
import javax.ejb.LocalBean;
import javax.ejb.SessionContext;

@Stateless  
@Remote(CallerRemote.class)

/*
   If you dont want to use "META-INF/jboss-ejb3.xml" then you can use 
   the following annotation to defing your security-domain
   @org.jboss.ejb3.annotation.SecurityDomain("ejb-security-domain")
*/

public class CallerBean implements CallerRemote
 {
     @Resource
     private SessionContext sessionContext;

     @RolesAllowed("ejbRole")
     public String testMethod(String name)
	    {
		   System.out.println("nntBean's testMethod(String name) called....");
                   System.out.println("nntUserName: '" + sessionContext.getCallerPrincipal().getName() + "' is able to access testMethod()");
                   if (sessionContext.isCallerInRole("ejbRole"))
                         System.out.println("tUser is in   "ejbRole"   ");
                   else
                         System.out.println("tUser is NOT in an allowed role");
		   return "[CallerBean] testMethod() returned Hello "+name;
	    }


     public String commonMethod(String name)
	    {
		   System.out.println("nntBean's commonMethod(String name) called....");
                   System.out.println("nnUser " + sessionContext.getCallerPrincipal().getName() + " is able to access commonMethod()");
                   if (sessionContext.isCallerInRole("ejbRole"))
                         System.out.println("t##### commonMethod()  User is in ejbRole");
                   else
                         System.out.println("t##### commonMethod()  User is NOT in ejbRole");
		   return "[CallerBean] commonMethod() returned Hello "+name;
	    }
 }

Step-8). Write the EJB Remote Interface “CallerRemote.java” as following inside the directory “/home/userone/Custom_SecurtyDomain_EJB3_AS711/src”:

package remote;
public interface CallerRemote
{
     public String testMethod(String name);
     public String commonMethod(String name);
}

Step-9). In order to secure the EJB we will define the security domain inside the “jboss-ejb3.xml” file. Spo create a file with this name inside “/home/userone/Custom_SecurtyDomain_EJB3_AS711/src” as following:


<?xml version="1.0"?>  
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
   xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:s="urn:security"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd
   http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
   version="3.1"
   impl-version="2.0">
  <assembly-descriptor>
    <s:security>
      <ejb-name>*</ejb-name>
          <s:security-domain>ejb-security-domain</s:security-domain>
    </s:security>
  </assembly-descriptor>

</jboss:ejb-jar>

Step-10). As we are going to create an EAR file containing the above Stateless Session Bean so We will write the “application.xml” as following inside the directory “/home/userone/Custom_SecurtyDomain_EJB3_AS711/src”:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" id="Application_ID" version="5">
  <module>
    <ejb>remoteEJB.jar</ejb>
  </module>
</application>

Developing EJB3 Remote Client

Step-11). Now we will write the Client side code to access the Above mentioned EJB Remotely so create a class “TestRemoteClientA.java” as following inside the directory “/home/userone/Custom_SecurtyDomain_EJB3_AS711/src”:

package client;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.util.Properties;
import remote.CallerRemote;
public class TestRemoteClientA
  {
      public static void main(String ar[]) throws Exception 
       {
          Context context=null;
       try
         {
                Properties props = new Properties();
                props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
                props.put(Context.PROVIDER_URL, "remote://localhost:4447"); 
                props.put(Context.SECURITY_PRINCIPAL, "ejbUser");
                props.put(Context.SECURITY_CREDENTIALS, "ejbPassword");

                //props.put("jboss.naming.client.remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED","true");
                //props.put("jboss.naming.client.connect.options.org.xnio.Options.SSL_STARTTLS","true");

                props.put("jboss.naming.client.ejb.context", true);
                props.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
                context = new InitialContext(props);	
	        System.out.println("nt--------------------------nGot initial Context: "+context);		
         }
       catch (Exception e)
         {
                e.printStackTrace();
          }

         // Lookup Format will be 
         // <app-name>/<module-name>/<distinct-name>/<bean-name>!<fully-qualified-classname-of-the-remote-interface>
   
         CallerRemote remote=(CallerRemote)context.lookup("TestRemoteEJBEAR/remoteEJB//CallerBean!remote.CallerRemote");
         //System.out.println("nt remote.testMethod("Common-MiddlewareMagic") = "+remote.commonMethod("Common-MiddlewareMagic"));

         System.out.println("nt remote.testMethod("MiddlewareMagic") = "+remote.testMethod("MiddlewareMagic"));
       }
  }

Step-12). Almost everything is done, so we will create a client side logging file sothat we will get the desired logging at the Remote EJB Client side. So lets create a file “logging.properties” inside “/home/userone/Custom_SecurtyDomain_EJB3_AS711/src” as following:


# Logging
handlers =  java.util.logging.ConsoleHandler
.level = ALL
INFO

# Console Logging
java.util.logging.ConsoleHandler.level=SEVERE

Step-13). Now the most important part of building / deploying and running the application so in order to achieve that we will create a simple ant build script, So Create a “build.xml” file inside the “/home/userone/Custom_SecurtyDomain_EJB3_AS711” directory as following:

<project name="EJB3_SecurityDomain_Service" default="all">
<property name="jboss.home" value="/NotBackedUp/JBoss_All/jboss-as-7.1.1.Final" />
<property name="jboss.module.dir" value="${jboss.home}/modules" />
<property name="basedir" value="." />
<property name="tmp.dir" value="tmp" />
<property name="src.dir" value="src" />
<property name="output.dir" value="build" />
<property name="ear.name" value="TestRemoteEJBEAR.ear" />
<property name="ejb.jar" value="remoteEJB.jar" />
<property name="client.jar.name" value="remoteEJBClient.jar" />

        <path id="jboss.classpath">
           <fileset dir="${jboss.module.dir}">
               <include name="**/*.jar"/>
           </fileset>  
        </path>

        <!-- Client Needs the following Jar to be present in the CLASSPATH including -->
        <path id="jboss.new.client.classpath">
           <fileset dir="${jboss.home}/bin/client" >
               <include name="jboss-client.jar" />
           </fileset>  
        </path>
	 
        <target name="all" depends="deploy" />

        <target name="build_ear">
           <delete dir="${tmp.dir}" />
           <mkdir dir="${tmp.dir}/META-INF" />
           <javac srcdir="${src.dir}" destdir="${tmp.dir}"  includes="*.java" excludes="TestRemoteClientA.java" classpathref="jboss.classpath"/>
           <copy file="${src.dir}/jboss-ejb3.xml" todir="${tmp.dir}/META-INF"/>
           <jar jarfile="${tmp.dir}/${ejb.jar}" basedir="${tmp.dir}" compress="true" />

           <delete file="${tmp.dir}/ejb-users.properties"/>
           <delete file="${tmp.dir}/ejb-roles.properties"/>
           <delete file="${tmp.dir}/META-INF/jboss-ejb3.xml"/>

           <delete includeEmptyDirs="true">
              <fileset dir="${tmp.dir}/remote"/>
           </delete> 
           <mkdir dir="${tmp.dir}/META-INF"/>
           <copy todir="${tmp.dir}/META-INF">
                <fileset dir="${src.dir}/">
                  <include name="application.xml"/> 
                </fileset>
           </copy>           
           <jar jarfile="${tmp.dir}/${ear.name}" basedir="${tmp.dir}" compress="true" />
           <delete includeEmptyDirs="true">
              <fileset dir="${tmp.dir}/META-INF"/>
           </delete> 
           <delete file="${tmp.dir}/${ejb.jar}"/>

           <copy file="${tmp.dir}/${ear.name}" tofile="${output.dir}/${ear.name}"/>
           <delete file="${tmp.dir}/${ear.name}"/>
        </target>


        <target name="deploy" depends="build_ear">
            <echo message="*******************  Deploying the EAR file ${ear.name} *********************" />  
            <echo message="********** ${output.dir}/${ear.name} to ${jboss.home}/standalone/deployments **********" />  
            <copy todir="${jboss.home}/standalone/deployments/">
                <fileset dir="${output.dir}/">
                  <include name="${ear.name}"/> 
                </fileset>
            </copy>
            <echo message="*******************  Deployed Successfully   *********************" />  
        </target>


        <target name="run">
           <delete dir="${tmp.dir}" />
           <mkdir dir="${tmp.dir}" />
           <javac srcdir="${src.dir}" destdir="${tmp.dir}"  includes="CallerRemote.java,TestRemoteClientA.java" classpathref="jboss.classpath"/>          
           <jar jarfile="${output.dir}/${client.jar.name}" basedir="${tmp.dir}" compress="true" />
           <delete dir="${tmp.dir}"/>
           <java classname="client.TestRemoteClientA" fork="true">
               <classpath>
                  <pathelement location="${output.dir}/${client.jar.name}"/>
                  <path refid="jboss.new.client.classpath"/>
               </classpath>

               <!-- Note Here we are passing the Client side logging related file to the JVM -->
               <sysproperty key="java.util.logging.manager" value="java.util.logging.LogManager"/>
               <sysproperty key="java.util.logging.config.file" value="${src.dir}/logging.properties"/>
               <sysproperty key="java.util.logging.ConsoleHandler.level" value="SEVERE" />
           </java>
        </target>        
    
</project>


NOTE: The only change in the above file you need to do is to change the “jboss.home” directory path in the second line of the above script to point to your own JBoss AS7 directory.

Step-15). Now before running your ANT script to build and deploy the above webapplication you should have the ANT as well as JAVA set in the $PATH variable of the Shell / command prompt as following:

For Unix Based OS:
export PATH=/home/userone/jdk1.6.0_21/bin:/home/userone/org.apache.ant_1.6.5/bin:$PATH

For Windows Based OS:
set PATH=C:/jdk1.6.0_21/bin;C:/org.apache.ant_1.6.5/bin;%PATH%

Step-16). Now once the PATH is set In the command/Shell prompt you can move inside the directory “/home/userone/Custom_SecurtyDomain_EJB3_AS711” and then run the ant to build and deploy the EJB based EAR applicationon your JBoss Standalone full profile, by running the command “ant deploy”

[userone@localhost Custom_SecurtyDomain_EJB3_AS711]$ ant deploy
Buildfile: build.xml

build_ear:
    [mkdir] Created dir: /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp/META-INF
    [javac] Compiling 2 source files to /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp
     [copy] Copying 1 file to /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp/META-INF
      [jar] Building jar: /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp/remoteEJB.jar
   [delete] Deleting: /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp/META-INF/jboss-ejb3.xml
     [copy] Copying 1 file to /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp/META-INF
      [jar] Building jar: /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp/TestRemoteEJBEAR.ear
   [delete] Deleting: /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp/remoteEJB.jar
     [copy] Copying 1 file to /home/userone/Custom_SecurtyDomain_EJB3_AS711/build
   [delete] Deleting: /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp/TestRemoteEJBEAR.ear

deploy:
     [echo] *******************  Deploying the EAR file TestRemoteEJBEAR.ear *********************
     [echo] ********** build/TestRemoteEJBEAR.ear to /home/userone/jboss-as-7.1.1.Final//standalone/deployments **********
     [copy] Copying 1 file to /home/userone/jboss-as-7.1.1.Final//standalone/deployments
     [echo] *******************  Deployed Successfully   *********************

BUILD SUCCESSFUL
Total time: 2 seconds

Step-17). Now we will try to compile and run the EJB3 remote Client application by running the command “ant run”

[userone@localhost Custom_SecurtyDomain_EJB3_AS711]$ ant run
Buildfile: build.xml

run:
   [delete] Deleting directory /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp
    [mkdir] Created dir: /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp
     [copy] Copying 1 file to /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp
    [javac] Compiling 2 source files to /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp
      [jar] Building jar: /home/userone/Custom_SecurtyDomain_EJB3_AS711/build/remoteEJBClient.jar
   [delete] Deleting directory /home/userone/Custom_SecurtyDomain_EJB3_AS711/tmp
      
      	--------------------------
      Got initial Context: javax.naming.InitialContext@5ff3ce5c
      
      	 remote.testMethod("MiddlewareMagic") = [CallerBean] testMethod() returned Hello MiddlewareMagic

BUILD SUCCESSFUL
Total time: 3 seconds

.
.
Thanks πŸ™‚
Middleware Magic Team


JPA2 with OpenJPA 2.2.0 in JBossAS7.1.1

Hi,

In Our previous demo we saw how we can use Oracle TopLink 12c with JBossAS7 as persistence provider. http://middlewaremagic.com/jboss/?p=1983
Here in this example we will see how we can use the Open JPA in JBossAS7 as a persistence provider.

As we already know that the JBoss Application Server7 JPA subsystem implements the JPA 2.0 container-managed requirements. JPA Applications use the Hibernate (core) 4.0 persistence provider, that is included with JBoss AS7. Hibernate 4 is packaged with the AS and is the default persistence provider. The JPA 2.0 Specifications can be found in the following link: http://jcp.org/aboutJava/communityprocess/pfd/jsr317/index.html

However in this current Demo we will just create a Simple JPA persistence unit With the help of “Open JPA 2.2.0” and then we will try to insert some employee detils inside the DataBase. So basically this is just as a startup.

In this example we will mainly focus on following points

Point-1). We will see how to use “Open JPA 2.2.0” with JBossAS7.1.1.Final.

Point-2). For Web Applications we should put the “persistence.xml” file inside “${WEB_APPLICATION}/WEB-INF/classes/META-INF/persistence.xml” AND For EJB Applications we should put the “persistence.xml” file inside “${EJB_JAR}/META-INF”

Point-3). To inject the EntityManager inside our Web Components we can use the annotation @javax.persistence.PersistenceContext(unitName=”name”)

Point-4). We can use the @javax.ejb.EJB annotation to inject an Enterprise Java Bean inside our app components. Like @EJB(lookup=”jndiName”)

Point-5). We will also see how to create a openJPA custom module and how to use the “jboss-deployment-structure.xml” file.

Point-6). We will see what error we get when we dont define following property in our “persistence.xml” file while using OpenJPA .

           <property name="openjpa.DynamicEnhancementAgent" value="false"/>
           <property name="openjpa.RuntimeUnenhancedClasses" value="supported" />

Point-7). The Full Demo can be downloaded from the following Github repository:
https://github.com/jaysensharma/MiddlewareMagicDemos/tree/master/JPA2_And_OpenJPA_On_AS7

Creating DataSource On JBossAS7

Step-1). Here we are using JBoss AS7 latest build “jboss-as-7.1.1.Final” which can be downloaded from the following link: http://www.jboss.org/jbossas/downloads

Step-2). In order to get more details on how to create MySQL DataSource in JBoss AS7 you can refer to the following article: http://middlewaremagic.com/jboss/?p=872
Just place the “mysql-connector-java-5.1.13-bin.jar” MySQL Jdbc driver in your JBoss Deployments directory, Then create a DataSource inside “${JBOSS_HOME}/standalone/configuration/standalone-full.xml” file as following:

        <subsystem xmlns="urn:jboss:domain:datasources:1.0">
            <datasources>

                <!-- Below is the DataSource Configuration which we added for our JPA TestCase-->
                <datasource jta="false" jndi-name="java:/MySqlDS" pool-name="MySqlDS_Pool" enabled="true" use-ccm="false">
                    <connection-url>jdbc:mysql://localhost:3306/testDB</connection-url>
                    <driver-class>com.mysql.jdbc.Driver</driver-class>
                    <driver>mysql-connector-java-5.1.13-bin.jar</driver>
                    <security>
                        <user-name>someDBUserName</user-name>
                        <password>someDBPassword</password>
                    </security>
                </datasource>
                <drivers>
                    <driver name="h2" module="com.h2database.h2">
                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                    </driver>
                </drivers>
            </datasources>
        </subsystem>

Creating OpenJPA 2.2.0 Module In JBossAS7

Step-3). Download the “OpenJPA 2.2.0” (apache-openjpa-2.2.0-binary.zip) from the following link:
http://openjpa.apache.org/downloads.html

Step-4). Extract the downloaded “apache-openjpa-2.2.0-binary.zip” and then copy the two Jars “apache-openjpa-2.2.0/lib/serp-1.13.1.jar” And “apache-openjpa-2.2.0/openjpa-all-2.2.0.jar”

Step-5). Create the following directory structure [jboss-as-7.1.1.Final/modules/org/eclipse/persistence/jpa/main] in your file system so that the OpenJPA 2.2.0 Module can be created.

     .
     .Β Β 
     jboss-as-7.1.1.Final/modules/
     β”‚Β Β 
     β”œβ”€β”€org
     β”‚Β Β  β”‚Β Β      
     β”‚Β Β  β”œβ”€β”€ apache
     β”‚Β Β  β”‚Β Β  β”‚Β 
     β”‚Β Β  β”‚Β Β  β”œβ”€β”€ openjpa
  Β Β                 β”‚Β 
                      ── main
                         β”œβ”€β”€ module.xml
               Β          β”œ
               Β          β”œβ”€β”€ openjpa-all-2.2.0.jar
               Β          β”œ
               Β          β”œβ”€β”€ serp-1.13.1.jar

Paste the “openjpa-all-2.2.0.jar” And “serp-1.13.1.jar” from downloaded OpenJPA s/w into the “jboss-as-7.1.1.Final/modules/org/apache/openjpa/main” and then write the following kind of “module.xml” file:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.apache.openjpa">
    <resources>
        <resource-root path="openjpa-all-2.2.0.jar"/>
        <resource-root path="serp-1.13.1.jar"/>
    </resources>

        <dependencies> 
            <module name="javax.persistence.api"/> 
            <module name="javax.transaction.api"/> 
            <module name="javax.validation.api"/> 
        </dependencies> 
</module>

Step-6). Restart your JBoss AS7 from inside “/home/userone/jboss-as-7.1.1.Final/bin” directory as following:

.
 ./standalone.sh -c standalone-full.xml
.

Developing OpenJPA 2.2.0 JPA Demo

Step1). Create a directory somewhere in your filesystem like “/home/userone/JPA2_And_OpenJPA_On_AS7” where we will place our application build related stuff. Then create another directory “src” inside “/home/userone/JPA2_And_OpenJPA_On_AS7” where we will be placing our source codes and JSPs.

Step2). Now first of all we will create an Entity “Employee.java” as following inside the “/home/userone/JPA2_And_OpenJPA_On_AS7/src” directory.

package jpa;
import java.io.Serializable;
import javax.persistence.*;
import java.lang.Integer;

@Entity
@Table(name="Employee")
public class Employee implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private Integer empno;

	private String ename;

    public Employee() {
    	System.out.println("Employee Object Created. this: "+this);
    }

	public Integer getEmpno() {
		return this.empno;
	}

	public void setEmpno(Integer empno) {
		this.empno = empno;
	}

	public String getEname() {
		return this.ename;
	}

	public void setEname(String ename) {
		this.ename = ename;
	}

}

Step3). Now we will create a Simple Stateless SessionBean remote Interface “EmployeeServiceRemote.java” inside “/home/userone/JPA2_And_OpenJPA_On_AS7/src” directory as following:

package jpa;
import java.lang.Integer;
import java.util.Collection;
import javax.ejb.Remote;
@Remote

public interface EmployeeServiceRemote{
  public void doAction();
  public Employee createEmployee(Integer id, String name);
  public void removeEmployee(Integer id);
  public Employee findEmployee(Integer id);
  public Collection<Employee> findAllEmployees() ;

}

Step4). Now we will Stateless Session Bean class “EmployeeService.java” by implementing the interface “EmployeeServiceRemote.java”. Place this file as well inside the “/home/userone/JPA2_And_OpenJPA_On_AS7/src” directory as following:

package jpa;
import java.lang.Integer;
import java.util.Collection;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import javax.persistence.EntityTransaction;
import javax.ejb.*;

@Stateless
public class EmployeeService implements EmployeeServiceRemote {
  @PersistenceContext(unitName="EmployeeService")
  EntityManager em;

  public EmployeeService() {
	  System.out.println("ntEmployeeService  Object Created. this: "+this);
  }

  @TransactionAttribute (TransactionAttributeType.REQUIRED)
  public Employee createEmployee(Integer id, String name) {
    Employee emp = new Employee();
    emp.setEmpno(id);
    emp.setEname(name);
    System.out.println("nt[EmployeeService] Before em.persist(emp)");

    try{ 
         
         //em.getTransaction().begin();
         em.persist(emp);
         //em.flush();
         //em.getTransaction().commit();
       } 
    catch(Exception e)
       {
          e.printStackTrace();
          try{   em.getTransaction().rollback();   } catch(Exception ee)  {  ee.printStackTrace();  }
       }

     System.out.println("nt[EmployeeService] Before findEmployee(id)");
     emp = findEmployee(id);
     System.out.println("nt[EmployeeService] Inside createEmployee() findEmployee result: "+emp);
     return emp;
  }

  public void removeEmployee(Integer id) {
	System.out.println("nt Inside removeEmployee("+id+")");
    Employee emp = findEmployee(id);
    if (emp != null) {
       try{ 
            //em.getTransaction().begin();
            em.remove(emp);
            //em.getTransaction().commit();
          } 
       catch(Exception e)
          {
             e.printStackTrace();
             try{   em.getTransaction().rollback();   } catch(Exception ee)  {  ee.printStackTrace();  }
          }
    }
  }

  public Employee findEmployee(Integer id) {
	System.out.println("nt Inside findEmployee("+id+")");
    return em.find(Employee.class, id);
  }

  @SuppressWarnings("unchecked")
  public Collection<Employee> findAllEmployees() 
     {
	System.out.println("nt Inside findAllEmployees()");
        Query query = em.createQuery("SELECT e FROM Employee e");
        return (Collection<Employee>) query.getResultList();
     }

  public void doAction(){
       System.out.println("nt Hello World...");
  }
}

Step5). Now we will write the “persistence.xml” file inside the “/home/userone/JPA2_And_OpenJPA_On_AS7/src” directory as following:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
	xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="EmployeeService">
    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
       <jta-data-source>java:/MySqlDS</jta-data-source> 
       <class>jpa.Employee</class>

      <properties>
          <property name="jboss.as.jpa.providerModule" value="org.apache.openjpa" />
          <property name="openjpa.Log" value="DefaultLevel=TRACE, Tool=INFO"/>


           <!--   IMPORTANT PROPERTIES   -->           
           <property name="openjpa.DynamicEnhancementAgent" value="false"/>
           <property name="openjpa.RuntimeUnenhancedClasses" value="supported" />
      </properties>
  </persistence-unit>
</persistence>

NOTE: We need to make sure that this “persistence.xml” file goes inside the “${war.name}/WEB-INF/classes/META-INF” directory of our WAR file. Note jboss.as.jpa.providerModule property is very important

Step6). Now we will write a simple “index.jsp” page to just provide a some input forms so that a user can enter the employee name and id details , Place this file as well inside the “/home/userone/JPA2_And_OpenJPA_On_AS7/src” directory as following:

<html>
<head>
<title>JPA Demo In JBoss AS7</title>
</head>
<body>
   <form action="TestServlet">
   Enter Employee ID : <input name="empId" type="text" value="" /> <BR/>
   Enter Employee Name : <input name="empName" type="text" value="" /> <BR/>
   <input type="submit" value="Store" />
   </form>
</body>
</html>

Step7). We will write the “TestServlet.java” inside the “/home/userone/JPA2_And_OpenJPA_On_AS7/src” as following in order to insert the details entered by the user in previous index.jsp page.


package servlets;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.Integer;
import javax.ejb.EJB;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import java.util.*;
import javax.transaction.*;
import javax.annotation.*;
import jpa.Employee;

@WebServlet(value="/TestServlet")
public class TestServlet extends HttpServlet 
  {
	private static final long serialVersionUID = 1L;

        @PersistenceContext(unitName="EmployeeService")
	EntityManager em;
	  
        @EJB(lookup="java:global/JPA_BASIC_Demo/EmployeeService!jpa.EmployeeServiceRemote")
        jpa.EmployeeServiceRemote remote;


	public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
                PrintWriter out=null;
		try {
			System.out.println("inside TestServlet service()");
			System.out.println("Got jpa.EmployeeServiceRemote :  "+remote);
			out=response.getWriter();			
			
                        out.println("<html><head><title>JPA Insert</title></head><body>");
			out.println("<BR>Employee Record Inserted in the Database.<BR>");
                        remote.createEmployee(new Integer(request.getParameter("empId")),request.getParameter("empName"));
                        out.println("Record Inserted.....");
                        
                        /*
                          //  If i call the "remote.findAllEmployees()" Now then i get an Exception here .... Only with OpenJPA 
                          //  (where as it works well with TopLink and Hibernate) 

                   
                        Collection<Employee> employees=remote.findAllEmployees();
                        out.println("<TABLE border="10%">");
                        out.println("<TR><TD>EmpID</TD><TD>EmpName</TD></TR>");
			for(Employee tmp : employees)
			{
			   out.println("<TR><TD>"+tmp.getEmpno()+"</TD><TD>"+tmp.getEname()+"</TD></TR>");
			}
                        out.println("</TABLE>");
                        */
                        remote.doAction();
                        out.println("<BR><BR><a href="index.jsp"> Want to insert Some More Employee Records ?</a></body></html>");
		     } 
                 catch (Exception e) 
                     {
			e.printStackTrace();
		     }
	}
}

Step8). As we created a module “org.eclipse.persistence.jpa” earlier which we are going to use in our web application. So we will need to create a “jboss-deployment-structure.xml” file as following:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
  <deployment>
    <dependencies>
      <module name="org.apache.openjpa" />
    </dependencies>
  </deployment>
</jboss-deployment-structure>

NOTE: Once our application is build then we should be able to see this file present inside our WebApplication “WEB-INF/jboss-deployment-structure.xml”.

Step9). Now the most important part, here we are going to develop “build.xml” ANT file, which will build, deploy our web application on the JBoss AS7.1 Beta Server, so write the following “build.xml” file inside “/home/userone/JPA2_And_OpenJPA_On_AS7” directory.


<project name="JPA_BASIC_Demo" default="deploy">
<property name="jboss.home" value="/NotBackedUp/JBoss_All/jboss-as-7.1.1.Final" />
<property name="jboss.module.dir" value="${jboss.home}/modules" />
<property name="basedir" value="." />
<property name="tmp.dir" value="tmp" />
<property name="output.dir" value="build" />
<property name="src.dir" value="src" />
<property name="war.name" value="JPA_BASIC_Demo.war" />
 
   <path id="jboss.classpath">
     <fileset dir="${jboss.module.dir}">
        <include name="**/*.jar"/>
     </fileset>
   </path>
 
        <target name="init">
           <delete dir="${output.dir}" />
           <mkdir dir="${output.dir}" />
           <delete dir="${tmp.dir}" />
           <mkdir dir="${tmp.dir}" />
           <mkdir dir="${tmp.dir}/WEB-INF/classes/META-INF"/>
        </target>
 
        <target name="build" depends="init">
           <javac srcdir="${src.dir}" destdir="${tmp.dir}/WEB-INF/classes"  includes="*.java" classpathref="jboss.classpath" />
           <copy todir="${tmp.dir}/WEB-INF/classes">
                <fileset dir="${src.dir}" includes="**/*.java"/>
           </copy>
           <copy file="${src.dir}/index.jsp" tofile="${tmp.dir}/index.jsp"/>
           <copy file="${src.dir}/jboss-deployment-structure.xml" tofile="${tmp.dir}/WEB-INF/jboss-deployment-structure.xml"/>

           <!-- Make Sure that the persistence.xml file is placed inside "${war.name}/WEB-INF/classes/META-INF" directory -->
           <copy file="${src.dir}/persistence.xml" tofile="${tmp.dir}/WEB-INF/classes/META-INF/persistence.xml"/>

           <jar jarfile="${tmp.dir}/${war.name}" basedir="${tmp.dir}" compress="true" />
           <copy file="${tmp.dir}/${war.name}" tofile="${output.dir}/${war.name}"/>

           <delete includeEmptyDirs="true">
              <fileset dir="${tmp.dir}"/>
           </delete>
        </target>
 
        <target name="deploy" depends="build">
            <echo message="*******************  Deploying the WAR file ${war.name} *********************" />
            <echo message="********** ${output.dir}/${war.name} to ${jboss.home}/standalone/deployments **********" />
            <copy todir="${jboss.home}/standalone/deployments/">
                <fileset dir="${output.dir}/">
                  <include name="${war.name}"/>
                </fileset>
            </copy>
            <echo message="*******************  Deployed Successfully   *********************" />
        </target>
</project>

NOTE: The only change in the above file you need to do is to change the “jboss.home” directory path in the second line of the above script to point to your own JBoss AS7 directory.

Step9). Now before running your ANT script to build and deploy the above webapplication you should have the ANT as well as JAVA set in the $PATH variable of the Shell / command prompt as following:

For Unix Based OS:
export PATH=/home/userone/jdk1.6.0_21/bin:/home/userone/org.apache.ant_1.6.5/bin:$PATH

For Windows Based OS:
set PATH=C:/jdk1.6.0_21/bin;C:/org.apache.ant_1.6.5/bin;%PATH%

Step10). Now once the PATH is set In the command/Shell prompt you can move inside the directory “/home/userone/JPA2_And_OpenJPA_On_AS7” and then run the ant to build the webservice. by running the command “ant deploy”

Buildfile: build.xml

init:
   [delete] Deleting directory /home/userone/JPA2_And_OpenJPA_On_AS7/build
    [mkdir] Created dir: /home/userone/JPA2_And_OpenJPA_On_AS7/build
    [mkdir] Created dir: /home/userone/JPA2_And_OpenJPA_On_AS7/tmp
    [mkdir] Created dir: /home/userone/JPA2_And_OpenJPA_On_AS7/tmp/WEB-INF/classes/META-INF

build:
    [javac] Compiling 4 source files to /home/userone/JPA2_And_OpenJPA_On_AS7/tmp/WEB-INF/classes
     [copy] Copying 4 files to /home/userone/JPA2_And_OpenJPA_On_AS7/tmp/WEB-INF/classes
     [copy] Copying 1 file to /home/userone/JPA2_And_OpenJPA_On_AS7/tmp
     [copy] Copying 1 file to /home/userone/JPA2_And_OpenJPA_On_AS7/tmp/WEB-INF
     [copy] Copying 1 file to /home/userone/JPA2_And_OpenJPA_On_AS7/tmp/WEB-INF/classes/META-INF
      [jar] Building jar: /home/userone/JPA2_And_OpenJPA_On_AS7/tmp/JPA_BASIC_Demo.war
     [copy] Copying 1 file to /home/userone/JPA2_And_OpenJPA_On_AS7/build

deploy:
     [echo] *******************  Deploying the WAR file JPA_BASIC_Demo.war *********************
     [echo] ********** build/JPA_BASIC_Demo.war to /home/userone/jboss-as-7.1.1.Final/standalone/deployments **********
     [copy] Copying 1 file to /home/userone/jboss-as-7.1.1.Final/standalone/deployments
     [echo] *******************  Deployed Successfully   *********************

BUILD SUCCESSFUL
Total time: 2 seconds

Step11). Now you will see the following kind of output on your JBoss AS7.1 console which means the application is deployed successfully:


22:31:20,023 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011403: Stopping Persistence Unit Service 'JPA_BASIC_Demo.war#EmployeeService'
22:31:20,024 ERROR [stderr] (MSC service thread 1-4) 1670729  EmployeeService  TRACE  [MSC service thread 1-4] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerFactoryImpl@eed9a0e.close() invoked.
22:31:20,025 ERROR [stderr] (MSC service thread 1-4) 1670730  EmployeeService  TRACE  [MSC service thread 1-4] openjpa.MetaData - Clearing metadata repository "org.apache.openjpa.jdbc.meta.MappingRepository@151c6810".
22:31:20,050 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment JPA_BASIC_Demo.war in 40ms
22:31:20,051 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "JPA_BASIC_Demo.war"
22:31:20,060 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) JBAS011401: Read persistence.xml for EmployeeService
22:31:20,093 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-8) JNDI bindings for session bean named EmployeeService in deployment unit deployment "JPA_BASIC_Demo.war" are as follows:

	java:global/JPA_BASIC_Demo/EmployeeService!jpa.EmployeeServiceRemote
	java:app/JPA_BASIC_Demo/EmployeeService!jpa.EmployeeServiceRemote
	java:module/EmployeeService!jpa.EmployeeServiceRemote
	java:jboss/exported/JPA_BASIC_Demo/EmployeeService!jpa.EmployeeServiceRemote
	java:global/JPA_BASIC_Demo/EmployeeService
	java:app/JPA_BASIC_Demo/EmployeeService
	java:module/EmployeeService

22:31:20,181 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011402: Starting Persistence Unit Service 'JPA_BASIC_Demo.war#EmployeeService'
22:31:20,221 ERROR [stderr] (MSC service thread 1-1) 0  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.Runtime - Setting the following properties from "?" into configuration: {javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, openjpa.RuntimeUnenhancedClasses=supported, javax.persistence.sharedCache.mode=UNSPECIFIED, PersistenceVersion=2.0, openjpa.Log=DefaultLevel=TRACE, Tool=INFO, openjpa.Id=EmployeeService, openjpa.ConnectionFactoryMode=managed, openjpa.ConnectionFactory=org.jboss.jca.adapters.jdbc.WrapperDataSource@36cb1594, javax.persistence.validation.mode=AUTO, javax.persistence.validation.factory=org.jboss.as.jpa.validator.SerializableValidatorFactory@4600f385, jboss.as.jpa.providerModule=org.apache.openjpa, openjpa.TransactionMode=managed, openjpa.MetaDataFactory=jpa(URLs=vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/, Types=jpa.Employee), openjpa.ClassResolver=org.apache.openjpa.persistence.PersistenceUnitInfoImpl$ClassResolverImpl@269be988, openjpa.DynamicEnhancementAgent=false}
22:31:20,227 ERROR [stderr] (MSC service thread 1-1) 6  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance.
22:31:20,228 ERROR [stderr] (MSC service thread 1-1) 7  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.MetaData - Scanning URL "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/" for persistent types.
22:31:20,229 ERROR [stderr] (MSC service thread 1-1) 8  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.MetaData - Scan of "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/" found persistent types [].
22:31:20,229 ERROR [stderr] (MSC service thread 1-1) 8  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.MetaData - Skipping persistent type location association for location "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/" since it is a directory.
22:31:20,230 ERROR [stderr] (MSC service thread 1-1) 9  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types.
22:31:20,230 ERROR [stderr] (MSC service thread 1-1) 9  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.MetaData - The persistent unit root url is "null"
22:31:20,230 ERROR [stderr] (MSC service thread 1-1) 9  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.MetaData - parsePersistentTypeNames() found [jpa.Employee].
22:31:20,231 ERROR [stderr] (MSC service thread 1-1) 10  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.MetaData - Found 1 classes with metadata in 3 milliseconds.
22:31:20,235 ERROR [stderr] (MSC service thread 1-1) 0  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.Runtime - Setting the following properties from "?" into configuration: {openjpa.BrokerFactory=jdbc, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, openjpa.RuntimeUnenhancedClasses=supported, javax.persistence.sharedCache.mode=UNSPECIFIED, PersistenceVersion=2.0, openjpa.Log=DefaultLevel=TRACE, Tool=INFO, openjpa.Id=EmployeeService, openjpa.ConnectionFactoryMode=managed, openjpa.ConnectionFactory=org.jboss.jca.adapters.jdbc.WrapperDataSource@36cb1594, javax.persistence.validation.mode=AUTO, javax.persistence.validation.factory=org.jboss.as.jpa.validator.SerializableValidatorFactory@4600f385, jboss.as.jpa.providerModule=org.apache.openjpa, openjpa.TransactionMode=managed, openjpa.BrokerImpl=non-finalizing, openjpa.MetaDataFactory=jpa(URLs=vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/, Types=jpa.Employee), openjpa.ClassResolver=org.apache.openjpa.persistence.PersistenceUnitInfoImpl$ClassResolverImpl@269be988, openjpa.DynamicEnhancementAgent=false}
22:31:20,237 ERROR [stderr] (MSC service thread 1-1) 2  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.Runtime - Trying to load javax.validation APIs based on the ValidationMode=AUTO
22:31:20,241 ERROR [stderr] (MSC service thread 1-1) 6  EmployeeService  INFO   [MSC service thread 1-1] openjpa.Runtime - OpenJPA dynamically loaded a validation provider.
22:31:20,241 ERROR [stderr] (MSC service thread 1-1) 6  EmployeeService  TRACE  [MSC service thread 1-1] openjpa.Runtime - org.apache.openjpa.persistence.PersistenceProviderImpl@6873c4aa creating container org.apache.openjpa.persistence.EntityManagerFactoryImpl@874aa79 for PU EmployeeService.
22:31:20,256 INFO  [org.jboss.web] (MSC service thread 1-5) JBAS018210: Registering web context: /JPA_BASIC_Demo
22:31:20,373 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "JPA_BASIC_Demo.war" with deployment "JPA_BASIC_Demo.war"


NOTE: When OpenJPA displays TRACE Logging message above then …JBoss Incorrectly showing ERROR Message.

Step12). Now access the WebApplication like following and then fill the form :
http://localhost:8080/JPA_BASIC_Demo/index.jsp

Once you hit the above URL you will see thew following kind of output in oyur JBossAS7 console:

.
22:33:39,382 INFO  [stdout] (http--127.0.0.1-8080-2) inside TestServlet service()
22:33:39,382 INFO  [stdout] (http--127.0.0.1-8080-2) Got jpa.EmployeeServiceRemote :  Proxy for remote EJB StatelessEJBLocator{appName='', moduleName='JPA_BASIC_Demo', distinctName='', beanName='EmployeeService', view='interface jpa.EmployeeServiceRemote'}
22:33:39,384 INFO  [stdout] (http--127.0.0.1-8080-2) 
22:33:39,384 INFO  [stdout] (http--127.0.0.1-8080-2) 	EmployeeService  Object Created. this: jpa.EmployeeService@598427a0
22:33:39,385 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: jpa.Employee@7345a749
22:33:39,385 INFO  [stdout] (http--127.0.0.1-8080-2) 
22:33:39,385 INFO  [stdout] (http--127.0.0.1-8080-2) 	[EmployeeService] Before em.persist(emp)
22:33:39,385 ERROR [stderr] (http--127.0.0.1-8080-2) 139150  EmployeeService  INFO   [http--127.0.0.1-8080-2] openjpa.Runtime - Starting OpenJPA 2.2.0
22:33:39,386 ERROR [stderr] (http--127.0.0.1-8080-2) 139151  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.Runtime - Properties: javax.persistence.lock.timeout: 0
22:33:39,386 ERROR [stderr] (http--127.0.0.1-8080-2) javax.persistence.query.timeout: 0
22:33:39,386 ERROR [stderr] (http--127.0.0.1-8080-2) javax.persistence.sharedCache.mode: UNSPECIFIED
22:33:39,387 ERROR [stderr] (http--127.0.0.1-8080-2) javax.persistence.validation.group.pre-persist: javax.validation.groups.Default
22:33:39,387 ERROR [stderr] (http--127.0.0.1-8080-2) javax.persistence.validation.group.pre-update: javax.validation.groups.Default
22:33:39,387 ERROR [stderr] (http--127.0.0.1-8080-2) javax.persistence.validation.mode: AUTO
22:33:39,387 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.AutoClear: 0
22:33:39,387 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.AutoDetach: []
22:33:39,388 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.BrokerFactory: jdbc
22:33:39,388 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.BrokerImpl: non-finalizing
22:33:39,388 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.CacheDistributionPolicy: default
22:33:39,388 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.Callbacks: default
22:33:39,388 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.ClassResolver: org.apache.openjpa.persistence.PersistenceUnitInfoImpl$ClassResolverImpl
22:33:39,388 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.Compatibility: default
22:33:39,389 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.ConnectionFactoryMode: true
22:33:39,389 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.ConnectionRetainMode: 0
22:33:39,389 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.DataCache: false
22:33:39,389 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.DataCacheManager: default
22:33:39,389 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.DataCacheTimeout: -1
22:33:39,389 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.DetachState: loaded
22:33:39,390 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.DynamicDataStructs: false
22:33:39,390 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.DynamicEnhancementAgent: false
22:33:39,390 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.EntityManagerFactory: default
22:33:39,390 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.FetchBatchSize: -1
22:33:39,390 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.FetchGroups: [default]
22:33:39,390 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.FlushBeforeQueries: 0
22:33:39,391 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.Id: EmployeeService
22:33:39,391 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.IgnoreChanges: false
22:33:39,391 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.InitializeEagerly: false
22:33:39,391 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.InstrumentationManager: default
22:33:39,391 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.InverseManager: false
22:33:39,391 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.LifecycleEventManager: validating
22:33:39,391 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.LockManager: mixed
22:33:39,392 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.Log: true(DefaultLevel=TRACE, Tool=INFO)
22:33:39,392 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.ManagedRuntime: auto
22:33:39,392 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.MaxFetchDepth: -1
22:33:39,392 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.MetaDataFactory: jpa(URLs=vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/, Types=jpa.Employee)
22:33:39,392 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.MetaDataRepository: default
22:33:39,392 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.Multithreaded: false
22:33:39,392 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.NontransactionalRead: true
22:33:39,393 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.NontransactionalWrite: true
22:33:39,393 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.Optimistic: true
22:33:39,393 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.OptimizeIdCopy: false
22:33:39,393 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.OrphanedKeyAction: log
22:33:39,393 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.PostLoadOnMerge: false
22:33:39,393 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.ProxyManager: default
22:33:39,393 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.QueryCache: false
22:33:39,394 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.QueryCompilationCache: true
22:33:39,394 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.ReadLockLevel: 10
22:33:39,394 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.RefreshFromDataCache: false
22:33:39,394 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.RestoreState: 1
22:33:39,394 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.RetainState: true
22:33:39,394 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.RetryClassRegistration: false
22:33:39,395 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.RuntimeUnenhancedClasses: 0
22:33:39,395 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.SavepointManager: in-mem
22:33:39,395 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.Sequence: table
22:33:39,395 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.TransactionMode: true
22:33:39,395 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.WriteLockLevel: 20
22:33:39,396 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.DriverDataSource: auto
22:33:39,396 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.EagerFetchMode: 2
22:33:39,396 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.FetchDirection: 1000
22:33:39,396 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.FinderCache: true
22:33:39,396 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.IdentifierUtil: default
22:33:39,397 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.LRSSize: 2
22:33:39,397 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.MappingDefaults: jpa
22:33:39,397 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.QuerySQLCache: true
22:33:39,397 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.ResultSetType: 1003
22:33:39,397 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.SQLFactory: default
22:33:39,398 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.SchemaFactory: dynamic
22:33:39,398 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.Schemas: []
22:33:39,398 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.SubclassFetchMode: 1
22:33:39,398 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.SynchronizeMappings: null
22:33:39,398 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.TransactionIsolation: -1
22:33:39,398 ERROR [stderr] (http--127.0.0.1-8080-2) openjpa.jdbc.UpdateManager: default
22:33:39,399 ERROR [stderr] (http--127.0.0.1-8080-2) 139164  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance.
22:33:39,399 ERROR [stderr] (http--127.0.0.1-8080-2) 139164  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Using metadata factory "org.apache.openjpa.persistence.jdbc.PersistenceMappingFactory@61e9e4be".
22:33:39,400 ERROR [stderr] (http--127.0.0.1-8080-2) 139165  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.JDBC - OpenJPA will now connect to the database to attempt to determine what type of database dictionary to use. You may prevent this connection in the future by setting your openjpa.jdbc.DBDictionary configuration property to the appropriate value for your database (see the documentation for available values).
22:33:39,400 ERROR [stderr] (http--127.0.0.1-8080-2) 139165  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.JDBC - createConnectionFactory: DataSource:org.jboss.jca.adapters.jdbc.WrapperDataSource@36cb1594
22:33:39,401 ERROR [stderr] (http--127.0.0.1-8080-2) 139166  EmployeeService  INFO   [http--127.0.0.1-8080-2] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.MySQLDictionary" (MySQL 5.5.20 ,MySQL-AB JDBC Driver mysql-connector-java-5.1.13 ( Revision: ${bzr.revision-id} )).
22:33:39,405 ERROR [stderr] (http--127.0.0.1-8080-2) 139170  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.JDBC - catalogSeparator: .
22:33:39,405 ERROR [stderr] (http--127.0.0.1-8080-2) catalogTerm: database
22:33:39,405 ERROR [stderr] (http--127.0.0.1-8080-2) databaseProductName: MySQL
22:33:39,405 ERROR [stderr] (http--127.0.0.1-8080-2) databaseProductVersion: 5.5.20
22:33:39,405 ERROR [stderr] (http--127.0.0.1-8080-2) driverName: MySQL-AB JDBC Driver
22:33:39,405 ERROR [stderr] (http--127.0.0.1-8080-2) driverVersion: mysql-connector-java-5.1.13 ( Revision: ${bzr.revision-id} )
22:33:39,406 ERROR [stderr] (http--127.0.0.1-8080-2) extraNameCharacters: #@
22:33:39,406 ERROR [stderr] (http--127.0.0.1-8080-2) identifierQuoteString: `
22:33:39,406 ERROR [stderr] (http--127.0.0.1-8080-2) numericFunctions: ABS,ACOS,ASIN,ATAN,ATAN2,BIT_COUNT,CEILING,COS,COT,DEGREES,EXP,FLOOR,LOG,LOG10,MAX,MIN,MOD,PI,POW,POWER,RADIANS,RAND,ROUND,SIN,SQRT,TAN,TRUNCATE
22:33:39,406 ERROR [stderr] (http--127.0.0.1-8080-2) procedureTerm: PROCEDURE
22:33:39,406 ERROR [stderr] (http--127.0.0.1-8080-2) schemaTerm: 
22:33:39,406 ERROR [stderr] (http--127.0.0.1-8080-2) searchStringEscape: 
22:33:39,407 ERROR [stderr] (http--127.0.0.1-8080-2) sqlKeywords: ACCESSIBLE,ANALYZE,ASENSITIVE,BEFORE,BIGINT,BINARY,BLOB,CALL,CHANGE,CONDITION,DATABASE,DATABASES,DAY_HOUR,DAY_MICROSECOND,DAY_MINUTE,DAY_SECOND,DELAYED,DETERMINISTIC,DISTINCTROW,DIV,DUAL,EACH,ELSEIF,ENCLOSED,ESCAPED,EXIT,EXPLAIN,FLOAT4,FLOAT8,FORCE,FULLTEXT,HIGH_PRIORITY,HOUR_MICROSECOND,HOUR_MINUTE,HOUR_SECOND,IF,IGNORE,INFILE,INOUT,INT1,INT2,INT3,INT4,INT8,ITERATE,KEYS,KILL,LEAVE,LIMIT,LINEAR,LINES,LOAD,LOCALTIME,LOCALTIMESTAMP,LOCK,LONG,LONGBLOB,LONGTEXT,LOOP,LOW_PRIORITY,MEDIUMBLOB,MEDIUMINT,MEDIUMTEXT,MIDDLEINT,MINUTE_MICROSECOND,MINUTE_SECOND,MOD,MODIFIES,NO_WRITE_TO_BINLOG,OPTIMIZE,OPTIONALLY,OUT,OUTFILE,PURGE,RANGE,READS,READ_ONLY,READ_WRITE,REGEXP,RELEASE,RENAME,REPEAT,REPLACE,REQUIRE,RETURN,RLIKE,SCHEMAS,SECOND_MICROSECOND,SENSITIVE,SEPARATOR,SHOW,SPATIAL,SPECIFIC,SQLEXCEPTION,SQL_BIG_RESULT,SQL_CALC_FOUND_ROWS,SQL_SMALL_RESULT,SSL,STARTING,STRAIGHT_JOIN,TERMINATED,TINYBLOB,TINYINT,TINYTEXT,TRIGGER,UNDO,UNLOCK,UNSIGNED,USE,UTC_DATE,UTC_TIME,UTC_TIMESTAMP,VARBINARY,VARCHARACTER,WHILE,X509,XOR,YEAR_MONTH,ZEROFILL
22:33:39,408 ERROR [stderr] (http--127.0.0.1-8080-2) stringFunctions: ASCII,BIN,BIT_LENGTH,CHAR,CHARACTER_LENGTH,CHAR_LENGTH,CONCAT,CONCAT_WS,CONV,ELT,EXPORT_SET,FIELD,FIND_IN_SET,HEX,INSERT,INSTR,LCASE,LEFT,LENGTH,LOAD_FILE,LOCATE,LOCATE,LOWER,LPAD,LTRIM,MAKE_SET,MATCH,MID,OCT,OCTET_LENGTH,ORD,POSITION,QUOTE,REPEAT,REPLACE,REVERSE,RIGHT,RPAD,RTRIM,SOUNDEX,SPACE,STRCMP,SUBSTRING,SUBSTRING,SUBSTRING,SUBSTRING,SUBSTRING_INDEX,TRIM,UCASE,UPPER
22:33:39,409 ERROR [stderr] (http--127.0.0.1-8080-2) systemFunctions: DATABASE,USER,SYSTEM_USER,SESSION_USER,PASSWORD,ENCRYPT,LAST_INSERT_ID,VERSION
22:33:39,409 ERROR [stderr] (http--127.0.0.1-8080-2) timeDateFunctions: DAYOFWEEK,WEEKDAY,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,PERIOD_ADD,PERIOD_DIFF,TO_DAYS,FROM_DAYS,DATE_FORMAT,TIME_FORMAT,CURDATE,CURRENT_DATE,CURTIME,CURRENT_TIME,NOW,SYSDATE,CURRENT_TIMESTAMP,UNIX_TIMESTAMP,FROM_UNIXTIME,SEC_TO_TIME,TIME_TO_SEC
22:33:39,410 ERROR [stderr] (http--127.0.0.1-8080-2) url: jdbc:mysql://localhost:3306/testDB
22:33:39,410 ERROR [stderr] (http--127.0.0.1-8080-2) userName: root@localhost
22:33:39,410 ERROR [stderr] (http--127.0.0.1-8080-2) defaultTransactionIsolation: 2
22:33:39,410 ERROR [stderr] (http--127.0.0.1-8080-2) driverMajorVersion: 5
22:33:39,410 ERROR [stderr] (http--127.0.0.1-8080-2) driverMinorVersion: 1
22:33:39,411 ERROR [stderr] (http--127.0.0.1-8080-2) maxBinaryLiteralLength: 16777208
22:33:39,411 ERROR [stderr] (http--127.0.0.1-8080-2) maxCatalogNameLength: 32
22:33:39,411 ERROR [stderr] (http--127.0.0.1-8080-2) maxCharLiteralLength: 16777208
22:33:39,411 ERROR [stderr] (http--127.0.0.1-8080-2) maxColumnNameLength: 64
22:33:39,411 ERROR [stderr] (http--127.0.0.1-8080-2) maxColumnsInGroupBy: 64
22:33:39,412 ERROR [stderr] (http--127.0.0.1-8080-2) maxColumnsInIndex: 16
22:33:39,412 ERROR [stderr] (http--127.0.0.1-8080-2) maxColumnsInOrderBy: 64
22:33:39,412 ERROR [stderr] (http--127.0.0.1-8080-2) maxColumnsInSelect: 256
22:33:39,412 ERROR [stderr] (http--127.0.0.1-8080-2) maxColumnsInTable: 512
22:33:39,412 ERROR [stderr] (http--127.0.0.1-8080-2) maxConnections: 0
22:33:39,413 ERROR [stderr] (http--127.0.0.1-8080-2) maxCursorNameLength: 64
22:33:39,413 ERROR [stderr] (http--127.0.0.1-8080-2) maxIndexLength: 256
22:33:39,413 ERROR [stderr] (http--127.0.0.1-8080-2) maxProcedureNameLength: 0
22:33:39,413 ERROR [stderr] (http--127.0.0.1-8080-2) maxRowSize: 2147483639
22:33:39,413 ERROR [stderr] (http--127.0.0.1-8080-2) maxSchemaNameLength: 0
22:33:39,413 ERROR [stderr] (http--127.0.0.1-8080-2) maxStatementLength: 65531
22:33:39,414 ERROR [stderr] (http--127.0.0.1-8080-2) maxStatements: 0
22:33:39,414 ERROR [stderr] (http--127.0.0.1-8080-2) maxTableNameLength: 64
22:33:39,414 ERROR [stderr] (http--127.0.0.1-8080-2) maxTablesInSelect: 256
22:33:39,414 ERROR [stderr] (http--127.0.0.1-8080-2) maxUserNameLength: 16
22:33:39,414 ERROR [stderr] (http--127.0.0.1-8080-2) isCatalogAtStart: true
22:33:39,415 ERROR [stderr] (http--127.0.0.1-8080-2) isReadOnly: false
22:33:39,415 ERROR [stderr] (http--127.0.0.1-8080-2) nullPlusNonNullIsNull: true
22:33:39,415 ERROR [stderr] (http--127.0.0.1-8080-2) nullsAreSortedAtEnd: false
22:33:39,415 ERROR [stderr] (http--127.0.0.1-8080-2) nullsAreSortedAtStart: false
22:33:39,415 ERROR [stderr] (http--127.0.0.1-8080-2) nullsAreSortedHigh: false
22:33:39,415 ERROR [stderr] (http--127.0.0.1-8080-2) nullsAreSortedLow: true
22:33:39,415 ERROR [stderr] (http--127.0.0.1-8080-2) storesLowerCaseIdentifiers: false
22:33:39,416 ERROR [stderr] (http--127.0.0.1-8080-2) storesLowerCaseQuotedIdentifiers: false
22:33:39,416 ERROR [stderr] (http--127.0.0.1-8080-2) storesMixedCaseIdentifiers: true
22:33:39,416 ERROR [stderr] (http--127.0.0.1-8080-2) storesMixedCaseQuotedIdentifiers: true
22:33:39,416 ERROR [stderr] (http--127.0.0.1-8080-2) storesUpperCaseIdentifiers: false
22:33:39,416 ERROR [stderr] (http--127.0.0.1-8080-2) storesUpperCaseQuotedIdentifiers: true
22:33:39,416 ERROR [stderr] (http--127.0.0.1-8080-2) supportsAlterTableWithAddColumn: true
22:33:39,417 ERROR [stderr] (http--127.0.0.1-8080-2) supportsAlterTableWithDropColumn: true
22:33:39,417 ERROR [stderr] (http--127.0.0.1-8080-2) supportsANSI92EntryLevelSQL: true
22:33:39,417 ERROR [stderr] (http--127.0.0.1-8080-2) supportsANSI92FullSQL: false
22:33:39,417 ERROR [stderr] (http--127.0.0.1-8080-2) supportsANSI92IntermediateSQL: false
22:33:39,417 ERROR [stderr] (http--127.0.0.1-8080-2) supportsCatalogsInDataManipulation: true
22:33:39,417 ERROR [stderr] (http--127.0.0.1-8080-2) supportsCatalogsInIndexDefinitions: true
22:33:39,418 ERROR [stderr] (http--127.0.0.1-8080-2) supportsCatalogsInPrivilegeDefinitions: true
22:33:39,418 ERROR [stderr] (http--127.0.0.1-8080-2) supportsCatalogsInProcedureCalls: true
22:33:39,418 ERROR [stderr] (http--127.0.0.1-8080-2) supportsCatalogsInTableDefinitions: true
22:33:39,419 ERROR [stderr] (http--127.0.0.1-8080-2) supportsColumnAliasing: true
22:33:39,419 ERROR [stderr] (http--127.0.0.1-8080-2) supportsConvert: false
22:33:39,419 ERROR [stderr] (http--127.0.0.1-8080-2) supportsCoreSQLGrammar: true
22:33:39,419 ERROR [stderr] (http--127.0.0.1-8080-2) supportsCorrelatedSubqueries: true
22:33:39,419 ERROR [stderr] (http--127.0.0.1-8080-2) supportsDataDefinitionAndDataManipulationTransactions: false
22:33:39,420 ERROR [stderr] (http--127.0.0.1-8080-2) supportsDataManipulationTransactionsOnly: false
22:33:39,420 ERROR [stderr] (http--127.0.0.1-8080-2) supportsDifferentTableCorrelationNames: true
22:33:39,420 ERROR [stderr] (http--127.0.0.1-8080-2) supportsExpressionsInOrderBy: true
22:33:39,420 ERROR [stderr] (http--127.0.0.1-8080-2) supportsExtendedSQLGrammar: false
22:33:39,420 ERROR [stderr] (http--127.0.0.1-8080-2) supportsFullOuterJoins: false
22:33:39,421 ERROR [stderr] (http--127.0.0.1-8080-2) supportsGroupBy: true
22:33:39,421 ERROR [stderr] (http--127.0.0.1-8080-2) supportsGroupByBeyondSelect: true
22:33:39,421 ERROR [stderr] (http--127.0.0.1-8080-2) supportsGroupByUnrelated: true
22:33:39,421 ERROR [stderr] (http--127.0.0.1-8080-2) supportsIntegrityEnhancementFacility: false
22:33:39,421 ERROR [stderr] (http--127.0.0.1-8080-2) supportsLikeEscapeClause: true
22:33:39,421 ERROR [stderr] (http--127.0.0.1-8080-2) supportsLimitedOuterJoins: true
22:33:39,421 ERROR [stderr] (http--127.0.0.1-8080-2) supportsMinimumSQLGrammar: true
22:33:39,422 ERROR [stderr] (http--127.0.0.1-8080-2) supportsMixedCaseIdentifiers: true
22:33:39,422 ERROR [stderr] (http--127.0.0.1-8080-2) supportsMixedCaseQuotedIdentifiers: true
22:33:39,422 ERROR [stderr] (http--127.0.0.1-8080-2) supportsMultipleResultSets: false
22:33:39,422 ERROR [stderr] (http--127.0.0.1-8080-2) supportsMultipleTransactions: true
22:33:39,422 ERROR [stderr] (http--127.0.0.1-8080-2) supportsNonNullableColumns: true
22:33:39,422 ERROR [stderr] (http--127.0.0.1-8080-2) supportsOpenCursorsAcrossCommit: false
22:33:39,422 ERROR [stderr] (http--127.0.0.1-8080-2) supportsOpenCursorsAcrossRollback: false
22:33:39,422 ERROR [stderr] (http--127.0.0.1-8080-2) supportsOpenStatementsAcrossCommit: false
22:33:39,423 ERROR [stderr] (http--127.0.0.1-8080-2) supportsOpenStatementsAcrossRollback: false
22:33:39,423 ERROR [stderr] (http--127.0.0.1-8080-2) supportsOrderByUnrelated: false
22:33:39,423 ERROR [stderr] (http--127.0.0.1-8080-2) supportsOuterJoins: true
22:33:39,423 ERROR [stderr] (http--127.0.0.1-8080-2) supportsPositionedDelete: false
22:33:39,423 ERROR [stderr] (http--127.0.0.1-8080-2) supportsPositionedUpdate: false
22:33:39,423 ERROR [stderr] (http--127.0.0.1-8080-2) supportsSchemasInDataManipulation: false
22:33:39,423 ERROR [stderr] (http--127.0.0.1-8080-2) supportsSchemasInIndexDefinitions: false
22:33:39,424 ERROR [stderr] (http--127.0.0.1-8080-2) supportsSchemasInPrivilegeDefinitions: false
22:33:39,424 ERROR [stderr] (http--127.0.0.1-8080-2) supportsSchemasInProcedureCalls: false
22:33:39,424 ERROR [stderr] (http--127.0.0.1-8080-2) supportsSchemasInTableDefinitions: false
22:33:39,424 ERROR [stderr] (http--127.0.0.1-8080-2) supportsSelectForUpdate: true
22:33:39,424 ERROR [stderr] (http--127.0.0.1-8080-2) supportsStoredProcedures: true
22:33:39,424 ERROR [stderr] (http--127.0.0.1-8080-2) supportsSubqueriesInComparisons: true
22:33:39,424 ERROR [stderr] (http--127.0.0.1-8080-2) supportsSubqueriesInExists: true
22:33:39,424 ERROR [stderr] (http--127.0.0.1-8080-2) supportsSubqueriesInIns: true
22:33:39,425 ERROR [stderr] (http--127.0.0.1-8080-2) supportsSubqueriesInQuantifieds: true
22:33:39,425 ERROR [stderr] (http--127.0.0.1-8080-2) supportsTableCorrelationNames: true
22:33:39,425 ERROR [stderr] (http--127.0.0.1-8080-2) supportsTransactions: true
22:33:39,425 ERROR [stderr] (http--127.0.0.1-8080-2) supportsUnion: true
22:33:39,425 ERROR [stderr] (http--127.0.0.1-8080-2) supportsUnionAll: true
22:33:39,425 ERROR [stderr] (http--127.0.0.1-8080-2) usesLocalFilePerTable: false
22:33:39,425 ERROR [stderr] (http--127.0.0.1-8080-2) usesLocalFiles: false
22:33:39,425 ERROR [stderr] (http--127.0.0.1-8080-2) allProceduresAreCallable: false
22:33:39,426 ERROR [stderr] (http--127.0.0.1-8080-2) allTablesAreSelectable: false
22:33:39,426 ERROR [stderr] (http--127.0.0.1-8080-2) dataDefinitionCausesTransactionCommit: true
22:33:39,426 ERROR [stderr] (http--127.0.0.1-8080-2) dataDefinitionIgnoredInTransactions: false
22:33:39,426 ERROR [stderr] (http--127.0.0.1-8080-2) doesMaxRowSizeIncludeBlobs: true
22:33:39,426 ERROR [stderr] (http--127.0.0.1-8080-2) supportsBatchUpdates: true
22:33:39,426 ERROR [stderr] (http--127.0.0.1-8080-2) 139191  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.JDBC - Initial connection autoCommit: true, holdability: 2, TransactionIsolation: 4
22:33:39,427 ERROR [stderr] (http--127.0.0.1-8080-2) 139192  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.JDBC - <t 1160114731, conn 1118349354> [0 ms] close
22:33:39,427 ERROR [stderr] (http--127.0.0.1-8080-2) 139192  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.JDBC - createConnectionFactory: DataSource:org.jboss.jca.adapters.jdbc.WrapperDataSource@36cb1594
22:33:39,428 ERROR [stderr] (http--127.0.0.1-8080-2) 139193  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.JDBC - <t 1160114731, conn 1607615466> [0 ms] close
22:33:39,430 ERROR [stderr] (http--127.0.0.1-8080-2) 139195  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.Runtime - Found datasource1: datasource 919278996 from configuration. StoreContext: org.apache.openjpa.kernel.BrokerImpl@4a8b9b70
22:33:39,432 ERROR [stderr] (http--127.0.0.1-8080-2) 139197  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Scanning URL "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/" for persistent types.
22:33:39,433 ERROR [stderr] (http--127.0.0.1-8080-2) 139198  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Scan of "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/" found persistent types [].
22:33:39,433 ERROR [stderr] (http--127.0.0.1-8080-2) 139198  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Skipping persistent type location association for location "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/" since it is a directory.
22:33:39,434 ERROR [stderr] (http--127.0.0.1-8080-2) 139199  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types.
22:33:39,435 ERROR [stderr] (http--127.0.0.1-8080-2) 139200  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - The persistent unit root url is "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/"
22:33:39,436 ERROR [stderr] (http--127.0.0.1-8080-2) 139201  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - parsePersistentTypeNames() found [jpa.Employee].
22:33:39,436 ERROR [stderr] (http--127.0.0.1-8080-2) 139201  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Found 1 classes with metadata in 4 milliseconds.
22:33:39,439 ERROR [stderr] (http--127.0.0.1-8080-2) 139204  EmployeeService  WARN   [http--127.0.0.1-8080-2] openjpa.Enhance - Creating subclass for "[class jpa.Employee]". This means that your application will be less efficient and will consume more memory than it would if you ran the OpenJPA enhancer. Additionally, lazy loading will not be available for one-to-one and many-to-one persistent attributes in types using field access; they will be loaded eagerly instead.
22:33:39,441 ERROR [stderr] (http--127.0.0.1-8080-2) 139206  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance.
22:33:39,441 ERROR [stderr] (http--127.0.0.1-8080-2) 139206  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Using metadata factory "org.apache.openjpa.persistence.jdbc.PersistenceMappingFactory@4812eb99".
22:33:39,442 ERROR [stderr] (http--127.0.0.1-8080-2) 139207  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Loading metadata for "class jpa.Employee" under mode "[META]".
22:33:39,442 ERROR [stderr] (http--127.0.0.1-8080-2) 139207  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Scanning URL "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/" for persistent types.
22:33:39,443 ERROR [stderr] (http--127.0.0.1-8080-2) 139208  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Scan of "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/" found persistent types [].
22:33:39,443 ERROR [stderr] (http--127.0.0.1-8080-2) 139208  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Skipping persistent type location association for location "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/" since it is a directory.
22:33:39,443 ERROR [stderr] (http--127.0.0.1-8080-2) 139208  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types.
22:33:39,444 ERROR [stderr] (http--127.0.0.1-8080-2) 139209  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - The persistent unit root url is "vfs:/content/JPA_BASIC_Demo.war/WEB-INF/classes/"
22:33:39,444 ERROR [stderr] (http--127.0.0.1-8080-2) 139209  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - parsePersistentTypeNames() found [jpa.Employee].
22:33:39,444 ERROR [stderr] (http--127.0.0.1-8080-2) 139209  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Found 1 classes with metadata in 2 milliseconds.
22:33:39,445 ERROR [stderr] (http--127.0.0.1-8080-2) 139210  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Parsing class "jpa.Employee".
22:33:39,445 ERROR [stderr] (http--127.0.0.1-8080-2) 139210  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Parsing package "jpa.Employee".
22:33:39,448 ERROR [stderr] (http--127.0.0.1-8080-2) 139213  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Generating default metadata for type "jpa.Employee".
22:33:39,449 ERROR [stderr] (http--127.0.0.1-8080-2) 139214  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Using reflection for metadata generation.
22:33:39,451 ERROR [stderr] (http--127.0.0.1-8080-2) 139216  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Set persistence-capable superclass of "jpa.Employee" to "null".
22:33:39,451 ERROR [stderr] (http--127.0.0.1-8080-2) 139216  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Resolving metadata for "jpa.Employee@1378463430".
22:33:39,451 ERROR [stderr] (http--127.0.0.1-8080-2) 139216  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	Resolving field "jpa.Employee@1378463430.empno".
22:33:39,452 ERROR [stderr] (http--127.0.0.1-8080-2) 139217  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	Resolving field "jpa.Employee@1378463430.ename".
22:33:39,452 ERROR [stderr] (http--127.0.0.1-8080-2) 139217  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Preparing mapping for "jpa.Employee".
22:33:39,452 ERROR [stderr] (http--127.0.0.1-8080-2) 139217  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	Resolving field "jpa.Employee@1378463430.empno".
22:33:39,453 ERROR [stderr] (http--127.0.0.1-8080-2) 139218  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	"empno" has mapping strategy "org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
22:33:39,453 ERROR [stderr] (http--127.0.0.1-8080-2) 139218  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	Resolving field "jpa.Employee@1378463430.ename".
22:33:39,453 ERROR [stderr] (http--127.0.0.1-8080-2) 139218  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	"ename" has mapping strategy "org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
22:33:39,454 ERROR [stderr] (http--127.0.0.1-8080-2) 139219  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - "jpa.Employee<discriminator>" has mapping strategy "none".
22:33:39,454 ERROR [stderr] (http--127.0.0.1-8080-2) 139219  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - "jpa.Employee<version>" has mapping strategy "none".
22:33:39,454 ERROR [stderr] (http--127.0.0.1-8080-2) 139219  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Resolving mapping for "jpa.Employee@1378463430".
22:33:39,455 ERROR [stderr] (http--127.0.0.1-8080-2) 139220  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - "jpa.Employee" has mapping strategy "full".
22:33:39,455 ERROR [stderr] (http--127.0.0.1-8080-2) 139220  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.Enhance - Enhancing type "class jpa.Employee" loaded by ModuleClassLoader for Module "deployment.JPA_BASIC_Demo.war:main" from Service Module Loader.
22:33:39,475 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@206ab4f
22:33:39,477 ERROR [stderr] (http--127.0.0.1-8080-2) 139242  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Loading metadata for "class jpa.Employee" under mode "[META][QUERY]".
22:33:39,477 ERROR [stderr] (http--127.0.0.1-8080-2) 139242  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Parsing class "jpa.Employee".
22:33:39,477 ERROR [stderr] (http--127.0.0.1-8080-2) 139242  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Parsing package "jpa.Employee".
22:33:39,478 ERROR [stderr] (http--127.0.0.1-8080-2) 139243  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Generating default metadata for type "jpa.Employee".
22:33:39,480 ERROR [stderr] (http--127.0.0.1-8080-2) 139245  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Set persistence-capable superclass of "jpa.Employee" to "null".
22:33:39,480 ERROR [stderr] (http--127.0.0.1-8080-2) 139245  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Resolving metadata for "jpa.Employee@64540819".
22:33:39,481 ERROR [stderr] (http--127.0.0.1-8080-2) 139246  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	Resolving field "jpa.Employee@64540819.empno".
22:33:39,481 ERROR [stderr] (http--127.0.0.1-8080-2) 139246  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	Resolving field "jpa.Employee@64540819.ename".
22:33:39,481 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@f6564de
22:33:39,481 ERROR [stderr] (http--127.0.0.1-8080-2) 139246  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Preparing mapping for "jpa.Employee".
22:33:39,482 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@49c132b7
22:33:39,482 ERROR [stderr] (http--127.0.0.1-8080-2) 139247  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,482 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@2ae8b235
22:33:39,483 ERROR [stderr] (http--127.0.0.1-8080-2) 139248  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,483 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@130bcb95
22:33:39,483 ERROR [stderr] (http--127.0.0.1-8080-2) 139248  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,484 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@6b62acf7
22:33:39,484 ERROR [stderr] (http--127.0.0.1-8080-2) 139249  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,484 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@1b49c335
22:33:39,485 ERROR [stderr] (http--127.0.0.1-8080-2) 139250  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,485 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@7aeda92
22:33:39,486 ERROR [stderr] (http--127.0.0.1-8080-2) 139251  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,486 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@688fab2e
22:33:39,486 ERROR [stderr] (http--127.0.0.1-8080-2) 139251  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,487 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@302f8ea3
22:33:39,487 ERROR [stderr] (http--127.0.0.1-8080-2) 139252  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,488 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@23d880c
22:33:39,488 ERROR [stderr] (http--127.0.0.1-8080-2) 139253  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,488 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@15aeccfa
22:33:39,489 ERROR [stderr] (http--127.0.0.1-8080-2) 139254  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,489 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@7133c35
22:33:39,489 ERROR [stderr] (http--127.0.0.1-8080-2) 139254  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,490 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@7fd5bf33
22:33:39,490 ERROR [stderr] (http--127.0.0.1-8080-2) 139255  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,490 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@29fbeed6
22:33:39,490 ERROR [stderr] (http--127.0.0.1-8080-2) 139255  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,491 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@5afd3922
22:33:39,491 ERROR [stderr] (http--127.0.0.1-8080-2) 139256  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,491 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@26b215d9
22:33:39,492 ERROR [stderr] (http--127.0.0.1-8080-2) 139257  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,492 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@75b86d67
22:33:39,492 ERROR [stderr] (http--127.0.0.1-8080-2) 139257  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,492 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@1f16c192
22:33:39,493 ERROR [stderr] (http--127.0.0.1-8080-2) 139258  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,493 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@efe6830
22:33:39,493 ERROR [stderr] (http--127.0.0.1-8080-2) 139258  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,496 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@606a2f00
22:33:39,496 ERROR [stderr] (http--127.0.0.1-8080-2) 139261  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,497 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@5b33da73
22:33:39,497 ERROR [stderr] (http--127.0.0.1-8080-2) 139262  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Processing registered persistence-capable class "class jpa.Employee".
22:33:39,497 ERROR [stderr] (http--127.0.0.1-8080-2) 139262  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	Resolving field "jpa.Employee@64540819.empno".
22:33:39,498 ERROR [stderr] (http--127.0.0.1-8080-2) 139263  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	"empno" has mapping strategy "org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
22:33:39,499 ERROR [stderr] (http--127.0.0.1-8080-2) 139264  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	Resolving field "jpa.Employee@64540819.ename".
22:33:39,499 ERROR [stderr] (http--127.0.0.1-8080-2) 139264  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	"ename" has mapping strategy "org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
22:33:39,500 ERROR [stderr] (http--127.0.0.1-8080-2) 139265  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - "jpa.Employee<discriminator>" has mapping strategy "none".
22:33:39,500 ERROR [stderr] (http--127.0.0.1-8080-2) 139265  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - "jpa.Employee<version>" has mapping strategy "none".
22:33:39,501 ERROR [stderr] (http--127.0.0.1-8080-2) 139266  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Resolving mapping for "jpa.Employee@64540819".
22:33:39,501 ERROR [stderr] (http--127.0.0.1-8080-2) 139266  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - "jpa.Employee" has mapping strategy "full".
22:33:39,501 ERROR [stderr] (http--127.0.0.1-8080-2) 139266  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - Initializing mapping for "jpa.Employee@64540819".
22:33:39,501 ERROR [stderr] (http--127.0.0.1-8080-2) 139266  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	Resolving field "jpa.Employee@64540819.empno".
22:33:39,502 ERROR [stderr] (http--127.0.0.1-8080-2) 139267  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.MetaData - 	Resolving field "jpa.Employee@64540819.ename".
22:33:39,502 ERROR [stderr] (http--127.0.0.1-8080-2) 139267  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerFactoryImpl@874aa79 created EntityManager org.apache.openjpa.persistence.EntityManagerImpl@4a8b9b70.
22:33:39,503 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@294ae2cc
22:33:39,505 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: org.apache.openjpa.enhance.jpa$Employee$pcsubclass@4555333c
22:33:39,506 INFO  [stdout] (http--127.0.0.1-8080-2) 
22:33:39,506 INFO  [stdout] (http--127.0.0.1-8080-2) 	[EmployeeService] Before findEmployee(id)
22:33:39,507 INFO  [stdout] (http--127.0.0.1-8080-2) 
22:33:39,507 INFO  [stdout] (http--127.0.0.1-8080-2) 	 Inside findEmployee(67)
22:33:39,507 INFO  [stdout] (http--127.0.0.1-8080-2) 
22:33:39,507 INFO  [stdout] (http--127.0.0.1-8080-2) 	[EmployeeService] Inside createEmployee() findEmployee result: jpa.Employee@7345a749
22:33:39,507 ERROR [stderr] (http--127.0.0.1-8080-2) 139272  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.SQLDiag - flush: org.apache.openjpa.kernel.PNewState for oid=67
22:33:39,508 ERROR [stderr] (http--127.0.0.1-8080-2) 139273  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.JDBC - The batch limit is set to 0.
22:33:39,508 ERROR [stderr] (http--127.0.0.1-8080-2) 139273  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.SQL - <t 1160114731, conn 1553386419> executing prepstmnt 1335485472 INSERT INTO Employee (empno, ename) VALUES (?, ?) [params=?, ?]
22:33:39,579 ERROR [stderr] (http--127.0.0.1-8080-2) 139344  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.SQL - <t 1160114731, conn 1553386419> [70 ms] spent
22:33:39,580 ERROR [stderr] (http--127.0.0.1-8080-2) 139345  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerImpl@4a8b9b70.close() invoked.
22:33:39,580 ERROR [stderr] (http--127.0.0.1-8080-2) 139345  EmployeeService  TRACE  [http--127.0.0.1-8080-2] openjpa.jdbc.JDBC - <t 1160114731, conn 1553386419> [0 ms] close
22:33:39,600 INFO  [stdout] (http--127.0.0.1-8080-2) Employee Object Created. this: jpa.Employee@42c16479
22:33:39,601 INFO  [stdout] (http--127.0.0.1-8080-2) 
22:33:39,601 INFO  [stdout] (http--127.0.0.1-8080-2) 	 Hello World...

.

=======================================================================

Some Issues You Might Face

=======================================================================

Issue-1

If you dont declare the property name=”jboss.as.jpa.providerModule” value=”org.apache.openjpa” in your “persistence.xml” file then you might see following exception while deploying your OpenJPA JPA:

22:39:34,646 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."JPA_BASIC_Demo.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."JPA_BASIC_Demo.war".INSTALL: Failed to process phase INSTALL of deployment "JPA_BASIC_Demo.war"
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
	at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
Caused by: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'org.apache.openjpa.persistence.PersistenceProviderImpl' not found
	at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.lookupProvider(PersistenceUnitDeploymentProcessor.java:555)
	at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deployPersistenceUnit(PersistenceUnitDeploymentProcessor.java:295)
	at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:258)
	at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleWarDeployment(PersistenceUnitDeploymentProcessor.java:194)
	at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:118)
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
	... 5 more

Issue-2

If the above code “TestServlet.java” If you will invoke two Operations on the entity then you may get following exceptions. To reproduce this issue just uncomment the following section in the “TestServlet.java”:


                        remote.createEmployee(new Integer(request.getParameter("empId")),request.getParameter("empName"));
                        out.println("Everything is OK till Here ...");

                        /* 
                         If i call the "remote.findAllEmployees()" Now then i get an Exception here .... Only with OpenJPA 
                         (where as it works well with TopLink and Hibernate) 
                        */                   

                        Collection<Employee> employees=remote.findAllEmployees();   //----> This line throws the following exception 

You will see the following kind of “ClassNotFoundException”

23:00:04,399 ERROR [stderr] (http--127.0.0.1-8080-1) java.lang.RuntimeException: ClassNotFoundException marshaling EJB parameters
23:00:04,400 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:229)
23:00:04,400 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:216)
23:00:04,400 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:188)
23:00:04,400 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179)
23:00:04,401 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)
23:00:04,401 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
23:00:04,401 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)
23:00:04,402 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
23:00:04,402 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
23:00:04,402 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
23:00:04,402 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
23:00:04,403 ERROR [stderr] (http--127.0.0.1-8080-1) 	at $Proxy19.findAllEmployees(Unknown Source)
23:00:04,403 ERROR [stderr] (http--127.0.0.1-8080-1) 	at servlets.TestServlet.service(Unknown Source)
23:00:04,403 ERROR [stderr] (http--127.0.0.1-8080-1) 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
23:00:04,403 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
23:00:04,403 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
23:00:04,404 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
23:00:04,404 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
23:00:04,404 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
23:00:04,404 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
23:00:04,405 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
23:00:04,405 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
23:00:04,405 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
23:00:04,405 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
23:00:04,406 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
23:00:04,406 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
23:00:04,406 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
23:00:04,406 ERROR [stderr] (http--127.0.0.1-8080-1) 	at java.lang.Thread.run(Thread.java:679)
23:00:04,407 ERROR [stderr] (http--127.0.0.1-8080-1) Caused by: java.lang.ClassNotFoundException: org.apache.openjpa.enhance.jpa$Employee$pcsubclass from [Module "deployment.JPA_BASIC_Demo.war:main" from Service Module Loader]
23:00:04,407 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
23:00:04,407 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
23:00:04,408 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
23:00:04,408 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
23:00:04,408 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
23:00:04,408 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
23:00:04,408 ERROR [stderr] (http--127.0.0.1-8080-1) 	at java.lang.Class.forName0(Native Method)
23:00:04,409 ERROR [stderr] (http--127.0.0.1-8080-1) 	at java.lang.Class.forName(Class.java:264)
23:00:04,409 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.marshalling.cloner.ClassLoaderClassCloner.clone(ClassLoaderClassCloner.java:46)
23:00:04,409 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:158)
23:00:04,409 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)
23:00:04,409 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:187)
23:00:04,410 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)
23:00:04,410 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.marshalling.cloner.SerializingCloner$StepObjectInput.doReadObject(SerializingCloner.java:738)
23:00:04,410 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
23:00:04,410 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:57)

Issue-3

If you wont Specify the following properties in your “persistence.xml” file then you may encounter the following exceptions:

           <!--   IMPORTANT PROPERTIES FOR openJPA -->           
           <property name="openjpa.DynamicEnhancementAgent" value="false"/>
           <property name="openjpa.RuntimeUnenhancedClasses" value="supported" />

Following exceptions you will encounter …

22:43:47,285 ERROR [org.jboss.ejb3.invocation] (http--127.0.0.1-8080-1) JBAS014134: EJB Invocation failed on component EmployeeService for method public abstract jpa.Employee jpa.EmployeeServiceRemote.createEmployee(java.lang.Integer,java.lang.String): javax.ejb.EJBException: <openjpa-2.2.0-r422266:1244990 fatal user error> org.apache.openjpa.persistence.ArgumentException: The type "class jpa.Employee" has not been enhanced.

	at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:166) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:80) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:179) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
	at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
	at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
	at $Proxy15.createEmployee(Unknown Source)	at servlets.TestServlet.service(Unknown Source) [classes:]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
	at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]



Caused by: <openjpa-2.2.0-r422266:1244990 fatal user error> org.apache.openjpa.persistence.ArgumentException: The type "class jpa.Employee" has not been enhanced.
	at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1823) [openjpa-all-2.2.0.jar:2.2.0]
	at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1797) [openjpa-all-2.2.0.jar:2.2.0]
	at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:822) [openjpa-all-2.2.0.jar:2.2.0]
	at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:719) [openjpa-all-2.2.0.jar:2.2.0]
	at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:643) [openjpa-all-2.2.0.jar:2.2.0]
	at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:411) [openjpa-all-2.2.0.jar:2.2.0]
	at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:384) [openjpa-all-2.2.0.jar:2.2.0]
	at org.apache.openjpa.kernel.BrokerImpl.newObjectId(BrokerImpl.java:1262) [openjpa-all-2.2.0.jar:2.2.0]
	at org.apache.openjpa.kernel.DelegatingBroker.newObjectId(DelegatingBroker.java:316) [openjpa-all-2.2.0.jar:2.2.0]
	at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:486) [openjpa-all-2.2.0.jar:2.2.0]
	at org.jboss.as.jpa.container.AbstractEntityManager.find(AbstractEntityManager.java:193) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
	at jpa.EmployeeService.findEmployee(Unknown Source) [classes:]
	at jpa.EmployeeService.createEmployee(Unknown Source) [classes:]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]
	at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]
	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
	... 43 more

22:43:47,461 ERROR [stderr] (http--127.0.0.1-8080-1) javax.ejb.EJBException: <openjpa-2.2.0-r422266:1244990 fatal user error> org.apache.openjpa.persistence.ArgumentException: The type "class jpa.Employee" has not been enhanced.


22:43:47,462 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:166)
22:43:47,462 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230)
22:43:47,462 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304)
22:43:47,462 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)
22:43:47,463 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:43:47,463 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:80)
22:43:47,463 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:43:47,463 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
22:43:47,464 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:43:47,464 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
22:43:47,464 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:43:47,464 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
22:43:47,465 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:43:47,465 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)
22:43:47,465 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:43:47,465 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
22:43:47,466 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:43:47,466 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
22:43:47,466 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)
22:43:47,466 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:179)
22:43:47,467 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179)
22:43:47,467 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)
22:43:47,467 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
22:43:47,468 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)
22:43:47,468 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
22:43:47,468 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
22:43:47,469 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
22:43:47,469 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
22:43:47,469 ERROR [stderr] (http--127.0.0.1-8080-1) 	at $Proxy15.createEmployee(Unknown Source)
22:43:47,469 ERROR [stderr] (http--127.0.0.1-8080-1) 	at servlets.TestServlet.service(Unknown Source)
22:43:47,469 ERROR [stderr] (http--127.0.0.1-8080-1) 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
22:43:47,470 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
22:43:47,470 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
22:43:47,470 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
22:43:47,470 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
22:43:47,471 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
22:43:47,471 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
22:43:47,471 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
22:43:47,471 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
22:43:47,472 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
22:43:47,472 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
22:43:47,472 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
22:43:47,472 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
22:43:47,473 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
22:43:47,473 ERROR [stderr] (http--127.0.0.1-8080-1) 	at java.lang.Thread.run(Thread.java:679)




22:43:47,473 ERROR [stderr] (http--127.0.0.1-8080-1) Caused by: <openjpa-2.2.0-r422266:1244990 fatal user error> org.apache.openjpa.persistence.ArgumentException: The type "class jpa.Employee" has not been enhanced.
22:43:47,474 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1823)
22:43:47,474 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1797)
22:43:47,474 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:822)
22:43:47,475 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:719)
22:43:47,475 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:643)
22:43:47,475 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:411)
22:43:47,475 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:384)
22:43:47,475 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.openjpa.kernel.BrokerImpl.newObjectId(BrokerImpl.java:1262)
22:43:47,476 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.openjpa.kernel.DelegatingBroker.newObjectId(DelegatingBroker.java:316)
22:43:47,476 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:486)
22:43:47,476 ERROR [stderr] (http--127.0.0.1-8080-1) 	at org.jboss.as.jpa.container.AbstractEntityManager.find(AbstractEntityManager.java:193)
22:43:47,476 ERROR [stderr] (http--127.0.0.1-8080-1) 	at jpa.EmployeeService.findEmployee(Unknown Source)
22:43:47,477 ERROR [stderr] (http--127.0.0.1-8080-1) 	at jpa.EmployeeService.createEmployee(Unknown Source)

Issue-4

In the above JBoss Console Outputs you will notice that JBoss is showing “ERROR” for most of the things where the Open JPA TRACE log is showing a successful execution,. Means Even if the Execution is successful JBoss is showing ERROR.

.
.
Thanks
Middleware Magic Team πŸ™‚


Copyright Β© 2010-2012 Middleware Magic. All rights reserved. |