1 Reply Latest reply on Oct 27, 2009 1:14 AM by I need a real name

    Help about Netbeans + Seam + Glassfish

    Luis Rato Newbie
      Hello,

      I'm trying to initiate a new project with NetBeans, Seam and Glassfish. For now, since I'm just starting to deal with Seam, I just want to make an "Hello World" project, but I'm having problems when I attempt to deploy it to Glassfish application server.

      First I have run the command ./seam setup, wish has generate the following setup information:

      hibernate.connection.password=
      workspace.home=/home/abban/NetBeansProjects
      hibernate.connection.dataSource_class=org.postgresql.jdbc3.Jdbc3ConnectionPool
      model.package=pt.Abban.prototype.model
      driver.jar=/home/abban/postgresql-8.4-701.jdbc4.jar
      action.package=pt.Abban.prototype.action
      test.package=pt.Abban.prototype.test
      database.type=postgres
      richfaces.skin=deepMarine
      glassfish.domain=domain1
      hibernate.default_catalog.null=
      hibernate.default_schema.null=
      database.drop=n
      project.name=prototype
      hibernate.connection.username=sa
      glassfish.home=/home/abban/SUNWappserver
      hibernate.connection.driver_class=org.postgresql.Driver
      hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
      jboss.domain=default
      project.type=ear
      icefaces.home=
      database.exists=n
      jboss.home=
      driver.license.jar=
      hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
      hibernate.connection.url=jdbc\:postgresql\:template1
      icefaces=n

      Then, I have run the command ./seam create-project and it was created successfully.

      Next, I have opened NetBeans and the project that was created, just to confirm that I could open it with the IDE.

      After that, I have run the command "ant gf-prepare" as described in the file "glassfish-readme.txt" that was created in the project root folder.

      Then I have started Glassfish again and finally, I have run the command "ant gf-explode".

      I have done everything that is described in the file "glassfish-readme.text", but not everything has worked correctly.
      After execute the command "ant gf-explode", it has stopped in the commands "gf-deploy-datasource" and "gf-explode". When I hit the enter key, it has presented me the following messages:

      gf-deploy-datasource:

           [exec] Please enter the admin user name>Please enter the admin password>Invalid user or password
           [exec] CLI137 Command add-resources failed.
           [exec] Result: 1

      gf-explode:

           [exec] CLI171 Command deploy failed : Deployment of application failed - Invalid user or password
           [exec] Please enter the admin user name>Please enter the admin password>
           [exec] Result: 1

      According to this, I have to input the admin user name and password. The problem is that it doesn't asks me for that. If I don't press the enter key, it will stay foverer blocked in the line "gf-deploy-datasource:".

      Regards
      Luis Rato
        • 1. Re: Help about Netbeans + Seam + Glassfish
          I need a real name Newbie

          Luis;


          You can get around this by creating a .asadminpass file with the GlassFish asadmin command..


          Use;  asadmin login --host HOSTNAME --port PORT.


          You will be asked to enter the admin username and the password and this command creates the corresponding line in the .asadminpass file.


          /home/user/.asadminpass or /root/.asadminpass when using root to deploy


          Next time you run ant gf-explode you should be OK.