Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on first run when %TEMP% is a junction #27

Open
grv87 opened this issue Oct 7, 2021 · 1 comment
Open

Error on first run when %TEMP% is a junction #27

grv87 opened this issue Oct 7, 2021 · 1 comment

Comments

@grv87
Copy link

grv87 commented Oct 7, 2021

OS: Windows 10 x64
Modelio version: 3.1, 4.1

Error when creating new project:

2021-10-07 11:21:15,883 INFO  LogService       - New project..
2021-10-07 11:21:17,394 TRACE modelio.core     - ModuleXmlExtractor: Rewrite 'C:\Users\<User>\.modelio\4.1\opensource-cache\conf\org.eclipse.osgi\289\data\extracted\staticModel.ramc' from 'C:\Users\<User>\.modelio\4.1\opensource-cache\conf\org.eclipse.osgi\289\0\.cp\module.xml'
2021-10-07 11:21:17,996 ERROR LogService       - Failed reading 'C:\Users\<User>\.modelio\4.1\opensource-cache\conf\org.eclipse.osgi\289\0\.cp\module.xml' module file: Failed extracting static model from 'staticModel.ramc':
 The "C:\Users\<User>\AppData\Local\Temp\ModelioCatalog2433277727943163920\.runtime" file does not exist.
java.lang.reflect.InvocationTargetException: Failed reading 'C:\Users\<User>\.modelio\4.1\opensource-cache\conf\org.eclipse.osgi\289\0\.cp\module.xml' module file: Failed extracting static model from 'staticModel.ramc':
 The "C:\Users\<User>\AppData\Local\Temp\ModelioCatalog2433277727943163920\.runtime" file does not exist.
	at org.modelio.app.project.ui.newproject.NewProjectHandler$2.run(NewProjectHandler.java:266)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.io.IOException: Failed reading 'C:\Users\<User>\.modelio\4.1\opensource-cache\conf\org.eclipse.osgi\289\0\.cp\module.xml' module file: Failed extracting static model from 'staticModel.ramc':
 The "C:\Users\<User>\AppData\Local\Temp\ModelioCatalog2433277727943163920\.runtime" file does not exist.
	at org.modelio.gproject.module.catalog.ModuleXmlExtractor.extractModuleXmlContent(ModuleXmlExtractor.java:204)
	at org.modelio.gproject.module.catalog.ModuleXmlExtractor.getModuleHandle(ModuleXmlExtractor.java:264)
	at org.modelio.platform.mda.infra.service.plugins.PluginModuleHandleFactory.get(PluginModuleHandleFactory.java:64)
	at org.modelio.platform.mda.infra.service.plugins.PluginModulesCache.getModuleHandle(PluginModulesCache.java:94)
	at org.modelio.platform.mda.infra.service.plugins.PluginModulesCache.findModule(PluginModulesCache.java:79)
	at org.modelio.platform.mda.infra.service.impl.ModuleServiceInitializer$CompositeModuleCache.findModule(ModuleServiceInitializer.java:132)
	at org.modelio.platform.project.creation.ProjectCreator.getModelerModule(ProjectCreator.java:164)
	at org.modelio.platform.project.creation.ProjectCreator.createProject(ProjectCreator.java:87)
	at org.modelio.platform.project.services.createproject.ProjectCreator2.doCreateProject(ProjectCreator2.java:69)
	at org.modelio.platform.project.services.createproject.ProjectCreator2.createProject(ProjectCreator2.java:53)
	at org.modelio.platform.project.services.ProjectService.createProject(ProjectService.java:407)
	at org.modelio.app.project.ui.newproject.NewProjectHandler$2.run(NewProjectHandler.java:258)
	... 1 common frames omitted
Caused by: java.io.IOException: Failed extracting static model from 'staticModel.ramc':
 The "C:\Users\<User>\AppData\Local\Temp\ModelioCatalog2433277727943163920\.runtime" file does not exist.
	at org.modelio.gproject.module.catalog.ModuleXmlExtractor.extractStaticModel(ModuleXmlExtractor.java:97)
	at org.modelio.gproject.module.catalog.ModuleXmlExtractor.extractModuleXmlContent(ModuleXmlExtractor.java:168)
	... 12 common frames omitted
Caused by: java.nio.file.NoSuchFileException: C:\Users\<User>\AppData\Local\Temp\ModelioCatalog2433277727943163920\.runtime
	at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
	at sun.nio.fs.WindowsLinkSupport.getFinalPath(WindowsLinkSupport.java:82)
	at sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:242)
	at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:836)
	at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:44)
	at org.modelio.gproject.gproject.lock.ProjectLock.get(ProjectLock.java:315)
	at org.modelio.gproject.gproject.GProject.lockProject(GProject.java:1038)
	at org.modelio.gproject.gproject.GProject.load(GProject.java:865)
	at org.modelio.gproject.gproject.GProjectFactory$Builder.load(GProjectFactory.java:383)
	at org.modelio.gproject.gproject.GProjectFactory$Builder.open(GProjectFactory.java:400)
	at org.modelio.gproject.module.catalog.RamcBuilder.createRamc(RamcBuilder.java:146)
	at org.modelio.gproject.module.catalog.ModuleXmlExtractor.extractStaticModel(ModuleXmlExtractor.java:95)
	... 13 common frames omitted

C:\Users\<User>\AppData\Local\Temp dir is a junction (pointing to a dir on another, letter-less volume). So, probably, additional or different API calls should be used.
.runtime is actually there, but it is a directory, not a file. This also might be a root cause.

Looks like the problem is with modules registration only.
Manually setting %TEMP% (or maybe java.io.tmpdir) is required for first run only.

@grv87 grv87 changed the title Error when %TEMP% is a junction Error on first run when %TEMP% is a junction Oct 7, 2021
@grv87
Copy link
Author

grv87 commented Oct 21, 2021

The similar issue: pypa/pip#10597
Probably the same error here: \\?\ prefix is lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant