[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
Ok jbosszone, I thought I posted a reply to my own message. I guess it got messed up somehow. Anyway, after I remove the ws4e then everything went well, looks like there is some conflicts or something. I enjoy your tutorials, they are real nice, to the point and concise. Great job and thanks!! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3888510#3888510 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3888510 --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3886819#3886819 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3886819 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3886676#3886676 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3886676 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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.StoreAccessServ
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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; | - http://schemas.xmlsoap.org/soap/envelope/"; | xmlns:xsd="http://www.w3.org/2001/XMLSchema"; | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> | - | - http://schemas.xmlsoap.org/soap/encoding/";> | Apache Axis version: 1.2.1 Built on Jun 14, 2005 (09:15:57 EDT) | | | - 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. | http://xml.apache.org/axis/wsdd/"; xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";> | | | | | | | | | | | | | 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) | - 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";> | - | - | | | | - | | | - | - | | | | | - | http://schemas.xmlsoap.org/soap/http"; /> | - | | - | http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://session.tusc.com.au"; use="encoded" /> | | - | http://schemas.xmlsoap.org/soap/encoding/"; | name
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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; 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 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882611#3882611 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882611 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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; : | * * @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/SupplierLocal | SupplierLocal | | | | jdbc/DefaultDS | java:/DefaultDS | | 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. : | | quantity | QUANTITY | | |: - 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 |msgReadOnl
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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; : | * * @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 | Finishedbut, 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
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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 under "session"; = ejb/CustomerLocal = ejb/ManagerLocal = ejb/ItemLocal - In jboss.xml, change all and tags under "session" to and 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 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881199#3881199 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881199 --- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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 { | | // /** | // * | // * | // * The ejbCreate method. | // * | // * | // * | // * @ejb.create-method | // * | // * @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 | // } | // | // /** | // * | // * The container invokes this method immediately after it calls ejbCreate. | // * | // * | // * @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 section. If no "fileset" for CustomerBean.java, make it as follows; : | | | | | | |: 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 tag under "session" in jboss.xml to as shown in Ref. 1. = add "ejb/" to CustomerLocal in tag under "session" in ejb-jar.xml as follows; : | ejb/CustomerLocal Entity | au.com.tusc.bmp.CustomerLocalHome | au.com.tusc.bmp.CustomerLocal | Customer | |: - 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. /** | * | * A generated session bean * | | | http://java.sun.com/xml/ns/j2ee"; xmlns:lomboz="http://lomboz.objectlearn.com/xml/lomboz";> | | | StoreAccess | StoreAccess | au.com.tusc.session.StoreAccessBean | Stateless | Container | | | | | * | * | * @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" | * | * | * @generated | * | */ - CustomerBean.java Note : The lomboz sections are generated automatically. /** | * | * You can insert your documentation for 'CustomerBean'. * | | | http://java.sun.com/xml/ns/j2ee"; xmlns:lomboz="htt
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879006#3879006 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879006 --- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - 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). View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878817#3878817 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3878817 --- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - Re: Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.
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. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878815#3878815 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3878815 --- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - 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. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878814#3878814 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3878814 --- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - 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. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878124#3878124 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3878124 --- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user