[Design of JBoss Collaboration Server] - MessageData Bug (only in special case)
by sappenin
Hey All,
I found this bug, and am looking for some guidance on how to fix it.
If I draft a message in webmail, and send it to myself, then try to "get" the message via POP3, no POP3 messages are downloaded, and the server throws a NullPointerException as follows, breaking pop3 until I remove the "bad" message from my inbox:
| 17:46:48,328 ERROR [STDERR] java.lang.NullPointerException
| 17:46:48,328 ERROR [STDERR] at org.jboss.mail.mailbox.MessageData.getBoundary(MessageData.java:345)
| 17:46:48,328 ERROR [STDERR] at org.jboss.mail.pop3.handlers.CmdRETR.writeMessage(CmdRETR.java:124)
| 17:46:48,328 ERROR [STDERR] at org.jboss.mail.pop3.handlers.CmdRETR.org$jboss$mail$pop3$handlers$CmdRETR$handleRequest$aop(CmdRETR.java:92)
| 17:46:48,328 ERROR [STDERR] at org.jboss.mail.pop3.handlers.CmdRETR$handleRequest_6157744562547821338.invokeNext(CmdRETR$handleRequest_6157744562547821338.java)
| 17:46:48,328 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| 17:46:48,328 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| 17:46:48,328 ERROR [STDERR] at org.jboss.mail.pop3.handlers.CmdRETR$handleRequest_6157744562547821338.invokeNext(CmdRETR$handleRequest_6157744562547821338.java)
| 17:46:48,328 ERROR [STDERR] at org.jboss.mail.pop3.handlers.CmdRETR.handleRequest(CmdRETR.java)
| 17:46:48,328 ERROR [STDERR] at org.jboss.mail.pop3.POP3ProtocolInstance.handleRequest(POP3ProtocolInstance.java:211)
| 17:46:48,328 ERROR [STDERR] at org.jboss.mail.ConnectionHandler.runSocket(ConnectionHandler.java:205)
| 17:46:48,328 ERROR [STDERR] at org.jboss.mail.ConnectionHandler.run(ConnectionHandler.java:97)
| 17:46:48,328 ERROR [STDERR] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
| 17:46:48,328 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
|
I've tracked this code down to the getBoundary() function of the MessageData class, here:
| String[] header = getHeader("Content-Type").split("\\r\\n");
|
If I inspect the headers of a "JBCS webmail" created message, there isn't a "Content-type" header, which is why (I'm guessing) a null pointer is thrown. The fix here may just be to check for a null string after calling getHeader("Content-Type").
However, I'm not quite sure if this is the right thing. Why does the boundary pivot around the "content-type" header? Does the SMTP spec mandate that everything after this header must be the body? Is content-type guaranteed to be last? I'll write a fix for this, but I'm not quite sure what it's supposed to be doing. I can see that CMDRetry.java line 124 is apparently using this a a boundary between message bodies (?).
Thanks!
David
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965911#3965911
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965911
19 years, 7 months
[Design of JBoss Collaboration Server] - MailboxServiceImpl Bug
by sappenin
When I try to retrieve messages via POP3, JBCS throws an error when it tries to call the "deleteMarked()" function. I've tracked the error down to MailboxServiceImpl Line 772, where fastExpunge issues a native Postgres query that postgres doesn't like.
The broken code is:
| session.createNativeQuery("delete from MessageData_BODYID b where b.MessageData_ID in (select m.id from MessageData m where m.deleted = true" + " and m.folder_id = :folder)").setParameter("folder", f.getId()).executeUpdate();
|
In my SQL window, I was able to issue a SQL query as follows:
| delete from MessageData_BODYID where MessageData_BODYID.MessageData_ID in (select m.id from MessageData m where m.deleted = true" + " and m.folder_id = :folder)
|
Basically, it appears that postgres doesn't like/allow the aliasing of tables (instead of "MessageData_BODYID as b where b.MessageData_ID", I just use the full table name "MessageData_BODYID where MessageData_BODYID.MessageData_ID").
That seems wierd to me, so I'm wondering if anyone has this problem with postgres. If others concur, I'll post a JIRA task with a fix.
david
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965908#3965908
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965908
19 years, 7 months
[Design of JBoss jBPM] - Re: Started: jBPM WS frontend
by alex.guizar@jboss.com
My suggestions:
anonymous wrote : document/rpc type? Document. Amenable to XS validation by the underlying stack, and faster to process than RPC. Web services are moving away from RPC.
anonymous wrote : JSR109 compliant? Why not JSR-181? JSR-181 web services are so much easier to mantain. JDK 1.5 is a requisite, but most WS customers do not seem to have a problem with that. Do you require JDK 1.4.2 compatibility in your workplace?
anonymous wrote : Other stacks?? JSR-109 or JSR-181 already give you portability. They don't prescribe the use of a full J2EE app server. JBossWS can run on plain Tomcat thanks to the microcontainer. XFire also supports JSR-181. There is no reason to go out of our way to support non-standard deployment models.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965832#3965832
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965832
19 years, 7 months