-
Oct 12th, 2012, 07:42 PM
#1
spring-context-3.1.0.RELEASE.jar in project cannot be read or is not a valid ZIP file
Hi,
I am new to STS but comfortable with Eclipse and Java. I did the following:
1. Downloaded the Eclipse integrated STS on to my Windows 7 64-bit machine
2. Created an MVC application using the template
3. I have NOT added any code to this because I first want to make sure that my barbones application from the template works
4. I deployed it onto the VMware tc server
5. I am seeing the following error:
Description Resource Path Location Type
Archive for required library: 'C:/Users/<username>/.m2/repository/org/springframework/spring-context/3.1.0.RELEASE/spring-context-3.1.0.RELEASE.jar' in project 'MasterFrameworkMVC' cannot be read or is not a valid ZIP file
6. I went to the location mentioned here and wanted to look at the contents of the jar. The result of that is -
$ jar tvf spring-context-3.1.0.RELEASE.jar
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\
bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\J AVA_S~1\classes\jasmine.jar
java.util.zip.ZipException: invalid CEN header (bad signature)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.zip.ZipFile.<init>(ZipFile.java:88)
at sun.tools.jar.Main.list(Main.java:979)
at sun.tools.jar.Main.run(Main.java:224)
at sun.tools.jar.Main.main(Main.java:1149)
All I did was install using Spring's installer, create an application using Spring's MVC template and attempt to run on the tc server provided by spring. Why am I seeing this error and how can I get past it?
Thanks a ton in advance
-
Oct 15th, 2012, 04:37 PM
#2
An update:
I just downloaded spring-context-3.1.0.RELEASE.jar again and replaced it in my install. I now have a different error:
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/MasterFrameworkMVC]]
at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployDescr iptor(HostConfig.java:650)
at org.apache.catalina.startup.HostConfig$DeployDescr iptor.run(HostConfig.java:1582)
at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError: org/springframework/core/NestedRuntimeException
at java.lang.ClassLoader.defineClass1(Native Method)
I do see this class in the spring-core-3.1.0.RELEASE.jar as shown below:
$ jar tvf spring-core-3.1.0.RELEASE.jar|grep "Nested"
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\
bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\J AVA_S~1\classes\jasmine.jar
1691 Tue Dec 13 01:10:34 PST 2011 org/springframework/core/NestedCheckedExcept
ion.class
890 Tue Dec 13 01:10:34 PST 2011 org/springframework/core/NestedExceptionUtil
s.class
1045 Tue Dec 13 01:10:34 PST 2011 org/springframework/core/NestedIOException.c
lass
1698 Tue Dec 13 01:10:34 PST 2011 org/springframework/core/NestedRuntimeExcept
ion.class
MY Questions are:
1. How do I put it on the VMware vFabric tc Server's classpath so that the runtime can find it?
2. The bigger question is: Doesn't STS and the MVC application from Spring's template set up all the necessary classpaths etc? Are there follow up steps and if yes, is it documented somewhere?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules