geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasad Kashyap" <goyathlay.geron...@gmail.com>
Subject Re: svn commit: r507680 - in /geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository: AbstractRepository.java Maven1Repository.java Maven2Repository.java
Date Wed, 14 Feb 2007 22:09:28 GMT
At Revision: 507695

I built a server with these changes and tried to start it. It failed.

Note: Didn't clean the local repo or do a 'mvn clean' before building it.

Doing a 'mvn clean install' again.

Booting Geronimo Kernel (in Java 1.5.0_08)...
16:57:29,213 WARN  [ConfigurationUtil] Could not load gbean org.apache.geronimo.
configs/j2ee-system/2.0-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/j
2ee-system/2.0-SNAPSHOT/car,j2eeType=Repository,name=Repository
org.apache.geronimo.gbean.InvalidConfigurationException: Could not find a valid
constructor for GBean: org.apache.geronimo.system.repository.Maven2Repository
ParameterTypes: [class java.net.URI, interface org.apache.geronimo.system.server
info.ServerInfo, boolean]
constructor types: [class java.io.File]
constructor types: [class java.net.URI, interface org.apache.geronimo.system.ser
verinfo.ServerInfo]

        at org.apache.geronimo.gbean.runtime.GBeanInstance.<init>(GBeanInstance.
java:351)
        at org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.ja
va:354)
        at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguratio
nGBeans(ConfigurationUtil.java:363)
        at org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConf
iguration(ConfigurationUtil.java:155)
        at org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConf
iguration(ConfigurationUtil.java:126)
        at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:242)
        at org.apache.geronimo.system.main.Daemon.<init>(Daemon.java:74)
        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:366)
Server Startup failed

org.apache.geronimo.kernel.config.InvalidConfigException: Unknown start exceptio
n
        at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguratio
nGBeans(ConfigurationUtil.java:444)
        at org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConf
iguration(ConfigurationUtil.java:155)
        at org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConf
iguration(ConfigurationUtil.java:126)
        at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:242)
        at org.apache.geronimo.system.main.Daemon.<init>(Daemon.java:74)
        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:366)
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: Could not fi
nd a valid constructor for GBean: org.apache.geronimo.system.repository.Maven2Re
pository
ParameterTypes: [class java.net.URI, interface org.apache.geronimo.system.server
info.ServerInfo, boolean]
constructor types: [class java.io.File]
constructor types: [class java.net.URI, interface org.apache.geronimo.system.ser
verinfo.ServerInfo]

        at org.apache.geronimo.gbean.runtime.GBeanInstance.<init>(GBeanInstance.
java:351)
        at org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.ja
va:354)
        at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguratio
nGBeans(ConfigurationUtil.java:363)
        ... 5 more
org.apache.geronimo.kernel.config.InvalidConfigException: Unknown start exceptio
n
        at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguratio
nGBeans(ConfigurationUtil.java:444)
        at org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConf
iguration(ConfigurationUtil.java:155)
        at org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConf
iguration(ConfigurationUtil.java:126)
        at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:242)
        at org.apache.geronimo.system.main.Daemon.<init>(Daemon.java:74)
        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:366)
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: Could not fi
nd a valid constructor for GBean: org.apache.geronimo.system.repository.Maven2Re
pository
ParameterTypes: [class java.net.URI, interface org.apache.geronimo.system.server
info.ServerInfo, boolean]
constructor types: [class java.io.File]
constructor types: [class java.net.URI, interface org.apache.geronimo.system.ser
verinfo.ServerInfo]

        at org.apache.geronimo.gbean.runtime.GBeanInstance.<init>(GBeanInstance.
java:351)
        at org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.ja
va:354)
        at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguratio
nGBeans(ConfigurationUtil.java:363)
        ... 5 more
Server shutdown begun
Server shutdown completed

