jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From siraj ahmed <siraj.ah...@hurix.com>
Subject Re: problem
Date Thu, 21 Jun 2007 13:12:17 GMT
*eption*

javax.servlet.ServletException
	org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.NullPointerException
	com.onjava.blog.data.dao.impl.JackrabbitBlogEntryDAO.getBlogEntry(JackrabbitBlogEntryDAO.java:171)
	com.onjava.blog.ui.action.EditBlogEntryForm.execute(EditBlogEntryForm.java:27)
	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



Felix Meschberger wrote:
> Hi Ahmed,
>
> Not sure, where exactly you get the NullPointerException. You should 
> be more
> specific. Thanks.
>
> Regards
> Felix
>
> On 6/21/07, siraj ahmed <siraj.ahmed@hurix.com> wrote:
>>
>>
>> I am getting null pointer exception here, I think the code is correct
>> then what is the problem
>>
>> public Node getBlogEntryNode(String blogTitle, Session session)
>>             throws BlogApplicationException {
>>         if (_logger.isDebugEnabled())
>>             _logger.debug("Entering JackrabbitBlogEntryDAO.getNode() "
>>                     + blogTitle);
>>         Node blogEntry;
>>         try {
>>             Workspace workSpace = session.getWorkspace();
>>
>>             QueryManager queryManager = workSpace.getQueryManager();
>>
>>             StringBuffer queryStr = new StringBuffer("//blogEntry[@title
>> = '");
>>             queryStr.append(blogTitle);
>>             queryStr.append("']");
>>
>>             Query query = queryManager.createQuery(queryStr.toString(),
>>                     Query.XPATH);
>>
>>
>>             QueryResult queryResult = query.execute();
>>
>>
>>             NodeIterator queryResultNodeIterator = 
>> queryResult.getNodes();
>>
>>
>>
>>
>>         blogEntry = null;
>>             while (queryResultNodeIterator.hasNext()) {
>>                 blogEntry = queryResultNodeIterator.nextNode();
>>             }
>>         } catch (InvalidQueryException e) {
>>             throw new BlogApplicationException(e);
>>         } catch (RepositoryException e) {
>>             throw new BlogApplicationException(e);
>>         }
>>         if (_logger.isDebugEnabled())
>>             _logger.debug("Exiting JackrabbitBlogEntryDAO.getNode() "
>>                     + blogEntry);
>>         return blogEntry;
>>     }
>>
>> -----------------------------------------------------------
>> Hurix Mumbai telephone numbers have changed. New numbers are:
>>
>> Mumbai 1: Simran Center -    +91 22 6677 4888
>>
>> Mumbai 2: Solitiare Center - +91 22 6709 6888
>> ===========================================================
>> ***Disclaimer***
>>
>>
>> This email, and any attachments ("this email"), is confidential. If you
>> are not the addressee
>> please tell the sender immediately, and destroy this email without 
>> using,
>> sending or storing
>> it. Any opinions, express or implied, in this email, are those of the
>> sender, and are not
>> necessarily approved by Hurix Systems. Except as expressly stated, this
>> e-mail should not be
>> regarded as an offer, solicitation, recommendation or agreement to 
>> buy or
>> sell products or
>> services, or to enter into any contract. E-mail transmissions are not
>> secure and may suffer
>> errors, viruses, delay, interception and amendment. Hurix Systems 
>> does not
>> accept liability
>> for damage caused by any of the foregoing.
>>
>> HURIX SYSTEMS MAY MONITOR ALL INCOMING AND OUTGOING MAILS
>> ============================================================
>>
>


-----------------------------------------------------------
Hurix Mumbai telephone numbers have changed. New numbers are:

Mumbai 1: Simran Center -    +91 22 6677 4888

Mumbai 2: Solitiare Center - +91 22 6709 6888
===========================================================
***Disclaimer***


This email, and any attachments ("this email"), is confidential. If you are not the addressee
please tell the sender immediately, and destroy this email without using, sending or storing
it. Any opinions, express or implied, in this email, are those of the sender, and are not
necessarily approved by Hurix Systems. Except as expressly stated, this e-mail should not
be
regarded as an offer, solicitation, recommendation or agreement to buy or sell products or
services, or to enter into any contract. E-mail transmissions are not secure and may suffer
errors, viruses, delay, interception and amendment. Hurix Systems does not accept liability
for damage caused by any of the foregoing.

HURIX SYSTEMS MAY MONITOR ALL INCOMING AND OUTGOING MAILS
============================================================

Mime
View raw message