VMware {code} Community
infiniguy
Contributor
Contributor

HTML plug-in that works with VWC 5.5 does not work with VWC 6.0

Hi,

We have a plug-in that works fine when deployed in VWC 5.5u2, but in VWC 6.0 it loads up but in our tab in the vSphere client we get tomcat 404 page.

When VWC loads the plug-in, we see the following stack trace (attaching the full log as well):

2015-09-27T16:46:22.963Z] [INFO ] start-signalling-1 org.eclipse.virgo.medic.eventlog.default WE0000I Starting web bundle 'com.infinidat.powertools.develop.Guys-Air' version '1.0.0' with context path '/vsphere- client/com_infinidat_powertools_develop_Guys_Air'. [2015-09-27T16:46:22.970Z] [INFO ] iLogServiceListener@19d9a7a7 org.osgi.service.log.LogService WE0003I Bundle com.infinidat.powertools.develop.Guys-Air_1.0.0, BundleEvent STARTED [2015-09-27T16:46:25.879Z] [INFO ] start-signalling-1 .[.[.[/vsphere-client/com_infinidat_powertools_develop_Guy s_Air] No Spring WebApplicationInitializer types detected on classpath [2015-09-27T16:46:25.882Z] [INFO ] start-signalling-1 .[.[.[/vsphere-client/com_infinidat_powertools_develop_Guy s_Air] Marking servlet ProxyServlet as unavailable [2015-09-27T16:46:25.883Z] [ERROR] start-signalling-1 .[.[.[/vsphere-client/com_infinidat_powertools_develop_Guy s_Air] Servlet /vsphere-client/com_infinidat_powertools_develop_Guys_Air threw load() exception java.lang.ClassNotFoundExc eption: com.infinidat.proxyServlet.ProxyServlet at org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappClassLoader.loadClass(BundleWebappClassLoader.java:31 2) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:529) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:511) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:139) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1148) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)

 

I tried re-compiling the plug-in again against the 6.0 SDK, and still get the same error.

2015-09-27T16:46:22.963Z] [INFO ] start-signalling-1            org.eclipse.virgo.medic.eventlog.default
       WE0000I Starting web bundle 'com.infinidat.powertools.develop.Guys-Air' version '1.0.0' with context path '/vsphere-
client/com_infinidat_powertools_develop_Guys_Air'.
[2015-09-27T16:46:22.970Z] [INFO ] iLogServiceListener@19d9a7a7  org.osgi.service.log.LogService
       WE0003I Bundle com.infinidat.powertools.develop.Guys-Air_1.0.0, BundleEvent STARTED
[2015-09-27T16:46:25.879Z] [INFO ] start-signalling-1            .[.[.[/vsphere-client/com_infinidat_powertools_develop_Guy
s_Air]  No Spring WebApplicationInitializer types detected on classpath
[2015-09-27T16:46:25.882Z] [INFO ] start-signalling-1            .[.[.[/vsphere-client/com_infinidat_powertools_develop_Guy
s_Air]  Marking servlet ProxyServlet as unavailable
[2015-09-27T16:46:25.883Z] [ERROR] start-signalling-1            .[.[.[/vsphere-client/com_infinidat_powertools_develop_Guy
s_Air]  Servlet /vsphere-client/com_infinidat_powertools_develop_Guys_Air threw load() exception java.lang.ClassNotFoundExc
eption: com.infinidat.proxyServlet.ProxyServlet
        at org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappClassLoader.loadClass(BundleWebappClassLoader.java:31
2)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:529)
        at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:511)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:139)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1148)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
Reply
0 Kudos
8 Replies
Peter_Ivanov
VMware Employee
VMware Employee

There is problem loading the class

[2015-09-27T15:12:58.576Z] [ERROR] start-signalling-1            .[.[.[/vsphere-client/com_infinidat_powertools_develop_Guys_Air]  Servlet /vsphere-client/com_infinidat_powertools_develop_Guys_Air threw load() exception java.lang.ClassNotFoundException: com.infinidat.proxyServlet.ProxyServlet

  at org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappClassLoader.loadClass(BundleWebappClassLoader.java:312)

  at java.lang.ClassLoader.loadClass(Unknown Source)

I assume ProxyServlet is your class. Which class does it extend from? Have you modified it between the releases?

This seems to me like missing package in the Import-Packages section of your MANIFEST.MF file. But I can only guess without seeing the file.

It will be very helpful if you could post this class. (You can send it privately to me, if you want).

Reply
0 Kudos
infiniguy
Contributor
Contributor

Yes, it is our class, it implements javax.servlet.Servlet. We didn't modify anything -- the same package works on VWC 5.5 but not on 6.0.

 

I'm attaching the source.

Reply
0 Kudos
infiniguy
Contributor
Contributor

I'm also attaching the manifest.
Reply
0 Kudos
Peter_Ivanov
VMware Employee
VMware Employee

I don't see anything wrong with your proxy class or manifest.

Few more questions:

1) Are you using Spring framework in your plugin?

I guess you do, because I can see the imported packages statements in the manifest.

I am seeing errors about missing Spring "No Spring WebApplicationInitializer types detected on classpath" which bother me...

2) Which Java version are you using when building your plugin? You should build your plugin with Java 1.6 because this is the version of the JRE used in the Web Client.

3) Which library do you use to refer javax.servlet.Servlet?

Are you using javax.servlet-api-xxx.jar/tomcat-servlet-api-xxx.jar/other and which version exactly?

4) Can you also attach your web.xml file?

Between 5.5 and 6.0 we have changed the version of the virgo web server. So it is possible that it comes with different version of the jar files you reference.

Reply
0 Kudos
infiniguy
Contributor
Contributor

1) Yes, we are.

I'm guessing this is a big part of the problem -- and yet I don't understand what has changed since VC5.5; from what I can see you only bumped trivial/minor versions of the web frameworks

2) Same results when compiling with Java6, Java7 or Java8

3) We tried both com.springsource.javax.servlet-2.5.0.jar and javax.servlet-api-3.0.1.jar that comes with the 6.0 SDK

4) attaching our web.xml

Reply
0 Kudos
Peter_Ivanov
VMware Employee
VMware Employee

Which version of the SDK are you using? 6.0 or 6.0 Update 1?

I saw that you are using classes from "com.vmware.vim25" package. These come from vim25.jar.

We have identified that in 6.0.1 there is a problem with the vim25.jar that we have shipped with the SDK.

If you are using 6.0.1 SDK, can you get the vim25.jar from 6.0.0 SDK and try again.

Reply
0 Kudos
infiniguy
Contributor
Contributor

Same happens when I use the 6.0.0 SDK.
Reply
0 Kudos
Peter_Ivanov
VMware Employee
VMware Employee

Sorry for the delay.

Without having the whole plugin there is nothing more that I can do for your. If you like you can send to me (privately) the minimal set that reproduces your problem.

For instance a war project with the web.xml, your ProxyServlet and all referenced classes.

I need to deploy and debug it on-site to be able to help.

Reply
0 Kudos