1 2 Previous Next 15 Replies Latest reply on Aug 4, 2005 3:42 PM by tumitoto

    Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.x an

    jbosszone

      Dear Vishal,

      Cleared up to Chapter 3 (Stateless Session Bean) with following setup (a summary of info in various threads/ref.).
      Your kind comments and/or advice would be appreciated.

      Ref. : Your original thread : http://www.jboss.org/index.html?module=bb&op=viewtopic&t=36910

      === Environment:
      - Windows XP SP2
      - J2SDK 1.4.2_08
      - Eclipse 3.0.2
      - JBoss 4.0.2
      - Lomboz 3.0.1 + emf-sdo-runtime-2.0.0
      - PostgreSQL 8.0.3 (= DefaultDS)

      Note : For download and installation of Eclipse, JBoss and Lomboz, see related docs/references for details.
      : Axis 1.2 to be installed later

      = Step 1: Download and install PostgreSQL (follow the Installer's instructions.)
      - The directory is "C:/PostgreSQL".
      - Add a user name ?postgres? with an own password "******".

      = Step 2: Make a database in PostgreSQL
      - Activate "pgAdmin III" for GUI session.
      - Create a new database named "MyStoreDbPgSQL" for the tutorial.
      - Make the tables and the data from myStoreSchema.script and myStoreSchema.data (see Chapter 1 of the tutorial).
      e.g. copy and paste SQL codes in *.script and *.data files above.(add ";" to each end of SQL codes)

      = Step 3: Add a directory as a new server option
      - Copy the complete directory of ?all? under "C:/JBoss-4.0.2/server" and name it "postgres".

      /JBoss-4.0.2/server
       |- /all
       |- /default
       |- /minimal
       |- /postgres
      - Keep the directories "all", "default" & "minimal" un-touched.
      - Delete all sub-directories and files under /server/postgres/log and /temp if any.

      = Step 4: Install JDBC drivers for PostgreSQL
      - Delete hsqldb.jar and hsqldb-plugin.jar in /server/postgres/lib.
      - Copy following three *.jar files in C:/PostgreSQL/8.0/jdbc to /server/postgres/lib.

      postgresql-8.0-311.jdbc2.jar
      postgresql-8.0-311.jdbc2ee.jar
      postgresql-8.0-311.jdbc3.jar

      - Due to troubles in their names, modify them as follows;

      postgresql-8.0.311.jdbc2.jar
      postgresql-8.0.311.jdbc2ee.jar
      postgresql-8.0.311.jdbc3.jar

      = Step 5: Prepare a Server Definition File for Lomboz to start up JBoss in Eclipse
      - Make a copy of "jboss32x.server" in "C:/eclipse/plugins/com.objectlearn.jdt.j2ee_3.0.1/servers" as "jboss402postgres.server".
      - Add ".bak" to all other "*.server" files in the same directory except for "jboss402postgres.server".
      - Modify "jboss402postgres.server" file.
      - A preliminary shape is as follows. (also see other samples in other threads/ref.)
      <serverDefinition
       name="JBOSS 4.0.2 PgSQL"
       ejbModules="true"
       webModules="true"
       earModules="true">
      <property id="serverRootDirectory"
       label="Application Server Directory:"
       type="directory"
       default="C:/jboss-4.0.2" />
      <property id="serverAddress"
       label="Address:"
       type="string"
       default="127.0.0.1" />
      <property id="serverPort"
       label="Port:"
       type="string"
       default="8080" />
      <property id="serverConfig"
       label="Server Configuration (minimal/default/all/postgres):"
       type="string"
       default="postgres" />
      <property id="classPathVariableName"
       label="Classpath Variable Name:"
       type="string"
       default="JBOSS402" />
      <property id="classPath"
       label="Classpath Variable:"
       type="directory"
       default="C:/jboss-4.0.2" />
      <serverHome>${serverRootDirectory}</serverHome>
      <webModulesDeployDirectory>${serverRootDirectory}/server/${serverConfig}/deploy</webModulesDeployDirectory>
      <ejbModulesDeployDirectory>${serverRootDirectory}/server/${serverConfig}/deploy</ejbModulesDeployDirectory>
      <earModulesDeployDirectory>${serverRootDirectory}/server/${serverConfig}/deploy</earModulesDeployDirectory>
      <jndiInitialContextFactory>org.jnp.interfaces.NamingContextFactory</jndiInitialContextFactory>
      <jndiProviderUrl>jnp://${serverAddress}:1099</jndiProviderUrl>
      <startClass>org.jboss.Main</startClass>
      <startWorkingDirectory>${serverRootDirectory}/bin</startWorkingDirectory>
      <startVmParameters>-Dprogram.name=run.bat -Djava.endorsed.dirs=${serverRootDirectory}/bin/../lib/endorsed -Xms128m -Xmx512m</startVmParameters>
      <startProgramArguments>-c ${serverConfig}</startProgramArguments>
      <stopClass>org.jboss.Shutdown</stopClass>
      <stopWorkingDirectory>${serverRootDirectory}/bin</stopWorkingDirectory>
      <stopVmParameters>-cp ${classPathVariableName}/bin/shutdown.jar -Djboss.boot.loader.name=shutdown.bat</stopVmParameters>
      <stopProgramArguments>-S</stopProgramArguments>
      <serverClassPath>
       <jar type="variable">JDK_TOOLS</jar>
       <jar type="variable">${classPathVariableName}/bin/run.jar</jar>
       <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/postgresql-8.0.311.jdbc3.jar</jar>
      </serverClassPath>
      <clientClassPath>
       <jar type="variable">${classPathVariableName}/client/jboss-j2ee.jar</jar>
       <jar type="variable">${classPathVariableName}/client/jnp-client.jar</jar>
       <jar type="variable">${classPathVariableName}/client/jboss-client.jar</jar>
       <jar type="variable">${classPathVariableName}/client/jboss-common-client.jar</jar>
       <jar type="variable">${classPathVariableName}/client/jbosssx-client.jar</jar>
       <jar type="variable">${classPathVariableName}/client/log4j.jar</jar>
       <jar type="variable">${classPathVariableName}/client/jnet.jar</jar>
       <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jnpserver.jar</jar>
       <jar type="variable">${classPathVariableName}/client/jboss-jaas.jar</jar>
      </clientClassPath>
      <projectClassPath>
       <jar type="variable">JDK_TOOLS</jar>
       <jar type="variable">${classPathVariableName}/bin/run.jar</jar>
       <jar type="variable">${classPathVariableName}/bin/shutdown.jar</jar>
       <jar type="variable">${classPathVariableName}/client/jboss-j2ee.jar</jar>
       <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/javax.servlet.jar</jar>
       <jar type="variable">${classPathVariableName}/lib/jboss-system.jar</jar>
       <jar type="variable">${classPathVariableName}/lib/concurrent.jar</jar>
       <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss.jar</jar>
       <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jnpserver.jar</jar>
       <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jpl-pattern.jar</jar>
       <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jpl-util.jar</jar>
       <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-transaction.jar</jar>
       <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/bcel.jar</jar>
       <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/postgresql-8.0.311.jdbc3.jar</jar>
      </projectClassPath>
      <adminTool>
       <web><deploy /><undeploy />
       </web>
       <ejb><deploy /><undeploy />
       </ejb>
       <ear><deploy /><undeploy />
       <webModule><deploy /><undeploy />
       </webModule>
       <ejbModule><deploy /><undeploy />
       </ejbModule>
       </ear>
      </adminTool>
      <adminToolPath>
      </adminToolPath>
      </serverDefinition>
      = Step 6: Prepare the Service Description File
      - Delete "/server/postgres/deploy/hsqldb-ds.xml".
      - Copy "postgres-ds.xml" in "/jboss-4.0.2/docs/examples/jca" to "/server/postgres/deploy"
      - In "postgres-ds.xml", the contents of <local-tx-datasource> are as follows;
      <jndi-name>DefaultDS</jndi-name>
       <connection-url>jdbc:postgresql://localhost/MyStoreDbPgSQL</connection-url>
       <driver-class>org.postgresql.Driver</driver-class>
       <user-name>postgres</user-name>
       <password>******</password>
      
       <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
       <metadata>
       <type-mapping>PostgreSQL 8.0</type-mapping>
       </metadata>

      = Step 7: Modify following three files for the postgres configuration to be fully J2EE 1.4 compliant.
      Ref. : "What?s New in JBoss AS 4.0" (section 2.1) http://docs.jboss.org/jbossas/whatsnew40/pdf/whatsnew40.pdf

      1. /server/postgres/conf/jboss-service.xml --> set the NamingService (JNDI) CallByValue to "true"
      2. /server/postgres/deploy/ear-deployer.xml --> set the Isolated and CallByValue attributes to "true"
      3. /server/postgres/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml --> confirm the Java2ClassLoadingCompliance and UseJBossWebLoader attributes to "false"

      = Step 8: Modify the JBoss Login Config File (/server/postgres/conf/login-config.xml)
      - Activate "Security domain for JBossMQ when using file-state-service.xml" section.
      - Make a copy of "Security domains for testing new jca framework" (HsqlDbRealm) section and name it "PostgresDbRealm".
      - Comment out the HsqlDbRealm section which is for "Hypersonic SQL".
      - The <application-policy> for PostgresDbRealm is as follows;
      <!-- Security domains for testing new jca framework -->
       <application-policy name = "PostgresDbRealm">
       <authentication>
       <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
       flag = "required">
       <module-option name = "principal"></module-option>
       <module-option name = "userName">postgres</module-option>
       <module-option name = "password">******</module-option>
       <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
       </login-module>
       </authentication>
       </application-policy>

      = Step 9: Modify "standardjaws.xml"
      - In "/server/postgres/conf/standardjaws.xml", the top parts of are as follows;
      <jaws>
       <datasource>java:/DefaultDS</datasource>
       <type-mapping>PostgreSQL</type-mapping>
       <debag>false</debug>
       <default-entity>
       :

      = Step 10: Modify "standardjbosscmp-jdbc.xml"
      - In "/server/postgres/conf/standardjbosscmp-jdbc.xml", the top parts are as follows;
      <jbosscmp-jdbc>
       <defaults>
       <datasource>java:/DefaultDS</datasource>
       <datasource-mapping>PostgreSQL</datasource-mapping>
       <!-- optional since 4.0 <datasource-mapping>Hypersonic SQL</datasource-mapping> -->
      
       <create-table>true</create-table>
       :

      = Step 11: Add ".bak" to disable "/jms" folder under "/server/postgres/deploy".

      = Step 12: Arrange "/server/postgres/deploy-hasingleton/jms" folder instead of "/server/postgres/deploy/jms.bak" (Step 11)
      - Delete hsqldb-jdbc2-service.xml and hsqldb-jdbc-state-service.xml. (Note : Addition of ".bak" for disabling is not effective.)
      - Copy following three files in "C:/jboss-4.0.2/docs/examples/jms" to "/server/postgres/deploy-hasingleton/jms".

      oil-service.xml
      postgres-jdbc3-service.xml
      rmi-il-service.xml

      - Modify the jdbc3 Persistence Manager section of postgres-jdbc3-service.xml as follows; (i.e. : ...=DataSourceBinding, name=PostgresDS --> name=DefaultDS ...)
      :
       | If you encouter problems with the configured BLOB_TYPE try a different
       | setting. Valid settings are OBJECT_BLOB, BINARYSTREAM_BLOB and BYTES_BLOB.
       -->
       <mbean code="org.jboss.mq.pm.jdbc3.PersistenceManager"
       name="jboss.mq:service=PersistenceManager">
       <depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
       <attribute name="SqlProperties">
       BLOB_TYPE=BYTES_BLOB
       :

      *** Start Eclipse and build a new project as MyStorePgSQL.

      = Step 13: Edit "xdoclet.xml" for PostgreSQL
      - In "/MyStorePgSQL/MyStoreMgr/META-INF/xdoclet.xml", the JBoss part is as follows;
      :
       <jboss
       version="4.0"
       :
       datasource="java:/DefaultDS"
       datasourcemapping="PostgreSQL"
       preferredrelationmapping="foreign-key"
       />
       :

      = Step 14: Start JBoss from the "Lomboz J2EE View" tag in Eclipse.

      --------------------

      Regards,

      jbosszone

        • 1. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.

          Thanks Nishi.

          For those who dont know what this is about.

          These new instructions are for new version of tools used in this
          tutorial http://www.tusc.com.au/tutorial/html/index.html. This covers steps in chapter 3.

          There is already a thread running on the issues with the tutorial in this forum.
          https://www.jboss.org/index.html?module=bb&op=viewtopic&t=36910&start=310

          I hope this work by NISHI helps people to leverage upon this documentation.

          • 2. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.

            For some time now I have tried to get Jboss 4.0.2 to run as the server in eclipse. I have tried many different server.file variations. Moreover, I have searched the web and the mailing lists numerous times with no success (I found a link or two but they seemed to be referring to 4.0.1 or had incorrect info).

            I believe that the problem is that there is no jboss-jass.jar file. Could also be that there is no jnet.jar file.

            Does anyone have a working a .server file for Jboss 4.0.2?

            If not then does anyone know what these two jars files (jboss-jass.jar, jnet.jar) have been replaced with in Jboss 4.0.2?

            Thanks in advance the the help.

            • 3. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
              starksm64

              jboss-jass.jar, jnet.jar have no use in any jboss-4.0.x and so they have been removed. They are old pre-jdk 1.4.x classes needed when running under jdk 1.3.

              • 4. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.

                Thanks for the reply Scott. This must not be the root of my problem.

                I am getting the following errors on startup (in eclipse):

                1. java.lang.NoClassDefFoundError: org/jboss/security/auth/spi/UsersObjectModelFactory

                2. ERROR [org.jboss.naming.NamingService] Starting failed jboss:service=Naming
                java.lang.ClassCastException
                at org.jboss.naming.NamingService.startService(NamingService.java:235)


                I have searched for UsersObjectModelFactory with no luck (# 1 above). Any idea where this resides?

                Also, in scouring the web I see others with the same problem in # 2:
                http://forge.objectweb.org/forum/forum.php?thread_id=1590&forum_id=360

                Thanks for any help in either of these two errors (I am running out of places to look).

                • 5. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
                  mistamoasn

                  i recommend using the jbosside plugin instead of the lomboz plugin. i had similar problems when using jboss 4.0.x. i tried many combinations of my .server files and i wasn't possible to create a running one.

                  after searching in the jboss-forums i found the following workaround: start and stop the jboss outside eclipse but deploy with the lomboz plugin. this worked for me.

                  but, as mentioned, switch to jbosside. you have better possibilites to configure it to your needs than with lomboz. just have a look at the jbosside plugin tutorial.

                  • 6. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
                    jbosszone


                    Post Subject : Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.x and PostgreSQL-8.x on Windows XP

                    Ref. 1 : Tutorial for building J2EE Applications using JBOSS and ECLIPSE (Chapter 5 : BMP Entity Bean)
                    http://www.tusc.com.au/tutorial/html/chap5.html

                    Ref. 2 : Tutorial on J2EE using JBOSS, ECLIPSE and Lomboz (Forum on Ref. 1)
                    http//www.jboss.org/index.html?module=bb&op=viewtopic&t=36910

                    Ref. 3 : Environment in use ;
                    - Windows XP SP2
                    - J2SDK 1.4.2_08
                    - Eclipse 3.0.2
                    - JBoss 4.0.2
                    - Lomboz 3.0.1 + emf-sdo-runtime-2.0.0
                    - PostgreSQL 8.0.3 (= DefaultDS)

                    Followings are some notes on Chapter 5 (BMP Entity Bean) in Ref. 1

                    * Chapter 4 (Statefull Session Bean) has been jumped over.
                    * Task numbers are based on Ref. 1.
                    * No change has been made to the server configuration file (jboss402postgres.server) thus far.

                    Task 1 : Create the Customer BMP Entity Bean
                    - Before start the task, make a copy of "xdoclet.xml" under MyStoreMgr/META-INF as a backup.
                    - On creation of "CustomerBean", check some points before proceeding further steps.
                    a. make sure the XDoclet part;

                    /**
                    * @ejb.bean name="Customer"* jndi-name="CustomerBean"* type="BMP"
                    **/

                    b. comment out "ejbCreate()" and "ejbPostCreate()" methods
                    public abstract class CustomerBean implements javax.ejb.EntityBean {
                    
                    // /**
                    // *
                    // * <!-- begin-user-doc -->
                    // * The ejbCreate method.
                    // * <!-- end-user-doc -->
                    // *
                    // * <!-- begin-xdoclet-definition -->
                    // * @ejb.create-method
                    // * <!-- end-xdoclet-definition -->
                    // * @generated
                    // */
                    // public java.lang.String ejbCreate() throws javax.ejb.CreateException {
                    // // EJB 2.0 spec says return null for CMP ejbCreate methods.
                    // // TODO: YOU MUST INITIALIZE THE FIELDS FOR THE BEAN HERE.
                    // // setMyField("Something");
                    // // begin-user-code
                    // return null;
                    // // end-user-code
                    // }
                    //
                    // /**
                    // * <!-- begin-user-doc -->
                    // * The container invokes this method immediately after it calls ejbCreate.
                    // * <!-- end-user-doc -->
                    // *
                    // * @generated
                    // */
                    // public void ejbPostCreate() throws javax.ejb.CreateException {
                    // // begin-user-code
                    // // end-user-code
                    // }
                    
                    }

                    c. confirm no parts of "xdoclet.xml" are missed.
                    = the lower half of xdoclet.xml might disappear on the first creation.
                    = recover it from the backup file if any.

                    d. check xdoclet.xml for <!-- BEANS START --> section.
                    If no "fileset" for CustomerBean.java, make it as follows;
                    :
                     <!-- BEANS START -->
                     <fileset dir="${project.dir}/src/" defaultexcludes="yes">
                     <include name="au/com/tusc/session/StoreAccessBean.java" />
                     </fileset> <fileset dir="${project.dir}/src/" defaultexcludes="yes">
                     <include name="au/com/tusc/bmp/CustomerBean.java" />
                     </fileset> <!-- BEANS END -->
                     :

                    Task 2 : Create Customer's DAO Interface
                    : (as per the steps in Ref. 1)
                    Task 9 : Add a create method to the StoreAccess Bean

                    Task 10 : Add a Business Method in StoreAccess Bean
                    - After "Generate EJB Classes" (before "deploy");
                    = change <ejb-ref> tag under "session" in jboss.xml to <ejb-local-ref> as shown in Ref. 1.
                    = add "ejb/" to CustomerLocal in <ejb-ref-name> tag under "session" in ejb-jar.xml as follows;
                    :
                     <ejb-local-ref > <ejb-ref-name>ejb/CustomerLocal</ejb-ref-name> <ejb-ref-type>Entity</ejb-ref-type>
                     <local-home>au.com.tusc.bmp.CustomerLocalHome</local-home>
                     <local>au.com.tusc.bmp.CustomerLocal</local>
                     <ejb-link>Customer</ejb-link>
                     </ejb-local-ref>
                     :

                    - Start JBoss from "Lomboz J2EE View" tag in Eclipse.
                    Note : Use "Run Server" instead of "Debug Server"
                    = In case of error with "Debug Server",
                    : click "Stop the launched server" button
                    : exit Eclipse
                    : delete MyStorePgSQL.jar file under /sever/postgres/deploy
                    : start Eclipse again, and then JBoss with "Run Server"


                    === On completion of CustomerBean.java, XDoclet sections of each file are as follows;

                    - StoreAccessBean.java
                    Note : The lomboz sections are generated automatically.
                    /**
                     *
                     * <!-- begin-user-doc --> A generated session bean <!-- end-user-doc --> *
                     <!-- lomboz.beginDefinition -->
                     <?xml version="1.0" encoding="UTF-8"?>
                     <lomboz:EJB xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:lomboz="http://lomboz.objectlearn.com/xml/lomboz">
                     <lomboz:session>
                     <lomboz:sessionEjb>
                     <j2ee:display-name>StoreAccess</j2ee:display-name>
                     <j2ee:ejb-name>StoreAccess</j2ee:ejb-name>
                     <j2ee:ejb-class>au.com.tusc.session.StoreAccessBean</j2ee:ejb-class>
                     <j2ee:session-type>Stateless</j2ee:session-type>
                     <j2ee:transaction-type>Container</j2ee:transaction-type>
                     </lomboz:sessionEjb>
                     </lomboz:session>
                     </lomboz:EJB>
                     <!-- lomboz.endDefinition -->
                     *
                     * <!-- begin-xdoclet-definition -->
                     * @ejb.bean name="StoreAccess"
                     * jndi-name="StoreAccessBean"
                     * type="Stateless"
                     * transaction-type="Container"
                     *
                     * @ejb.dao class="au.com.tusc.session.StoreAccessDAO"
                     * impl-class="au.com.tusc.dao.StoreAccessDAOImpl"
                     *
                     * @ejb.resource-ref res-ref-name="jdbc/DefaultDS"
                     * res-type="javax.sql.Datasource"
                     * res-auth="container"
                     *
                     * @jboss.resource-ref res-ref-name="jdbc/DefaultDS"
                     * jndi-name="java:/DefaultDS"
                     *
                     * @ejb.ejb-ref ejb-name="Customer"
                     * view-type="local"
                     * ref-name="CustomerLocal"
                     *
                     * @jboss.ejb-ref-jndi ref-name="CustomerLocal"
                     * jndi-name="CustomerLocal"
                     *
                     * @ejb.util generate="physical"
                     *
                    * <!-- end-xdoclet-definition -->
                     * @generated
                     *
                     */

                    - CustomerBean.java
                    Note : The lomboz sections are generated automatically.
                    /**
                     *
                     * <!-- begin-user-doc --> You can insert your documentation for '<em><b>CustomerBean</b></em>'. <!-- end-user-doc --> *
                     <!-- begin-lomboz-definition -->
                     <?xml version="1.0" encoding="UTF-8"?>
                     <lomboz:EJB xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:lomboz="http://lomboz.objectlearn.com/xml/lomboz">
                     <lomboz:entity>
                     <lomboz:entityEjb>
                     <j2ee:display-name>Customer</j2ee:display-name>
                     <j2ee:ejb-name>Customer</j2ee:ejb-name>
                     <j2ee:ejb-class>au.com.tusc.bmp.CustomerBean</j2ee:ejb-class>
                     <j2ee:persistence-type>Bean</j2ee:persistence-type>
                     <j2ee:cmp-version>2.x</j2ee:cmp-version>
                     <j2ee:abstract-schema-name>mySchema</j2ee:abstract-schema-name>
                     </lomboz:entityEjb>
                     <lomboz:tableName></lomboz:tableName>
                     <lomboz:dataSourceName></lomboz:dataSourceName>
                     </lomboz:entity>
                     </lomboz:EJB>
                     <!-- end-lomboz-definition -->
                     *
                     * <!-- begin-xdoclet-definition -->
                     *
                     *
                    
                    
                     /**
                     * @ejb.bean name="Customer"
                     * jndi-name="CustomerBean"
                     * type="BMP"
                     *
                     * @ejb.dao class="au.com.tusc.bmp.CustomerDAO"
                     * impl-class="au.com.tusc.dao.CustomerDAOImpl"
                     *
                     * @ejb.resource-ref res-ref-name="jdbc/DefaultDS"
                     * res-type="javax.sql.DataSource"
                     * res-auth="Container"
                     *
                     * @jboss.resource-ref res-ref-name="jdbc/DefaultDS"
                     * jndi-name="java:/DefaultDS"
                     *
                     * @ejb.util generate="physical"
                     *
                     * <!-- end-xdoclet-defintion -->
                     * @generated
                     **/

                    - Also, ejb-jar.xml is;
                    <?xml version="1.0" encoding="UTF-8"?>
                    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
                    
                    <ejb-jar >
                    
                     <description><![CDATA[No Description.]]></description>
                     <display-name>Generated by XDoclet</display-name>
                    
                     <enterprise-beans>
                    
                     <!-- Session Beans -->
                     <session >
                     <description><![CDATA[<!-- begin-user-doc --> A generated session bean <!-- end-user-doc --> * <!-- lomboz.beginDefinition --> <?xml version="1.0" encoding="UTF-8"?> <lomboz:EJB xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:lomboz="http://lomboz.objectlearn.com/xml/lomboz"> <lomboz:session> <lomboz:sessionEjb> <j2ee:display-name>StoreAccess</j2ee:display-name> <j2ee:ejb-name>StoreAccess</j2ee:ejb-name> <j2ee:ejb-class>au.com.tusc.session.StoreAccessBean</j2ee:ejb-class> <j2ee:session-type>Stateless</j2ee:session-type> <j2ee:transaction-type>Container</j2ee:transaction-type> </lomboz:sessionEjb> </lomboz:session> </lomboz:EJB> <!-- lomboz.endDefinition --> <!-- begin-xdoclet-definition -->]]></description>
                    
                     <ejb-name>StoreAccess</ejb-name>
                    
                     <home>au.com.tusc.session.StoreAccessHome</home>
                     <remote>au.com.tusc.session.StoreAccess</remote>
                     <local-home>au.com.tusc.session.StoreAccessLocalHome</local-home>
                     <local>au.com.tusc.session.StoreAccessLocal</local>
                     <ejb-class>au.com.tusc.session.StoreAccessSession</ejb-class>
                     <session-type>Stateless</session-type>
                     <transaction-type>Container</transaction-type>
                    
                     <ejb-local-ref >
                     <ejb-ref-name>ejb/CustomerLocal</ejb-ref-name>
                     <ejb-ref-type>Entity</ejb-ref-type>
                     <local-home>au.com.tusc.bmp.CustomerLocalHome</local-home>
                     <local>au.com.tusc.bmp.CustomerLocal</local>
                     <ejb-link>Customer</ejb-link>
                     </ejb-local-ref>
                    
                     <resource-ref >
                     <res-ref-name>jdbc/DefaultDS</res-ref-name>
                     <res-type>javax.sql.Datasource</res-type>
                     <res-auth>container</res-auth>
                     </resource-ref>
                    
                     </session>
                    
                     <!--
                     To add session beans that you have deployment descriptor info for, add
                     a file to your XDoclet merge directory called session-beans.xml that contains
                     the <session></session> markup for those beans.
                     -->
                    
                     <!-- Entity Beans -->
                     <entity >
                     <description><![CDATA[<!-- begin-user-doc --> You can insert your documentation for '<em><b>CustomerBean</b></em>'.]]></description>
                    
                     <ejb-name>Customer</ejb-name>
                    
                     <home>au.com.tusc.bmp.CustomerHome</home>
                     <remote>au.com.tusc.bmp.Customer</remote>
                     <local-home>au.com.tusc.bmp.CustomerLocalHome</local-home>
                     <local>au.com.tusc.bmp.CustomerLocal</local>
                    
                     <ejb-class>au.com.tusc.bmp.CustomerBMP</ejb-class>
                     <persistence-type>Bean</persistence-type>
                     <prim-key-class>au.com.tusc.bmp.CustomerPK</prim-key-class>
                     <reentrant>False</reentrant>
                    
                     <resource-ref >
                     <res-ref-name>jdbc/DefaultDS</res-ref-name>
                     <res-type>javax.sql.DataSource</res-type>
                     <res-auth>Container</res-auth>
                     </resource-ref>
                    
                     </entity>
                    
                     <!--
                     To add entity beans that you have deployment descriptor info for, add
                     a file to your XDoclet merge directory called entity-beans.xml that contains
                     the <entity></entity> markup for those beans.
                     -->
                    
                     <!-- Message Driven Beans -->
                     <!--
                     To add message driven beans that you have deployment descriptor info for, add
                     a file to your XDoclet merge directory called message-driven-beans.xml that contains
                     the <message-driven></message-driven> markup for those beans.
                     -->
                    
                     </enterprise-beans>
                    
                     <!-- Relationships -->
                    
                     <!-- Assembly Descriptor -->
                     <assembly-descriptor >
                     <!--
                     To add additional assembly descriptor info here, add a file to your
                     XDoclet merge directory called assembly-descriptor.xml that contains
                     the <assembly-descriptor></assembly-descriptor> markup.
                     -->
                    
                     <!-- finder permissions -->
                    
                     <!-- finder permissions -->
                    
                     <!-- transactions -->
                    
                     <!-- finder transactions -->
                     </assembly-descriptor>
                    
                    </ejb-jar>

                    - and jboss.xml is;
                    <?xml version="1.0" encoding="UTF-8"?>
                    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
                    
                    <jboss>
                    
                     <unauthenticated-principal>nobody</unauthenticated-principal>
                    
                     <enterprise-beans>
                    
                     <!--
                     To add beans that you have deployment descriptor info for, add
                     a file to your XDoclet merge directory called jboss-beans.xml that contains
                     the <session></session>, <entity></entity> and <message-driven></message-driven>
                     markup for those beans.
                     -->
                    
                     <entity>
                     <ejb-name>Customer</ejb-name>
                     <jndi-name>CustomerBean</jndi-name>
                     <local-jndi-name>CustomerLocal</local-jndi-name>
                     <resource-ref>
                     <res-ref-name>jdbc/DefaultDS</res-ref-name>
                     <jndi-name>java:/DefaultDS</jndi-name>
                     </resource-ref>
                    
                     <method-attributes>
                     </method-attributes>
                    
                     </entity>
                    
                     <session>
                     <ejb-name>StoreAccess</ejb-name>
                     <jndi-name>StoreAccessBean</jndi-name>
                     <local-jndi-name>StoreAccessLocal</local-jndi-name>
                     <ejb-local-ref>
                     <ejb-ref-name>ejb/CustomerLocal</ejb-ref-name>
                     <jndi-name>CustomerLocal</jndi-name>
                     </ejb-local-ref>
                     <resource-ref>
                     <res-ref-name>jdbc/DefaultDS</res-ref-name>
                     <jndi-name>java:/DefaultDS</jndi-name>
                     </resource-ref>
                    
                     <method-attributes>
                     </method-attributes>
                     </session>
                    
                     </enterprise-beans>
                    
                     <resource-managers>
                     </resource-managers>
                    
                    </jboss>


                    jbosszone


                    • 7. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
                      jbosszone


                      Post Subject : Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.x and PostgreSQL-8.x on Windows XP

                      Ref. 1 : Tutorial for building J2EE Applications using JBOSS and ECLIPSE (Chapter 6 : CMP Entity Bean)
                      http://www.tusc.com.au/tutorial/html/chap6.html

                      Ref. 2 : Tutorial on J2EE using JBOSS, ECLIPSE and Lomboz (Forum on Ref. 1)
                      http//www.jboss.org/index.html?module=bb&op=viewtopic&t=36910

                      Ref. 3 : Environment in use ;
                      - Windows XP SP2
                      - J2SDK 1.4.2_08
                      - Eclipse 3.0.2
                      - JBoss 4.0.2
                      - Lomboz 3.0.1 + emf-sdo-runtime-2.0.0
                      - PostgreSQL 8.0.3 (= DefaultDS)

                      Followings are some notes on the Chapter 6 (CMP Entity Bean) in Ref. 1

                      * Task numbers are based on Ref. 1.
                      * No change has been made to the server configuration file (jboss402postgres.server) thus far.
                      * For "jboss-jaas.jar" & "jnet.jar" in the server definition file, it seems JBoss just ignore them even if exist.

                      Task 1 : Create a CMP Entity Bean named "Item"
                      - Enter "DefaultDS" as a Datasource on the 2nd page of Lomboz EJB Creation Wizard.
                      - On creation of "ItemBean", check a point before proceeding further steps.
                      = make sure the XDoclet parts of ItemBean.java;

                      :
                      *
                      * @ejb.bean name="Item"* jndi-name="ItemBean"* type="CMP"
                      * primkey-field="itemID"
                      * schema="MyStoreItem"
                      * cmp-version="2.x"
                      * data-source="DefaultDS"
                      *
                       :


                      Task 2 : Implement ejbCreate Method.
                      : (as per the steps in Ref. 1)
                      Task 12 : Add another business method to StoreAccess Bean.
                      - add getOutOfStockItems() method.

                      Task 13 : Add another business method to StoreAccess Bean.
                      - add getItemsBySupplier() method.
                      - generate EJB Classes.
                      - In ejb-jar.xml, add "ejb/" to the three items below in <ejb-ref-name> under "session";
                      = ejb/CustomerLocal
                      = ejb/ManagerLocal
                      = ejb/ItemLocal
                      - In jboss.xml, change all <ejb-ref> and </ejb-ref> tags under "session" to <ejb-local-ref> and </ejb-local-ref> respectively.
                      (see Task 10 in Chapter 5 of Ref. 1)
                      - deploy beans.

                      Task 14 and 15 : as per the steps in Ref. 1

                      For "SupplierBean.java";
                      Task 1 : Create a CMP Entity Bean named Supplier (2nd page of Wizard),
                      - note that the column name of Credit Limit is "CREDIT_LIMIT", not "CREDITLIMIT".

                      === Current Status in Chapter 7 (MDB) ===
                      - tackling difficulties at Task 4 (Deploy the RequestItems Bean).
                      - trying modifications of settings, such as
                      = switch using of jms folder under /deploy-hasingleton to /deploy
                      = change settings in the related xml files etc.
                      - no success so far.


                      jbosszone


                      • 8. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
                        jbosszone


                        Post Subject : Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.x and PostgreSQL-8.x on Windows XP

                        Ref. 1 : Tutorial for building J2EE Applications using JBOSS and ECLIPSE
                        http://www.tusc.com.au/tutorial/html/chap7.html (Chapter 7 : Message Driven Bean)

                        Ref. 2 : Tutorial on J2EE using JBOSS, ECLIPSE and Lomboz (Forum on Ref. 1)
                        http://www.jboss.org/index.html?module=bb&op=viewtopic&t=36910

                        Ref. 3 : Environment in use ;
                        - Windows XP SP2
                        - J2SDK 1.4.2_08
                        - Eclipse 3.0.2
                        - JBoss 4.0.2
                        - Lomboz 3.0.1 + emf-sdo-runtime-2.0.0
                        - PostgreSQL 8.0.3 (= DefaultDS)

                        Followings are some notes on Chapter 7 (MDB) in Ref. 1

                        * The notes cover a creation of RequestItemsBean.
                        * Task numbers are based on Ref. 1
                        * No change has been made to the server definition file (jboss402postgres.server) thus far.
                        * Copy and paste additional files for Chapter 7 and after.
                        - Before start up JBoss, copy and paste three "*.xml" files below. Keep their contents as they are.

                        a. "hajndi-jms-ds.xml" and "file-state-service.xml" in /jboss-4.0.2/docs/examples/jms to "/postgres/deploy-hasingleton/jms"
                        b. "jbossmq-state.xml" in /jboss-4.0.2/docs/examples/jms/conf to "/postgres/conf"

                        - As a result, "/postgres/deploy-hasingleton/jms" folder contains following files.

                        jbossmq-httpil.sar
                        file-state-service.xml
                        hajndi-jms-ds.xml
                        jbossmq-destinations-service.xml
                        jbossmq-service.xml
                        jvm-il-service.xml
                        oil-service.xml
                        postgres-jdbc3-service.xml
                        rmi-il-service.xml
                        uil2-service.xml

                        =Note : All other settings and files are kept unchanged after Chapter 6.
                        For addition of "file-state-service.xml", see Step 8 (Modify the JBoss Login Config File) in the first post of this thread.

                        Task 1 : Create RequestItems MDB under package au.com.tusc.mdb
                        - On creation of "ItemBean", check some points before proceeding further steps.
                        = make sure the XDoclet parts of ItemBean.java;

                        :
                         * <!-- begin-xdoclet-definition --> * @ejb.bean name="RequestItems" * acknowledge-mode="Auto-acknowledge"
                         * destination-type="javax.jms.Queue" * subscription-durability="NonDurable" * transaction-type="Container"
                         *
                         :

                        Task 2 : Create an Immutable Value Object named RequestItem.
                        - On creation of "RequestItem", confirm a point below.
                        :
                        public class RequestItem extends java.lang.Object implements Serializable {
                         :

                        Task 3 : Implement the onMessage method
                        (as per the steps in Ref. 1)

                        Task 4 : Deploy the RequestItems Bean
                        (add some deployment descriptors as per the steps in Ref. 1)
                        - generate EJB classes
                        - fix deployment descriptions, i.e. "ejb-local-ref" and "ejb/"
                        - confirm copy-and-paste of additional three files. (see Note above)
                        - start JBoss with "Run Server" menu in "Lomboz J2EE View" tag.
                        - if failure/error messages occur, stop JBoss and check the tables in the database with "pgAdmin III".
                        - drop all of following files if exist.

                        hilosequences
                        jms_message_log
                        jms_reference_log
                        jms_transaction_log
                        timers

                        - re-start JBoss

                        Task 5 : Create a test client name RequestMDBClient
                        : (as per the steps in Ref. 1)
                        Task 6 : Add a method named testMDBBean

                        Task 7 : Run the test client and test the bean
                        - Messages expected in the console are;
                        Looking up the factory
                        Looking up the queue
                        Creating the connection now ...
                        Creating the session now ...
                        Creating the sender now ...
                        Setting the object in message now ...
                        Sending the message
                        Shutting down
                        Finished
                        but, they might be as follows instead, which are a summary of "server.log".
                        23:37:03,906 INFO [STDOUT] Message Driven Bean got message org.jboss.mq.SpyObjectMessage {
                        Header {
                         jmsDestination : QUEUE.MdbQueue
                         jmsDeliveryMode : 2
                         jmsExpiration : 0
                         jmsPriority : 4
                         jmsMessageID : ID:9-11188462238901
                         jmsTimeStamp : 1118846223890
                         jmsCorrelationID: null
                         jmsReplyTo : null
                         jmsType : null
                         jmsRedelivered : false
                         jmsProperties : {}
                         jmsPropReadWrite: false
                         msgReadOnly : true
                         producerClientId: ID:9
                        }
                        }
                        23:37:03,906 INFO [STDOUT] Entering RequestItemsBean.onMessage()
                        23:37:03,968 INFO [STDOUT] Entering StoreAccessBean
                        23:37:03,968 INFO [STDOUT] Leaving StoreAccessBean
                        23:37:03,968 INFO [STDOUT] Entering StoreAccessDAOImpl.loginUser()
                        23:37:03,984 INFO [STDOUT] Userid is U6
                        23:37:03,984 INFO [STDOUT] Leaving StoreAccessDAOImpl.loginUser()
                        23:37:03,984 INFO [STDOUT] Entering StoreAccessBean.getItemData()
                        23:37:03,984 INFO [STDOUT] Entering ItemBean.getItemData()
                        23:37:03,984 INFO [STDOUT] Leaving ItemBean.getItemData()
                        23:37:03,984 INFO [STDOUT] Entering ItemBean.getItemData()
                        23:37:03,984 INFO [STDOUT] Leaving ItemBean.getItemData()
                        23:37:03,984 INFO [STDOUT] Leaving StoreAccessBean.getItemsOutOfStock()
                        23:37:04,000 INFO [STDOUT] List of Out-Of-Stock Items
                        23:37:04,015 INFO [STDOUT] Entering SupplierBean.requestItem() 30
                        23:37:04,015 INFO [STDOUT] Leaving SupplierBean.requestItem()
                        23:37:04,015 INFO [STDOUT] Entering SupplierBean.requestItem() 30
                        23:37:04,015 INFO [STDOUT] Leaving SupplierBean.requestItem()
                        23:37:04,015 INFO [STDOUT] Leaving RequestItemsBean.onMessage()

                        - Also, the results can be checked in the database table using "pgAdmin III".
                        = select * from supplier

                        ==> "S1";"U4";"SEBASTIAN";"BELLOFIORE";"10 ELIZABETH ST";"I430";0.00


                        === On completion of RequestItemsBean, the contents of <message-driven> tag of each file are as follows;

                        - ejb-jar.xml
                        :
                         <!-- Message Driven Beans -->
                         <message-driven >
                         <description><![CDATA[<!-- begin-user-doc --> You can insert your documentation for '<em><b>RequestItemsBean</b></em>'.]]></description>
                        
                         <ejb-name>RequestItems</ejb-name>
                        
                         <ejb-class>au.com.tusc.mdb.RequestItemsBean</ejb-class>
                         <transaction-type>Container</transaction-type>
                         <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
                         <message-driven-destination>
                         <destination-type>javax.jms.Queue</destination-type>
                         <subscription-durability>NonDurable</subscription-durability>
                         </message-driven-destination>
                        
                         <ejb-ref >
                         <ejb-ref-name>ejb/StoreAccess</ejb-ref-name>
                         <ejb-ref-type>Session</ejb-ref-type>
                         <home>au.com.tusc.session.StoreAccessHome</home>
                         <remote>au.com.tusc.session.StoreAccess</remote>
                         <ejb-link>StoreAccess</ejb-link>
                         </ejb-ref>
                        
                         <ejb-local-ref >
                         <ejb-ref-name>ejb/SupplierLocal</ejb-ref-name>
                         <ejb-ref-type>Entity</ejb-ref-type>
                         <local-home>au.com.tusc.cmp.SupplierLocalHome</local-home>
                         <local>au.com.tusc.cmp.SupplierLocal</local>
                         <ejb-link>Supplier</ejb-link>
                         </ejb-local-ref>
                        
                         </message-driven>
                         :

                        - jboss.xml
                        :
                         <message-driven>
                         <ejb-name>RequestItems</ejb-name>
                         <destination-jndi-name>queue/MdbQueue</destination-jndi-name>
                         <ejb-local-ref>
                         <ejb-ref-name>ejb/SupplierLocal</ejb-ref-name>
                         <jndi-name>SupplierLocal</jndi-name>
                         </ejb-local-ref>
                         <ejb-ref>
                         <ejb-ref-name>ejb/StoreAccess</ejb-ref-name>
                         <jndi-name>StoreAccessBean</jndi-name>
                         </ejb-ref>
                         </message-driven>
                         :


                        jbosszone


                        • 9. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
                          jbosszone


                          Post Subject : Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.x and PostgreSQL-8.x on Windows XP

                          Ref. 1 : Tutorial for building J2EE Applications using JBOSS and ECLIPSE
                          http://www.tusc.com.au/tutorial/html/chap7.html (Chapter 7 : Message Driven Bean, Exercise)

                          Ref. 2 : Tutorial on J2EE using JBOSS, ECLIPSE and Lomboz (Forum on Ref. 1)
                          http://www.jboss.org/index.html?module=bb&op=viewtopic&t=36910

                          Ref. 3 : Environment in use ;
                          - Windows XP SP2
                          - J2SDK 1.4.2_08
                          - Eclipse 3.0.2
                          - JBoss 4.0.2
                          - Lomboz 3.0.1 + emf-sdo-runtime-2.0.0
                          - PostgreSQL 8.0.3 (= DefaultDS)

                          Followings are some notes on Chapter 7 (MDB, Exercise) in Ref. 1

                          * The notes cover a creation of DeliverItemsBean.
                          * Task numbers are based on Ref. 1
                          * No change has been made to the server definition file (jboss402postgres.server) thus far.

                          Task 1 : Create DeliverItems MDB under package au.com.tusc.mdb
                          - On creation of "DeliverItemsBean", check some points before proceeding further steps.
                          = make sure the XDoclet section of DeliverItemsBean.java;

                          :
                           * <!-- begin-xdoclet-definition --> * @ejb.bean name="DeliverItems" * acknowledge-mode="Auto-acknowledge"
                           * destination-type="javax.jms.Queue" * subscription-durability="NonDurable" * transaction-type="Container"
                           *
                           :

                          Task 2 : Create an Immutable Value Object named DeliverItem.
                          : (as per the steps in Ref. 1)
                          Task 4 : Add class level tags for deployment

                          Task 5 : Deploy the DeliverItems Bean
                          - generate EJB classes
                          - fix deployment descriptions, i.e. "ejb-local-ref" and "ejb/"
                          - start JBoss with "Run Server" in "Lomboz J2EE View" menu.
                          - deploy beans
                          Note : An error on deployment might occur. It states;
                          00:08:26,344 ERROR [XmlFileLoader] failed to load jboss.xml. There could be a syntax error.
                          org.jboss.deployment.DeploymentException: Error in jboss.xml for Bean StoreAccess: ejb-local-ref ejb/StoreAccess found in jboss.xml but not in ejb-jar.xml

                          = If occured, comment out "ejb/StoreAccess" under "session" tag in jboss.xml
                          = re-deploy
                          :
                           <ejb-local-ref>
                           <ejb-ref-name>ejb/SupplierLocal</ejb-ref-name>
                           <jndi-name>SupplierLocal</jndi-name>
                           </ejb-local-ref>
                          <!--
                           <ejb-local-ref>
                           <ejb-ref-name>ejb/StoreAccess</ejb-ref-name>
                           <jndi-name>StoreAccessBean</jndi-name>
                           </ejb-local-ref>
                          -->
                           <resource-ref>
                           <res-ref-name>jdbc/DefaultDS</res-ref-name>
                           <jndi-name>java:/DefaultDS</jndi-name>
                           </resource-ref>
                          

                          Task 6 : Create a test client name DeliverMDBClient
                          : (as per the steps in Ref. 1)
                          Task 8 : Implement testMDBBean

                          Task 9 : Run the test client and test the bean
                          - Messages expected in the console are similar as RequestItemsBean, but they probably show an error as below.

                          "(javax.ejb.EJBException: Store failed; CausedByException is: ERROR: column "quantity" is of type integer but expression is of type character varying)"

                          :
                          22:44:08,517 INFO [STDOUT] Delivering items in store now... :
                          22:44:08,517 INFO [STDOUT] Entering ItemBean.fillStock() with quantity 100
                          22:44:08,517 INFO [STDOUT] Quantity of items after delivery of items 100
                          22:44:08,517 INFO [STDOUT] Leaving ItemBean.fillStock()
                          22:44:08,517 INFO [STDOUT] Entering ItemBean.getItemData()
                          22:44:08,517 INFO [STDOUT] Leaving ItemBean.getItemData()
                          22:44:08,517 INFO [STDOUT] Stock of item after delivery is :{itemID=I4 supplierID=S1 description=CLOCK quantity=100 price=65.0}
                          22:44:08,517 INFO [STDOUT] Entering DeliverItemsBean.onMessage()
                          22:44:08,533 ERROR [StdServerSession] failed to commit/rollback
                          org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=EX-3000/192, BranchQual=, localId=192] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Store failed; CausedByException is:
                           ERROR: column "quantity" is of type integer but expression is of type character varying)
                           at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:344)
                           at org.jboss.tm.TxManager.commit(TxManager.java:200)
                           :

                          - Modify "jbosscmp-jdbc.xml" under /MyStoreMgr/META-INF in order to avoid the error.
                          = comment out two tags as below.
                          Note : This is to be considered as a provisional measure only.
                          :
                           <cmp-field>
                           <field-name>quantity</field-name>
                           <column-name>QUANTITY</column-name>
                          <!--
                           <jdbc-type>VARCHAR</jdbc-type>
                           <sql-type>INTEGER</sql-type>
                          -->
                           </cmp-field>
                           :

                          - re-deploy beans and run the test client. Results are as follows;
                          Note : not necessary to re-generate classes.
                          Looking up the factory
                          Looking up the queue
                          Creating the connection
                          Creating the session
                          Creating the sender
                          Setting the object in message
                          Sending the message
                          Shuting down
                          Done !

                          or
                          23:30:27,553 INFO [STDOUT] Message Driven Bean got message org.jboss.mq.SpyObjectMessage {
                          Header {
                           jmsDestination : QUEUE.DelMdbQueue
                           jmsDeliveryMode : 2
                           jmsExpiration : 0
                           jmsPriority : 4
                           jmsMessageID : ID:31-11193642275381
                           jmsTimeStamp : 1119364227538
                           jmsCorrelationID: null
                           jmsReplyTo : null
                           jmsType : null
                           jmsRedelivered : false
                           jmsProperties : {}
                           jmsPropReadWrite: false
                           msgReadOnly : true
                           producerClientId: ID:31
                          }
                          }
                          23:30:27,553 INFO [STDOUT] Entering DeliverItemsBean.onMessage()
                          23:30:27,585 INFO [STDOUT] Entering StoreAccessBean.ejbCreate()
                          23:30:27,616 INFO [STDOUT] Leaving StoreAccessBean.ejbCreate()
                          23:30:27,632 INFO [STDOUT] Entering StoreAccessBean
                          23:30:27,632 INFO [STDOUT] Leaving StoreAccessBean
                          23:30:27,632 INFO [STDOUT] Entering StoreAccessDAOImpl.init()
                          23:30:27,647 INFO [STDOUT] Leaving StoreAccessDAOImpl.init()
                          23:30:27,647 INFO [STDOUT] Entering StoreAccessDAOImpl.loginUser()
                          23:30:27,647 INFO [STDOUT] Userid is U4
                          23:30:27,647 INFO [STDOUT] Leaving StoreAccessDAOImpl.loginUser()
                          23:30:27,647 INFO [STDOUT] Login is sucessful with U4
                          23:30:27,647 INFO [STDOUT] Entering StoreAccessBean.getSupplierData()
                          23:30:27,663 INFO [STDOUT] Entering SupplierBean.getSupplierData()
                          23:30:27,663 INFO [STDOUT] Leaving SupplierBean.getSupplierData()
                          23:30:27,663 INFO [STDOUT] Leaving StoreAccessBean.getSupplierData()
                          23:30:27,678 INFO [STDOUT] Delivering items in store now... :
                          23:30:27,678 INFO [STDOUT] Entering ItemBean.fillStock() with quantity 100
                          23:30:27,678 INFO [STDOUT] Quantity of items after delivery of items 100
                          23:30:27,678 INFO [STDOUT] Leaving ItemBean.fillStock()
                          23:30:27,678 INFO [STDOUT] Entering ItemBean.getItemData()
                          23:30:27,678 INFO [STDOUT] Leaving ItemBean.getItemData()
                          23:30:27,678 INFO [STDOUT] Stock of item after delivery is :{itemID=I4 supplierID=S1 description=CLOCK quantity=100 price=65.0}
                          23:30:27,678 INFO [STDOUT] Entering DeliverItemsBean.onMessage()

                          Also, the results can be checked in the database table using "pgAdmin III".
                          = select * from item

                          ==> "I4";"S1";"CLOCK";100;65.00


                          jbosszone



                          • 10. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
                            jbosszone


                            Post Subject : Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.x and PostgreSQL-8.x on Windows XP

                            Ref. 1 : Tutorial for building J2EE Applications using JBOSS and ECLIPSE
                            http://www.tusc.com.au/tutorial/html/chap8.html (Chapter 8 : Web Clients - Servlet & JSP)

                            Ref. 2 : Tutorial on J2EE using JBOSS, ECLIPSE and Lomboz (Forum on Ref. 1)
                            http://www.jboss.org/index.html?module=bb&op=viewtopic&t=36910

                            Ref. 3 : Environment in use ;
                            - Windows XP SP2
                            - J2SDK 1.4.2_08
                            - Eclipse 3.0.2
                            - JBoss 4.0.2
                            - Lomboz 3.0.1 + emf-sdo-runtime-2.0.0
                            - PostgreSQL 8.0.3 (= DefaultDS)

                            Followings are some notes on Chapter 8 (Servlet & JSP) in Ref. 1

                            * The notes cover creations of a Servlet named AccessController and a JSP named showItems.
                            * Task numbers are based on Ref. 1
                            * No change has been made to the server definition file (jboss402postgres.server) thus far.

                            Task 1 : Create AccessController Servlet
                            - on completion of AccessController, "super.init(config);" is added in "init()" method. No need to hide it.

                            public void init(ServletConfig config) throws ServletException {
                             super.init(config);
                             //TODO Method stub generated by Lomboz
                            }

                            - in "web.xml", DTD is not shown at the top.
                            - it seems the file without dtd works normally. If any trouble, add DTD like below and see;
                            <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
                             "http://java.sun.com/dtd/web-app_2_3.dtd">

                            Task 2 : Add a business method to StoreAccess Bean named getAllItems()
                            : (as per the steps in Ref. 1)
                            Task 6 : Implement the processRequest method

                            Task 7 : Deploy the AccessController Servlet
                            - on completion of deployment, following message is shown in the console.
                            :
                            21:55:39,015 INFO [TomcatDeployer] deploy, ctxPath=/OnlineStore, warUrl=file:/C:/jboss-4.0.2/server/postgres/tmp/deploy/tmp41196OnlineStore-exp.war/

                            Task 8 : Test the AccessController Servlet
                            (as per the steps in Ref. 1)

                            Task 9 : Create a JSP named showItems
                            : (as per the steps in Ref. 1)
                            Task 13 : Test the showItems.jsp page


                            === Correction ===
                            - At the end of JBoss startup every time, an error message followed by others on MBeans are shown as below.
                            - It seems there is no influence on the functions of beans up to this point, i.e. end of Chapter 8.
                            :
                            23:57:42,218 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/C:/jboss-4.0.2/server/postgres/deploy/jmx-console.war/23:57:42,468 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
                            --- MBeans waiting for other MBeans ---
                            ObjectName: jboss.jca:name=JmsXA,service=TxCM
                             State: CONFIGURED
                             I Depend On:
                             jboss.jca:name=JmsXA,service=ManagedConnectionPool
                             jboss.jca:service=CachedConnectionManager
                             :
                             :
                            ObjectName: jboss.jca:name=JmsXA,service=ManagedConnectionFactory
                             State: CONFIGURED
                             I Depend On: jboss.jca:name='jms-ra.rar',service=RARDeployment Depends On Me:
                             jboss.jca:name=JmsXA,service=ManagedConnectionPool
                            
                            ObjectName: jboss.jca:name=JmsXA,service=ConnectionFactoryBinding
                             State: CONFIGURED
                             I Depend On:
                             jboss.jca:name=JmsXA,service=TxCM
                            
                            --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---ObjectName: jboss.jca:name='jms-ra.rar',service=RARDeployment State: NOTYETINSTALLED
                             Depends On Me:
                             jboss.jca:name=JmsXA,service=ManagedConnectionFactory
                            
                            
                            23:57:42,609 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
                            23:57:42,718 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
                            23:57:42,734 INFO [JkMain] Jk running ID=0 time=0/63 config=null
                            23:57:42,765 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 24s:437ms
                             :

                            - The messages can be eliminated with following corrections.
                            = remove ".bak" from "/jboss-4.0.2/server/postgres/deploy/jms.bak" to activate the "jms" folder. (ref. Step 11 in the first post of this thread)
                            = put ".bak" to hajndi-jms-ds.xml under "/postgres/deploy/jms" to disable.
                            - "jms-ra.rar" is only one active file in "/postgres/deploy/jms" folder as a result.


                            jbosszone



                            • 11. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
                              jbosszone


                              Post Subject : Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.x and PostgreSQL-8.x on Windows XP

                              Ref. 1 : Tutorial for building J2EE Applications using JBOSS and ECLIPSE
                              http://www.tusc.com.au/tutorial/html/chap9.html (Chapter 9 : Web Services (1/2))

                              Ref. 2 : Tutorial on J2EE using JBOSS, ECLIPSE and Lomboz (Forum on Ref. 1)
                              http://www.jboss.org/index.html?module=bb&op=viewtopic&t=36910

                              === Environment in use ;
                              - Windows XP SP2
                              - J2SDK 1.4.2_08
                              - Eclipse 3.0.2
                              - JBoss 4.0.2
                              - Lomboz 3.0.1 + emf-sdo-runtime-2.0.0
                              - PostgreSQL 8.0.3 (= DefaultDS)
                              - AXIS 1.2.1

                              Followings are some notes on Chapter 9 (Web Services (1/2)) in Ref. 1

                              * Task numbers below are based on the appearance order of tasks since the numbers are not shown in Ref. 1.

                              Task 1 : Installing AXIS
                              Task 2 : Configuring AXIS with JBoss
                              Task 3 : Create a Web Service named "MyStoreLoginService"
                              Task 4 : Deploy the Web Service
                              Task 5 : Create a Web Service Test Client named "TestClient"
                              Task 6 : Test the TestClient

                              Task 7 : Create a Web Client (Servlet named "Login")
                              Task 8 : Test the Web Client
                              Task 9 : Create a .NET Client
                              Task 10 : Test the .NET Client
                              Task 11 : Create a Perl Client
                              Task 12 : Test the Perl Client

                              * The notes in this post cover the 1st half of Chapter 9, i.e. Task 1 - 6 only.
                              * No change has been made to the server definition file (jboss402postgres.server) thus far.

                              Task 1 : Installing AXIS
                              - download "axis-bin-1_2_1.zip"
                              http://ws.apache.org/axis/
                              - make a new folder named "axis" under "C:\"
                              - unzip under "C:\axis"

                              Task 2 : Configuring AXIS with JBoss
                              - make a new folder "webapps" under "C:\jboss-4.0.2\server\postgres\deploy"
                              - copy "axis" folder under "C:\axis\axis-1_2_1\webapps" to "C:\jboss-4.0.2\server\postgres\deploy\webapps"
                              ==> "C:\jboss-4.0.2\server\postgres\deploy\webapps\axis" as a result.

                              - rename "axis" under "\server\postgres\deploy\webapps" to "axis.war"
                              ==> "C:\jboss-4.0.2\server\postgres\deploy\webapps\axis.war" as a result.

                              - set Windows environment variables as follows;

                              AXIS_HOME C:\axis\axis-1_2_1
                              AXIS_LIB C:\axis\axis-1_2_1\lib
                              AXISCLASSPATH (see below)
                              .;
                              %AXIS_LIB%\axis.jar;
                              %AXIS_LIB%\commons-discovery-0.2.jar;
                              %AXIS_LIB%\commons-logging-1.0.4.jar;
                              %AXIS_LIB%\jaxrpc.jar;
                              %AXIS_LIB%\log4j-1.2.8.jar;
                              %AXIS_LIB%\saaj.jar;
                              %AXIS_LIB%\wsdl4j-1.5.1.jar
                              
                              Note : The values for "AXISCLASSPATH" should be in one line.


                              - start Eclipse and JBoss.
                              - go to each URL shown in Ref. 1 to test the configuration, i.e.;

                              http://127.0.0.1:8080/axis
                              http://127.0.0.1:8080/axis/services/AdminService?wsdl
                              http://127.0.0.1:8080/axis/servlet/AxisServlet
                              and
                              http://127.0.0.1:8080/axis/services/Version?method=getVersion

                              = the result of "getVersion" is;
                              <?xml version="1.0" encoding="UTF-8" ?>
                              - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                              - <soapenv:Body>
                              - <getVersionResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
                               <getVersionReturn xsi:type="xsd:string">Apache Axis version: 1.2.1 Built on Jun 14, 2005 (09:15:57 EDT)</getVersionReturn>
                               </getVersionResponse>
                               </soapenv:Body>
                               </soapenv:Envelope>

                              - re-boot Windows XP.

                              Task 3 : Create a Web Service named "MyStoreLoginService"
                              - create "deploy.wsdd" under "au.com.tusc.WebService"
                              = a part of the original descriptions has been revised as follows.
                              <?xml version="1.0" encoding="UTF-8"?>
                              <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
                               <service name="MyStoreLoginService" provider="java:EJB">
                              
                              <!-- original - ->
                               <parameter name="beanJndiName" value="StoreAccessLocal"/>
                               <parameter name="homeInterfaceName" value="au.com.tusc.session.StoreAccessLocalHome"/>
                               <parameter name="remoteInterfaceName" value="au.com.tusc.session.StoreAccessLocal"/>
                              <!- - -->
                              <!-- revised -->
                               <parameter name="beanJndiName" value="StoreAccessBean"/>
                               <parameter name="homeInterfaceName" value="au.com.tusc.session.StoreAccessHome"/>
                               <parameter name="remoteInterfaceName" value="au.com.tusc.session.StoreAccess"/>
                              <!-- -->
                               <parameter name="allowedMethods" value="loginUser"/>
                               <parameter name="jndiURL" value="jnp://localhost:1099"/>
                               <parameter name="jndiContextClass" value="org.jnp.interfaces.NamingContextFactory"/>
                               </service>
                              </deployment>

                              Task 4 : Deploy the Web Service
                              - deploy the WSDD in the command console using;
                              java org.apache.axis.client.AdminClient deploy.wsdd

                              = if error/failure, try following;
                              java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient deploy.wsdd

                              - on completion of the deployment, go to http://127.0.0.1:8080/axis/servlet/AxisServlet
                              - click "(wsdl)" of "MyStoreLoginService"
                              (http://localhost:8080/axis/services/MyStoreLoginService?wsdl)
                              <?xml version="1.0" encoding="UTF-8" ?>
                              - <wsdl:definitions targetNamespace="http://127.0.0.1:8080/axis/services/MyStoreLoginService"
                               xmlns:apachesoap="http://xml.apache.org/xml-soap"
                               xmlns:impl="http://127.0.0.1:8080/axis/services/MyStoreLoginService"
                               xmlns:intf="http://127.0.0.1:8080/axis/services/MyStoreLoginService"
                               xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                               xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                               xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
                               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                              - <!--
                              Apache Axis version: 1.2.1
                              Built on Jun 14, 2005 (09:15:57 EDT) / [en]-(WSDL created by Apache Axis version: 1.2.1
                              Built on Jun 14, 2005 (09:15:57 EDT))
                              
                               -->
                              - <wsdl:message name="loginUserRequest">
                               <wsdl:part name="in0" type="soapenc:string" />
                               <wsdl:part name="in1" type="soapenc:string" />
                               </wsdl:message>
                              - <wsdl:message name="loginUserResponse">
                               <wsdl:part name="loginUserReturn" type="soapenc:string" />
                               </wsdl:message>
                              - <wsdl:portType name="StoreAccess">
                              - <wsdl:operation name="loginUser" parameterOrder="in0 in1">
                               <wsdl:input message="impl:loginUserRequest" name="loginUserRequest" />
                               <wsdl:output message="impl:loginUserResponse" name="loginUserResponse" />
                               </wsdl:operation>
                               </wsdl:portType>
                              - <wsdl:binding name="MyStoreLoginServiceSoapBinding" type="impl:StoreAccess">
                               <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
                              - <wsdl:operation name="loginUser">
                               <wsdlsoap:operation soapAction="" />
                              - <wsdl:input name="loginUserRequest">
                               <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://session.tusc.com.au" use="encoded" />
                               </wsdl:input>
                              - <wsdl:output name="loginUserResponse">
                               <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                               namespace="http://127.0.0.1:8080/axis/services/MyStoreLoginService" use="encoded" />
                               </wsdl:output>
                               </wsdl:operation>
                               </wsdl:binding>
                              - <wsdl:service name="StoreAccessService">
                              - <wsdl:port binding="impl:MyStoreLoginServiceSoapBinding" name="MyStoreLoginService">
                               <wsdlsoap:address location="http://127.0.0.1:8080/axis/services/MyStoreLoginService" />
                               </wsdl:port>
                               </wsdl:service>
                               </wsdl:definitions>

                              - save the wsdl as "MyStoreLoginService.wsdl" under "au.com.tusc.WebService"

                              Task 5 : Create a Web Service test client named "TestClient"
                              - add external jars (C:\axis\axis-1_2_1\lib) into the libraries as per the steps in Ref. 1

                              axis.jar
                              commons-discovery-0.2.jar
                              commons-logging-1.0.4.jar
                              jaxrpc.jar
                              log4j-1.2.8.jar
                              saaj.jar
                              wsdl4j-1.5.1.jar

                              - generate SOAP clients
                              = select "1.2" as the "Type version" in the wizard.
                              = as "deploy.wsdd" has been modified, the file names generated in "au.com.tusc.WebService" are different from Ref. 1
                              - add a new file named "TestClient.java" as per steps in Ref. 1

                              Task 6 : Test the TestClient
                              - remove AXIS 1.1 jar files in the Java Build Path Libraries before testing
                              = right click "MyStorePgSQL" in the Project Explorer of Eclipse, go to Properties/Java Build Path/Libraries.
                              = remove following jar files in the libraries, which are from AXIS ver.1.1

                              AXIS/axis.jar - /c:\eclipse\plugins\org.apache.axis_1.1.0\axis.jar
                              AXIS/jaxrpc.jar - /c:\eclipse\plugins\org.apache.axis_1.1.0\jaxrpc.jar
                              AXIS/saaj.jar - /c:\eclipse\plugins\org.apache.axis_1.1.0\saaj.jar
                              AXIS/wsdl4j.jar - /c:\eclipse\plugins\org.apache.axis_1.1.0\wsdl4j.jar

                              - run "TestClient"
                              ==> USERID recvd is : U2


                              jbosszone



                              • 12. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
                                jbosszone


                                Post Subject : Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.x and PostgreSQL-8.x on Windows XP

                                Ref. 1 : Tutorial for building J2EE Applications using JBOSS and ECLIPSE
                                http://www.tusc.com.au/tutorial/html/chap9.html (Chapter 9 : Web Services (2/2))

                                Ref. 2 : Tutorial on J2EE using JBOSS, ECLIPSE and Lomboz (Forum on Ref. 1)
                                http://www.jboss.org/index.html?module=bb&op=viewtopic&t=36910

                                === Environment in use ;
                                - Windows XP SP2
                                - J2SDK 1.4.2_08
                                - Eclipse 3.0.2
                                - JBoss 4.0.2
                                - Lomboz 3.0.1 + emf-sdo-runtime-2.0.0
                                - PostgreSQL 8.0.3 (= DefaultDS)
                                - AXIS 1.2.1

                                Followings are some notes on Chapter 9 (Web Services (2/2)) in Ref. 1

                                * Task numbers are as below.

                                Task 1 : Installing AXIS
                                Task 2 : Configuring AXIS with JBoss
                                Task 3 : Create a Web Service named "MyStoreLoginService"
                                Task 4 : Deploy the Web Service
                                Task 5 : Create a Web Service Test Client named "TestClient"
                                Task 6 : Test the TestClient

                                Task 7 : Create a Web Client (Servlet named "Login")
                                Task 8 : Test the Web Client
                                Task 9 : Create a .NET Client named "DOTNETCLIENT" (using C#.Net)
                                Task 10 : Test the .NET Client


                                Task 11 : Create a Perl Client
                                Task 12 : Test the Perl Client

                                * The notes below cover the Task 7 - 10 only.
                                * No change has been made to the server definition file (jboss402postgres.server) thus far.

                                Task 7 : Create a Web Client (a Servlet named "Login")
                                (as per the steps in Ref. 1)
                                Note : switch "import" sections based on a selected "callWebService()" method, e.g.

                                :import org.apache.axis.client.Call;
                                /*
                                // === activate for the 1st "callWebService()" methodimport java.net.URL;*/
                                
                                // === activate for the 2nd "callWebService()" methodimport javax.xml.namespace.QName;
                                 import org.apache.axis.client.Service;
                                public class Login extends HttpServlet {
                                 :
                                 :
                                /*
                                // === the 1st "callWebService()" method
                                private String callWebService() throws Exception {
                                
                                // URL is used for creating the call, which uses the WSDL.
                                 Call call = new Call( new URL("http://localhost:8080/axis/services/MyStoreLoginService?wsdl") );
                                
                                // Calls the object, passing in the username and passwd. The return value is stored as an object.
                                 String username = (String) call.invoke ("loginUser", new Object[] { new String("ANDY") , new String("PASSWD") } );
                                 return username;
                                 }
                                */
                                
                                // === the 2nd "callWebService()" method
                                private String callWebService() throws Exception {
                                
                                 // Endpoint is used for making the call
                                 String endpoint = "http://localhost:8080/axis/services/MyStoreLoginService";
                                
                                 // The Service object is the starting point for accessing the web service.
                                 Service service = new Service();
                                
                                 // The call object is used to actually invoke the web service.
                                 Call call = (Call)service.createCall();
                                
                                 // Sets the call objects endpoint address
                                 call.setTargetEndpointAddress(endpoint);
                                
                                 // Sets the operation name associated with this Call object.
                                 call.setOperationName(new QName("loginUser"));
                                
                                 // Calls the object, passing in the username and passwd. The return value is stored as an object.
                                 Object returnValue = call.invoke(new Object[] { new String("ANDY") , new String("PASSWD") });
                                 return (String) returnValue;
                                
                                 }
                                }

                                - start JBoss and deploy the web module ("Lomboz J2EE View" tag, "OnlineStore" (right click) and "deploy").

                                Task 8 : Test the Web Client
                                - go to "http://localhost:8080/OnlineStore/login" for test.
                                = an error might occur as below;
                                :
                                00:16:57,625 INFO [STDOUT] Entering Login.init()
                                00:16:57,625 INFO [STDOUT] Leaving Login.init()
                                00:16:57,640 INFO [STDOUT] Entering Login.processRequest()
                                00:16:57,640 ERROR [[login]] Servlet.service() for servlet login threw exceptionjava.lang.NoClassDefFoundError: org/apache/axis/client/Service at au.com.tusc.WebService.Login.callWebService(Login.java:107)
                                 at au.com.tusc.WebService.Login.processRequest(Login.java:77)
                                 :

                                = if error, undeploy "OnlineStore" or delete "OnlineStore.war" file from "/server/postgres/deploy" folder.
                                = then, copy and paste all files under "C:\axis\axis-1_2_1\lib" to "MyStorePgSQL/OnlineStore(WEB)/WEB-INF/lib" in Eclipse Package Explorer.

                                axis.jar
                                axis-ant.jar
                                commons-discovery-0.2.jar
                                commons-logging-1.0.4.jar
                                jaxrpc.jar
                                log4j-1.2.8.jar
                                log4j.properties
                                saaj.jar
                                wsdl4j-1.5.1.jar

                                = re-deploy and go to the URL.

                                Task 9 : Create a .NET Client named "DOTNETCLIENT"
                                - a platform used is C#.Net instead of VB.Net in Ref. 1.
                                - "add following URL of the Web Service" (as a test)
                                http://localhost:8080/axis/services/MyStoreLoginService?wsdl

                                - "btnGetID_Click()" is;
                                :
                                private void btnGetID_Click(object sender, System.EventArgs e)
                                 {
                                 // string strResult;
                                 localhost.StoreAccessService objWebRef = new localhost.StoreAccessService();
                                
                                 // Call loginuser function and display the result ID to the lblOutput control
                                 lblOutput.Text = objWebRef.loginUser(TextBoxName.Text, TextBoxPassword.Text);
                                 }
                                 :

                                Task 10 : Test the .NET Client
                                (as per the steps in Ref. 1)


                                jbosszone


                                • 13. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
                                  tumitoto

                                  I am trying to complete chapter 9: web services (1/2). After I did the deploy.wsdd (Task 4). I went to the AxisServlet but I am getting:
                                  Exception - org.apache.axis.ConfigurationException: org.apache.axis.deployment.wsdd.WSDDException: No provider type matches QName '{http://xml.apache.org/axis/wsdd/providers/java}EJB'
                                  org.apache.axis.deployment.wsdd.WSDDException: No provider type matches QName '{http://xml.apache.org/axis/wsdd/providers/java}EJB'
                                  at org.apache.axis.deployment.wsdd.WSDDProvider.getInstance(WSDDProvider.java:206)
                                  at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:493)
                                  at org.apache.axis.deployment.wsdd.WSDDDeployment.getDeployedServices(WSDDDeployment.java:619)
                                  at org.apache.axis.configuration.FileProvider.getDeployedServices(FileProvider.java:358)
                                  ...
                                  Any comments on what I did wrong? Thanks in advance.

                                  • 14. Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
                                    jbosszone

                                    Dear tumitoto,

                                    There might be some helpful info in the results of Google search with
                                    "org.apache.axis.deployment.wsdd.WSDDException: No provider type matches QName".

                                    e.g.;
                                    http://issues.apache.org/jira/browse/AXIS-1760?page=comments#action_58265


                                    jbosszone

                                    1 2 Previous Next