0 Replies Latest reply on Jun 2, 2005 2:06 PM by John Doe

    Server could not connect to any host due to NullPointerExcep

    John Doe Newbie

      I am using:
      JBoss AS 4.0.2
      Hibernate 3.0.1
      JBoss Portal 2.0 RC2.

      I am also using the all configuration instead of default because I want to use EJB 3.0.

      This is the error I am getting:

      11:20:07,459 INFO [Environment] Hibernate 3.0.1
      11:20:07,469 INFO [Environment] hibernate.properties not found
      11:20:07,469 INFO [Environment] using CGLIB reflection optimizer
      11:20:07,469 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      11:20:07,699 INFO [Configuration] configuring from url: file:/C:/Extracted/JBos
      s/jboss-4.0.2/server/all/deploy/jboss-portal.sar/conf/hibernate/hibernate.cfg.xm
      l
      11:20:07,719 INFO [Configuration] Mapping resource: org/jboss/portal/core/impl/
      role/RoleImpl.hbm.xml
      11:20:07,899 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.role.Ro
      leImpl -> jbp_roles
      11:20:07,959 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.ro
      le.RoleImpl.users -> jbp_role_membership
      11:20:07,959 INFO [Configuration] Mapping resource: org/jboss/portal/core/impl/
      user/UserImpl.hbm.xml
      11:20:07,969 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.user.Us
      erImpl -> jbp_users
      11:20:08,069 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.us
      er.UserImpl.dynamic -> jbp_user_prop
      11:20:08,069 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.us
      er.UserImpl.roles -> jbp_role_membership
      11:20:08,069 INFO [Configuration] Mapping resource: org/jboss/portal/core/impl/
      user/UserPref.hbm.xml
      11:20:08,079 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.user.Us
      erPref -> jbp_user_pref
      11:20:08,079 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.us
      er.UserPref.strings -> jbp_user_pref_prop_value
      11:20:08,079 INFO [Configuration] Mapping resource: org/jboss/portal/core/impl/
      user/UserPrefSet.hbm.xml
      11:20:08,089 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.user.Us
      erPrefSet -> jbp_user_pref_set
      11:20:08,089 INFO [Configuration] Configured SessionFactory: java:portal/Sessio
      nFactory
      11:20:08,089 INFO [Configuration] processing extends queue
      11:20:08,089 INFO [Configuration] processing collection mappings
      11:20:08,089 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.us
      er.UserPrefSet.children -> jbp_user_pref_set
      11:20:08,089 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.us
      er.UserPrefSet.content -> jbp_user_pref
      11:20:08,089 INFO [Configuration] processing association property references
      11:20:08,089 INFO [Configuration] processing foreign key constraints
      11:20:08,130 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
      11:20:08,150 INFO [SettingsFactory] Maximum outer join fetch depth: 2
      11:20:08,150 INFO [SettingsFactory] Default batch fetch size: 1
      11:20:08,150 INFO [SettingsFactory] Generate SQL with comments: disabled
      11:20:08,150 INFO [SettingsFactory] Order SQL updates by primary key: disabled
      11:20:08,150 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.AST
      QueryTranslatorFactory
      11:20:08,160 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
      11:20:08,160 INFO [SettingsFactory] Query language substitutions: {}
      11:20:08,170 INFO [NamingHelper] JNDI InitialContext properties:{}
      11:20:08,170 INFO [DatasourceConnectionProvider] Using datasource: java:PortalD
      S
      11:20:08,280 WARN [JBossManagedConnectionPool] Throwable while attempting to ge
      t a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested
       throwable: (java.sql.SQLException: Unable to connect to any hosts due to except
      ion: java.lang.NullPointerException)

      Why is it not connecting? I have seen others who cannot connect and the server tells them why.