Problem: maven error opening zip file Solution: delete .m2 for a fresh start

I created a new maven 4.0.0 project in eclipse via File/New/Other/Maven Projekt on Windows.

I put in some extra dependency in the pom.xml and then after some Project/Clean… and Run/Run As/Maven Clean and Run/Run As/Maven Install , I got the following problem:

[ERROR] Failed to parse plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.3.1 (C:\Users\\.m2\repository\org\apache\maven\plugins\maven-install-plugin] –>.3.1\maven-install-plugin-2.3.1.jar): error in opening zip file -> [Help 1]

I don’t know how the error came about. I am not sure whether I already had a .m2 folder with old broken content from earlier projects.
But I know that it helped to delete the complete .m2-directory with the repository (if you don’t mind about all the stuff that you already downloaded there.)

C:\Users\<username>.m2

I did this after reading that one might try deleting

C:\Users\<username>\.m2\repository\org\apache\maven\plugins\maven-jar-plugin\2.3.2

I read it on this helpful site:
https://www.genuitec.com/forums/topic/all-maven-projects-start-with-failure-cannot-open-zip-file/

Advertisements

May 5, 2016 at 10:33 pm Leave a comment

wsdl webservice from Outlook Web App

I’m trying to figure out what the Webservice for an Outlook Web App (OWA) can provide me with.

So far, this doesn’t work but I hope I’ll manage to get it to work during this post.

I had the URL for webservice. It look something like this:

https://exchange.myuniversity.edu/EWS/Services.wsdl

Then I wanted to create the client-class-stubs via wsimport . I tried running wsimport from the command line.

First problem: I have to use a proxy. As wsimport works from the console I tried setting the proxy there. As I use Windows 7 proxycfg wasn’t the correct command any more but I had to use

netsh winhttp set proxy proxy.mycompany.com:3128

In case you have put explicity proxy information into the system settings of IE netsh winhttp import proxy source=ie might help. But I only have an automatic configuration there and that didn’t carry over to the command line proxy configuration.

Then I figured that wsimport had it’s own proxy argument and I could get the result via:

wsimport -httpproxy:proxy.mycompany.com:3128 https://exchange.myuniversity.edu/EWS/Services.wsdl

This got me the following error message:

[ERROR] Server returned HTTP response code: 401 for URL: https://exchange.myuniversity.edu/EWS/Services.wsdl,  "https://exchange.myuniversity.edu/EWS/Services.wsdl" needs authorization, please provide authorization file with read access at C:\Users\winusername\.metro\auth or use -Xauthfile to give the authorization file and on each  line provide authorization information using this format : http[s]://user:password@host:port//<url-path>

So I created a file myuni.txt with the line:

https://uniaccountname:unipassword@exchange.myuniversity.edu/EWS/Services.wsdl

(At first I mistakenly thought that I was supposed to download the SSL certificate, but that wasn’t the case.)

I than ran:

wsimport -httpproxy:proxy.mycompany.de:3128 -Xauthfile myuni.txt https://exchange.myuniversity.edu/EWS/Services.wsdl

However I ran into:

parsing WSDL...
[ERROR] Server redirected too many  times (20),  "https://exchange.myuniversity.edu/EWS/Services.wsdl" needs authorization, please provide authorization file with read access at C:\Users\winusername\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format: http[s]://user:password@host:port//<url-path>

I didn’t know how to solve this, so followed Ravi C Kota’s suggestion on Code Ranch to just download the wsdl-file.

However I than got:

 At least one WSDL with at least one service definition needs to be provided.
        Failed to parse the WSDL.

Maybe I have the same problem as Henning Mahlzahn over at social.technet.microsoft.com.

Unfortunately Henning Mahlzahn only links to the URL

http://tp.its.yale.edu/confluence/display/EXCH/Introduction+to+MS+Exchange+Web+Services+via+Java%28JAXWS%29

saying it describes how to change the wsdl file. As this URL is down, I tried to figure out how to correct my wsdl by looking at the amazon.wsdl file at:

