Hi

I posted this in a separate thread today. Sorry. After some
investigation, I found this. Please help me.

I see a strange behavior in HTTP PUT (REST). When I tried CXF-2.2.2
deploying userapi.ear (with "user" as context-root in jboss), it is
failing with following error. If I rename same ear file to something
else such as cog.ear (with 'cog' as context-root), it started working.
Is 'user' a reserve word in HTTP/CXF/REST world? Can't I use "user' word
for my application for "Address"?

[in my app, cog.ear contains cog.war. Same way, user.ear contains
user.war too]

17:28:54,290 ERROR [STDERR] Sep 14, 2009 5:28:54 PM
org.apache.cxf.interceptor.LoggingInInterceptor logging

INFO: Inbound Message

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

ID: 3

Address: /userapi/user/users/6E2D6D23D40D2FC9E04400144F8AE084/contacts/2

Encoding: UTF-8

Content-Type: application/json

Headers: {content-length=[536], connection=[keep-alive],
cache-control=[no-cache], host=[localhost:28080], user-agent=[J
ava/1.5.0_14], pragma=[no-cache], Content-Type=[application/json],
content-type=[application/json], Accept=[text/html, i mage/gif,
image/jpeg, *; q=.2, */*; q=.2], content-language=[en-US]}

Payload: { "UserContact": { "ContactId": 111111, "UserId": 11111,
"FirstName": "xxxxxx",

"LastName": "xxxxxx", "Street": "Sharynne Ln.", "AptNumber": 5350,
"City": "Malibu",

"State": "CA", "Zip": 90265, "Phone1": "xxxxxxx", "Phone2": "xxxxxxx",
"Company": "Ebay", "Email": "[email protected]", "DateAdded": "24-OCT-02",
"Active": 1, "Note": "Note", "Fax": "56356", "Country": "US",

"DefaultContact": 1, "PaymentContact": 1, "Title":"Mr.",
"LastModifiedDate": "10-SEP-09", "ChkPmtToCo": 0

}}

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

17:28:54,290 ERROR [STDERR] Sep 14, 2009 5:28:54 PM
org.apache.cxf.phase.PhaseInterceptorChain doIntercept

INFO: Interceptor has thrown exception, unwinding now
java.lang.NullPointerException

at
org.apache.cxf.attachment.AttachmentUtil.createAttachment(AttachmentUtil
.java:136)

at
org.apache.cxf.jaxrs.ext.MessageContextImpl.createAttachments(MessageCon
textImpl.java:135)

at
org.apache.cxf.jaxrs.ext.MessageContextImpl.get(MessageContextImpl.java:
58)

at
org.apache.cxf.jaxrs.utils.multipart.AttachmentUtils.getMultipartBody(At
tachmentUtils.java:54)

at
org.apache.cxf.jaxrs.utils.JAXRSUtils.processFormParam(JAXRSUtils.java:5
90)

 

Regards

Karuna Pydipati

StubHub/eBay - Platform & Services

Phone: (415)222-8752

Email: [email protected] <mailto:[email protected]> 

 

 

Reply via email to