Hi everyone,
I am trying to use the "console-theme-plugin-10.0.0-SNAPSHOT.jar"
bundle. When the code attempts to retrieve the file:
"META-INF/services/com.sun.webui.theme.ThemeService" from the jar, it
cannot find it (see trace below).
I am completely lost on how to fix this. Ideas? File exists in the
bundle, not sure if I need a special export for it -- do I? I am
accessing this via Jerome's "Glassfish-require-services" feature from
the webapp classloader. MANIFEST.MF is also attached.
Thanks!
Ken
SEVERE: StandardWrapperValve[FacesServlet]: PWC1406: Servlet.service()
for servlet FacesServlet threw exception
java.lang.IllegalArgumentException: Failed to set property (height) with
value (1), which is of type (java.lang.String). Expected type (int).
This occured on the component named (sun_image5) of type
(com.sun.webui.jsf.component.ImageComponent).
at
com.sun.jsftemplating.component.ComponentUtil.setOption(ComponentUtil.java:482)
at
com.sun.jsftemplating.component.factory.ComponentFactoryBase.setOption(ComponentFactoryBase.java:134)
at
com.sun.jsftemplating.component.factory.ComponentFactoryBase.setOptions(ComponentFactoryBase.java:106)
at
com.sun.jsftemplating.component.factory.sun.ImageComponentFactory.create(ImageComponentFactory.java:65)
at
com.sun.jsftemplating.component.ComponentUtil.createChildComponent(ComponentUtil.java:400)
at
com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:290)
at
com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:552)
at
com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:581)
at
com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:581)
at
com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:251)
at
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:205)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at
com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at
com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:80)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:337)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
at
org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:460)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:307)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at
com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:610)
at
com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:547)
at
com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:783)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at
com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
at
com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
Caused by: javax.faces.FacesException: java.lang.NoClassDefFoundError:
com/sun/webui/theme/ThemeService
at
javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:1651)
at
javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:1526)
at
com.sun.jsftemplating.component.ComponentUtil.setOption(ComponentUtil.java:480)
... 53 more
Caused by: java.lang.NoClassDefFoundError: com/sun/webui/theme/ThemeService
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
org.apache.felix.framework.searchpolicy.ContentClassLoader.findClass(ContentClassLoader.java:214)
at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClassFromModule(ContentClassLoader.java:85)
at
org.apache.felix.framework.searchpolicy.ContentLoaderImpl.getClass(ContentLoaderImpl.java:162)
at
org.apache.felix.framework.searchpolicy.R4Wire.getClass(R4Wire.java:101)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.searchImports(R4SearchPolicyCore.java:505)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:466)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
at
org.apache.felix.moduleloader.ModuleImpl.getClass(ModuleImpl.java:179)
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1503)
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:358)
at
org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2.loadClass(OSGiModuleImpl.java:315)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1413)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at sun.misc.Service$LazyIterator.next(Service.java:271)
at
com.sun.webui.theme.SPIThemeFactory.findThemeServiceReferences(SPIThemeFactory.java:611)
at
com.sun.webui.theme.SPIThemeFactory.findThemeReferences(SPIThemeFactory.java:544)
at
com.sun.webui.theme.SPIThemeFactory.getThemeResources(SPIThemeFactory.java:464)
at
com.sun.webui.theme.SPIThemeFactory.getTheme(SPIThemeFactory.java:178)
at
com.sun.webui.jsf.util.ThemeUtilities.getTheme(ThemeUtilities.java:138)
at
com.sun.webui.jsf.component.ImageComponent.getTheme(ImageComponent.java:919)
at
com.sun.webui.jsf.component.ImageComponent.initThemeImage(ImageComponent.java:914)
at
com.sun.webui.jsf.component.ImageComponent.getHeight(ImageComponent.java:286)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:1636)
... 55 more
Caused by: java.lang.ClassNotFoundException:
com.sun.webui.theme.ThemeService
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 91 more
Caused by: java.lang.ClassNotFoundException:
com.sun.webui.theme.ThemeService
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.searchDynamicImports(R4SearchPolicyCore.java:602)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:478)
at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)
... 95 more
FYI.... I worked-around my previous problem, although I'm not happy with
the work-a-round. I marked 2 packages that the bundle was importing &
exporting as "optional" imports to get the bundle to load -- removing
the version information from import in the Manifest also fixed the
problem, but I couldn't figure out how to create a pom.xml that dropped
the version information. If anyone knows what was wrong w/ previous
pom.xml or MANIFEST that prevented it from finding classes in the same
bundle which imported/exported them, let me know. - Ken
Manifest-Version: 1.0
Export-Package: woodstock4_3.suntheme.javascript._html,woodstock4_3.su
ntheme.javascript_uncompressed.widget,woodstock4_3.suntheme.propertie
s,woodstock4_3.suntheme.images.addremove,woodstock4_3.suntheme.javasc
ript.widget._base,woodstock4_3.suntheme.images.bubble,woodstock4_3.su
ntheme.javascript_uncompressed.theme.nls,woodstock4_3.suntheme.images
.login,woodstock4_3.suntheme.javascript_uncompressed.widget._base,woo
dstock4_3.suntheme.templates,woodstock4_3.suntheme.images.alarms,wood
stock4_3.suntheme.css,woodstock4_3.suntheme.images.scheduler,woodstoc
k4_3.suntheme.css_uncompressed,woodstock4_3.suntheme.images.commontas
kssection,woodstock4_3.suntheme.javascript._base,woodstock4_3.sunthem
e.images.pagetitle,woodstock4_3.suntheme.javascript_uncompressed._doj
o,woodstock4_3.suntheme.images.accordion,woodstock4_3.suntheme.images
.calendar,woodstock4_3.suntheme.images.masthead,woodstock4_3.suntheme
.images.file-chooser,woodstock4_3.suntheme.images.inlineAlert,woodsto
ck4_3.suntheme.images.href,woodstock4_3.suntheme.images.button,woodst
ock4_3.suntheme.javascript_uncompressed.widget._xhr,branding,org.glas
sfish.admingui.customtheme;uses:="org.glassfish.api.admingui,org.jvne
t.hk2.annotations",woodstock4_3.suntheme.images.table2,woodstock4_3.s
untheme;uses:="com.sun.webui.theme",woodstock4_3.suntheme.images.help
,woodstock4_3.suntheme.javascript._dojo._firebug,woodstock4_3.sunthem
e.images.wizard,woodstock4_3.suntheme.images.progressBar,woodstock4_3
.suntheme.javascript_uncompressed,woodstock4_3.suntheme.images.table,
woodstock4_3.suntheme.images.tree,woodstock4_3.suntheme.javascript.wi
dget,woodstock4_3.suntheme.javascript.widget._jsfx,woodstock4_3.sunth
eme.javascript_uncompressed._dojo._firebug,woodstock4_3.suntheme.imag
es.rating,woodstock4_3.suntheme.javascript.widget._xhr,woodstock4_3.s
untheme.images.version,woodstock4_3.suntheme.images.leftpane,woodstoc
k4_3.suntheme.javascript,woodstock4_3.suntheme.images.field,woodstock
4_3.suntheme.javascript.theme,woodstock4_3.suntheme.images.titledbox,
woodstock4_3.suntheme.javascript_uncompressed.widget._jsfx,woodstock4
_3.suntheme.javascript.theme.nls,woodstock4_3.suntheme.javascript_unc
ompressed._html,woodstock4_3.suntheme.images.alerts,woodstock4_3.sunt
heme.javascript_uncompressed.theme,woodstock4_3.suntheme.messages,woo
dstock4_3.suntheme.images.topology,woodstock4_3.suntheme.javascript._
dojo,woodstock4_3.suntheme.images.other,woodstock4_3.suntheme.images.
modalWindow,woodstock4_3.suntheme.images.tabs,woodstock4_3.suntheme.j
avascript_uncompressed._base,woodstock4_3.suntheme.images.dnd
Built-By: paulsen
X-SJWUIC-Theme-Templates: woodstock4_3.suntheme.properties.templates
Tool: Bnd-0.0.255
X-SJWUIC-Theme-Timestamp: 200807161313
X-SJWUIC-Theme-Prefix: /theme
X-SJWUIC-SWAED-Version: 4.0
Bundle-License:
https://glassfish.dev.java.net/nonav/public/CDDL+GPL.h
tml
Bundle-SymbolicName: org.glassfish.admingui.console-theme-plugin
X-SJWUIC-Theme-Stylesheets: woodstock4_3.suntheme.properties.styleshee
ts
X-SJWUIC-Theme-Images: woodstock4_3.suntheme.properties.images
X-SJWUIC-Theme-Name: suntheme
X-SJWUIC-Theme-Messages: woodstock4_3.suntheme.messages.messages
X-SJWUIC-Theme-ClassMapper: woodstock4_3.suntheme.properties.styles
Bundle-Name: Admin Console Custom Plugin
Created-By: Apache Maven Bundle Plugin
X-SJWUIC-Theme-JavaScript: woodstock4_3.suntheme.properties.javascript
Bundle-Vendor: Sun Microsystems, Inc.
X-SJWUIC-Theme-Version: 4.3
Build-Jdk: 1.6.0_06
Bundle-Version: 10.0.0.SNAPSHOT
Bnd-LastModified: 1222289602815
Bundle-ManifestVersion: 2
Bundle-Description: Custom Theme Plugin for Glassfish V3 Admin Console
Bundle-DocURL:
http://www.sun.com
Embed-Dependency: *;artifactId=webui-jsf-suntheme;inline=true
Import-Package: branding;resolution:=optional;version="10.0.0.SNAPSHOT
",com.sun.webui.theme;resolution:=optional,org.glassfish.admingui.cus
tomtheme;resolution:=optional;version="10.0.0.SNAPSHOT",org.glassfish
.api.admingui;version="10.0",org.jvnet.hk2.annotations,woodstock4_3.s
untheme,woodstock4_3.suntheme.css,woodstock4_3.suntheme.css_uncompres
sed,woodstock4_3.suntheme.images.accordion,woodstock4_3.suntheme.imag
es.addremove,woodstock4_3.suntheme.images.alarms,woodstock4_3.sunthem
e.images.alerts,woodstock4_3.suntheme.images.bubble,woodstock4_3.sunt
heme.images.button,woodstock4_3.suntheme.images.calendar,woodstock4_3
.suntheme.images.commontaskssection,woodstock4_3.suntheme.images.dnd,
woodstock4_3.suntheme.images.field,woodstock4_3.suntheme.images.file-
chooser,woodstock4_3.suntheme.images.help,woodstock4_3.suntheme.image
s.href,woodstock4_3.suntheme.images.inlineAlert,woodstock4_3.suntheme
.images.leftpane,woodstock4_3.suntheme.images.login,woodstock4_3.sunt
heme.images.masthead,woodstock4_3.suntheme.images.modalWindow,woodsto
ck4_3.suntheme.images.other,woodstock4_3.suntheme.images.pagetitle,wo
odstock4_3.suntheme.images.progressBar,woodstock4_3.suntheme.images.r
ating,woodstock4_3.suntheme.images.scheduler,woodstock4_3.suntheme.im
ages.table,woodstock4_3.suntheme.images.table2,woodstock4_3.suntheme.
images.tabs,woodstock4_3.suntheme.images.titledbox,woodstock4_3.sunth
eme.images.topology,woodstock4_3.suntheme.images.tree,woodstock4_3.su
ntheme.images.version,woodstock4_3.suntheme.images.wizard,woodstock4_
3.suntheme.javascript,woodstock4_3.suntheme.javascript._base,woodstoc
k4_3.suntheme.javascript._dojo,woodstock4_3.suntheme.javascript._dojo
._firebug,woodstock4_3.suntheme.javascript._html,woodstock4_3.sunthem
e.javascript.theme,woodstock4_3.suntheme.javascript.theme.nls,woodsto
ck4_3.suntheme.javascript.widget,woodstock4_3.suntheme.javascript.wid
get._base,woodstock4_3.suntheme.javascript.widget._jsfx,woodstock4_3.
suntheme.javascript.widget._xhr,woodstock4_3.suntheme.javascript_unco
mpressed,woodstock4_3.suntheme.javascript_uncompressed._base,woodstoc
k4_3.suntheme.javascript_uncompressed._dojo,woodstock4_3.suntheme.jav
ascript_uncompressed._dojo._firebug,woodstock4_3.suntheme.javascript_
uncompressed._html,woodstock4_3.suntheme.javascript_uncompressed.them
e,woodstock4_3.suntheme.javascript_uncompressed.theme.nls,woodstock4_
3.suntheme.javascript_uncompressed.widget,woodstock4_3.suntheme.javas
cript_uncompressed.widget._base,woodstock4_3.suntheme.javascript_unco
mpressed.widget._jsfx,woodstock4_3.suntheme.javascript_uncompressed.w
idget._xhr,woodstock4_3.suntheme.messages,woodstock4_3.suntheme.prope
rties,woodstock4_3.suntheme.templates