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

Resources at https://argouml-tigris-org.github.io/user-profiles unreachable #11

Open
giacgbj opened this issue May 26, 2020 · 13 comments
Open

Comments

@giacgbj
Copy link

giacgbj commented May 26, 2020

The resources previously located at http://argouml.org/user-profiles/ are unreachable at https://argouml-tigris-org.github.io/user-profiles since 23 May.

@linustolke
Copy link
Member

Hello. This is very confusing. I can't find anything in www/user-profiles in my old dump of the Tigris repository (see https://github.com/argouml-tigris-org/argouml/tree/GITHUB_IMPORT/www ), there simply were no such directory. I guess the configuration of argouml.org was more complex than we thought.

@giacgbj
Copy link
Author

giacgbj commented May 27, 2020

Consider that the unreachability of those resources is causing the following exception during the build:

INFO  [AndroMDA] loading model --> 'jar:file:[OMISSIS]/mda/src/main/uml/foo.zargo!/foo.xmi'
INFO  [AndroMDA] referenced model --> 'http://argouml.org/user-profiles/datatype.xmi'
org.netbeans.lib.jmi.util.DebugException: XMI version attribute is missing.
        at org.netbeans.lib.jmi.xmi.XmiContext.setVersion(XmiContext.java:210)
        at org.netbeans.lib.jmi.xmi.XmiElement$Document.<init>(XmiElement.java:94)
        at org.netbeans.lib.jmi.xmi.XmiSAXReader.startElement(XmiSAXReader.java:169)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:393)
        at org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:136)
        at org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:107)
        at org.netbeans.lib.jmi.xmi.XmiContext.readExternalDocument(XmiContext.java:921)
        at org.netbeans.lib.jmi.xmi.XmiContext.resolve(XmiContext.java:750)
        at org.netbeans.lib.jmi.xmi.XmiContext.resolveExternalReferences(XmiContext.java:839)
        at org.netbeans.lib.jmi.xmi.XmiElement$Content.endElement(XmiElement.java:394)
        at org.netbeans.lib.jmi.xmi.XmiSAXReader.endElement(XmiSAXReader.java:258)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:393)
        at org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:136)
        at org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:98)
        at org.netbeans.lib.jmi.xmi.SAXReader.read(SAXReader.java:56)
        at org.andromda.repositories.mdr.MDRepositoryFacade.loadModel(MDRepositoryFacade.java:553)
        at org.andromda.repositories.mdr.MDRepositoryFacade.readModel(MDRepositoryFacade.java:157)
        at org.andromda.core.repository.Repositories.loadModel(Repositories.java:172)
        at org.andromda.core.engine.ModelProcessor.loadModelIfNecessary(ModelProcessor.java:344)
        at org.andromda.core.engine.ModelProcessor.loadIfNecessary(ModelProcessor.java:533)
        at org.andromda.core.engine.ModelProcessor.processModels(ModelProcessor.java:225)
        at org.andromda.core.engine.ModelProcessor.process(ModelProcessor.java:146)
        at org.andromda.core.engine.ModelProcessor.process(ModelProcessor.java:82)
        at org.andromda.core.engine.Engine.run(Engine.java:82)
        at org.andromda.core.AndroMDA.run(AndroMDA.java:197)
        at org.andromda.maven.plugin.AndroMDAMojo.execute(AndroMDAMojo.java:92)
        at org.andromda.maven.plugin.AbstractAndroMDAMojo.execute(AbstractAndroMDAMojo.java:106)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
org.netbeans.lib.jmi.util.DebugException: XMI parsing error at line: 1: XMI version attribute is missing.
        at org.netbeans.lib.jmi.xmi.XmiContext.readExternalDocument(XmiContext.java:931)
        at org.netbeans.lib.jmi.xmi.XmiContext.resolve(XmiContext.java:750)
        at org.netbeans.lib.jmi.xmi.XmiContext.resolveExternalReferences(XmiContext.java:839)
        at org.netbeans.lib.jmi.xmi.XmiElement$Content.endElement(XmiElement.java:394)
        at org.netbeans.lib.jmi.xmi.XmiSAXReader.endElement(XmiSAXReader.java:258)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:393)
        at org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:136)
        at org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:98)
        at org.netbeans.lib.jmi.xmi.SAXReader.read(SAXReader.java:56)
        at org.andromda.repositories.mdr.MDRepositoryFacade.loadModel(MDRepositoryFacade.java:553)
        at org.andromda.repositories.mdr.MDRepositoryFacade.readModel(MDRepositoryFacade.java:157)
        at org.andromda.core.repository.Repositories.loadModel(Repositories.java:172)
        at org.andromda.core.engine.ModelProcessor.loadModelIfNecessary(ModelProcessor.java:344)
        at org.andromda.core.engine.ModelProcessor.loadIfNecessary(ModelProcessor.java:533)
        at org.andromda.core.engine.ModelProcessor.processModels(ModelProcessor.java:225)
        at org.andromda.core.engine.ModelProcessor.process(ModelProcessor.java:146)
        at org.andromda.core.engine.ModelProcessor.process(ModelProcessor.java:82)
        at org.andromda.core.engine.Engine.run(Engine.java:82)
        at org.andromda.core.AndroMDA.run(AndroMDA.java:197)
        at org.andromda.maven.plugin.AndroMDAMojo.execute(AndroMDAMojo.java:92)
        at org.andromda.maven.plugin.AbstractAndroMDAMojo.execute(AbstractAndroMDAMojo.java:106)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[org.netbeans.lib.jmi.Logger] XMI parsing error at line: 7256: XMI parsing error at line: 1: XMI version attribute is missing.

