Menu

Bug

Developers
2011-01-17
2013-05-28
1 2 > >> (Page 1 of 2)
  • Kevin Aebig

    Kevin Aebig - 2011-01-17

    Hey guys,

    I've been working at creating an Outlook 2003 / 2007 addin that allows users to search their own archive easily. I've accomplished this by tying into the webservice. I can successfully login / logout and though I can send a query, see it in the logs and debug it, I can't get it to work because of an issue.

    Here's the debug log of the exception happening on the server side:

    ERROR Jan/17 09:33:09 - failed to search for message:failed to parse search query {searchquery='( (to:k.aebig@mydomain.com) AND (subject:song) OR (body:song) OR (from:song) OR (attachments:song) ) AND sentdate:[d20110112000000 TO d20110117235959]'}
    DEBUG Jan/17 09:33:09 - failed to parse search query {searchquery='( (to:k.aebig@mydomain.com) AND (subject:song) OR (body:song) OR (from:song) OR (attachments:song) ) AND sentdate:[d20110112000000 TO d20110117235959]'}
        at java.lang.Thread.run(Unknown Source)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:231)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at com.stimulus.util.UTF8Filter.doFilter(UTF8Filter.java:33)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:142)
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
        at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
        at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
        at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
        at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:205)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)
        at com.stimulus.archiva.webservice.SimpleAPI.searchMessage(SimpleAPI.java:105)
        at com.stimulus.archiva.search.StandardSearch.searchMessage(StandardSearch.java:150)
        at com.stimulus.archiva.search.StandardSearch.getFilter(StandardSearch.java:225)
        at com.stimulus.archiva.search.StandardSearch.getUserRoleFilter(StandardSearch.java:348)
    java.lang.NullPointerException
    DEBUG Jan/17 09:33:09 - failed to parse search query {searchquery='( (to:k.aebig@mydomain.com) AND (subject:song) OR (body:song) OR (from:song) OR (attachments:song) ) AND sentdate:[d20110112000000 TO d20110117235959]'}
    DEBUG Jan/17 09:33:09 - successfully parsed search query {query='( (to:k.aebig@mydomain.com) AND (subject:song) OR (body:song) OR (from:song) OR (attachments:song) ) AND sentdate:[d20110112000000 TO d20110117235959]'}
    DEBUG Jan/17 09:33:09 - successfully returned search analyzer {language='en', class='com.stimulus.archiva.search.ArchivaAnalyzer'}
    DEBUG Jan/17 09:33:09 - analyzer class instance created {language='en', class='com.stimulus.archiva.search.ArchivaAnalyzer'}
    DEBUG Jan/17 09:33:09 - retrieved analyzer class {language='en', class='com.stimulus.archiva.search.ArchivaAnalyzer'}
    DEBUG Jan/17 09:33:09 - successfully obtained class name for search analyzer {language='en', class='com.stimulus.archiva.search.ArchivaAnalyzer'}
    DEBUG Jan/17 09:33:09 - getAnalyzer() {language='en'}
    DEBUG Jan/17 09:33:09 - standard search executed {query='( (to:k.aebig@mydomain.com) AND (subject:song) OR (body:song) OR (from:song) OR (attachments:song) )'}
    DEBUG Jan/17 09:33:09 - addCriteria()
    DEBUG Jan/17 09:33:09 - newCriteria()
     INFO Jan/17 09:33:09 - executing search via web service interface {name='administrator@mydomain.local',role='administrator',ipAddress='null',emailAddress='administrator@mydomain.com',query='( (to:k.aebig@mydomain.com) AND (subject:song) OR (body:song) OR (from:song) OR (attachments:song) )'}
    

    It seems that the getUserRoleFilter is throwing a null pointer exception. I'm not from a Java background but still attempted to setup a build environment to completely fix this on my own using the latest svn version. Needless to say, that hasn't gone well.

    We're currently testing this out and if it goes well, we'll be including it as part of our upgrade to Exchange 2010. The dealbreaker is getting this webservice and addin to talk, otherwise it will simply be too difficult for our users to use and we'll be stuck going with GFI Archiver (which I truly don't want to do).

    As well, I'd be will to share the source for the addin if I can get some feedback / help resolving this issue.

    Cheers,

    Kevin

     
  • iScott

    iScott - 2011-01-18

    Hi kaebig

    Are you working from the Open Source or enterprise edition ?

    Thanks
    Ian

     
  • Kevin Aebig

    Kevin Aebig - 2011-01-18

    Currently OSE, but we're looking to upgrade as we're moving to Exchange 2010.

     
  • iScott

    iScott - 2011-01-18

    Hi again Kevin,
    We have been working with the OSE and extending its functionality using custom web services with reasonable success.

    I haven't seen the exact error you have generated previously, but we have resolved some very similar issues - all of which stem from errors we made when creating the initial web services from the OSE source.

    Can you detail the steps you have taken to get web services enabled.  Such as are you running the standard tomcat that was started by the standard build spec, have you built axis2 to it or are you running axis 2 outside the current OSE runtime web service.
    maybe we can compare to our efforts and see what the differences are

     
  • Nobody/Anonymous

    Hi Ian,

    I'm currently taking the lazy route and using the default SimpleAPI webservice as a web reference in .NET. Up until the exception everything was moving along smoothly.

    Just to clarify, other than some Blackberry applications(J2ME), I'm not a Java guy by any stretch of the imagination, but I'll try to answer everything.

    It's a standard install of MailCleaner OSE on a W2K3 Standard HyperV instance. The index volume and OS are running from a virtual harddrive and the store is a iSCSI disk on our SAN. Everything is running well without issue.

    As for axis2, I'm not using a custom build, though I've setup Eclipse and have it running in the included tomcat server. I'm hoping to be able to debug why I'm getting a null exception on:

    com.stimulus.archiva.search.StandardSearch.getUserRoleFilter(StandardSearch.java:348) java.lang.NullPointerException

    If you don't mind me asking, what are you guys trying to accomplish?

    Cheers,

    Kevin

     
  • Kevin Aebig

    Kevin Aebig - 2011-01-24

    FYI,

    The SimpleAPI webservice will probably never work in it's current state as it's not passing the authenticated principal to the Search class. By adding the following code to the searchMessage method (line:84), it will now properly create a valid query.

    After the following line:
    search.init();
    Add:
    search.setPrincipal(principal);

    This is assuming you're already gone through the nightmare of setting up a build environment, fixed the ant build file and NSIS installer script and worked through all the dependancy issues.

    As it sits though, it does work extremely well once everything is in place.

     
  • Kevin Aebig

    Kevin Aebig - 2011-01-25

    FYI,

    The SimpleAPI webservice has a second bug in  getMessageByID (line:45) by improperly checking for a logged in principal.

    Currently it reads:
    if (principal!=null)
         throw new AxisFault("not logged in");
    It should read:
    if (principal==null)
         throw new AxisFault("not logged in");

    With the difference being that when the principal property is null, than the user hasn't logged in yet. 

    After figuring this out, I'm almost done with the Outlook Plugin… will post screenshots soon.

     
  • iScott

    iScott - 2011-01-27

    Hi Kevin

    Sorry I have been quiet, I am only working on this in my free time.
    Sounds like you are getting on well. Configuring the build environment is such a head scratcher. I am just trying to create a new web client for the server for a bit of fun.

    Did you get the null pointer exception sorted ? It looks like you might have been passing in an empty string instead of a null value.
    You could modify the current code on line 98 from :-

    if (filterQuery!=null) {

    to :-

    if (filterQuery!=null && filterQuery != "") {

    I would be keen to see your Outlook plugin when you get it finished.
    Good luck and keep us posted.

    Thanks
    Ian

     
  • Kevin Aebig

    Kevin Aebig - 2011-01-28

    I've actually finished it and added a few handy things.

    I'll try to post screen caps tomorrow.

    Cheers,

    Kevin

     
  • Kevin Aebig

    Kevin Aebig - 2011-01-28

    Thought I'd post the screen caps of the *near* finished addin.

    Main Added Toolbar

    Search Window
    - Filters by Field, Date From / To

    Message Window
    - Show / Print archived message
    - Save as MSG, EML, TXT
    - View / Save Attachments

     
  • Achim J. Latz

    Achim J. Latz - 2011-03-14

    Gentlemen: This is a very interesting topic. I managed to get OSE to build from SVN, applied the fixes you propose to SimpleAPI.java, and now I am wondering: what to do next. Just FYI, it appears that Jamie Band (Mailarchiva developer) is also asking for help with web services: http://www.mail-archive.com/java-user@axis.apache.org/msg00083.html

    Perhaps there is a way to bring this to the next level:
    1) include your patches in SVN
    2) Make web services work (also SearchService?wsdl which appears to be missing /axis2-web/listSingleService.jsp)
    3) Include an example (perhaps based on "Creating an Outlook Addin with C# Express" as described in http://fransking.blogspot.com/2006/07/creating-outlook-addin-with-c-express.html

     
  • Kevin Aebig

    Kevin Aebig - 2011-03-14

    I've had to shelf this project temporarily, but my plans are to post a completely organized source with instructions, including the updated webservice and outlook plugin

    The only thing that gives me pause to doing that is the fact that the managing developer was completely silent through this thread… I have no wish to see the code I wrote end up in the paid version of this software because of that.

    The sad thing is, I've already planned to re-write the front end and add some features that will essentially make this better than other software currently on the market.

     
  • Nobody/Anonymous

    Hey. I am sorry if I was silent. It was not intentional. Just been overloaded with work. An update of the OSE is way over due. We will be looking into this shortly. We also have a more comprehensive web services API coming out shortly. We're going to be porting the Metro based web service API in EE version to OSE.

    It is great to see that you developed an Outlook plugin. We were however hoping on taking another tact though. You'll notice in the EE version that we provide an Outlook integration although it does not require the use of a Outlook client. This is because we offer NTLM v2 single signon authenitcation. To do this, we had to purchase Jespa - a commercial authentication library. At present, JICFS does not support NTLM v1.

     
  • Nobody/Anonymous

    Please don't rewrite the web services API as this work is already done. I will be happy to add you as a Developer to the MailArchiva OSE project. Just PM me with your details.

     
  • Achim J. Latz

    Achim J. Latz - 2011-03-14

    After a couple of *very* interesting hours with VS Express 2010, Office 2003, and several assemblies, I have now a working addin for Outlook. I am now stuck with getting the actual web service to work, because the following line does not seem to work:

    SimpleAPIPortTypeClient myclient = new ServiceReference1.SimpleAPIPortTypeClient("http://localhost:8080/mailarchiva/services/SimpleAPI.SimpleAPIHttpSoap12Endpoint/");

    Rather than spending more time on this now, would it be possible to get an approximate timeframe for the offical updates to OSE and kaebig's existing plugin? I think predictability is more important in this case than speediness.

    Thanks, Achim

     
  • Achim J. Latz

    Achim J. Latz - 2011-03-14

    Just FYI, I found some older usage examples (in Java) for the MailArchiva web service:
    http://replay.waybackmachine.org/20090622175740/http://knowledge.mailarchiva.com/bin/view/Main/WebServices

    Unfortunately I haven't figured out yet how to generate the SimpleAPIPortType class from the WSDL description in Eclipse. Apart from that, the example seems to need only minor updates (axis2 instead of axis, updating the SearchResult import path).

     
  • Kevin Aebig

    Kevin Aebig - 2011-03-14

    I don't have the code in front of me, but I'm almost positive the way I got it to work was by changing the return type to an array of simple objects.

    Also, use the legacy WSDL web reference generator and Visual Studio will do the marshaling for you.

     
  • Achim J. Latz

    Achim J. Latz - 2011-03-15

    I generated the file, but for some reason I cannot instantiate a SimpleAPIPortTypeClient object with the local endpoint.

    Would you be willing to share your progress so far, so that I don't have to reinvent the wheel?

    Thanks in advance!

     
  • Kevin Aebig

    Kevin Aebig - 2011-03-15

    I don't have acces to my project right now, but can send you a copy of everything you'll need tomorrow.

     
  • Achim J. Latz

    Achim J. Latz - 2011-03-15

    Thanks, that would be fantastic.

     
  • Achim J. Latz

    Achim J. Latz - 2011-03-16

    I think I found another problem with current OSE SVN related to web services:

    org.apache.axis2.deployment.DeploymentException: A ClassNotFoundException error occurred in loading the message receiver com.stimulus.archiva.webservice.MailArchivaServiceMessageReceiverInOut
    DEBUG mar/15 12:02:16 - at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:106)
    DEBUG mar/15 12:02:16 - at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:110)
    DEBUG mar/15 12:02:16 - at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:179)
    DEBUG mar/15 12:02:16 - at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:81)
    DEBUG mar/15 12:02:16 - at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)

     
  • Achim J. Latz

    Achim J. Latz - 2011-03-16

    Turns out that the reference to the class

    com.stimulus.archiva.webservice.MailArchivaService
    

    comes from the following services.xml file (lines 7 an d 9) in web/WEB-INF/services/MailArchivaService/META-INF/services.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <!-- This file was auto-generated from WSDL -->
    <!-- by the Apache Axis2 version: 1.3  Built on : Aug 10, 2007 (04:45:47 LKT) -->
    <serviceGroup>
        <service name="MailArchiva">
            <messageReceivers>
                <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" class="com.stimulus.archiva.webservice.MailArchivaServiceMessageReceiverInOut"/>
            </messageReceivers>
            <parameter name="ServiceClass">com.stimulus.archiva.webservice.MailArchivaService</parameter>
            <parameter name="useOriginalwsdl">false</parameter>
            <parameter name="modifyUserWSDLPortAddress">true</parameter>
            <parameter name="cacheAttachments" locked="false">true</parameter>
            <parameter name="attachmentDIR" locked="false">c:\temp</parameter>
            <parameter name="sizeThreshold" locked="false">40000000</parameter>
            <parameter name="CONNECTION_TIMEOUT" locked="false">10000000</parameter>
            <parameter name="SO_TIMEOUT" locked="false">10000000</parameter>
            <parameter name="enableMTOM" locked="false">true</parameter>
            <operation name="getServerVersion" mep="http://www.w3.org/ns/wsdl/in-out">
                <actionMapping>\"\"</actionMapping>
                <outputActionMapping>url:MAILARCHIVA/MailArchiva/getServerVersionResponse</outputActionMapping>
            </operation>
            <operation name="storeMessage" mep="http://www.w3.org/ns/wsdl/in-out">
                <actionMapping>\"\"</actionMapping>
                <outputActionMapping>url:MAILARCHIVA/MailArchiva/storeMessageResponse</outputActionMapping>
            </operation>
        </service>
    </serviceGroup>
    
     
  • Kevin Aebig

    Kevin Aebig - 2011-03-16

    I'm putting together build instructions and should have it ready shortly.

    I don't recall having to change anything in regards to that.

     
  • Anonymous

    Anonymous - 2011-03-19

    kaebig… I've added you as a contributor to the project. Feel free to update the src tree & publish the Outlook plugin as you see fit . Regarding the web service interface,probably the best approach would have been just to regenerate the stubs using Eclipse web services wizard.

     
  • Anonymous

    Anonymous - 2011-03-19

    I will also be happy to add the build instructions to the knowledge base.

    Thanks for your contribution

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.