users@glassfish.java.net

Re: Primefaces.jar as GlassFish module

From: Peter Penzov <peter.penzov_at_gmail.com>
Date: Tue, 5 Jun 2012 22:33:51 +0300

I managed to deploy Primefaces as module with the command: add-library
--type common /opt/primefaces.jar

I don't know why but now I get a second problem. I cannot deploy my OSGI
package. This is the Glassfish error stack:

Jun 5, 2012 10:27:13 PM com.sun.enterprise.admin.launcher.GFLauncherLogger
info
INFO: JVM invocation command line:
-XX:+UnlockDiagnosticVMOptions
-XX:PermSize=64m
-XX:MaxPermSize=192m
-XX:NewRatio=2
-Xmx512m
-client
-javaagent:/opt/glassfish3/glassfish/lib/monitor/flashlight-agent.jar
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.disableConfigSave=false
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=/opt/glassfish3/glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=/opt/glassfish3/glassfish/domains/domain1/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=/opt/glassfish3/glassfish/domains/domain1/config/server.policy
-Djava.awt.headless=true
-Dfelix.fileinstall.log.level=2
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=/opt/glassfish3/glassfish/domains/domain1
-Dosgi.shell.telnet.ip=127.0.0.1
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Djava.endorsed.dirs=/opt/glassfish3/glassfish/modules/endorsed:/opt/glassfish3/glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=/opt/glassfish3/glassfish
-Dfelix.fileinstall.bundles.startTransient=true
-Djava.ext.dirs=/opt/jdk1.7.0_03/lib/ext:/opt/jdk1.7.0_03/jre/lib/ext:/opt/glassfish3/glassfish/domains/domain1/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=/opt/glassfish3/glassfish/domains/domain1/config/cacerts.jks
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=/opt/glassfish3/glassfish/domains/domain1/config/login.conf
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dgosh.args=--nointeractive
Jun 5, 2012 10:27:13 PM com.sun.enterprise.admin.launcher.GFLauncherLogger
info
INFO: Successfully launched in 9 msec.
[#|2012-06-05T22:27:18.358+0300|INFO|glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=Thread-2;|Running
GlassFish Version: GlassFish Server Open Source Edition 3.1.2 (build 23)|#]

[#|2012-06-05T22:27:19.012+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=20;_ThreadName=Thread-2;|Grizzly
Framework 1.9.46 started in: 166ms - bound to [0.0.0.0:8080]|#]

[#|2012-06-05T22:27:19.010+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=22;_ThreadName=Thread-2;|Grizzly
Framework 1.9.46 started in: 63ms - bound to [0.0.0.0:8181]|#]

[#|2012-06-05T22:27:19.150+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-2;|Grizzly
Framework 1.9.46 started in: 65ms - bound to [0.0.0.0:4848]|#]

[#|2012-06-05T22:27:19.177+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=29;_ThreadName=Thread-2;|Grizzly
Framework 1.9.46 started in: 37ms - bound to [0.0.0.0:3700]|#]

[#|2012-06-05T22:27:19.193+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=32;_ThreadName=Thread-2;|Grizzly
Framework 1.9.46 started in: 13ms - bound to [0.0.0.0:7676]|#]

[#|2012-06-05T22:27:19.521+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=1;_ThreadName=Thread-2;|The
Admin Console is already installed, but not yet loaded.|#]

[#|2012-06-05T22:27:19.548+0300|INFO|glassfish3.1.2|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=1;_ThreadName=Thread-2;|Registered
org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for
persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2012-06-05T22:27:19.663+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=Thread-2;|GlassFish
Server Open Source Edition 3.1.2 (23) startup time : Felix (3,749ms),
startup services(2,013ms), total(5,762ms)|#]

[#|2012-06-05T22:27:20.239+0300|INFO|glassfish3.1.2|javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver|_ThreadID=39;_ThreadName=Thread-2;|JMX005:
JMXStartupService had Started JMXConnector on JMXService URL
service:jmx:rmi://Testserver:8686/jndi/rmi://Testserver:8686/jmxrmi|#]

[#|2012-06-05T22:27:21.096+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=49;_ThreadName=Thread-2;|The
Admin Console is already installed, but not yet loaded.|#]

[#|2012-06-05T22:27:21.097+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=49;_ThreadName=Thread-2;|The
Admin Console is starting. Please wait.|#]

[#|2012-06-05T22:27:23.603+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=12;_ThreadName=Thread-2;|WEB0169:
Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]

[#|2012-06-05T22:27:23.644+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=12;_ThreadName=Thread-2;|WEB0169:
Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]|#]

[#|2012-06-05T22:27:23.671+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=12;_ThreadName=Thread-2;|WEB0169:
Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848]|#]

[#|2012-06-05T22:27:23.872+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=12;_ThreadName=Thread-2;|WEB0171:
Created virtual server [server]|#]

[#|2012-06-05T22:27:23.896+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=12;_ThreadName=Thread-2;|WEB0171:
Created virtual server [__asadmin]|#]

[#|2012-06-05T22:27:24.902+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=12;_ThreadName=Thread-2;|WEB0172:
Virtual server [server] loaded default web module []|#]

[#|2012-06-05T22:27:26.880+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=49;_ThreadName=Thread-2;|SEC1002:
Security Manager is OFF.|#]

[#|2012-06-05T22:27:26.897+0300|INFO|glassfish3.1.2|org.glassfish.osgihttp|_ThreadID=12;_ThreadName=Thread-2;|defaultVirtualServer
= server|#]

[#|2012-06-05T22:27:26.990+0300|INFO|glassfish3.1.2|org.apache.catalina.startup.ContextConfig|_ThreadID=12;_ThreadName=Thread-2;|No
default web.xml|#]

[#|2012-06-05T22:27:27.003+0300|INFO|glassfish3.1.2|org.glassfish.osgihttp|_ThreadID=12;_ThreadName=Thread-2;|standardContext
=
StandardEngine[glassfish-web].StandardHost[server].StandardContext[/osgi]|#]

[#|2012-06-05T22:27:27.020+0300|INFO|glassfish3.1.2|org.apache.catalina.startup.ContextConfig|_ThreadID=12;_ThreadName=Thread-2;|No
default web.xml|#]

[#|2012-06-05T22:27:27.037+0300|INFO|glassfish3.1.2|org.glassfish.osgihttp|_ThreadID=12;_ThreadName=Thread-2;|standardContext
=
StandardEngine[glassfish-web].StandardHost[__asadmin].StandardContext[/osgi]|#]

[#|2012-06-05T22:27:27.170+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=49;_ThreadName=Thread-2;|SEC1010:
Entering Security Startup Service|#]

[#|2012-06-05T22:27:27.188+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=49;_ThreadName=Thread-2;|SEC1143:
Loading policy provider
com.sun.enterprise.security.provider.PolicyWrapper.|#]

[#|2012-06-05T22:27:27.346+0300|INFO|glassfish3.1.2|org.glassfish.osgi.felixwebconsoleextension|_ThreadID=12;_ThreadName=Thread-2;|Registered
org.glassfish.osgi.felixwebconsoleextension.GlassFishBrandingPlugin_at_1b672bd6
|#]

[#|2012-06-05T22:27:27.448+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=49;_ThreadName=Thread-2;|SEC1115:
Realm [admin-realm] of classtype
[com.sun.enterprise.security.auth.realm.file.FileRealm] successfully
created.|#]

[#|2012-06-05T22:27:27.450+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=49;_ThreadName=Thread-2;|SEC1115:
Realm [file] of classtype
[com.sun.enterprise.security.auth.realm.file.FileRealm] successfully
created.|#]

[#|2012-06-05T22:27:27.481+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=49;_ThreadName=Thread-2;|SEC1115:
Realm [certificate] of classtype
[com.sun.enterprise.security.auth.realm.certificate.CertificateRealm]
successfully created.|#]

[#|2012-06-05T22:27:27.514+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=49;_ThreadName=Thread-2;|SEC1011:
Security Service(s) Started Successfully|#]

[#|2012-06-05T22:27:31.261+0300|INFO|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=49;_ThreadName=Thread-2;|Initializing
Mojarra 2.1.6 (SNAPSHOT 20111206) for context ''|#]

[#|2012-06-05T22:27:33.317+0300|INFO|glassfish3.1.2|org.hibernate.validator.util.Version|_ThreadID=49;_ThreadName=Thread-2;|Hibernate
Validator 4.2.0.Final|#]

[#|2012-06-05T22:27:34.577+0300|INFO|glassfish3.1.2|org.primefaces.webapp.PostConstructApplicationEventListener|_ThreadID=49;_ThreadName=Thread-2;|Running
on PrimeFaces 3.3|#]

[#|2012-06-05T22:27:34.706+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=49;_ThreadName=Thread-2;|WEB0671:
Loading application [__admingui] at [/]|#]

[#|2012-06-05T22:27:34.709+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=49;_ThreadName=Thread-2;|CORE10010:
Loading application __admingui done in 13,611 ms|#]

[#|2012-06-05T22:27:34.710+0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=49;_ThreadName=Thread-2;|The
Admin Console application is loaded.|#]

[#|2012-06-05T22:27:48.180+0300|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.com.sun.enterprise.container.common|_ThreadID=66;_ThreadName=Thread-2;|User
[] from host localhost does not have administration access|#]

[#|2012-06-05T22:27:55.245+0300|INFO|glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=65;_ThreadName=Thread-2;|Created
EjbThreadPoolExecutor with thread-core-pool-size 16 thread-max-pool-size 32
thread-keep-alive-seconds 60 thread-queue-capacity 2147483647
allow-core-thread-timeout false |#]

[#|2012-06-05T22:27:57.054+0300|INFO|glassfish3.1.2|com.sun.jersey.server.impl.application.WebApplicationImpl|_ThreadID=65;_ThreadName=Thread-2;|Initiating
Jersey application, version 'Jersey: 1.11 12/09/2011 10:27 AM'|#]

[#|2012-06-05T22:27:58.055+0300|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.admin.rest.adapter|_ThreadID=65;_ThreadName=Thread-2;|REST00001:
Listening to REST requests at context: /management/domain|#]

[#|2012-06-05T22:27:58.091+0300|INFO|glassfish3.1.2|org.glassfish.admingui|_ThreadID=74;_ThreadName=Thread-2;|Redirecting
to /|#]

[#|2012-06-05T22:27:58.160+0300|WARNING|glassfish3.1.2|org.apache.catalina.connector.Request|_ThreadID=71;_ThreadName=Thread-2;|PWC4011:
Unable to set request character encoding to UTF-8 from context , because
request parameters have already been read, or ServletRequest.getReader()
has already been called|#]

[#|2012-06-05T22:27:58.388+0300|WARNING|glassfish3.1.2|org.apache.catalina.connector.Request|_ThreadID=70;_ThreadName=Thread-2;|PWC4011:
Unable to set request character encoding to UTF-8 from context , because
request parameters have already been read, or ServletRequest.getReader()
has already been called|#]

[#|2012-06-05T22:27:58.961+0300|INFO|glassfish3.1.2|org.glassfish.admingui|_ThreadID=70;_ThreadName=Thread-2;|Admin
Console: Initializing Session Attributes...|#]

[#|2012-06-05T22:28:07.265+0300|WARNING|glassfish3.1.2|org.apache.catalina.connector.Request|_ThreadID=72;_ThreadName=Thread-2;|PWC4011:
Unable to set request character encoding to UTF-8 from context , because
request parameters have already been read, or ServletRequest.getReader()
has already been called|#]

[#|2012-06-05T22:28:09.991+0300|WARNING|glassfish3.1.2|org.apache.catalina.connector.Request|_ThreadID=65;_ThreadName=Thread-2;|PWC4011:
Unable to set request character encoding to UTF-8 from context , because
request parameters have already been read, or ServletRequest.getReader()
has already been called|#]

[#|2012-06-05T22:28:21.267+0300|WARNING|glassfish3.1.2|org.apache.catalina.connector.Request|_ThreadID=199;_ThreadName=Thread-2;|PWC4011:
Unable to set request character encoding to UTF-8 from context , because
request parameters have already been read, or ServletRequest.getReader()
has already been called|#]

[#|2012-06-05T22:28:21.440+0300|INFO|glassfish3.1.2|org.glassfish.admingui|_ThreadID=199;_ThreadName=Thread-2;|GUI
deployment: uploadToTempfile|#]

[#|2012-06-05T22:28:21.470+0300|INFO|glassfish3.1.2|org.glassfish.admingui|_ThreadID=199;_ThreadName=Thread-2;|uploadFileName=History-Module-57-1.0-SNAPSHOT.war|#]

[#|2012-06-05T22:28:22.060+0300|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=200;_ThreadName=Thread-2;|Installed
com.DX_57.History-Module-57 [761] from
reference:file:/opt/glassfish3/glassfish/domains/domain1/applications/History-Module-57-1.0-SNAPSHOT/|#]

[#|2012-06-05T22:28:22.071+0300|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=200;_ThreadName=Thread-2;|Exception
while invoking class org.glassfish.extras.osgicontainer.OSGiDeployedBundle
start method
java.lang.RuntimeException: org.osgi.framework.BundleException: Unresolved
constraint in bundle com.DX_57.History-Module-57 [761]: Unable to resolve
761.0: missing requirement [761.0] osgi.wiring.package;
(&(osgi.wiring.package=org.primefaces.model.chart)(version>=3.3.0))
    at
org.glassfish.extras.osgicontainer.OSGiDeployedBundle.startBundle(OSGiDeployedBundle.java:110)
    at
org.glassfish.extras.osgicontainer.OSGiDeployedBundle.resume(OSGiDeployedBundle.java:83)
    at
org.glassfish.extras.osgicontainer.OSGiDeployedBundle.start(OSGiDeployedBundle.java:67)
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
    at
org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
    at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
    at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:391)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
    at
org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:214)
    at
org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:207)
    at
org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
    at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
    at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
    at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
    at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
    at
com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
    at
com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
    at
org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:148)
    at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
    at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
    at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
    at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)
Caused by: org.osgi.framework.BundleException: Unresolved constraint in
bundle com.DX_57.History-Module-57 [761]: Unable to resolve 761.0: missing
requirement [761.0] osgi.wiring.package;
(&(osgi.wiring.package=org.primefaces.model.chart)(version>=3.3.0))
    at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
    at
org.glassfish.extras.osgicontainer.OSGiDeployedBundle.startBundle(OSGiDeployedBundle.java:107)
    ... 56 more
|#]

[#|2012-06-05T22:28:22.074+0300|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=200;_ThreadName=Thread-2;|Exception
while loading the app|#]

[#|2012-06-05T22:28:22.093+0300|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=200;_ThreadName=Thread-2;|Uninstalled
com.DX_57.History-Module-57 [761]|#]

[#|2012-06-05T22:28:22.111+0300|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=200;_ThreadName=Thread-2;|Exception
while loading the app : org.osgi.framework.BundleException: Unresolved
constraint in bundle com.DX_57.History-Module-57 [761]: Unable to resolve
761.0: missing requirement [761.0] osgi.wiring.package;
(&(osgi.wiring.package=org.primefaces.model.chart)(version>=3.3.0))
org.osgi.framework.BundleException: Unresolved constraint in bundle
com.DX_57.History-Module-57 [761]: Unable to resolve 761.0: missing
requirement [761.0] osgi.wiring.package;
(&(osgi.wiring.package=org.primefaces.model.chart)(version>=3.3.0))
    at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
    at
org.glassfish.extras.osgicontainer.OSGiDeployedBundle.startBundle(OSGiDeployedBundle.java:107)
    at
org.glassfish.extras.osgicontainer.OSGiDeployedBundle.resume(OSGiDeployedBundle.java:83)
    at
org.glassfish.extras.osgicontainer.OSGiDeployedBundle.start(OSGiDeployedBundle.java:67)
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
    at
org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
    at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
    at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:391)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
    at
org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:214)
    at
org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:207)
    at
org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
    at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
    at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
    at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
    at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
    at
com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
    at
com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
    at
org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:148)
    at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
    at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
    at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
    at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)
|#]

[#|2012-06-05T22:28:22.131+0300|INFO|glassfish3.1.2|org.glassfish.admingui|_ThreadID=199;_ThreadName=Thread-2;|Exception
Occurred :Error occurred during deployment: Exception while loading the app
: org.osgi.framework.BundleException: Unresolved constraint in bundle
com.DX_57.History-Module-57 [761]: Unable to resolve 761.0: missing
requirement [761.0] osgi.wiring.package;
(&(osgi.wiring.package=org.primefaces.model.chart)(version>=3.3.0)). Please
see server.log for more details.|#]


Maybe my POM.xml file is wrong?


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.DX_57</groupId>
    <artifactId>History-Module-57</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>History-Module-57</name>

    <properties>
        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>6.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>3.3</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>4.3.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <version>4.3.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>osgi-cdi-api</artifactId>
            <version>3.2-b03</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>

            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.3.7</version>
                    <extensions>true</extensions>
                    <configuration>
                        <supportedProjectTypes>
                            <supportedProjectType>ejb</supportedProjectType>
                            <supportedProjectType>war</supportedProjectType>

<supportedProjectType>bundle</supportedProjectType>
                            <supportedProjectType>jar</supportedProjectType>
                        </supportedProjectTypes>
                        <instructions>
                            <!-- Read all OSGi configuration info from this
optional file -->
                            <_include>-osgi.properties</_include>
                            <!-- By default, we don't export anything -->
                            <Export-Package>!*.impl.*, *</Export-Package>
                        </instructions>
                    </configuration>
                    <executions>
                        <execution>
                            <id>bundle-manifest</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>manifest</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>bundle-install</id>
                            <phase>install</phase>
                            <goals>
                                <goal>install</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin> <!-- Need to use this plugin to build war files -->
                    <artifactId>maven-war-plugin</artifactId>
                    <groupId>org.apache.maven.plugins</groupId>
                    <!-- Use version 2.1-beta-1, as it supports the new
property failOnMissingWebXml -->
                    <version>2.2</version>
                    <configuration>
                        <archive>
                            <!-- add bundle plugin generated manifest to
the war -->
                            <manifestFile>

${project.build.outputDirectory}/META-INF/MANIFEST.MF
                            </manifestFile>
                            <!-- For some reason, adding Bundle-ClassPath
in maven-bundle-plugin
                            confuses that plugin and it generates wrong
Import-Package, etc.
                            So, we generate it here.
                            -->
                            <manifestEntries>
                                <Bundle-ClassPath>WEB-INF/classes/
                                </Bundle-ClassPath>
                            </manifestEntries>
                        </archive>
                    <!-- We don't have a web.xml -->
                        <failOnMissingWebXml>false</failOnMissingWebXml>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>

<outputDirectory>${endorsed.dir}</outputDirectory>
                            <silent>true</silent>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>javax</groupId>

<artifactId>javaee-endorsed-api</artifactId>
                                    <version>6.0</version>
                                    <type>jar</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dir}</endorseddirs>
                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <!-- Enable this plugin for all modules -->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>glassfish-repo</id>
            <name>The Glassfish repository</name>
            <url>http://download.java.net/maven/glassfish/</url>
        </repository>
        <repository>
            <id>prime-repo</id>
            <name>PrimeFaces Maven Repository</name>
            <url>http://repository.primefaces.org</url>
            <layout>default</layout>
        </repository>
    </repositories>
    <description>Module History Module</description>
</project>

How I can solve this error message: Unresolved constraint in bundle
com.DX_57.History-Module-57 [761]: Unable to resolve 761.0: missing
requirement [761.0] osgi.wiring.package;
(&(osgi.wiring.package=org.primefaces.model.chart)(version>=3.3.0))

On Tue, Jun 5, 2012 at 9:45 PM, Sathyan Catari <Sathyan.Catari_at_oracle.com>wrote:

> Please refer
> http://docs.oracle.com/cd/E26576_01/doc.312/e24938/add-library.htm
>
> Thanks
> Sathyan
>
>
>
> On 6/5/12 11:42 AM, Peter Penzov wrote:
>
> I want to deploy Primefaces.jar as Glassfish module. I downloaded
> Primefaces.jar<http://repository.primefaces.org/org/primefaces/primefaces/3.3/primefaces-3.3.jar>and I copied the jar into
> glassfish3/glassfish/modules folder. Then I added the name
> primefaces-3.3.jar into
> glassfish3/glassfish/domains/domain1/config/default-web.xml but nothing
> happens. What am I missing?
>
>