due to the fact that the hrefs of the elements in the foo.xmi are usually absolute URLs like:

<UML:DataType href = 'http://argouml.org/user-profiles/datatype.xmi#_9_0_1fe00f9_1119336925531_195604_13'/>

It seems there's no easy way to fix it using ArgoUML. The only way is to remove them manually or use a runtime XSLT transformation to remove them before processing.

@linustolke
Copy link
Member

This is apparantly not the same files as where in http://argouml.org/profiles. Publishing the files there is simple if we just have the files. Do you have the files somewhere, in some cache?

@giacgbj
Copy link
Author

giacgbj commented May 28, 2020

I have the following files (xmiS.zip):

  • andromda-profile.xmi
  • datatype.xmi
  • default-uml14.xmi

@stcarrez
Copy link
Contributor

I'm having the same issue, which is now blocking for me because my old ArgoUML does not work anymore.

INFO: Loading to extent http://argouml.org/profiles/uml14/default-uml14.xmi UmlPackage$Impl  ID: 127-0-1-1-237481a1:172646ebe8d:-8000:0000000000000895  MID: 127-0-1-1-237481a1:172646ebe8d:-8000:00000000000002E7  OPCKG: 127-0-1-1-237481a1:172646ebe8d:-8000:0000000000000895
org.netbeans.lib.jmi.util.DebugException: XMI version attribute is missing.
	at org.netbeans.lib.jmi.xmi.XmiContext.setVersion(XmiContext.java:210)
	at org.netbeans.lib.jmi.xmi.XmiElement$Document.<init>(XmiElement.java:94)
	at org.netbeans.lib.jmi.xmi.XmiSAXReader.startElement(XmiSAXReader.java:169)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
	at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:745)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1359)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl.java:1289)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
	at org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:136)
	at org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:98)

It looks like the file that is downloaded at http://argouml.org/profiles/uml14/default-uml14.xmi
is different than the default UML 14 file that we were using. It looks like that file is older and is missing several definitions. Indeed, that file was created on Tue Aug 14 18:51:04 BRT 2007 while the latest default-uml14.xmi was created on Tue Nov 25 14:57:52 EST 2008.

The file reported by @giacgbj is identical to mine.

It is a real problem that ArgoUML tries to download files from http://argouml.org.

  • it forces you to have your Internet connection when you launch it,
  • it is insecure because it uses http,
  • it makes dependency on the argouml.org site,
  • it creates this kind of problem.

Meanwhile, is it possible that you restore the correct file on the argouml.org site?

@stcarrez
Copy link
Contributor

I've setup a fake http://argouml.org site on my computer and put the correct file on it.
This work arround worked for me. I'm not blocked anymore. But, I still think it is important that
ArgoUML does not download UML profiles when they are available locally within the archive.

@linustolke, if you give us some hints and directions on how to fix that, I can try to have a look and propose a fix. I tried to hack XmiReferenceResolverImpl and MDRModelImplementation but I got lost at some point as I couldn't find some easy way to find a relation between instances of two classes.

linustolke added a commit to argouml-tigris-org/argouml-tigris-org.github.io that referenced this issue May 30, 2020
@linustolke
Copy link
Member

The files from @giacgbj are now added to the github.io site in an attempt to get things running. It doesn't seem to work though. I mean the tests are still not working. The error in the test is: org.argouml.persistence.XmiFormatException: org.argouml.model.XmiReferenceException: http://argouml.org/user-profiles/Profile4testGetApplicableTagDefinitionsIssue60083126601093153195795.xmi

I can't understand how changing http://argouml.org to point to https://argouml-tigris-org.github.io instead of http://argouml.tigris.org could have made the code fail in this way. It is a big surprise to me that the code is affected by the internet in this way. I will have a look at it also but I am not very familiar in these parts of the code so please keep on attempting to find a solution.

@giacgbj
Copy link
Author

giacgbj commented May 30, 2020

I don't know if this is the case, but when you introduce redirects in the URLs (I see a 307 Temporary Redirect), if the code is not written properly to handle them, it won't work.

@stcarrez
Copy link
Contributor

stcarrez commented Jun 20, 2020

See #16 and the pull request #17 for a correction.

Sorry, I failed to use repo to submit (OTOH it makes the overall submission process weird...).

@linustolke
Copy link
Member

I have written #31 with an explanation to at least one part of the problem.

@linustolke
Copy link
Member

With the change I did, are these resources now reachable (from the new location)? @giacgbj

@giacgbj
Copy link
Author

giacgbj commented Aug 16, 2022

Which change? The resources were already reachable (I mean wget, curl, etc., not AndromMDA) at the new address.

The resources are reachable, but, probably due to #11 (comment), it still doesn't work using the old URL.

@linustolke
Copy link
Member

I was referring to the changes I did in #31 . I modified the code to handle redirects from http to https.

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

3 participants