NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

[SOLVED] Deploying Visual Web JSF in production Glassfish server

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
andresdelosreyes



Joined: 30 Sep 2009
Posts: 16
Location: Cuenca

PostPosted: Wed Jul 14, 2010 3:31 pm    Post subject: [SOLVED] Deploying Visual Web JSF in production Glassfish server Reply with quote

Hello everyone, I'm having trouble deploying my Visual web JSF app in the glassfish v2 production server which is not registered in Netbeans 6.5, I'm using my .war file, I've already uploaded to the production server via admin console, created the jdbc's via resources in the admin console, and my app is running, but it has trouble when connecting to the database, when it connects via a class for login it works perfectly, but when it has to display tables created by dragging a database table to the visual table component, it just does not show them.

Please help me here

Andres de los Reyes


Last edited by andresdelosreyes on Tue Jul 20, 2010 1:41 pm; edited 1 time in total
Back to top
jyeary



Joined: 21 Oct 2008
Posts: 606
Location: Simpsonville, SC

PostPosted: Fri Jul 16, 2010 6:13 pm    Post subject: Re: Deploying Visual Web JSF in production Glassfish server Reply with quote

I have encountered something similar in the past. It may have to do with the dataproviders in dataprovider.jar. I had to login as the user who owns the tables to work on them, if I remember correctly. It would not allow transitive permissions to another user.

I hope that helps.


On Wed, Jul 14, 2010 at 11:31 AM, andresdelosreyes <address-removed ([email]address-removed[/email])> wrote:
Quote:
Hello everyone, I'm having trouble deploying my Visual web JSF app in the glassfish v2 production server which is not registered in Netbeans 6.5, I'm using my .war file, I've already uploaded to the production server via admin console, created the jdbc's via resources in the admin console, and my app is running, but it has trouble when connecting to the database, when it connects via a class for login it works perfectly, but when it has to display tables created by dragging a database table to the visual table component, it just does not show them.

Please help me here

Andres de los Reyes







--
John Yeary
--
http://javaevangelist.blogspot.com

"Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the gray twilight that knows not victory nor defeat."
-- Theodore Roosevelt
Back to top
andresdelosreyes



Joined: 30 Sep 2009
Posts: 16
Location: Cuenca

PostPosted: Sun Jul 18, 2010 3:36 am    Post subject: Reply with quote

Can you be a little more specific please about the same user, where can I change users, or where can I find the file dataprovider.jar??

if it helps here is my log file
Code:


[#|2010-07-17T22:22:59.375-0500|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8090-1;_RequestID=ae3b6b98-7b28-464b-a48a-6ef6eec94e42;|WebModule[/Juridico]java.sql.SQLException
java.lang.RuntimeException: java.sql.SQLException
   at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:416)
   at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:373)
   at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:713)
   at com.sun.webui.jsf.component.TableRowGroupBase.getRowKeys(TableRowGroupBase.java:552)
   at com.sun.webui.jsf.component.TableRowGroupBase.getFilteredRowKeys(TableRowGroupBase.java:185)
   at com.sun.webui.jsf.component.TableRowGroupBase.getRowCount(TableRowGroupBase.java:495)
   at com.sun.webui.jsf.component.Table.getRowCount(Table.java:326)
   at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:416)
   at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:138)
   at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
   at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1126)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
   at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
   at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
   at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
   at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
   at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
   at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
   at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
   at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
   at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
   at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
   at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
   at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
   at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
   at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
   at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:382)
   at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
   at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: java.sql.SQLException
   at com.sun.sql.rowset.internal.CachedRowSetXReader.connect(CachedRowSetXReader.java:381)
   at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:160)
   at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:865)
   at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:1325)
   at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1351)
   at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:402)
   ... 57 more
Caused by: javax.naming.NameNotFoundException: sist_juridico_MySQL not found
   at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
   at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
   at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)
   at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
   at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:111)
   at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409)
   at javax.naming.InitialContext.lookup(InitialContext.java:392)
   at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:1001)
   at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
   at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:407)
   at javax.naming.InitialContext.lookup(InitialContext.java:392)
   at com.sun.sql.rowset.internal.CachedRowSetXReader.connect(CachedRowSetXReader.java:366)
   ... 62 more
|#]

