[Installation, Configuration & DEPLOYMENT] - Re: Change DefaultDS
by abdujaparov
Hi,
I inserted this mysql-ds.xml:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!-- $Id: mysql-ds.xml 41017 2006-02-07 14:26:14Z acoliver $ -->
| <!-- Datasource config for MySQL using 3.0.9 available from:
| http://www.mysql.com/downloads/api-jdbc-stable.html
| -->
|
| <datasources>
| <local-tx-datasource>
| <jndi-name>DefaultDS</jndi-name>
| <connection-url>jdbc:mysql://server.xubuntu:3306/test</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>angelo</user-name>
| <password>palermo</password>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
| <!-- should only be used on drivers after 3.22.1 with "ping" support-->
| <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
|
| <!-- sql to call when connection is created
| <new-connection-sql>some arbitrary sql</new-connection-sql>
| -->
|
| <security-domain>mySQLDbRealm</security-domain>
| <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
| <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
| -->
|
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
|
and I inserted this mysql-persistence-service.xml:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!--
| MySql persistence deployment descriptor.
|
| Tested with MySQL 5.0.27
|
| $Id$
| -->
|
| <server>
|
| <!-- Persistence Manager MBean configuration
| ======================================== -->
|
| <mbean code="org.jboss.messaging.core.jmx.JDBCPersistenceManagerService"
| name="jboss.messaging:service=PersistenceManager"
| xmbean-dd="xmdesc/JDBCPersistenceManager-xmbean.xml">
|
| <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
|
| <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
|
| <!-- The datasource to use for the persistence manager -->
|
| <attribute name="DataSource">java:/DefaultDS</attribute>
|
| <!-- If true will attempt to create tables and indexes on every start-up -->
|
| <attribute name="CreateTablesOnStartup">true</attribute>
|
| <!-- If true then we will automatically detect and reject duplicate messages sent during failover -->
|
| <attribute name="DetectDuplicates">true</attribute>
|
| <!-- The size of the id cache to use when detecting duplicate messages -->
|
| <attribute name="IDCacheSize">500</attribute>
|
| <attribute name="SqlProperties"><![CDATA[
| CREATE_DUAL=CREATE TABLE JBM_DUAL (DUMMY INTEGER, PRIMARY KEY (DUMMY)) ENGINE = INNODB
| CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (MESSAGE_ID BIGINT, CHANNEL_ID BIGINT, TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INTEGER, SCHED_DELIVERY BIGINT, PRIMARY KEY(MESSAGE_ID, CHANNEL_ID)) ENGINE = INNODB
| CREATE_IDX_MESSAGE_REF_TX=CREATE INDEX JBM_MSG_REF_TX ON JBM_MSG_REF (TRANSACTION_ID, STATE)
| CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY TINYINT, TYPE TINYINT, HEADERS MEDIUMBLOB, PAYLOAD LONGBLOB, PRIMARY KEY (MESSAGE_ID)) ENGINE = INNODB
| CREATE_TRANSACTION=CREATE TABLE JBM_TX (NODE_ID INTEGER, TRANSACTION_ID BIGINT, BRANCH_QUAL VARBINARY(254), FORMAT_ID INTEGER, GLOBAL_TXID VARBINARY(254), PRIMARY KEY (TRANSACTION_ID)) ENGINE = INNODB
| CREATE_COUNTER=CREATE TABLE JBM_COUNTER (NAME VARCHAR(255), NEXT_ID BIGINT, PRIMARY KEY(NAME)) ENGINE = INNODB
| CREATE_ID_CACHE=CREATE TABLE JBM_ID_CACHE (NODE_ID INTEGER, CNTR INTEGER, JBM_ID VARCHAR(255), PRIMARY KEY(NODE_ID, CNTR)) ENGINE = INNODB
| INSERT_DUAL=INSERT INTO JBM_DUAL VALUES (1)
| CHECK_DUAL=SELECT 1 FROM JBM_DUAL
| INSERT_MESSAGE_REF=INSERT INTO JBM_MSG_REF (CHANNEL_ID, MESSAGE_ID, TRANSACTION_ID, STATE, ORD, PAGE_ORD, DELIVERY_COUNT, SCHED_DELIVERY) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
| DELETE_MESSAGE_REF=DELETE FROM JBM_MSG_REF WHERE MESSAGE_ID=? AND CHANNEL_ID=? AND STATE='C'
| UPDATE_MESSAGE_REF=UPDATE JBM_MSG_REF SET TRANSACTION_ID=?, STATE='-' WHERE MESSAGE_ID=? AND CHANNEL_ID=? AND STATE='C'
| UPDATE_PAGE_ORDER=UPDATE JBM_MSG_REF SET PAGE_ORD = ? WHERE MESSAGE_ID=? AND CHANNEL_ID=?
| COMMIT_MESSAGE_REF1=UPDATE JBM_MSG_REF SET STATE='C', TRANSACTION_ID = NULL WHERE TRANSACTION_ID=? AND STATE='+'
| COMMIT_MESSAGE_REF2=DELETE FROM JBM_MSG_REF WHERE TRANSACTION_ID=? AND STATE='-'
| ROLLBACK_MESSAGE_REF1=DELETE FROM JBM_MSG_REF WHERE TRANSACTION_ID=? AND STATE='+'
| ROLLBACK_MESSAGE_REF2=UPDATE JBM_MSG_REF SET STATE='C', TRANSACTION_ID = NULL WHERE TRANSACTION_ID=? AND STATE='-'
| LOAD_PAGED_REFS=SELECT MESSAGE_ID, DELIVERY_COUNT, PAGE_ORD, SCHED_DELIVERY FROM JBM_MSG_REF WHERE CHANNEL_ID = ? AND PAGE_ORD BETWEEN ? AND ? ORDER BY PAGE_ORD
| LOAD_UNPAGED_REFS=SELECT MESSAGE_ID, DELIVERY_COUNT, SCHED_DELIVERY FROM JBM_MSG_REF WHERE STATE = 'C' AND CHANNEL_ID = ? AND PAGE_ORD IS NULL ORDER BY ORD
| LOAD_REFS=SELECT MESSAGE_ID, DELIVERY_COUNT, SCHED_DELIVERY FROM JBM_MSG_REF WHERE STATE = 'C' AND CHANNEL_ID = ? ORDER BY ORD
| UPDATE_REFS_NOT_PAGED=UPDATE JBM_MSG_REF SET PAGE_ORD = NULL WHERE PAGE_ORD BETWEEN ? AND ? AND CHANNEL_ID=?
| SELECT_MIN_MAX_PAGE_ORD=SELECT MIN(PAGE_ORD), MAX(PAGE_ORD) FROM JBM_MSG_REF WHERE CHANNEL_ID = ?
| UPDATE_DELIVERY_COUNT=UPDATE JBM_MSG_REF SET DELIVERY_COUNT = ? WHERE MESSAGE_ID = ? AND CHANNEL_ID = ?
| UPDATE_CHANNEL_ID=UPDATE JBM_MSG_REF SET CHANNEL_ID = ? WHERE CHANNEL_ID = ?
| MOVE_REFERENCE=UPDATE JBM_MSG_REF SET CHANNEL_ID = ? WHERE MESSAGE_ID = ? AND CHANNEL_ID = ?
| LOAD_MESSAGES=SELECT MESSAGE_ID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, HEADERS, PAYLOAD, TYPE FROM JBM_MSG
| INSERT_MESSAGE=INSERT INTO JBM_MSG (MESSAGE_ID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, TYPE, HEADERS, PAYLOAD) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
| INSERT_MESSAGE_CONDITIONAL=INSERT INTO JBM_MSG (MESSAGE_ID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, TYPE) SELECT ?, ?, ?, ?, ?, ? FROM JBM_DUAL WHERE NOT EXISTS (SELECT MESSAGE_ID FROM JBM_MSG WHERE MESSAGE_ID = ?)
| UPDATE_MESSAGE_4CONDITIONAL=UPDATE JBM_MSG SET HEADERS=?, PAYLOAD=? WHERE MESSAGE_ID=?
| INSERT_MESSAGE_CONDITIONAL_FULL=INSERT INTO JBM_MSG (MESSAGE_ID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, TYPE, HEADERS, PAYLOAD) SELECT ?, ?, ?, ?, ?, ?, ?, ? FROM JBM_DUAL WHERE NOT EXISTS (SELECT MESSAGE_ID FROM JBM_MSG WHERE MESSAGE_ID = ?)
| MESSAGE_ID_COLUMN=MESSAGE_ID
| DELETE_MESSAGE=DELETE FROM JBM_MSG WHERE MESSAGE_ID = ? AND NOT EXISTS (SELECT JBM_MSG_REF.MESSAGE_ID FROM JBM_MSG_REF WHERE JBM_MSG_REF.MESSAGE_ID = ?)
| INSERT_TRANSACTION=INSERT INTO JBM_TX (NODE_ID, TRANSACTION_ID, BRANCH_QUAL, FORMAT_ID, GLOBAL_TXID) VALUES(?, ?, ?, ?, ?)
| DELETE_TRANSACTION=DELETE FROM JBM_TX WHERE NODE_ID = ? AND TRANSACTION_ID = ?
| SELECT_PREPARED_TRANSACTIONS=SELECT TRANSACTION_ID, BRANCH_QUAL, FORMAT_ID, GLOBAL_TXID FROM JBM_TX WHERE NODE_ID = ?
| SELECT_MESSAGE_ID_FOR_REF=SELECT MESSAGE_ID, CHANNEL_ID FROM JBM_MSG_REF WHERE TRANSACTION_ID = ? AND STATE = '+' ORDER BY ORD
| SELECT_MESSAGE_ID_FOR_ACK=SELECT MESSAGE_ID, CHANNEL_ID FROM JBM_MSG_REF WHERE TRANSACTION_ID = ? AND STATE = '-' ORDER BY ORD
| UPDATE_COUNTER=UPDATE JBM_COUNTER SET NEXT_ID = ? WHERE NAME=?
| SELECT_COUNTER=SELECT NEXT_ID FROM JBM_COUNTER WHERE NAME=? FOR UPDATE
| INSERT_COUNTER=INSERT INTO JBM_COUNTER (NAME, NEXT_ID) VALUES (?, ?)
| SELECT_ALL_CHANNELS=SELECT DISTINCT(CHANNEL_ID) FROM JBM_MSG_REF
| UPDATE_TX=UPDATE JBM_TX SET NODE_ID=? WHERE NODE_ID=?
| UPDATE_ID_IN_CACHE=UPDATE JBM_ID_CACHE SET JBM_ID = ? WHERE NODE_ID = ? AND CNTR = ?
| INSERT_ID_IN_CACHE=INSERT INTO JBM_ID_CACHE (NODE_ID, CNTR, JBM_ID) VALUES (?, ?, ?)
| LOAD_ID_CACHE=SELECT CNTR, JBM_ID FROM JBM_ID_CACHE WHERE NODE_ID = ?
| ]]></attribute>
|
| <!-- The maximum number of parameters to include in a prepared statement -->
|
| <attribute name="MaxParams">500</attribute>
|
| </mbean>
|
| <!-- Messaging Post Office MBean configuration
| ========================================= -->
|
| <mbean code="org.jboss.messaging.core.jmx.MessagingPostOfficeService"
| name="jboss.messaging:service=PostOffice"
| xmbean-dd="xmdesc/MessagingPostOffice-xmbean.xml">
|
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
|
| <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
|
| <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
|
| <!-- The name of the post office -->
|
| <attribute name="PostOfficeName">JMS post office</attribute>
|
| <!-- The datasource used by the post office to access it's binding information -->
|
| <attribute name="DataSource">java:/DefaultDS</attribute>
|
| <!-- If true will attempt to create tables and indexes on every start-up -->
|
| <attribute name="CreateTablesOnStartup">true</attribute>
|
| <attribute name="SqlProperties"><![CDATA[
| CREATE_POSTOFFICE_TABLE=CREATE TABLE JBM_POSTOFFICE (POSTOFFICE_NAME VARCHAR(255), NODE_ID INTEGER, QUEUE_NAME VARCHAR(255), COND VARCHAR(1023), SELECTOR VARCHAR(1023), CHANNEL_ID BIGINT, CLUSTERED CHAR(1), ALL_NODES CHAR(1), PRIMARY KEY(POSTOFFICE_NAME, NODE_ID, QUEUE_NAME)) ENGINE = INNODB
| INSERT_BINDING=INSERT INTO JBM_POSTOFFICE (POSTOFFICE_NAME, NODE_ID, QUEUE_NAME, COND, SELECTOR, CHANNEL_ID, CLUSTERED, ALL_NODES) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
| DELETE_BINDING=DELETE FROM JBM_POSTOFFICE WHERE POSTOFFICE_NAME=? AND NODE_ID=? AND QUEUE_NAME=?
| LOAD_BINDINGS=SELECT QUEUE_NAME, COND, SELECTOR, CHANNEL_ID, CLUSTERED, ALL_NODES FROM JBM_POSTOFFICE WHERE POSTOFFICE_NAME=? AND NODE_ID=?
| ]]></attribute>
|
| <!-- This post office is non clustered. If you want a clustered post office then set to true -->
|
| <attribute name="Clustered">false</attribute>
|
| <!-- All the remaining properties only have to be specified if the post office is clustered.
| You can safely comment them out if your post office is non clustered -->
|
| <!-- The JGroups group name that the post office will use -->
|
| <attribute name="GroupName">${jboss.messaging.groupname:MessagingPostOffice}</attribute>
|
| <!-- Max time to wait for state to arrive when the post office joins the cluster -->
|
| <attribute name="StateTimeout">30000</attribute>
|
| <!-- Max time to wait for a synchronous call to node members using the MessageDispatcher -->
|
| <attribute name="CastTimeout">30000</attribute>
|
| <!-- Set this to true if you want failover of connections to occur when a node is shut down -->
|
| <attribute name="FailoverOnNodeLeave">false</attribute>
|
| <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
| <attribute name="ControlChannelName">jbm-control</attribute>
| <attribute name="DataChannelName">jbm-data</attribute>
| <attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
| </mbean>
|
| <!-- Messaging JMS User Manager MBean config
| ======================================= -->
|
| <mbean code="org.jboss.jms.server.plugin.JDBCJMSUserManagerService"
| name="jboss.messaging:service=JMSUserManager"
| xmbean-dd="xmdesc/JMSUserManager-xmbean.xml">
| <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
| <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
| <attribute name="DataSource">java:/DefaultDS</attribute>
| <attribute name="CreateTablesOnStartup">true</attribute>
| <attribute name="SqlProperties"><![CDATA[
| CREATE_USER_TABLE=CREATE TABLE JBM_USER (USER_ID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, CLIENTID VARCHAR(128), PRIMARY KEY(USER_ID)) ENGINE = INNODB
| CREATE_ROLE_TABLE=CREATE TABLE JBM_ROLE (ROLE_ID VARCHAR(32) NOT NULL, USER_ID VARCHAR(32) NOT NULL, PRIMARY KEY(USER_ID, ROLE_ID)) ENGINE = INNODB
| SELECT_PRECONF_CLIENTID=SELECT CLIENTID FROM JBM_USER WHERE USER_ID=?
| POPULATE.TABLES.1 = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('guest', 'guest')
| POPULATE.TABLES.2 = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('j2ee', 'j2ee')
| POPULATE.TABLES.3 = INSERT INTO JBM_USER (USER_ID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')
| POPULATE.TABLES.4 = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('nobody', 'nobody')
| POPULATE.TABLES.5 = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('dynsub', 'dynsub')
| POPULATE.TABLES.6 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('guest','guest')
| POPULATE.TABLES.7 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('j2ee','guest')
| POPULATE.TABLES.8 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('john','guest')
| POPULATE.TABLES.9 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('subscriber','john')
| POPULATE.TABLES.10 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('publisher','john')
| POPULATE.TABLES.11 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('publisher','dynsub')
| POPULATE.TABLES.12 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('durpublisher','john')
| POPULATE.TABLES.13 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('durpublisher','dynsub')
| POPULATE.TABLES.14 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('noacc','nobody')
| ]]></attribute>
| </mbean>
|
| </server>
|
I removed hsqldb-ds.xml and hsqldb-persistence-service.xml but I continue to receive errors:
| 21:29:32,937 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of
| incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
|
| DEPLOYMENTS MISSING DEPENDENCIES:
| Deployment "jboss.jca:name=JmsXA,service=ConnectionFactoryBinding" is missing
| the following dependencies:
| Dependency "jboss.jca:name=JmsXA,service=TxCM" (should be in state "Create",
| but is actually in state "Configured")
| Deployment "jboss.jca:name=JmsXA,service=ManagedConnectionFactory" is missing
| the following dependencies:
| Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create"
| , but is actually in state "Configured")
| Deployment "jboss.jca:name=JmsXA,service=ManagedConnectionPool" is missing the
| following dependencies:
| Dependency "jboss.jca:name=JmsXA,service=ManagedConnectionFactory" (should b
| e in state "Create", but is actually in state "Configured")
| Deployment "jboss.jca:name=JmsXA,service=TxCM" is missing the following depend
| encies:
| Dependency "jboss.jca:name=JmsXA,service=ManagedConnectionPool" (should be i
| n state "Create", but is actually in state "Configured")
| Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFac
| tory" is missing the following dependencies:
| Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create"
| , but is actually in state "Configured")
| Dependency "jboss.messaging:service=PostOffice" (should be in state "Create"
| , but is actually in state "Configured")
| Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFacto
| ry" is missing the following dependencies:
| Dependency "jboss.messaging:service=PostOffice" (should be in state "Create"
| , but is actually in state "Configured")
| Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create"
| , but is actually in state "Configured")
| Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is mi
| ssing the following dependencies:
| Dependency "jboss.messaging:service=PostOffice" (should be in state "Create"
| , but is actually in state "Configured")
| Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create"
| , but is actually in state "Configured")
| Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the
| following dependencies:
| Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create"
| , but is actually in state "Configured")
| Dependency "jboss.messaging:service=PostOffice" (should be in state "Create"
| , but is actually in state "Configured")
| Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is mis
| sing the following dependencies:
| Dependency "jboss.messaging:service=PostOffice" (should be in state "Create"
| , but is actually in state "Configured")
| Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create"
| , but is actually in state "Configured")
| Deployment "jboss.messaging:service=PostOffice" is missing the following depen
| dencies:
| Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create"
| , but is actually in state "Configured")
| Dependency "jboss.jgroups:service=ChannelFactory" (should be in state "Creat
| e", but is actually in state "** NOT FOUND Depends on 'jboss.jgroups:service=Cha
| nnelFactory' **")
| Deployment "jboss.messaging:service=ServerPeer" is missing the following depen
| dencies:
| Dependency "jboss.messaging:service=JMSUserManager" (should be in state "Cre
| ate", but is actually in state "**ERROR**")
| Dependency "jboss.messaging:service=PersistenceManager" (should be in state
| "Create", but is actually in state "**ERROR**")
| Deployment "jboss.mq:service=DestinationManager" is missing the following depe
| ndencies:
| Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create"
| , but is actually in state "Configured")
|
| DEPLOYMENTS IN ERROR:
| Deployment "jboss.jgroups:service=ChannelFactory" is in error due to the follo
| wing reason(s): ** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' *
| *
| Deployment "jboss.messaging:service=PersistenceManager" is in error due to the
| following reason(s): **ERROR**, java.lang.SecurityException: Unauthenticated ca
| ller:null
| Deployment "jboss.messaging:service=JMSUserManager" is in error due to the fol
| lowing reason(s): **ERROR**, java.lang.SecurityException: Unauthenticated caller
| :null
| Deployment "jboss:service=KeyGeneratorFactory,type=HiLo" is in error due to th
| e following reason(s): java.lang.SecurityException: Unauthenticated caller:null
|
| 21:29:32,966 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8
| 080
| 21:29:32,988 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
| 21:29:33,004 INFO [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=
| JBoss_5_0_1_GA date=200902231221)] Started in 40s:818ms
|
Another thing.
I tried to load this simple jsp page to test the connection to the db:
| <%@page contentType="text/html"
| import="java.util.*,javax.naming.*,javax.sql.DataSource,java.sql.*"
| %>
| <%
|
| DataSource ds = null;
| Connection con = null;
| PreparedStatement pr = null;
| InitialContext ic;
| try {
| ic = new InitialContext();
| ds = (DataSource)ic.lookup( "java:/DefaultDS" );
| con = ds.getConnection();
| pr = con.prepareStatement("select cognome, nome, squadraA from giocatore");
| ResultSet rs = pr.executeQuery();
| while (rs.next()) {
| out.println("<br> " +rs.getString("cognome") + " | " + rs.getString("nome") + " | " +rs.getString("squadraA"));
| }
| rs.close();
| pr.close();
| }catch(Exception e){
| out.println("Exception thrown " +e);
| }finally{
| if(con != null){
| con.close();
| }
| } %>
|
But when I open the page I receive this error: Exception thrown java.lang.SecurityException: Unauthenticated caller:null and in the console I read these error messages:
| 21:31:31,635 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role f
| iles
| java.io.IOException: No properties file: users.properties or defaults: defaultUs
| ers.properties found
| at org.jboss.security.auth.spi.Util.loadProperties(Util.java:198)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRole
| sLoginModule.java:186)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRo
| lesLoginModule.java:200)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRol
| esLoginModule.java:127)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
| at javax.security.auth.login.LoginContext.access$000(LoginContext.java:1
| 86)
| at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
| at java.security.AccessController.doPrivileged(Native Method)
| at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:6
| 80)
| at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
| at org.jboss.security.plugins.auth.JaasSecurityManagerBase.defaultLogin(
| JaasSecurityManagerBase.java:552)
| at org.jboss.security.plugins.auth.JaasSecurityManagerBase.authenticate(
| JaasSecurityManagerBase.java:486)
| at org.jboss.security.plugins.auth.JaasSecurityManagerBase.isValid(JaasS
| ecurityManagerBase.java:365)
| at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityMa
| nager.java:160)
| at org.jboss.security.integration.JBossSecuritySubjectFactory.createSubj
| ect(JBossSecuritySubjectFactory.java:90)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubjec
| t(BaseConnectionManager2.java:687)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
| onnection(BaseConnectionManager2.java:495)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
| nManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp
| erDataSource.java:89)
| at org.apache.jsp.client_jsp._jspService(client_jsp.java:69)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
| .java:369)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
| 22)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
| ss(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
| e(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
| onnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :829)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
| ss(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
| 7)
| at java.lang.Thread.run(Thread.java:619)
| 21:31:37,790 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role f
| iles
| java.io.IOException: No properties file: users.properties or defaults: defaultUs
| ers.properties found
| at org.jboss.security.auth.spi.Util.loadProperties(Util.java:198)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRole
| sLoginModule.java:186)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRo
| lesLoginModule.java:200)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRol
| esLoginModule.java:127)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
| at javax.security.auth.login.LoginContext.access$000(LoginContext.java:1
| 86)
| at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
| at java.security.AccessController.doPrivileged(Native Method)
| at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:6
| 80)
| at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
| at org.jboss.security.plugins.auth.JaasSecurityManagerBase.defaultLogin(
| JaasSecurityManagerBase.java:552)
| at org.jboss.security.plugins.auth.JaasSecurityManagerBase.authenticate(
| JaasSecurityManagerBase.java:486)
| at org.jboss.security.plugins.auth.JaasSecurityManagerBase.isValid(JaasS
| ecurityManagerBase.java:365)
| at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityMa
| nager.java:160)
| at org.jboss.security.integration.JBossSecuritySubjectFactory.createSubj
| ect(JBossSecuritySubjectFactory.java:90)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubjec
| t(BaseConnectionManager2.java:687)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
| onnection(BaseConnectionManager2.java:495)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
| nManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp
| erDataSource.java:89)
| at org.apache.jsp.client_jsp._jspService(client_jsp.java:69)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
| .java:369)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
| 22)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
| ss(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
| e(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
| onnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :829)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
| ss(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
| 7)
| at java.lang.Thread.run(Thread.java:619)
|
|
Why?
How can I solve?
Thanks, bye bye.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224789#4224789
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224789
17 years
[JBoss Messaging] - NoClassDefFound Exception from Sun AS 8.2 to JBM 1.4.0
by dkuanwang
Hi JBM experts,
I have recently posted a similar question and it was resolved with the help of PeterJ:
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224375#4224375
However, while the standalone java client works fine. I run into NoClassDefFound Exception again when using the same code on Sun AS 8:
Caused by: java.lang.NoClassDefFoundError
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createClient(ClientConnectionFactoryDelegate.java:298)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:228)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnectionFactoryDelegate.java)
at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientClusteredConnectionFactoryDelegate$getClientAOPStack$aop(ClientClusteredConnectionFactoryDelegate.java:242)
at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.getClientAOPStack(ClientClusteredConnectionFactoryDelegate.java)
at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
at jmsremoteclient.TestMessageProducer.(TestMessageProducer.java:43)
TestMessageProducer is the class where I try to initiate the connection to JBM. Obviously there may be class conflicts in the classpath...but the exception doesn't suggest the class name and therefore made it harder to debug. (I did included log4j.jar)
Has anyone seem similar issue and have suggestions for the conflicting jar?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224780#4224780
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224780
17 years
[JBoss/Spring Integration] - Re: IllegalArgumentException when trying to deploy an ear
by Grexe
Unfortunately I stumble across the same issue but the proposed solution did not help, double-checked my classpath and tried different Spring-versions, even replacing spring-jars in jbossws.sar, but still get the same error, using JBoss 4.2.3.GA + jbossws-cxf-3.1.0.GA on Windows Vista, JDK 1.5.0_17:
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
| org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [ddaBeanRefContext.xml]; nested exception is java.lang.IllegalArgumentException: Class [org.apache.cxf.transport.http_jetty.spring.NamespaceHandler] does not implement the NamespaceHandler interface
| Caused by:
| java.lang.IllegalArgumentException: Class [org.apache.cxf.transport.http_jetty.spring.NamespaceHandler] does not implement the NamespaceHandler interface
| at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings(DefaultNamespaceHandlerResolver.java:119)
| at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:96)
| at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:83)
| at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createDefaultNamespaceHandlerResolver(XmlBeanDefinitionReader.java:498)
| at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createReaderContext(XmlBeanDefinitionReader.java:487)
| at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:468)
| at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:363)
| at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:313)
| at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
| at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
| at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
| at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
| at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
| at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)
| at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:394)
| at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)
| at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
| at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
| at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
| at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
| at org.jboss.web.WebModule.startModule(WebModule.java:83)
| at org.jboss.web.WebModule.startService(WebModule.java:61)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy44.start(Unknown Source)
| at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:85)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy45.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224779#4224779
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224779
17 years
[JBoss Messaging] - SOAP over JMS using JBOSS Messaging
by mpurdy1973
i have used SOAP over JMS with TIBCO EMS Server; i would like to do the same with JBOSS Messaging in AS 5.0.1
below is the client code for an example of what i am trying to do
thanx,
matt
|
|
| import javax.jms.JMSException;
| import javax.jms.MessageProducer;
| import javax.jms.Queue;
| import javax.jms.QueueConnection;
| import javax.jms.QueueConnectionFactory;
| import javax.jms.QueueReceiver;
| import javax.jms.QueueSession;
| import javax.jms.TextMessage;
|
| public class SoapOverJmsClient
| {
| public static final String SOAP_REQUEST = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns0=\"http://www.pyxisengineering.com/Quote/\"><soapenv:Header/><soapenv:Body><ns0:GetAll><symbol>tibx</symbol></ns0:GetAll></soapenv:Body></soapenv:Envelope>";
| public static final String REQUEST_JMS_QUEUE_NAME = "queue.sample";
| public static final String REPLY_TO_JMS_QUEUE_NAME = "queue.sample";
|
| public static void main(String[] args)
| {
|
| String inputValue = "tibx";
| SoapOverJmsClient.sendJMS(inputValue);
|
| }//end SoapOverJmsClient entry point
|
| public static void sendJMS(String inputValue)
| {
| //receiving reply from the queue.
| try
| {
| //create the queues
| QueueConnectionFactory factory = new com.tibco.tibjms.TibjmsQueueConnectionFactory("localhost");
| QueueConnection connection = factory.createQueueConnection(null, null);
| QueueSession session = connection.createQueueSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
| Queue requestQueue = session.createQueue(SoapOverJmsClient.REQUEST_JMS_QUEUE_NAME);
| javax.jms.Queue replyToQueue = session.createQueue(SoapOverJmsClient.REPLY_TO_JMS_QUEUE_NAME);
|
| //build jms message
| MessageProducer sender = session.createSender(requestQueue);
| TextMessage txtMsg = session.createTextMessage();
| txtMsg.setStringProperty("SoapAction", "\"GetAll\"");
| txtMsg.setStringProperty("Mime_Version", "1.0");
| txtMsg.setStringProperty("Content_Type", "application/xml; charset=\"utf-8\"");
| txtMsg.setText(SoapOverJmsClient.SOAP_REQUEST);
|
| //set the reply queue
| txtMsg.setJMSReplyTo(replyToQueue);
|
| //send message
| sender.send(txtMsg);
|
|
| //use createQueue() to enable receiving from dynamic queues.
| QueueReceiver receiver = session.createReceiver(replyToQueue);
|
| //start the connection to receive from queue
| connection.start();
|
| //read queue messages
| javax.jms.Message message = receiver.receive(10000);
| if(message != null)
| System.out.println("Received message: " + message);
| else
| System.out.println("Error while retriving message");
| connection.close();
| }
| catch(JMSException jmse)
| {
| jmse.printStackTrace();
| System.exit(0);
|
| }//end catch jmse
|
| }//end static sendJMS
|
| }//end class SoapOverJmsClient
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224776#4224776
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224776
17 years