http://soap.amazon.com/schemas2/AmazonWebServices.wsdl

Infering from that file I added a service definition in my wsdl file before the last line and after the last </wsdl:binding>. Including the two surrunding lines I had:

    </wsdl:binding>
    <wsdl:service name="ExchangeService">
        <wsdl:port name="ExchangeServicePortType" binding="tns:ExchangeServiceBinding">
            <soap:address location="http://schemas.xmlsoap.org/wsdl/soap/"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Where I made up the name “ExchangeService”, an I got the names for port and binding from the lines:

   <wsdl:portType name="ExchangeServicePortType">

and

   <wsdl:binding name="ExchangeServiceBinding" type="tns:ExchangeServicePortType">

(On my first try I forgot the “wsdl:”-namespace in front of the port so I got the following error:

parsing WSDL…

Exception in thread “main” com.sun.tools.internal.ws.util.WSDLParseException: Encountered error in wsdl. Check namespace of element <port>

Now the parsing worked a little further and I got to the point where I need the file

parsing WSDL...
[ERROR] C:\cwd\messages.xsd (Das System kann die angegebene Datei nicht finden)

[WARNING] schema_reference.4: Failed to read schema document 'messages.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.  line 5 of file:/C:/crw/modified.Services.wsdl.xml#types?schema1

So I had to download all the files Henning Malzahn listed in his posting: : Services.wsdl, messages.xsd and types.xsd

Those files are located in the same directory on your exchange server as the wsdl. In my case:

https://exchange.myuniversity.edu/EWS/messages.xsd

Running wsimport now got me the new errors:

parsing WSDL...
[WARNING] src-resolve: Cannot resolve the name 'xml:lang' to a(n) 'attribute declaration' component.
  line 3921 of file:/C:/cwd/types.xsd
[WARNING] s4s-elt-invalid-content.1: The content of 'ReplyBody' is invalid.  Element 'attribute' is invalid, misplaced, or occurs too often.
  line 3921 of file:/C:/cwd/types.xsd
[ERROR] undefined attribute 'xml:lang'  line 3921 of file:/C:/cwd/types.xsd

Those errors all reference some line in types.xsd. As the line had a “use=\”optional\”” attribute, I thought I could just comment it out. So I had the following:

<xs:complexType name=”ReplyBody”>
<xs:sequence>
<xs:element minOccurs=”0″ maxOccurs=”1″ name=”Message” type=”xs:string”/>
</xs:sequence>
<!–    <xs:attribute ref=”xml:lang” use=”optional”/>–>
</xs:complexType>

All these changes resulted in compiling code:

parsing WSDL…

generating code…

compiling code…

Note: C:\cwd\.\com\
microsoft\schemas\exchange\services\_2006\messages\ObjectFactory.java uses unche
cked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Now I had to check whether I could use the Web Service features from within Java and I wasn’t too sure about it because I had come across a posting by cheeso on Connecting to Exchange using JAX-WS, part 1 – All About Interop – Site Home – MSDN Blogs where he lists these things he had to do before he was able to use the Web Service:

Let me summarize what I did to get Java to talk to Exchange:

  • Modified the exchange.wsdl to include a service definition, and to remove all occurrences of impersonation, S2SAuth, and MailboxCulture from each wsdl:message.
  • Modified the types.xsd to eliminate the ref=”t:Path”, and replace it with actual elements
  • Use Fiddler2 to trace and debug the SOAP messages.

I forgot to add the -keep option to my wsimport statement. I added it in order to get coding help from eclipse.

At this point I stopped trying for now. What I did was trying to use the amazon web service but it then I read that amazon’s webservice based on soap is not compatible with JAX-WS and that one should use JAX-RPC. Now I wonder whether exchange is compatible.

August 1, 2011 at 3:42 pm Leave a comment

Android ViewMap example – a beginner’s very basic observations

Hi,

I’m just got an eclipse project containing code coming from http://developer.android.com/guide/tutorials/views/hello-mapview.html but with slight changes. I wanted to run it here to help with debugging some problems. As I had never written an android project I had some very basic “insights”.

  • I had to generate my own MapKey. I got the information for that from: http://code.google.com/intl/de-DE/android/add-ons/google-apis/mapkey.html . For now I only got a MapKey for my  debug.keystore . You need keytool for it and it’s part of the Oracle SDK within the bin folder
  • Sometimes I might have executed the main.xml that produced an main.out.xml. I had to delete that, when it was there.
  • I wanted to have a look at the main.xml. It was not perfectly formatted. As I wasn’t sure whether it was correct on an XML-level I ran Source/Format on it. Then I was able to see that it was actually correct.
  • I had an error symbol on my project and I could run it. There were, however, no errors indicated in the log. So I ran Project/Clean and it got rid of the problem. (From: http://stackoverflow.com/questions/3638660/undefined-error-when-trying-to-run-android-tutorial-form-stuff )
  • Then I had the error log: No command output when running: ‘am start -n google.map/google.map.HelloViewMap -a android.intent.action.MAIN -c android.intent.category.LAUNCHER’ on device emulator” specifically

eclipse.buildId=M20100909-0800java.version=1.6.0_24java.vendor=Sun Microsystems Inc.BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DEFramework arguments:  -product org.eclipse.epp.package.jee.productCommand-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

ErrorSat Apr 09 15:56:54 CEST 2011No command output when running: 'am start -n google.map/google.map.HelloViewMap -a android.intent.action.MAIN -c android.intent.category.LAUNCHER' on device emulator-5554
com.android.ddmlib.ShellCommandUnresponsiveException	at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:408)	at com.android.ddmlib.Device.executeShellCommand(Device.java:276)	at com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAction(Unknown Source)	at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchApp(Unknown Source)	at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.clientChanged(Unknown Source)	at com.android.ddmlib.AndroidDebugBridge.clientChanged(AndroidDebugBridge.java:867)	at com.android.ddmlib.Device.update(Device.java:398)	at com.android.ddmlib.Client.update(Client.java:834)	at com.android.ddmlib.HandleAppName.handleAPNM(HandleAppName.java:90)	at com.android.ddmlib.HandleAppName.handleChunk(HandleAppName.java:64)	at com.android.ddmlib.MonitorThread.callHandler(MonitorThread.java:414)	at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:322)	at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)

