Java Equinox P2 IStatus在Eclipse RAP应用程序中返回代码10001;您的原始请求已被修改。空的子项=[]”;
我必须使用一个已经存在的EclipseRAP应用程序,它包含两个特性和大约40个依赖项 由于Eclipse RAP没有Java Equinox P2 IStatus在Eclipse RAP应用程序中返回代码10001;您的原始请求已被修改。空的子项=[]”;,java,equinox,p2,eclipse-rap,Java,Equinox,P2,Eclipse Rap,我必须使用一个已经存在的EclipseRAP应用程序,它包含两个特性和大约40个依赖项 由于Eclipse RAP没有preStartup()方法,因此我调用RAP的start()方法中的更新过程: public class MyApplication implements IApplication { @Override public Object start( IApplicationContext context ) throws Exception {
preStartup()
方法,因此我调用RAP的start()
方法中的更新过程:
public class MyApplication implements IApplication
{
@Override
public Object start( IApplicationContext context ) throws Exception
{
P2Util.update();
...
}
}
IProvisioningAgent
不为空,已正确初始化IMetadataRepositoryManager
和iAtFactRepositoryManager
public static boolean configureRepository( IProvisioningAgent agent )
{
String repo = "file:///c:/export/repository/"; // TODO HERE!
log.debug( "Initiliazing Repository Managers" );
IMetadataRepositoryManager metadataManager = ( IMetadataRepositoryManager ) agent.getService( IMetadataRepositoryManager.SERVICE_NAME );
IArtifactRepositoryManager artifactManager = ( IArtifactRepositoryManager ) agent.getService( IArtifactRepositoryManager.SERVICE_NAME );
URI uri;
try
{
uri = new URI( repo );
}
catch ( URISyntaxException e1 )
{
log.error( "Unexpected URISyntaxException, the specified path is not a valid URI", e1 ); //$NON-NLS-1$
return false;
}
if ( metadataManager == null )
{
log.error( "IMetadataRepositoryManager instance is null!" );
return false;
}
metadataManager.addRepository( uri );
log.debug( "Added repository to MetadataManager: " + repo );
if ( artifactManager == null )
{
log.error( "IArtifactRepositoryManager instance is null!" );
return false;
}
artifactManager.addRepository( uri );
log.debug( "Added repository to ArtifactManager: " + repo );
return true;
}
在我调用checkForUpdates()
之后,仍然有一个问题一直在发生
它返回以下状态:
状态确定:org.eclipse.equinox.p2.operations code=10001您的原始请求已被修改。空子项=[]
我已经检查了运行配置中的标记“启动的应用程序中的支持软件安装”,问题仍然存在 你是怎么解决的?我现在在p2设置中遇到了相同的问题?不幸的是,我没有。我创建了自己的更新算法.Tnx来响应。我还将创建自己的更新算法。p2实现是垃圾,工作不太好。请将您的解决方案粘贴到这里。我也面临着同样的问题。正如我在之前的评论中所说的,我没有找到解决办法。我删除了Equinox P2的垃圾并实现了我自己的更新方法。你是如何解决这个问题的?我现在在p2设置中遇到了相同的问题?不幸的是,我没有。我创建了自己的更新算法.Tnx来响应。我还将创建自己的更新算法。p2实现是垃圾,工作不太好。请将您的解决方案粘贴到这里。我也面临着同样的问题。正如我在之前的评论中所说的,我没有找到解决办法。我删除了Equinox P2垃圾,实现了我自己的更新方法。
public static IStatus checkForUpdates( IProvisioningAgent agent ) throws OperationCanceledException
{
log.info( "Checking for new updates in repository" );
ProvisioningSession session = new ProvisioningSession( agent );
UpdateOperation operation = new UpdateOperation( session );
IStatus status = operation.resolveModal( new NullProgressMonitor() );
return status;
}