I hava 2 questions to ask.
1.After I start a new HTML plug-in project and compile it,virgo fails to start and tells me the following error message:
[2014-04-17 22:20:28.658] [INFO ] TCP Connection(18)-127.0.0.1 <DE0000I> Installing bundle 'com.fujitsu.evwcphtmlbridgeui.evwcp-htmlbridge' version '1.0.0'.
[2014-04-17 22:20:28.789] [INFO ] TCP Connection(18)-127.0.0.1 <ME0003I> Dump 'serviceability\dump\2014-04-17-22-20-779' generated
[2014-04-17 22:20:28.789] [ERROR] TCP Connection(18)-127.0.0.1 <DE0002E> Installation of bundle 'com.fujitsu.evwcphtmlbridgeui.evwcp-htmlbridge' version '1.0.0' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.fujitsu.evwcphtmlbridgeui.evwcp-htmlbridge' at version '1.0.0': Cannot resolve: com.fujitsu.evwcphtmlbridgeui.evwcp-htmlbridge
Resolver report:
An Import-Package could not be resolved. Resolver error data <Import-Package: com.fujitsu.evwcphtmlbridgeui.mvc; version="0.0.0">. Caused by missing constraint in bundle <com.fujitsu.evwcphtmlbridgeui.evwcp-htmlbridge_1.0.0>
constraint: <Import-Package: com.fujitsu.evwcphtmlbridgeui.mvc; version="0.0.0">
at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:46)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessGraph(CompensatingPipeline.java:73)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:359)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:185)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:253)
at org.eclipse.virgo.kernel.deployer.management.StandardDeployer.deploy(StandardDeployer.java:52)
at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:192)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:174)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:117)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:54)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:235)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1486)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:96)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1327)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1419)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:847)
at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Then,I refer to the following method in FAQ:
Q:Bundle installation fails because "An Import-Package could not be resolved"
A:This means that Virgo cannot find any installed bundle exporting the missing package:
(1)Either the bundle manifest's Import-Packages metadata is wrong (but this is unlikely if you used a tool like bundlor to generate it),
(2)Or the missing package is in a library which itself don't contain correct OSGI metadata (see how to package a library as an OSGI bundle),
(3)Or simply that the bundle exporting the package in question is not deployed yet! Check the bundle status list in the Virgo editor. Select the bundle and verify its list of exported packages.
(4)If you checked the previous points and the deployment error persists try to delete your server/work directory where bundles are cached and restart the server.
Step 1. I have finished.
Step 2. Even though I use "Virgo/Run Generation of MANIFEST.MF FILE" to get the file MANIFEST.MF, virgo still fails to start.
Step 3. There is no package called 'com.fujitsu.evwcphtmlbridgeui.mvc' in Bundle Overview.
Step 4. Don't work.
2.After building java code,I get a warning.Does it lead to the first question?
Buildfile: C:\sdk\workspace-sts\evwcp-htmlbridge-service\build-java.xml
clean:
[delete] Deleting directory C:\sdk\workspace-sts\evwcp-htmlbridge-service\target
[mkdir] Created dir: C:\sdk\workspace-sts\evwcp-htmlbridge-service\target\classes
compile-java:
[javac] Compiling 10 source files to C:\sdk\workspace-sts\evwcp-htmlbridge-service\target\classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] 1 warning
BUILD SUCCESSFUL
Total time: 2 seconds
Refering to the method in FAQ,I need to install JDK1.6,but the step 'add javac option -bootstrap jdk1.6.x/lib/rt.jar' makes me confused,I don't know how to do.
BTW:My Software Environment
Win7 x86
Java JDK 1.7.0_17
Apache Ant 1.9.2
Eclipse JEE
STS 2.9.2.RELEASE
Eclipse Virgo Tools I don't find the version
vSphere Client SDK Tools 1.0.0.201402061353
Flash Builder 4.7
Flex SDK 4.6
Flash Player 11.5 +
I have set the Java compiler option -target 1.6 in my build script.
> <Import-Package: com.acme.demo.services; version="0.0.0">"
Version 0.0.0 is a sign that the MANIFEST is missing in the deployed jar for that bundle (the default version is set to 1.0.0 in MANIFEST.MF)
Usually this means that the Eclipse or STS build wasn't clean. The work-around is to do "Project > Clean" and force a redeploy for that bundle. The Java console must show that version 1.0.0 was deployed. You can also see that in the full Virgo log.
Your UI bundle 'com.fujitsu.evwcphtmlbridgeui.evwcp-htmlbridge' declares com.fujitsu.evwcphtmlbridgeui.mvc in its MANIFEST.MF list of import packages, but no other bundle exporting this package has been deployed yet. This is case #3 in the FAQ, your java bundle must not have been deployed correctly (I assume this is the one exporting that package!) Check that project's build and make sure the bundle deploys correctly first.
laurentsd wrote:
Your UI bundle 'com.fujitsu.evwcphtmlbridgeui.evwcp-htmlbridge' declares com.fujitsu.evwcphtmlbridgeui.mvc in its MANIFEST.MF list of import packages, but no other bundle exporting this package has been deployed yet. This is case #3 in the FAQ, your java bundle must not have been deployed correctly (I assume this is the one exporting that package!) Check that project's build and make sure the bundle deploys correctly first.
I start a new HTML plug-in project(named "demo",and doesn't make any changes)and compile it, MANIFEST.MF is automatic constructed(\demo-service\src\main\resources\META-INF\MANIFEST.MF):
Manifest-Version: 1.0
Bundle-Vendor: VMware
Bundle-Version: 1.0.0
Tool: Bundlor 1.1.0.RELEASE
Bundle-Name: demo-service
Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.acme.demo.demo-service
Export-Package: com.acme.demo.services,
com.acme.demo.mvc
Import-Package: org.apache.commons.logging,
com.vmware.vise.data,
com.vmware.vise.data.query,
com.vmware.vise.vim.data,
javax.servlet.http,
org.eclipse.osgi.framework.internal.core,
org.springframework.beans.factory.annotation,
org.springframework.http,
org.springframework.stereotype,
org.springframework.web.bind.annotation,
org.springframework.web.context,
org.springframework.web.context.support,
org.springframework.web.servlet,
org.springframework.web.servlet.view,
org.springframework.web.servlet.view.json
after make-jar-bundle by ant build, I get demo-service.jar ,and I open it with 7-zip compatible tool, open MANIFEST.MF in demo-service\META-INF directory:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.7.0_17-b02 (Oracle Corporation)
Bundle-Vendor: VMware
Bundle-Version: 1.0.0
Tool: Bundlor 1.1.0.RELEASE
Bundle-Name: demo-service
Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.acme.demo.demo-service
Export-Package: com.acme.demo.services,com.acme.demo.mvc
Import-Package: org.apache.commons.logging,com.vmware.vise.data,com.vm
ware.vise.data.query,com.vmware.vise.vim.data,javax.servlet.http,org.
eclipse.osgi.framework.internal.core,org.springframework.beans.factor
y.annotation,org.springframework.http,org.springframework.stereotype,
org.springframework.web.bind.annotation,org.springframework.web.conte
xt,org.springframework.web.context.support,org.springframework.web.se
rvlet,org.springframework.web.servlet.view,org.springframework.web.se
rvlet.view.json
does my project's bundle deploys correctly?
but when I use the right-click menu Redeploy to force a redeployment of a particular bundle, I also get the same error " An Import-Package could not be resolved. Resolver error data <Import-Package: com.acme.demo.services; version="0.0.0">"
BTW:Do you need virgo's log?
> <Import-Package: com.acme.demo.services; version="0.0.0">"
Version 0.0.0 is a sign that the MANIFEST is missing in the deployed jar for that bundle (the default version is set to 1.0.0 in MANIFEST.MF)
Usually this means that the Eclipse or STS build wasn't clean. The work-around is to do "Project > Clean" and force a redeploy for that bundle. The Java console must show that version 1.0.0 was deployed. You can also see that in the full Virgo log.
laurentsd wrote:
> <Import-Package: com.acme.demo.services; version="0.0.0">"
Version 0.0.0 is a sign that the MANIFEST is missing in the deployed jar for that bundle (the default version is set to 1.0.0 in MANIFEST.MF)
Usually this means that the Eclipse or STS build wasn't clean. The work-around is to do "Project > Clean" and force a redeploy for that bundle. The Java console must show that version 1.0.0 was deployed. You can also see that in the full Virgo log.
thanks, it's my fault. After I do "Project > Clean", bulid .jar file and force a redeploy for that bundle, the virgo server started normally.