11 Replies Latest reply on Mar 20, 2009 8:19 PM by Glenn Davidson

    Web App not running, getting a file download popup window.

    Glenn Davidson Novice

      I am writing a web application and was able to successfully run it on the JBAS. I subsequently had an error on a managed bean that I discovered when I deployed the app. I have corrected the error but the app will no longer run in the web server. I keep getting a file download popup window asking me to open the file. Any guidance would be most appreciated.

      Thanks

        • 1. Re: Web App not running, getting a file download popup windo
          jaikiran pai Master

          What URL are you using to access the application? And which version of JBoss AS and Java. And post the console logs.

          While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.

          • 2. Re: Web App not running, getting a file download popup windo
            Glenn Davidson Novice

            Thanks for the reply, I am using JBoss Developer Studio 2.0.0.CR2. The URL I am using is: http://localhost:8080/test.

            It looks like something happened when it was setting up the Messaging Queue.

            The logs look normal until the following:


            .....
            2009-03-18 08:26:11,544 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.jca:service=DataSourceBinding,name=DefaultDS dependent components: [ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
            State: CREATED
            I Depend On:
            jboss.jca:service=DataSourceBinding,name=DefaultDS
            , ObjectName: jboss.messaging:service=PersistenceManager
            State: CREATED
            I Depend On:
            jboss.jca:service=DataSourceBinding,name=DefaultDS
            jboss:service=TransactionManager
            Depends On Me:
            jboss.messaging:service=ServerPeer
            , ObjectName: jboss.messaging:service=PostOffice
            State: CREATED
            I Depend On:
            jboss.messaging:service=ServerPeer
            jboss.jca:service=DataSourceBinding,name=DefaultDS
            jboss:service=TransactionManager
            Depends On Me:
            jboss.messaging.connectionfactory:service=ConnectionFactory
            jboss.messaging.connectionfactory:service=ClusteredConnectionFactory
            jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory
            jboss.messaging.destination:service=Queue,name=DLQ
            jboss.messaging.destination:service=Queue,name=ExpiryQueue
            jboss.messaging.destination:service=Topic,name=testTopic
            jboss.messaging.destination:service=Topic,name=securedTopic
            jboss.messaging.destination:service=Topic,name=testDurableTopic
            jboss.messaging.destination:service=Queue,name=testQueue
            jboss.messaging.destination:service=Queue,name=A
            jboss.messaging.destination:service=Queue,name=B
            jboss.messaging.destination:service=Queue,name=C
            jboss.messaging.destination:service=Queue,name=D
            jboss.messaging.destination:service=Queue,name=ex
            jboss.messaging.destination:service=Queue,name=PrivateDLQ
            jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue
            jboss.messaging.destination:service=Queue,name=QueueWithOwnDLQAndExpiryQueue
            jboss.messaging.destination:service=Topic,name=TopicWithOwnDLQAndExpiryQueue
            jboss.messaging.destination:service=Queue,name=QueueWithOwnRedeliveryDelay
            jboss.messaging.destination:service=Topic,name=TopicWithOwnRedeliveryDelay
            jboss.messaging.destination:service=Queue,name=testDistributedQueue
            jboss.messaging.destination:service=Topic,name=testDistributedTopic
            , ObjectName: jboss.messaging:service=JMSUserManager
            State: CREATED
            I Depend On:
            jboss.jca:service=DataSourceBinding,name=DefaultDS
            jboss:service=TransactionManager
            Depends On Me:
            jboss.messaging:service=ServerPeer
            , ObjectName: jboss:service=KeyGeneratorFactory,type=HiLo
            State: CREATED
            I Depend On:
            jboss:service=TransactionManager
            jboss.jca:service=DataSourceBinding,name=DefaultDS
            ]
            2009-03-18 08:26:11,544 DEBUG [org.jboss.system.ServiceController] starting service jboss.ejb:service=EJBTimerService,persistencePolicy=database
            2009-03-18 08:26:11,544 DEBUG [org.jboss.ejb.txtimer.DatabasePersistencePolicy] Starting jboss.ejb:service=EJBTimerService,persistencePolicy=database
            2009-03-18 08:26:11,715 DEBUG [org.jboss.ejb.txtimer.DatabasePersistencePolicy] Started jboss.ejb:service=EJBTimerService,persistencePolicy=database
            2009-03-18 08:26:11,715 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.ejb:service=EJBTimerService,persistencePolicy=database dependent components: []
            2009-03-18 08:26:11,715 DEBUG [org.jboss.system.ServiceController] starting service jboss.messaging:service=PersistenceManager
            2009-03-18 08:26:11,715 DEBUG [org.jboss.messaging.core.jmx.JDBCPersistenceManagerService] Starting jboss.messaging:service=PersistenceManager
            2009-03-18 08:26:11,762 DEBUG [org.jboss.messaging.core.impl.JDBCSupport] Failed to execute: CREATE TABLE JBM_DUAL (DUMMY INTEGER, PRIMARY KEY(DUMMY))
            java.sql.SQLException: Table already exists: JBM_DUAL in statement [CREATE TABLE JBM_DUAL]
            at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
            at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
            at org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown Source)
            at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:239)
            at org.jboss.messaging.core.impl.JDBCSupport.createSchema(JDBCSupport.java:301)
            at org.jboss.messaging.core.impl.JDBCSupport.start(JDBCSupport.java:167)
            at org.jboss.messaging.core.impl.JDBCPersistenceManager.start(JDBCPersistenceManager.java:148)
            at org.jboss.messaging.core.jmx.JDBCPersistenceManagerService.startService(JDBCPersistenceManagerService.java:100)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            .......

            • 3. Re: Web App not running, getting a file download popup windo
              jaikiran pai Master

              Those are DEBUG level logs which you can ignore.

              I am using JBoss Developer Studio 2.0.0.CR2.

              Can you try starting the server from the command prompt using the run.bat (or run.sh depending on your OS) in the %JBOSS_HOME%/bin folder?

              The console logs that i asked for are the ones you will see on the console when you start it from the command prompt.

              And by the way are you sure the IDE has deployed an application at the "test" context?


              • 4. Re: Web App not running, getting a file download popup windo
                Glenn Davidson Novice

                I have attempted to run Jboss from the command prompt (RUN.bat). When I tried to run the the "run.bat" I received an error message saying the -server was not found in the JVM. I upgraded the JVM and ran the "run.bat" again, this time it started the batch file but the command window frose after a few seconds, the last line it displayed is:

                [Log4jservice$URLWatchTimerTask] Configuring from URL: resourse:jboss-log4j.xml

                I looked into the log in the sever dir but I see no entries for the time that I attempted to run the "run.bat"

                I then started the server from within Jboss Developer Studio and it started correctly. However I am still getting the file download popup when attempting to run the web app. Please note that I went back and created a new project with the "kickstartwithout libs" which had worked earlier. I loaded that app onto the server and attempted to run it without any modifications. It is getting the file upload popup as well. I have uninstalled JBDevStudio and reloaded it and I am getting the same results. My next test will be to use a new workspace, create the quickstart from scratch again and then start the server.

                • 5. Re: Web App not running, getting a file download popup windo
                  Glenn Davidson Novice

                  Interesting find.

                  I opened a new workspace and created a new JSF project, I used:

                  JSF Environment = JSF1.2withFacelets
                  Template= FaceletsKickStartwithoutLibs

                  I made sure it was deployed on the server. When I started the server, I looked at the console log and I saw this:

                  14:40:31,287 ERROR [managedbean] JSF will be unable to create managed bean person when it is requested. The following problems where found:
                  - Bean or property class demo.Person for managed bean person cannot be found.

                  I checked the faces-config.xml file and the managed bean is set up. I checked the source directories and the class is there in the correct package.

                  • 6. Re: Web App not running, getting a file download popup windo
                    Glenn Davidson Novice

                    Ok, this has just gone from strange to very wierd. In an attempt to figure this out, or out of pure fustration, I went to a competing product (not to be named) and set up a small test app. I installed tomcat 6 and using the other tool created and deployed a small app to tomcat. I did not change anything in Jboss Dev Studio. I went back into JBDS and just redeployed the app and it worked. No changes at all. I was shocked. Please let me reassure you that no changes were made to JBDS. I am wondering if it could be something in IE? Once an app had a problem loading it would not load properly. But when a different app is run on a different server all of a sudden it works? It does not make any sense to me but right now I am not going to argue with success.

                    • 7. Re: Web App not running, getting a file download popup windo
                      Peter Johnson Master

                      Not all the answers you are looking for, but a few observations:

                      1) Based on the last line that appears in the console (the "[Log4jservice$URLWatchTimerTask] " line), it appears that the app server is configured to not log to the console after bootstrap (that is the last bootstrapping log entry). You should, however, see a server/xxx/log/server.log file (unless the logging has been reconfigured to not show that).

                      2) The "file upload popup" usually means that your servlet/action/whatever is setting a MIME type other than the typical "text/html" and those the browser thinks it is receiving some file that it cannot handle. This is due to code in your app - the app server does not control this.

                      3) I think that the "-server" issue is due to a missing findstr command, but since you did not post the error, I really cannot tell.

                      It would help us if we first concentrated on getting the app server to start from the command line without your app deployed. It would also help if you started with an app server whose configuration has not been changed so that you get the full console log. So go back to the command line and enter run.bat and post the full console output (you might have to change the command prompt properties to increase the buffer size - I have mine set to 9000 line).

                      If that app server start without problems, and you get a response from http://localhost:8080, then deploy your app. If that results in an error, post all console log messages from the "Started in xxx seconds" message on.

                      Only when all of that is working should we attempt to tackle the deploy-through-Eclipse issue.

                      • 8. Re: Web App not running, getting a file download popup windo
                        Peter Johnson Master

                        This conversation is moving too fast, with new issues being brought out every few minutes, making what I just typed of dubious help. I am not even sure of where you stand and what is working and what is not working. My take on your last post is that you brought in a new IDE and Tomcat and after getting the app working there is miraculously started working on JBoss Dev Studio and JBoss AS. Is that correct?

                        • 9. Re: Web App not running, getting a file download popup windo
                          Jean Chastain Newbie

                          Peter, You think that's confusing, let me throw this in: I found this post because I tried to create a kick start project in Eclipse running on JBAS 5.0.1 and got the "JSF will be unable to create managed bean person when it is requested" error. Had nothing to do with his file popup or JBoss Dev Studio.
                          Jean

                          • 10. Re: Web App not running, getting a file download popup windo
                            Peter Johnson Master

                            Ah, the joys of using tools and working through their issues. No wonder I tend to use Eclipse like a glorified text editor (including writing all of my own config files) and do all my building/packaging/deploying using Maven or Ant from the command line.

                            • 11. Re: Web App not running, getting a file download popup windo
                              Glenn Davidson Novice

                              All, I was able to get past the file upload problem by running the "Clean" option from the Project tab of JBAS. I too have gotten the error when attempting to run the Quick Start app where when starting the app a message is displayed in the console that states the person bean could not be found. Again, running the clean function corrects this. But I have now found a much bigger problem. It appears that the JSF navigation is not working properly. To keep things clean I created an new quickstart app anbd deployed it. It worked as advertized. I then added a command link with the same action as the command button and the command link will not work Please note: I did the same test in MyEclipse and got the same result. I think ther may be a problem with my machine, Brand new 64 bit laptop running Vista (yeah I know but this is how it came).

                              Has anyone heard of anything like this?