users@glassfish.java.net

Re: Primefaces.jar as GlassFish module

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Wed, 06 Jun 2012 06:33:12 +0530

Not sure what you are doing. If you want to use primefaces, bundle it
inside the WAB as done here:

https://svn.java.net/svn/glassfish~svn/trunk/fighterfish/test/testapp/test.app9

It is working fine for us.

Sahoo
On Wednesday 06 June 2012 01:56 AM, Peter Penzov wrote:
> I deployed Primefaces and my bundle with the recommended command but
> now I get this error:
>
> [#|2012-06-05T23:24:27.867+0300|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=225;_ThreadName=Thread-2;|RAR5114
> : Error allocating connection : [Error in allocating a connection.
> Cause: Connection could not be allocated because: IO Error: The
> Network Adapter could not establish the connection]|#]
>
> [#|2012-06-05T23:24:27.903+0300|SEVERE|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.application|_ThreadID=225;_ThreadName=Thread-2;|Error
> Rendering View[/Dashboard.xhtml]
> javax.el.ELException: /Dashboard.xhtml: An error occurred performing
> resource injection on managed bean DashboardController
> at
> com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:90)
> at
> com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
> at
> com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:302)
> at
> com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
> at
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
> at
> com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
> at
> com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
> at
> com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
> at
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
> at
> com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
> at
> com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
> at
> com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> at
> com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
> at
> org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
> at
> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
> at
> com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
> 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: com.sun.faces.mgbean.ManagedBeanCreationException: An error
> occurred performing resource injection on managed bean DashboardController
> at
> com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:229)
> at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:105)
> at
> com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
> at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
> at
> com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
> at
> com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
> at
> com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
> at
> com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
> at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:103)
> at com.sun.el.parser.AstValue.getValue(AstValue.java:179)
> at
> com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224)
> at
> com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:227)
> at
> com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85)
> ... 41 more
> Caused by: com.sun.faces.spi.InjectionProviderException:
> com.sun.enterprise.container.common.spi.util.InjectionException:
> Exception attempting invoke lifecycle method public void
> com.DX_57.HM_57.Dashboard.initSettings() throws java.sql.SQLException
> at
> org.glassfish.faces.integration.GlassFishInjectionProvider.invokePostConstruct(GlassFishInjectionProvider.java:231)
> at
> com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:223)
> ... 53 more
> Caused by:
> com.sun.enterprise.container.common.spi.util.InjectionException:
> Exception attempting invoke lifecycle method public void
> com.DX_57.HM_57.Dashboard.initSettings() throws java.sql.SQLException
> at
> org.glassfish.faces.integration.GlassFishInjectionProvider.invokeLifecycleMethod(GlassFishInjectionProvider.java:393)
> at
> org.glassfish.faces.integration.GlassFishInjectionProvider.invokePostConstruct(GlassFishInjectionProvider.java:306)
> at
> org.glassfish.faces.integration.GlassFishInjectionProvider.invokePostConstruct(GlassFishInjectionProvider.java:229)
> ... 54 more
> Caused by: java.security.PrivilegedActionException:
> java.lang.reflect.InvocationTargetException
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.glassfish.faces.integration.GlassFishInjectionProvider.invokeLifecycleMethod(GlassFishInjectionProvider.java:376)
> ... 56 more
> Caused by: java.lang.reflect.InvocationTargetException
> 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
> org.glassfish.faces.integration.GlassFishInjectionProvider$2.run(GlassFishInjectionProvider.java:382)
> ... 58 more
> Caused by: java.sql.SQLException: Error in allocating a connection.
> Cause: Connection could not be allocated because: IO Error: The
> Network Adapter could not establish the connection
> at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:120)
> at com.DX_57.HM_57.Dashboard.initSettings(Dashboard.java:95)
> ... 63 more
> Caused by: javax.resource.spi.ResourceAllocationException: Error in
> allocating a connection. Cause: Connection could not be allocated
> because: IO Error: The Network Adapter could not establish the connection
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:236)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
> at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)
> ... 64 more
> Caused by: com.sun.appserv.connectors.internal.api.PoolingException:
> Connection could not be allocated because: IO Error: The Network
> Adapter could not establish the connection
> at
> com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:103)
> at
> com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:282)
> at
> com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1512)
> at
> com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:944)
> at
> com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:230)
> at
> com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:511)
> at
> com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
> at
> com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
> at
> com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
> ... 68 more
> Caused by: com.sun.appserv.connectors.internal.api.PoolingException:
> Connection could not be allocated because: IO Error: The Network
> Adapter could not establish the connection
> at
> com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:924)
> at
> com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1189)
> at
> com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:98)
> ... 78 more
> Caused by: com.sun.appserv.connectors.internal.api.PoolingException:
> Connection could not be allocated because: IO Error: The Network
> Adapter could not establish the connection
> at
> com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:110)
> at
> com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:907)
> ... 80 more
> Caused by: javax.resource.spi.ResourceAllocationException: Connection
> could not be allocated because: IO Error: The Network Adapter could
> not establish the connection
> at
> com.sun.gjc.spi.CPManagedConnectionFactory.createManagedConnection(CPManagedConnectionFactory.java:147)
> at
> com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:87)
> ... 81 more
> Caused by: java.sql.SQLRecoverableException: IO Error: The Network
> Adapter could not establish the connection
> at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
> at
> oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
> at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
> at
> oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
> at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
> at
> oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
> at
> oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:207)
> at
> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:139)
> at
> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:88)
> at
> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:70)
> at
> com.sun.gjc.spi.CPManagedConnectionFactory.createManagedConnection(CPManagedConnectionFactory.java:133)
> ... 82 more
> Caused by: oracle.net.ns.NetException: The Network Adapter could not
> establish the connection
> at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:392)
> at
> oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:434)
> at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
> at oracle.net.ns.NSProtocol.connect(NSProtocol.java:247)
> at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)
> at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)
> ... 92 more
> Caused by: java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
> at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
> at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
> at java.net.Socket.connect(Socket.java:579)
> at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:150)
> at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
> at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:370)
> ... 97 more
> |#]
>
> On Tue, Jun 5, 2012 at 11:07 PM, Harald Wellmann
> <hwellmann.de_at_googlemail.com <mailto:hwellmann.de_at_googlemail.com>> wrote:
>
> Am 05.06.2012 21:33, schrieb Peter Penzov:
>
> I managed to deploy Primefaces as module with the command:
> add-library
> --type common /opt/primefaces.jar
>
>
> add-library is for plain old libraries, not for OSGi bundles. Try
>
> asadmin deploy --type osgi primefaces.jar
>
> or simply copy your bundle to
> glassfish/domains/domain1/autodeploy/bundles.
>
> Regards,
> Harald
>
>
>