On 2/14/07, djencks@apache.org <djencks@apache.org> wrote:
> Author: djencks
> Date: Wed Feb 14 12:26:06 2007
> New Revision: 507680
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=507680
> Log:
> GERONIMO-2814 add flag to Repository so it can resolve against base or server location
>
> Modified:
>     geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/AbstractRepository.java
>     geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/Maven1Repository.java
>     geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/Maven2Repository.java
>
> Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/AbstractRepository.java
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/AbstractRepository.java?view=diff&rev=507680&r1=507679&r2=507680
> ==============================================================================
> --- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/AbstractRepository.java
(original)
> +++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/AbstractRepository.java
Wed Feb 14 12:26:06 2007
> @@ -59,8 +59,8 @@
>      protected final File rootFile;
>      private final Map typeHandlers = new HashMap();
>
> -    public AbstractRepository(URI root, ServerInfo serverInfo) {
> -        this(resolveRoot(root, serverInfo));
> +    public AbstractRepository(URI root, ServerInfo serverInfo, boolean resolveToServer)
{
> +        this(resolveRoot(root, serverInfo, resolveToServer));
>      }
>
>      public AbstractRepository(File rootFile) {
> @@ -76,7 +76,7 @@
>          typeHandlers.put("car", new UnpackArtifactTypeHandler());
>      }
>
> -    private static File resolveRoot(URI root, ServerInfo serverInfo) {
> +    private static File resolveRoot(URI root, ServerInfo serverInfo, boolean resolveToServer)
{
>          if (root == null) throw new NullPointerException("root is null");
>
>          if (!root.toString().endsWith("/")) {
> @@ -89,7 +89,7 @@
>
>          URI resolvedUri;
>          if (serverInfo != null) {
> -            resolvedUri = serverInfo.resolve(root);
> +            resolvedUri = resolveToServer ? serverInfo.resolveServer(root) : serverInfo.resolve(root);
>          } else {
>              resolvedUri = root;
>          }
>
> Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/Maven1Repository.java
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/Maven1Repository.java?view=diff&rev=507680&r1=507679&r2=507680
> ==============================================================================
> --- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/Maven1Repository.java
(original)
> +++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/Maven1Repository.java
Wed Feb 14 12:26:06 2007
> @@ -38,8 +38,8 @@
>   * @version $Rev$ $Date$
>   */
>  public class Maven1Repository extends AbstractRepository implements WritableListableRepository
{
> -    public Maven1Repository(URI root, ServerInfo serverInfo) {
> -        super(root, serverInfo);
> +    public Maven1Repository(URI root, ServerInfo serverInfo, boolean resolveToServer)
{
> +        super(root, serverInfo, resolveToServer);
>      }
>
>      public Maven1Repository(File rootFile) {
> @@ -166,10 +166,12 @@
>          infoFactory.addAttribute("root", URI.class, true);
>
>          infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
> +
> +        infoFactory.addAttribute("resolveToServer", Boolean.TYPE, true);
>
>          infoFactory.addInterface(Maven1Repository.class);
>
> -        infoFactory.setConstructor(new String[]{"root", "ServerInfo"});
> +        infoFactory.setConstructor(new String[]{"root", "ServerInfo", "resolveToServer"});
>
>          GBEAN_INFO = infoFactory.getBeanInfo();
>      }
>
> Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/Maven2Repository.java
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/Maven2Repository.java?view=diff&rev=507680&r1=507679&r2=507680
> ==============================================================================
> --- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/Maven2Repository.java
(original)
> +++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/repository/Maven2Repository.java
Wed Feb 14 12:26:06 2007
> @@ -24,6 +24,8 @@
>  import java.util.SortedSet;
>  import java.util.TreeSet;
>
> +import org.apache.commons.logging.Log;
> +import org.apache.commons.logging.LogFactory;
>  import org.apache.geronimo.gbean.GBeanInfo;
>  import org.apache.geronimo.gbean.GBeanInfoBuilder;
>  import org.apache.geronimo.kernel.repository.Artifact;
> @@ -34,8 +36,12 @@
>   * @version $Rev$ $Date$
>   */
>  public class Maven2Repository extends AbstractRepository implements WritableListableRepository
{
> -    public Maven2Repository(URI root, ServerInfo serverInfo) {
> -        super(root, serverInfo);
> +    private static final Log log = LogFactory.getLog(Maven2Repository.class);
> +    public Maven2Repository(URI root, ServerInfo serverInfo, boolean resolveToServer)
{
> +        super(root, serverInfo, resolveToServer);
> +        log.debug("Maven2Repository(root = " + root + ", resolveToServer = "
> +                + resolveToServer + ") rootFile = "
> +                + rootFile.getAbsolutePath());
>      }
>
>      public Maven2Repository(File rootFile) {
> @@ -204,8 +210,9 @@
>          GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Maven2Repository.class,
"Repository");
>          infoFactory.addAttribute("root", URI.class, true);
>          infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
> +        infoFactory.addAttribute("resolveToServer", Boolean.TYPE, true);
>          infoFactory.addInterface(Maven2Repository.class);
> -        infoFactory.setConstructor(new String[]{"root", "ServerInfo"});
> +        infoFactory.setConstructor(new String[]{"root", "ServerInfo", "resolveToServer"});
>          GBEAN_INFO = infoFactory.getBeanInfo();
>      }
>
>
>
>

Mime
View raw message