continuum-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simon <skitch...@apache.org>
Subject Re: data-management-cli-1.1-app throws NullPointerException in downloadArtifact
Date Wed, 13 Aug 2008 21:58:38 GMT
Drat. Replied earlier with my non-subscribed address. No wonder no-one
offered any suggestions :-).

Anyway, finally solved the problem. Looking into the source, a
NullPointerException at:

org.codehaus.plexus.redback.management.JdoDataManagementTool.restoreRBACDatabase(JdoDataManagementTool.java:186)

is caused by a null return from Permission.getResource() which gave me
the necessary hint.

In the rbac.xml file there were lines like:
 <permission>
   ...
   <resource identifier=" Apache Tobago Nightly Build"/>
 </permission>
Removing the leading whitespace from these entries allowed the rbac.xml
file to load successfully.

So it would appear that the UI allows people to (accidentally) create
names with leading whitespace, and they work. But dumping and reloading
them does not.


Alas, despite importing the data without any errors, the server fails to
start. From wrapper.log:

INFO   | jvm 1    | 2008/08/13 21:47:08 | [ERROR] Error while deploying
appserver continuum-plexus-application-1.1.jar.
INFO   | jvm 1    | 2008/08/13 21:47:08 |
org.codehaus.plexus.appserver.ApplicationServerException: Error in the
app server lifecycle post-app-container-init-service-call phase.
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.codehaus.plexus.appserver.application.deploy.DefaultApplicationDeployer.deployJar(DefaultApplicationDeployer.java:119)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.codehaus.plexus.appserver.application.deploy.DefaultApplicationDeployer.deploy(DefaultApplicationDeployer.java:88)
...
INFO   | jvm 1    | 2008/08/13 21:47:08 | Caused by:
org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException: Error calling
service in pre-app init phase.
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AfterAppStartServiceSetupPhase.execute(AfterAppStartServiceSetupPhase
.java:32)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.codehaus.plexus.appserver.application.deploy.DefaultApplicationDeployer.deployJar(DefaultApplicationDeployer.java:107)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       ... 32 more
INFO   | jvm 1    | 2008/08/13 21:47:08 | Caused by:
org.codehaus.plexus.appserver.service.PlexusServiceException: Error
while starting the context /continuum
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.codehaus.plexus.service.jetty.JettyPlexusService.afterApplicationStart(JettyPlexusService.java:252)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AfterAppStartServiceSetupPhase.execute(AfterAppStartServiceSetupPhase
.java:28)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       ... 33 more
INFO   | jvm 1    | 2008/08/13 21:47:08 | Caused by:
org.codehaus.plexus.jetty.ServletContainerException: Error while
starting the context /continuum
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.codehaus.plexus.jetty.AbstractJettyServletContainer.startApplication(AbstractJettyServletContainer.java:213)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.codehaus.plexus.service.jetty.JettyPlexusService.afterApplicationStart(JettyPlexusService.java:248)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       ... 34 more
INFO   | jvm 1    | 2008/08/13 21:47:08 | Caused by:
java.lang.NullPointerException
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3667)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3646)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1202)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1261)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.codehaus.plexus.jdo.PlexusJdoUtils.updateObject(PlexusJdoUtils.java:160)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.apache.maven.continuum.store.JdoContinuumStore.updateObject(JdoContinuumStore.java:1080)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.apache.maven.continuum.store.JdoContinuumStore.updateBuildDefinitionTemplate(JdoContinuumStore.java:935)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.apache.maven.continuum.builddefinition.DefaultBuildDefinitionService.addBuildDefinitionInTemplate(DefaultBuildDefinitionService.ja
va:504)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.apache.maven.continuum.builddefinition.DefaultBuildDefinitionService.getDefaultAntBuildDefinitionTemplate(DefaultBuildDefinitionSe
rvice.java:285)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.apache.maven.continuum.builddefinition.DefaultBuildDefinitionService.initializeDefaultContinuumBuildDefintions(DefaultBuildDefinit
ionService.java:115)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.apache.maven.continuum.builddefinition.DefaultBuildDefinitionService.initialize(DefaultBuildDefinitionService.java:104)
INFO   | jvm 1    | 2008/08/13 21:47:08 |       at
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializePhase.execute(InitializePhase.java:33)