.  http://www.anddev.org/sdk-adt-emulator-problems-f16/unparsed-aapt-errors-check-the-console-for-output-t12615.html told me to just delete it or clean the project.

I’ll publish this now and might come back later

April 9, 2011 at 2:29 pm Leave a comment

VLC increase volume over 200%

How to increase the volume in VLC over the max setting of 200%: Click in the video and use the scrollwheel to get up to 400% volume.
Additionally: Open the amplifier and set the preamplifier to 20dB.

Continue Reading February 17, 2011 at 11:22 pm 2 comments

No video calls on iPhone 3G with skype app 3.0.0 (Not even one-way)

When calling an iPhone 3G with the new Skype app 3.0 you can not establish a two-way or even one-way video chat. I tried it.

Continue Reading December 31, 2010 at 11:57 am 2 comments

Adding temporary notes to LaTeX draft compiles

This is a short example code for comments in LaTeX draft documents. Depending on a variable at the start of the LaTeX document the comments are either compiled into the .pdf or .dvi file or they are kept out of it.

Continue Reading April 13, 2010 at 9:02 am Leave a comment

Use SpeedStep to Minimize Fan Noise even while laptop is plugged in – via Win XP command line

If you want to throttle your CPU via SpeedStep even while plugged in, you need to change a power scheme. You can add a new from the Power Options dialog (“control powercfg.cpl”) and change the SpeedStep behaviour while on AC via “POWERCFG.EXE /CHANGE MyPowerConfig1LowCPUSpeed /processor-throttle-ac CONSTANT”. This will slower the CPU so the fan won’t go on.

Continue Reading February 4, 2010 at 10:36 pm Leave a comment

Older Posts


Blog Stats

  • 16,361 hits