3 Replies Latest reply: Oct 26, 2010 2:37 PM by jtahlborn RSS

    JAXB not finding referenced classes

    DMF
      package com.dmf.xyz;
      
      public interface DbAccessConfigBean  {
          String getDbClientSecurityPolicy();        
          String getDbServerRegistryURL() ;
          String getDbServerRegistryName();
      }
      package com.dmf.xyz;
      
      import com.dmf.xyz.thrown.FatalError;
      
      @XmlRootElement()
      @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)
      @XmlType( name = "modelConfigurationBean" ,
                namespace = "http://com.dmf.xyz")
      public final class ModelConfigurationBean implements DbAccessConfigBean 
      {
          @Override
          public final String getDbServerRegistryURL () { return this.dbServerRegistryURL; }
          public final void setDbServerRegistryURL ( final String dbServerRegistryURL ) {
              this.dbServerRegistryURL = dbServerRegistryURL;
          }
          @Override
          public final String getDbServerRegistryName () { return this.dbServerRegistryName; }
          public final void setDbServerRegistryName ( final String dbServerRegistryName ) {
              this.dbServerRegistryName = dbServerRegistryName;
          }
          @Override
          public final String getDbClientSecurityPolicy () { return this.dbClientSecurityPolicy; }
          public final void setDbClientSecurityPolicy ( final String dbClientSecurityPolicy ) {
              if( dbClientSecurityPolicy == null )  throw new FatalError("this is a bad example");
              this.dbClientSecurityPolicy = dbClientSecurityPolicy;
          }
      JAXB can't find DbAccessConfigBean because while it's in the same package, it's in a different (referenced) Eclipse project.

      JAXB can't find FatalError, apparently because it's in a different package.

      If I get rid of the references it works fine. How can I keep the references?