[#|2010-07-17T22:22:59.375-0500|SEVERE|sun-appserver2.1|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8090-1;RENDER_RESPONSE 6;/Expedientes.jsp;javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1336fab];_RequestID=ae3b6b98-7b28-464b-a48a-6ef6eec94e42;|JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /Expedientes.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1336fab]|#]

[#|2010-07-17T22:22:59.390-0500|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8090-1;_RequestID=ae3b6b98-7b28-464b-a48a-6ef6eec94e42;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException
   at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:603)
   at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:325)
   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
   at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
   at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
   at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
   at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
   at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
   at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
   at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
   at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
   at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
   at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
   at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
   at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
   at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:382)
   at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
   at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: java.lang.RuntimeException: java.sql.SQLException
   at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:416)
   at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:373)
   at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:713)
   at com.sun.webui.jsf.component.TableRowGroupBase.getRowKeys(TableRowGroupBase.java:552)
   at com.sun.webui.jsf.component.TableRowGroupBase.getFilteredRowKeys(TableRowGroupBase.java:185)
   at com.sun.webui.jsf.component.TableRowGroupBase.getRowCount(TableRowGroupBase.java:495)
   at com.sun.webui.jsf.component.Table.getRowCount(Table.java:326)
   at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:416)
   at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:138)
   at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
   at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1126)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
   at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
   at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
   ... 38 more
Caused by: java.sql.SQLException
   at com.sun.sql.rowset.internal.CachedRowSetXReader.connect(CachedRowSetXReader.java:381)
   at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:160)
   at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:865)
   at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:1325)
   at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1351)
   at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:402)
   ... 57 more
Caused by: javax.naming.NameNotFoundException: sist_juridico_MySQL not found
   at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
   at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
   at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)
   at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
   at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:111)
   at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409)
   at javax.naming.InitialContext.lookup(InitialContext.java:392)
   at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:1001)
   at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
   at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:407)
   at javax.naming.InitialContext.lookup(InitialContext.java:392)
   at com.sun.sql.rowset.internal.CachedRowSetXReader.connect(CachedRowSetXReader.java:366)
   ... 62 more
|#]


thanks for your reply and please help
Back to top
jyeary



Joined: 21 Oct 2008
Posts: 606
Location: Simpsonville, SC

PostPosted: Mon Jul 19, 2010 11:56 am    Post subject: Re: Deploying Visual Web JSF in production Glassfish server Reply with quote

The user you are using for your JNDI connection should match the owner of the tables. You change the login in your JNDI connections on GlassFish. The dataprovider.jar is bundled in your war file once you compile and package your application.

I am not sure what this means:

Caused by: javax.naming.NameNotFoundException: sist_juridico_MySQL not found

Is sist_juridico_MySQL the name of the database? If so, you seem to have an issue with your JNDI lookup. You can check the connections and ping
Back to top
andresdelosreyes



Joined: 30 Sep 2009
Posts: 16
Location: Cuenca

PostPosted: Tue Jul 20, 2010 1:59 am    Post subject: Reply with quote

The user I'm using matches the owner of the tables, and yes sist_juridico_MySQL is the name of my JDBC resource in glassfish 2.1, what I don't understand is Why if the complete name is "jdbc/sist_juridico_MYSQL" the one that is missing is "sist_juridico_MYSQL", I tried creating it whit that name but I still get the same error message.

I have ping my Connection Pool and it pings successfully, I have no idea what is the problem here, the only hint I have is the "javax.naming.NameNotFoundException:" can you help me, where can I check the JNDI lookup. or what do I have to check in the Netbeans Glassfish v2.1 and compare it whith my produccion server Glassfish 2.1?

Please help, I'm a total newbie in glassfish
Back to top
andresdelosreyes



Joined: 30 Sep 2009
Posts: 16
Location: Cuenca

PostPosted: Tue Jul 20, 2010 1:16 pm    Post subject: Reply with quote

Just solved the problem!!!

What I did was to add my production server in Netbeans servers, then changed the project properties so that the project deploys in my production server, and led Netbeans handle the server (Glassfish v2.1) configuration, now its working perfectly, thanks jyeary for your help, I guess something was wrong with the connection pool or the odbc's...
Back to top
jyeary



Joined: 21 Oct 2008
Posts: 606
Location: Simpsonville, SC

PostPosted: Tue Jul 20, 2010 2:38 pm    Post subject: Re: Deploying Visual Web JSF in production Glassfish server Reply with quote

I am glad you resolved it. I was approaching it from what I thought was a different issue.

Cheers.


On Tue, Jul 20, 2010 at 9:17 AM, andresdelosreyes <address-removed ([email]address-removed[/email])> wrote:
Quote:
Just solved the problem!!!

What I did was to add my production server in Netbeans servers, then changed the project properties so that the project deploys in my production server, and led Netbeans handle the server (Glassfish v2.1) configuration, now its working perfectly, thanks jyeary for your help, I guess something was wrong with the connection pool or the odbc's...







--
John Yeary
--
http://javaevangelist.blogspot.com

"Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the gray twilight that knows not victory nor defeat."
-- Theodore Roosevelt
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo