[Beginners Corner] - Questions for general use of JBoss 5.0?
by dickson1888
Hi all,
I start to study how to use JBoss 5.0G.A. (before that, I used Tomcat or JRun). I have installed it and hot deploy a simple war application; also browse the function in JBoss Management Console. Before I deeply study it, I have several questions about how to use it. Thanks in advance for any help.
1. Is it possible that deploy a web application without using war, ear file format? For example, just create a folder and some jsp files under the "depoly" folder or other place. It seems that not working at all.
2. Any other GUI tools to help to setup/config or admin the JBoss server; except that "JBoss Management Console"? such start up or shutdown the JBoss server, setup data source, view the log...etc. (Easy config?)
3. Can we stop one application when JBoss server is running? (not the whole JBoss server)
4. Can the library be used for individual web application in JBoss? (not for globally use) For Example, I want to develop a jar or use a specific library (jar or zip files) that is only for a single web application. How can I do that?
5. Basic Authentication with Apache
Is it possible that login in Apache web server and then pass it to JBoss (maybe JAAS or other authentication module) so that it won't require to login again?
Thanks for any help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206169#4206169
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206169
15 years, 9 months
[JBoss Messaging] - Re: ClassCastException when casting ObjectMessage object
by chicken
after I add the serialVersionID, i get the old error and new error about log4j, I am using log4j 1.2.15
17:08:13,650 INFO [STDOUT] ERROR: java.lang.ClassCastException: CustomMessageBean
| 17:08:13,652 INFO [WebappClassLoader] Illegal access: this web application instance has been stopped already. Could not load org.apache.log4j.spi.ThrowableInformation. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
| java.lang.IllegalStateException
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1244)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:159)
| at org.apache.log4j.Category.forcedLog(Category.java:391)
| at org.apache.log4j.Category.error(Category.java:322)
| at mail.AsyncQueueReceiver.onMessage(AsyncQueueReceiver.java:146)
| at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
| at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
| at org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:595)
| 17:08:13,658 ERROR [ClientConsumer] Failed to deliver message
| java.lang.NoClassDefFoundError: org/apache/log4j/spi/ThrowableInformation
| at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:159)
| at org.apache.log4j.Category.forcedLog(Category.java:391)
| at org.apache.log4j.Category.error(Category.java:322)
| at mail.AsyncQueueReceiver.onMessage(AsyncQueueReceiver.java:146)
| at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
| at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
| at org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206166#4206166
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206166
15 years, 9 months
[JBoss Messaging] - Re: ClassCastException when casting ObjectMessage object
by chicken
thank you so much for your quickly help
I mean I reload my web application: I usually modify the web.xml in my application so that the application reloads and applies my new source.
the onMessage() method only throws the exception after I reload my application and run the function that uses JMS.
usually it works well.
When I develop my web application, I usually have to reload my application, and I always face the exception so that I have to restart JBoss application server (not reload my application) and It will take more time than reloading my web application.
here is my CustomMessageBean.java:
| import java.io.Serializable;
| import java.util.Date;
|
| public class CustomMessageBean implements Serializable {
| private String server;
|
| private String from;
|
| private String to;
|
| private String toNew;
|
| private String cc;
|
| private String bcc;
|
| private String subject;
|
| private String content;
|
| private boolean isHTML;
|
| private String charSet;
|
| private String attachment;
|
| private Date date;
|
| private String admMemNo;
|
| private String user_id;
|
| private String serverName;
|
| public MessageBean() {
| }
|
| public CustomMessageBean (String server, String from, String to, String toNew,
| String cc, String bcc, String subject, String content,
| boolean isHTML, String charSet, String attachment, Date date,
| String admMemNo, String user_id, String serverName) {
| this.server = server;
| this.from = from;
| this.to = to;
| this.toNew = toNew;
| this.cc = cc;
| this.bcc = bcc;
| this.subject = subject;
| this.content = content;
| this.isHTML = isHTML;
| this.charSet = charSet;
| this.attachment = attachment;
| this.date = date;
| this.admMemNo = admMemNo;
| this.user_id = user_id;
| this.serverName = serverName;
| }
|
| public void setServer(String server) {
| this.server = server;
| }
|
| public String getServer() {
| return server;
| }
|
| public void setFrom(String from) {
| this.from = from;
| }
|
| public String getFrom() {
| return from;
| }
|
| public void setTo(String to) {
| this.to = to;
| }
|
| public String getTo() {
| return to;
| }
|
| public void setToNew(String toNew) {
| this.toNew = toNew;
| }
|
| public String getToNew() {
| return toNew;
| }
|
| public void setCc(String cc) {
| this.cc = cc;
| }
|
| public String getCc() {
| return cc;
| }
|
| public void setBcc(String bcc) {
| this.bcc = bcc;
| }
|
| public String getBcc() {
| return bcc;
| }
|
| public void setSubject(String subject) {
| this.subject = subject;
| }
|
| public String getSubject() {
| return subject;
| }
|
| public void setContent(String content) {
| this.content = content;
| }
|
| public String getContent() {
| return content;
| }
|
| public void setIsHTML(boolean isHTML) {
| this.isHTML = isHTML;
| }
|
| public boolean getIsHTML() {
| return isHTML;
| }
|
| public void setCharSet(String charSet) {
| this.charSet = charSet;
| }
|
| public String getCharSet() {
| return charSet;
| }
|
| public void setAttachment(String attachment) {
| this.attachment = attachment;
| }
|
| public String getAttachment() {
| return attachment;
| }
|
| public void setDate(Date date) {
| this.date = date;
| }
|
| public Date getDate() {
| return date;
| }
|
| public void setAdmMemNo(String admMemNo) {
| this.admMemNo = admMemNo;
| }
|
| public String getAdmMemNo() {
| return admMemNo;
| }
|
| public void setUser_id(String user_id) {
| this.user_id = user_id;
| }
|
| public String getUser_id() {
| return user_id;
| }
|
| public void setServerName(String serverName) {
| this.serverName = serverName;
| }
|
| public String getServerName() {
| return serverName;
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206163#4206163
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206163
15 years, 9 months
[JBoss Messaging] - ClassCastException when casting ObjectMessage object
by chicken
Dear all
I have a problem with JMS on JBoss 4.3.0.
My queue works well but whenever after I reload my application I could not cast the queue object to my custom message object (CustomMessageBean ):
ERROR: java.lang.ClassCastException: CustomMessageBean
public void onMessage(Message message) {
| try {
| if (message instanceof ObjectMessage) {
| String messageId = message.getJMSMessageID();
| ObjectMessage qObjectMessage = (ObjectMessage) message;
| CustomMessageBean mailBeanJMS = (CustomMessageBean) qObjectMessage
| .getObject();
| MailMgr receiverMailMgr = new MailMgr();
| rlog.debug("messageid: " + messageId);
| ......
|
| }
| } catch (Exception e) {
| System.out.println("ERROR: " + e.toString());
| }
| }
Here is configuration content for the queue:
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=myQueue"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| </mbean>
To solve this problem, I have to restart JBoss Server every times I apply new source code!
please help me solve this problem.
Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206157#4206157
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206157
15 years, 9 months