Has anyone got an idea about this one?

Regards,
Simon



On Mon, 2008-08-11 at 22:53 +0200, simon wrote:
> Thanks for the reply Olivier.
> 
> Yes, I do. And I found a tip which suggested renaming my settings.xml
> file. I did that, and the problem went away.
> 
> I'm now stuck on a different problem:
> 
> 7798 [main] INFO JPOX.RDBMS  - Creating table
> USERSMANAGEMENTMODELLOMETADATA
> 7903 [main] INFO JPOX.RDBMS  - Validated 1 unique key(s) for table
> USERSMANAGEMENTMODELLOMETADATA
> 7972 [main] INFO JPOX.RDBMS  - Validated 1 index(es) for table
> USERSMANAGEMENTMODELLOMETADATA
> Exception in thread "main" java.lang.NullPointerException
>         at
> org.codehaus.plexus.redback.management.JdoDataManagementTool.restoreRBACDatabase(JdoDataManagementTool.java:186)
>         at
> org.apache.maven.continuum.management.redback.JdoDataManagementTool.restoreDatabase(JdoDataManagementTool.java:93)
>         at
> org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:270)
>         at
> org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:177)
> 
> 
> On Mon, 2008-08-11 at 22:44 +0200, Olivier Lamy wrote:
> > Hi,
> > Do you have any profiles declared in your ~/.m2/settings.xml ?
> > 
> > --
> > Olivier
> > 
> > 2008/8/11 simon <skitching@apache.org>:
> > > Hi,
> > >
> > > I'm trying to do an upgrade of an existing continuum installation (for
> > > apache myfaces). This is solaris on x86 with java 1.5.0_16. The old
> > > version is 1.1-beta-2, the new version is 1.1 (final release).
> > >
> > > I've successfully exported the data from the old version (after shutting
> > > it down).
> > >
> > > I've also installed and started the new version, then stopped it again.
> > >
> > > But when I try to import data into the new instance I get a very weird
> > > error:
> > >
> > > -bash-3.00$ java -Xmx512m -jar data-management-cli-1.1-app.jar
> > > -usersJdbcUrl jdbc:derby:/local/continuum-1.1/data/users/database -mode
> > > IMPORT -directory backups -debug
> > >
> > > 0 [main] INFO org.apache.maven.continuum.management.DataManagementCli  -
> > > Processing Redback database...
> > > Exception in thread "main" java.lang.NullPointerException
> > >        at
> > > org.apache.maven.continuum.management.DataManagementCli.downloadArtifact(DataManagementCli.java:364)
> > >        at
> > > org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:198)
> > >        at
> > > org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:177)
> > >
> > > Using -debug flag gives no extra info.
> > >
> > > Can someone suggest what might be the problem? The maven stuff seems to
> > > be ok; I can run "mvn help:effective-pom" and "mvn help:active-profiles"
> > > and get what I expect (including a mapping to the Sun maven repo for the
> > > j2ee jars that this app seems to need).
> > >
> > > Testing trivial export/import from fresh continuum installation on my
> > > personal PC works fine. So it's either a problem with the exported data
> > > somehow, or a problem with the environment. The error message seems to
> > > indicate a problem with maven or maven repo setup, but I don't have any
> > > idea what it could be...
> > >
> > >
> > > Some other notes:
> > > *  The instructions here don't quite work for me
> > >  http://continuum.apache.org/docs/1.1/installation/upgrade.html
> > >
> > > Exporting the builds data goes fine. But then when exporting the user
> > > data, an error message about "directory already exists" is shown. Trying
> > > to use a different dir for user export data gives an error message about
> > > "keys missing". Specifying the same output dir as for builds data, plus
> > > "-overwrite" does work.
> > >
> > > Is using "-overwrite" the correct thing to do? If so, then updating the
> > > installation instructions would be really helpful.
> > >
> > > What if I want to export just user data - how can that be done?
> > >
> > > * Needing to download sun jars when the management app was started feels
> > > rather odd to me. Adding the sun maven repo to my settings.xml solves
> > > it. However if it is possible to avoid this in future, that might be
> > > nice.
> > >
> > >
> > > Thanks in advance,
> > > Simon
> > >
> > >
> > >


Mime
View raw message