Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Trying to generate model using headless invocation throws Exception
Trying to generate model using headless invocation throws Exception [message #395738] Wed, 21 September 2005 08:07 Go to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
I want to generate the ecore model automatically and modified the existing
example from org.eclipse.xsd.ecore.importer a little bit.

My root structure looks like this:
C:\test\eclipse\workspace\testp\src
C:\test\eclipse\workspace\testp\model\test.xsd
C:\test\eclipse\workspace\testp\emf

C:\test\eclipse\codegenWorkspace

My eclipse project is "testp" and from there I would like to generate the
genmodel of test.xsd
I would like to have the generated model file in the codegenWorkspace.
I am trying to do that with the following command

*** my gen.bat ***********************************************************
*
* set MAIN_DIR=C:\test\eclipse\workspace
* set WORKSPACE=%MAIN_DIR%\..\codegenWorkspace
*
* startup.jar org.eclipse.core.launcher.Main -clean -data %WORKSPACE%
* -application org.eclipse.xsd.ecore.importer.XSD2GenModel
* %MAIN_DIR%\model\test.xsd %MAIN_DIR%\emf\test.genmodel -modelProject
* %MAIN_DIR%\src -copyright "This is my code."
*
************************************************************ **************

This produces the a .log file which contains information
about an IllegalArgumentException, which is shown below.
I would appreciate every little help.

Thanks.


*** .log file
************************************************************ ****
!SESSION 2005-09-21 13:33:10.554
-----------------------------------------------
eclipse.buildId=I20050627-1435
java.version=1.4.2_09
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: org.eclipse.core.launcher.Main -application
org.eclipse.xsd.ecore.importer.XSD2GenModel
C:\test\eclipse\workspace\model\test.xsd
C:\test\eclipse\workspace\emf\test.genmodel -modelProject
C:\test\eclipse\workspace\src -copyright This is my code.
Command-line arguments: org.eclipse.core.launcher.Main -clean -data
C:\test\eclipse\workspace\..\codegenWorkspace -application
org.eclipse.xsd.ecore.importer.XSD2GenModel
C:\test\eclipse\workspace\model\test.xsd
C:\test\eclipse\workspace\emf\test.genmodel -modelProject
C:\test\eclipse\workspace\src -copyright This is my code.

!ENTRY org.eclipse.emf.importer 2 0 2005-09-21 13:33:14.260
!MESSAGE Error
!STACK 1
org.eclipse.core.runtime.CoreException[0]:
java.lang.IllegalArgumentException: Error: No schema file (.xsd or .wsdl)
specified
at
org.eclipse.xsd.ecore.importer.XSDImporterApplication.proces sArguments(XSDImporterApplication.java:134)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:143)
at
org.eclipse.emf.importer.ModelImporterApplication$1.run(Mode lImporterApplication.java:99)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1719)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1739)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:117)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
!SUBENTRY 1 org.eclipse.emf.importer 4 0 2005-09-21 13:33:14.260
!MESSAGE Error
!STACK 0
java.lang.IllegalArgumentException: Error: No schema file (.xsd or .wsdl)
specified
at
org.eclipse.xsd.ecore.importer.XSDImporterApplication.proces sArguments(XSDImporterApplication.java:134)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:143)
at
org.eclipse.emf.importer.ModelImporterApplication$1.run(Mode lImporterApplication.java:99)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1719)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1739)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:117)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
************************************************************ *******************
Re: Trying to generate model using headless invocation throws Exception [message #395739 is a reply to message #395738] Wed, 21 September 2005 08:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070400000600050905060003
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Enrique,

You say the file is at C:\test\eclipse\workspace\*testp\*model\test.xsd,
but your command line specifies C:\test\eclipse\workspace\model\test.xsd.


Enrique wrote:

> I want to generate the ecore model automatically and modified the
> existing example from org.eclipse.xsd.ecore.importer a little bit.
>
> My root structure looks like this:
> C:\test\eclipse\workspace\testp\src
> C:\test\eclipse\workspace\testp\model\test.xsd
> C:\test\eclipse\workspace\testp\emf
> C:\test\eclipse\codegenWorkspace
>
> My eclipse project is "testp" and from there I would like to generate
> the genmodel of test.xsd
> I would like to have the generated model file in the codegenWorkspace.
> I am trying to do that with the following command
>
> *** my gen.bat
> ***********************************************************
> *
> * set MAIN_DIR=C:\test\eclipse\workspace
> * set WORKSPACE=%MAIN_DIR%\..\codegenWorkspace
> *
> * startup.jar org.eclipse.core.launcher.Main -clean -data %WORKSPACE%
> * -application org.eclipse.xsd.ecore.importer.XSD2GenModel *
> %MAIN_DIR%\model\test.xsd %MAIN_DIR%\emf\test.genmodel -modelProject *
> %MAIN_DIR%\src -copyright "This is my code."
> *
> ************************************************************ **************
>
>
> This produces the a .log file which contains information
> about an IllegalArgumentException, which is shown below.
> I would appreciate every little help.
> Thanks.
>
>
> *** .log file
> ************************************************************ ****
> !SESSION 2005-09-21 13:33:10.554
> -----------------------------------------------
> eclipse.buildId=I20050627-1435
> java.version=1.4.2_09
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
> Framework arguments: org.eclipse.core.launcher.Main -application
> org.eclipse.xsd.ecore.importer.XSD2GenModel
> C:\test\eclipse\workspace\model\test.xsd
> C:\test\eclipse\workspace\emf\test.genmodel -modelProject
> C:\test\eclipse\workspace\src -copyright This is my code.
> Command-line arguments: org.eclipse.core.launcher.Main -clean -data
> C:\test\eclipse\workspace\..\codegenWorkspace -application
> org.eclipse.xsd.ecore.importer.XSD2GenModel
> C:\test\eclipse\workspace\model\test.xsd
> C:\test\eclipse\workspace\emf\test.genmodel -modelProject
> C:\test\eclipse\workspace\src -copyright This is my code.
>
> !ENTRY org.eclipse.emf.importer 2 0 2005-09-21 13:33:14.260
> !MESSAGE Error
> !STACK 1
> org.eclipse.core.runtime.CoreException[0]:
> java.lang.IllegalArgumentException: Error: No schema file (.xsd or
> .wsdl) specified
> at
> org.eclipse.xsd.ecore.importer.XSDImporterApplication.proces sArguments(XSDImporterApplication.java:134)
>
> at
> org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:143)
>
> at
> org.eclipse.emf.importer.ModelImporterApplication$1.run(Mode lImporterApplication.java:99)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1719)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1739)
> at
> org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:117)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
> !SUBENTRY 1 org.eclipse.emf.importer 4 0 2005-09-21 13:33:14.260
> !MESSAGE Error
> !STACK 0
> java.lang.IllegalArgumentException: Error: No schema file (.xsd or
> .wsdl) specified
> at
> org.eclipse.xsd.ecore.importer.XSDImporterApplication.proces sArguments(XSDImporterApplication.java:134)
>
> at
> org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:143)
>
> at
> org.eclipse.emf.importer.ModelImporterApplication$1.run(Mode lImporterApplication.java:99)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1719)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1739)
> at
> org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:117)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
> ************************************************************ *******************
>
>


--------------070400000600050905060003
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Enrique,<br>
<br>
You say the file is at C:\test\eclipse\workspace\<b>testp\</b>model\test.xsd,
but your command line specifies
C:\test\eclipse\workspace\model\test.xsd.<br>
<br>
<br>
Enrique wrote:
<blockquote cite="mid061854482e48c66f0b33f2f71d4d75ca$1@www.eclipse.org"
type="cite">I want to generate the ecore model automatically and
modified the existing example from org.eclipse.xsd.ecore.importer a
little bit.
<br>
<br>
My root structure looks like this:
<br>
C:\test\eclipse\workspace\testp\src
<br>
C:\test\eclipse\workspace\testp\model\test.xsd
<br>
C:\test\eclipse\workspace\testp\emf
Re: Trying to generate model using headless invocation throws Exception [message #395766 is a reply to message #395739] Thu, 22 September 2005 02:52 Go to previous messageGo to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
Ooops, I fixed it. Thanks so far.

set MAIN_DIR=C:\test\eclipse\workspace
set WORKSPACE=%MAIN_DIR%\..\codegenWorkspace

But even fixing this mistake there are exactly the same exception.

I tried following commands among others

************************************************************ **********
startup.jar org.eclipse.core.launcher.Main
-clean
-data %MAIN_DIR%
-application org.eclipse.xsd.ecore.importer.XSD2GenModel
%MAIN_DIR%\testp\model\test.xsd %MAIN_DIR%\testp\emf\test.genmodel
-modelProject %MAIN_DIR%\testp\src
-copyright "This is my code."
** and ************************************************************ ***
startup.jar org.eclipse.core.launcher.Main
-clean
-data %WORKSPACE%
-application org.eclipse.xsd.ecore.importer.XSD2GenModel
%MAIN_DIR%\testp\model\test.xsd %MAIN_DIR%\testp\emf\test.genmodel
-modelProject %MAIN_DIR%\testp\src
-copyright "This is my code."
************************************************************ **********

No one was working
Re: Trying to generate model using headless invocation throws Exception [message #395774 is a reply to message #395766] Thu, 22 September 2005 07:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080807080503070107010900
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Enrique,

According to the usage syntax, you need to specify two arguments after
-modelProject, i.e., I'd expect "-modelProject %MAIN_DIR%\testp src"

Usage: { <model.xsd> | <model.wsdl> }+ [ <model.genmodel> [ -reload
] ] <OPTION>
<OPTION> ::= [ <PROJECT-OPTION> ] [ <PACKAGE-MAP> ] [
<PACKAGES> ]
{ <REF-GEN-MODEL> }*
[ <TEMPLATE-PATH> ] [ <MODEL-PLUGIN-ID> ] [
<COPYRIGHT> ]
[ <SDO> ] [ <QUIET> ]
<PROJECT-OPTION> ::= <MODEL-PROJECT> [ <EDIT-PROJECT> ] [
<EDITOR-PROJECT> ]
[ <TESTS-PROJECT> ]
<MODEL-PROJECT> ::= *-modelProject <model-directory> <fragment-path>*
<EDIT-PROJECT> ::= -editProject <edit-directory> <fragment-path>
<EDITOR-PROJECT> ::= -editorProject <editor-directory> <fragment-path>
<TESTS-PROJECT> ::= -testsProject <tests-directory> <fragment-path>
<PACKAGE-MAP> ::= -packageMap { <nsURI> <qualified-package-name> }+
<PACKAGES> ::= -packages { <nsURI> }+
<REF-GEN-MODEL> ::= -refGenModel <model.genmodel> { <nsURI> }+
<TEMPLATE-PATH> ::= -templatePath <template-directory>
<MODEL-PLUGIN-ID> ::= -modelPluginID <plugin-ID>
<COPYRIGHT> ::= -copyright <copyright-string>
<SDO> ::= -sdo
<QUIET> ::= -quiet

Specifying no -packages is the same as specifying them all
Use ##local to represent the null nsURI

For example:

xsd2genmodel
example.xsd
result/model/Example.genmodel
-modelProject result src
-editProject result.edit src
-editorProject result.editor src

-packages http://www.example.com/Example1



Enrique wrote:

> Ooops, I fixed it. Thanks so far.
>
> set MAIN_DIR=C:\test\eclipse\workspace
> set WORKSPACE=%MAIN_DIR%\..\codegenWorkspace
>
> But even fixing this mistake there are exactly the same exception.
>
> I tried following commands among others
>
> ************************************************************ **********
> startup.jar org.eclipse.core.launcher.Main -clean -data %MAIN_DIR%
> -application org.eclipse.xsd.ecore.importer.XSD2GenModel
> %MAIN_DIR%\testp\model\test.xsd %MAIN_DIR%\testp\emf\test.genmodel
> -modelProject %MAIN_DIR%\testp\src -copyright "This is my code."
> ** and ************************************************************ ***
> startup.jar org.eclipse.core.launcher.Main -clean -data %WORKSPACE%
> -application org.eclipse.xsd.ecore.importer.XSD2GenModel
> %MAIN_DIR%\testp\model\test.xsd %MAIN_DIR%\testp\emf\test.genmodel
> -modelProject %MAIN_DIR%\testp\src -copyright "This is my code."
> ************************************************************ **********
>
> No one was working
>


--------------080807080503070107010900
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Enrique,<br>
<br>
According to the usage syntax, you need to specify two arguments after
-modelProject, i.e., I'd expect "-modelProject %MAIN_DIR%\testp src"
<blockquote><small>Usage: { &lt;model.xsd&gt; | &lt;model.wsdl&gt; }+ [
&lt;model.genmodel&gt; [ -reload ] ] &lt;OPTION&gt;<br>
&lt;OPTION&gt;
Re: Trying to generate model using headless invocation throws Exception [message #395776 is a reply to message #395774] Thu, 22 September 2005 10:06 Go to previous messageGo to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
I tried it also with two arguments before, the same way you described the
example below. But it didn`t work either. No matter what I do, I always
get the same exception.
Re: Trying to generate model using headless invocation throws Exception [message #395777 is a reply to message #395776] Thu, 22 September 2005 10:18 Go to previous messageGo to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
I forgot to mention that I am using
Eclipse 3.1 and EMF 2.1.
Maybe I missed something.
Re: Trying to generate model using headless invocation throws Exception [message #395779 is a reply to message #395777] Thu, 22 September 2005 11:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Enrique,

If even the basic usage printing isn't working, there's something
serious going wrong with the installation. Can you try clearing the
..log and doing the scenario again to see what things all show up in the
..log? (It's in <your-workspace>/.metadata/.log.)


Enrique wrote:

> I forgot to mention that I am using
> Eclipse 3.1 and EMF 2.1.
> Maybe I missed something.
>
Re: Trying to generate model using headless invocation throws Exception [message #395799 is a reply to message #395779] Fri, 23 September 2005 04:44 Go to previous messageGo to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
Trying:
set %ECL_PLUG%=C:\test\eclipse\plugins
set
classpath=;%ECL_PLUG%\org.eclipse.ant.core_3.1.0.jar;%ECL_PL UG%\org.eclipse.ant.ui_3.1.0.jar;%ECL_PLUG%\org.eclipse.comp are_3.1.0.jar;%ECL_PLUG%\org.eclipse.core.boot_3.1.0.jar;%EC L_PLUG%\org.eclipse.core.commands_3.1.0.jar;%ECL_PLUG%\org.e clipse.core.expressions_3.1.0.jar;%ECL_PLUG%\org.eclipse.cor e.filebuffers_3.1.0.jar;%ECL_PLUG%\org.eclipse.core.resource s.compatibility_3.1.0.jar;%ECL_PLUG%\org.eclipse.core.resour ces.win32_3.1.0.jar;%ECL_PLUG%\org.eclipse.core.resources_3. 1.0.jar;%ECL_PLUG%\org.eclipse.core.runtime.compatibility_3. 1.0.jar;%ECL_PLUG%\org.eclipse.core.runtime_3.1.0.jar;%ECL_P LUG%\org.eclipse.core.variables_3.1.0.jar;%ECL_PLUG%\org.ecl ipse.debug.core_3.1.0.jar;%ECL_PLUG%\org.eclipse.debug.ui_3. 1.0.jar;%ECL_PLUG%\org.eclipse.draw2d_3.1.0.jar;%ECL_PLUG%\o rg.eclipse.emf.activities_2.1.0.jar;%ECL_PLUG%\org.eclipse.e mf.ant_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.codegen.ecore.ui _2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.codegen.ecore_2.1.0.ja r;%ECL_PLUG%\org.eclipse.emf.codegen.ui_2.1.0.jar;%ECL_PLUG% \org.eclipse.emf.codegen_2.1.0.jar;%ECL_PLUG%\org.eclipse.em f.common.ui_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.common_2.1. 0.jar;%ECL_PLUG%\org.eclipse.emf.commonj.sdo_2.1.0.jar;%ECL_ PLUG%\org.eclipse.emf.ecore.change.edit_2.1.0.jar;%ECL_PLUG% \org.eclipse.emf.ecore.change_2.1.0.jar;%ECL_PLUG%\org.eclip se.emf.ecore.edit_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.ecore .editor_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.ecore.sdo.edit_ 2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.ecore.sdo.editor_2.1.0. jar;%ECL_PLUG%\org.eclipse.emf.ecore.sdo_2.1.0.jar;%ECL_PLUG %\org.eclipse.emf.ecore.xmi_2.1.0.jar;%ECL_PLUG%\org.eclipse .emf.ecore_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.edit.ui_2.1. 0.jar;%ECL_PLUG%\org.eclipse.emf.edit_2.1.0.jar;%ECL_PLUG%\o rg.eclipse.emf.examples_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf .importer.ecore_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.importe r.java_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.importer.rose_2. 1.0.jar;%ECL_PLUG%\org.eclipse.emf.importer_2.1.0.jar;%ECL_P LUG%\org.eclipse.emf.java.edit_2.1.0.jar;%ECL_PLUG%\org.ecli pse.emf.java.editor_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.jav a_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.mapping.ecore2ecore.e ditor_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.mapping.ecore2eco re_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.mapping.ecore2xml.ui _2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.mapping.ecore2xml_2.1. 0.jar;%ECL_PLUG%\org.eclipse.emf.mapping.ui_2.1.0.jar;%ECL_P LUG%\org.eclipse.emf.mapping.xsd2ecore.editor_2.1.0.jar;%ECL _PLUG%\org.eclipse.emf.mapping.xsd2ecore_2.1.0.jar;%ECL_PLUG %\org.eclipse.emf.mapping_2.1.0.jar;%ECL_PLUG%\org.eclipse.e mf_2.1.0.jar;%ECL_PLUG%\org.eclipse.gef.examples.flow_3.1.0. jar;%ECL_PLUG%\org.eclipse.gef.examples.logic_3.1.0.jar;%ECL _PLUG%\org.eclipse.gef.examples.shapes_3.1.0.jar;%ECL_PLUG%\ org.eclipse.gef.examples.text_3.1.0.jar;%ECL_PLUG%\org.eclip se.gef_3.1.0.jar;%ECL_PLUG%\org.eclipse.help.appserver_3.1.0 .jar;%ECL_PLUG%\org.eclipse.help.base_3.1.0.jar;%ECL_PLUG%\o rg.eclipse.help.ui_3.1.0.jar;%ECL_PLUG%\org.eclipse.help_3.1 .0.jar;%ECL_PLUG%\org.eclipse.jdt.core_3.1.0.jar;%ECL_PLUG%\ org.eclipse.jdt.debug.ui_3.1.0.jar;%ECL_PLUG%\org.eclipse.jd t.launching_3.1.0.jar;%ECL_PLUG%\org.eclipse.jdt.ui_3.1.0.ja r;%ECL_PLUG%\org.eclipse.jdt_3.1.0.jar;%ECL_PLUG%\org.eclips e.jface.text_3.1.0.jar;%ECL_PLUG%\org.eclipse.jface_3.1.0.ja r;%ECL_PLUG%\org.eclipse.uml2.codegen.ecore.ui_1.1.0.jar;%EC L_PLUG%\org.eclipse.uml2.codegen.ecore_1.1.0.jar;%ECL_PLUG%\ org.eclipse.uml2.common.edit_1.1.0.jar;%ECL_PLUG%\org.eclips e.uml2.common_1.1.0.jar;%ECL_PLUG%\org.eclipse.uml2.ecore.im porter_1.1.0.jar;%ECL_PLUG%\org.eclipse.uml2.edit_1.1.0.jar; %ECL_PLUG%\org.eclipse.uml2.editor_1.1.0.jar;%ECL_PLUG%\org. eclipse.uml2.examples.emof2ecore_1.1.0.jar;%ECL_PLUG%\org.ec lipse.uml2.examples.ui_1.1.0.jar;%ECL_PLUG%\org.eclipse.uml2 .examples_1.1.0.jar;%ECL_PLUG%\org.eclipse.uml2.resources_1. 1.0.jar;%ECL_PLUG%\org.eclipse.uml2_1.1.0.jar;%ECL_PLUG%\org .eclipse.xsd.ecore.importer_2.1.0.jar;%ECL_PLUG%\org.eclipse .xsd.edit_2.1.0.jar;%ECL_PLUG%\org.eclipse.xsd.editor_2.1.0. jar;%ECL_PLUG%\org.eclipse.xsd_2.1.0.jar

set MAIN_DIR=C:\test\eclipse\workspace
set WORKSPACE=%MAIN_DIR%\..\codegenWorkspace


startup.jar org.eclipse.core.launcher.Main -clean -data %MAIN_DIR%
-application org.eclipse.xsd.ecore.importer.XSD2GenModel
%MAIN_DIR%\testp\model\test.xsd %MAIN_DIR%\testp\emf\test.genmodel
-modelProject %MAIN_DIR%\testp src -packages
http://www.example.com/Example1 -copyright "This is my code."


This is the .log file:

!SESSION 2005-09-23 09:37:22.938
-----------------------------------------------
eclipse.buildId=I20050627-1435
java.version=1.4.2_09
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: org.eclipse.core.launcher.Main -application
org.eclipse.xsd.ecore.importer.XSD2GenModel
C:\test\eclipse\workspace\testp\model\test.xsd
C:\test\eclipse\workspace\testp\emf\test.genmodel -modelProject
C:\test\eclipse\workspace\testp src -packages
http://www.example.com/Example1 -copyright This is my code.
Command-line arguments: org.eclipse.core.launcher.Main -clean -data
C:\test\eclipse\workspace -application
org.eclipse.xsd.ecore.importer.XSD2GenModel
C:\test\eclipse\workspace\testp\model\test.xsd
C:\test\eclipse\workspace\testp\emf\test.genmodel -modelProject
C:\test\eclipse\workspace\testp src -packages
http://www.example.com/Example1 -copyright This is my code.

!ENTRY org.eclipse.emf.importer 2 0 2005-09-23 09:37:26.534
!MESSAGE Error
!STACK 1
org.eclipse.core.runtime.CoreException[0]:
java.lang.IllegalArgumentException: Error: No schema file (.xsd or .wsdl)
specified
at
org.eclipse.xsd.ecore.importer.XSDImporterApplication.proces sArguments(XSDImporterApplication.java:134)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:143)
at
org.eclipse.emf.importer.ModelImporterApplication$1.run(Mode lImporterApplication.java:99)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1719)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1739)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:117)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
!SUBENTRY 1 org.eclipse.emf.importer 4 0 2005-09-23 09:37:26.534
!MESSAGE Error
!STACK 0
java.lang.IllegalArgumentException: Error: No schema file (.xsd or .wsdl)
specified
at
org.eclipse.xsd.ecore.importer.XSDImporterApplication.proces sArguments(XSDImporterApplication.java:134)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:143)
at
org.eclipse.emf.importer.ModelImporterApplication$1.run(Mode lImporterApplication.java:99)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1719)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1739)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:117)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Re: Trying to generate model using headless invocation throws Exception [message #395803 is a reply to message #395799] Fri, 23 September 2005 06:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Enrique,

I have a feeling that the problem is caused by what you've put on your
classpath. One does not normally put all the Eclipse plugins on the
classpath and I have a feeling that doing that will prevent proper
plugin initialization. Try it with only startup.jar on your classpath.
If you can't get the usage print-out when passing no arguments to the
application the really must be a configuration issue and the classpath
sounds like a likely possibility...


Enrique wrote:

> Trying:
> set %ECL_PLUG%=C:\test\eclipse\plugins
> set
> classpath=;%ECL_PLUG%\org.eclipse.ant.core_3.1.0.jar;%ECL_PL UG%\org.eclipse.ant.ui_3.1.0.jar;%ECL_PLUG%\org.eclipse.comp are_3.1.0.jar;%ECL_PLUG%\org.eclipse.core.boot_3.1.0.jar;%EC L_PLUG%\org.eclipse.core.commands_3.1.0.jar;%ECL_PLUG%\org.e clipse.core.expressions_3.1.0.jar;%ECL_PLUG%\org.eclipse.cor e.filebuffers_3.1.0.jar;%ECL_PLUG%\org.eclipse.core.resource s.compatibility_3.1.0.jar;%ECL_PLUG%\org.eclipse.core.resour ces.win32_3.1.0.jar;%ECL_PLUG%\org.eclipse.core.resources_3. 1.0.jar;%ECL_PLUG%\org.eclipse.core.runtime.compatibility_3. 1.0.jar;%ECL_PLUG%\org.eclipse.core.runtime_3.1.0.jar;%ECL_P LUG%\org.eclipse.core.variables_3.1.0.jar;%ECL_PLUG%\org.ecl ipse.debug.core_3.1.0.jar;%ECL_PLUG%\org.eclipse.debug.ui_3. 1.0.jar;%ECL_PLUG%\org.eclipse.draw2d_3.1.0.jar;%ECL_PLUG%\o rg.eclipse.emf.activities_2.1.0.jar;%ECL_PLUG%\org.eclipse.e mf.ant_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.codegen.ecore.ui _2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.codegen.ecore_2.1.0.ja r;%ECL_PLUG%\org.eclipse.emf.codegen.ui_2.1.0.jar;%ECL_PLUG% \org.eclipse.emf.codegen_2.1.0.jar;%ECL_PLUG%\org.eclipse.em f.common.ui_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.common_2.1. 0.jar;%ECL_PLUG%\org.eclipse.emf.commonj.sdo_2.1.0.jar;%ECL_ PLUG%\org.eclipse.emf.ecore.change.edit_2.1.0.jar;%ECL_PLUG% \org.eclipse.emf.ecore.change_2.1.0.jar;%ECL_PLUG%\org.eclip se.emf.ecore.edit_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.ecore .editor_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.ecore.sdo.edit_ 2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.ecore.sdo.editor_2.1.0. jar;%ECL_PLUG%\org.eclipse.emf.ecore.sdo_2.1.0.jar;%ECL_PLUG %\org.eclipse.emf.ecore.xmi_2.1.0.jar;%ECL_PLUG%\org.eclipse .emf.ecore_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.edit.ui_2.1. 0.jar;%ECL_PLUG%\org.eclipse.emf.edit_2.1.0.jar;%ECL_PLUG%\o rg.eclipse.emf.examples_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf .importer.ecore_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.importe r.java_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.importer.rose_2. 1.0.jar;%ECL_PLUG%\org.eclipse.emf.importer_2.1.0.jar;%ECL_P LUG%\org.eclipse.emf.java.edit_2.1.0.jar;%ECL_PLUG%\org.ecli pse.emf.java.editor_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.jav a_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.mapping.ecore2ecore.e ditor_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.mapping.ecore2eco re_2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.mapping.ecore2xml.ui _2.1.0.jar;%ECL_PLUG%\org.eclipse.emf.mapping.ecore2xml_2.1. 0.jar;%ECL_PLUG%\org.eclipse.emf.mapping.ui_2.1.0.jar;%ECL_P LUG%\org.eclipse.emf.mapping.xsd2ecore.editor_2.1.0.jar;%ECL _PLUG%\org.eclipse.emf.mapping.xsd2ecore_2.1.0.jar;%ECL_PLUG %\org.eclipse.emf.mapping_2.1.0.jar;%ECL_PLUG%\org.eclipse.e mf_2.1.0.jar;%ECL_PLUG%\org.eclipse.gef.examples.flow_3.1.0. jar;%ECL_PLUG%\org.eclipse.gef.examples.logic_3.1.0.jar;%ECL _PLUG%\org.eclipse.gef.examples.shapes_3.1.0.jar;%ECL_PLUG%\ org.eclipse.gef.examples.text_3.1.0.jar;%ECL_PLUG%\org.eclip se.gef_3.1.0.jar;%ECL_PLUG%\org.eclipse.help.appserver_3.1.0 .jar;%ECL_PLUG%\org.eclipse.help.base_3.1.0.jar;%ECL_PLUG%\o rg.eclipse.help.ui_3.1.0.jar;%ECL_PLUG%\org.eclipse.help_3.1 .0.jar;%ECL_PLUG%\org.eclipse.jdt.core_3.1.0.jar;%ECL_PLUG%\ org.eclipse.jdt.debug.ui_3.1.0.jar;%ECL_PLUG%\org.eclipse.jd t.launching_3.1.0.jar;%ECL_PLUG%\org.eclipse.jdt.ui_3.1.0.ja r;%ECL_PLUG%\org.eclipse.jdt_3.1.0.jar;%ECL_PLUG%\org.eclips e.jface.text_3.1.0.jar;%ECL_PLUG%\org.eclipse.jface_3.1.0.ja r;%ECL_PLUG%\org.eclipse.uml2.codegen.ecore.ui_1.1.0.jar;%EC L_PLUG%\org.eclipse.uml2.codegen.ecore_1.1.0.jar;%ECL_PLUG%\ org.eclipse.uml2.common.edit_1.1.0.jar;%ECL_PLUG%\org.eclips e.uml2.common_1.1.0.jar;%ECL_PLUG%\org.eclipse.uml2.ecore.im porter_1.1.0.jar;%ECL_PLUG%\org.eclipse.uml2.edit_1.1.0.jar; %ECL_PLUG%\org.eclipse.uml2.editor_1.1.0.jar;%ECL_PLUG%\org. eclipse.uml2.examples.emof2ecore_1.1.0.jar;%ECL_PLUG%\org.ec lipse.uml2.examples.ui_1.1.0.jar;%ECL_PLUG%\org.eclipse.uml2 .examples_1.1.0.jar;%ECL_PLUG%\org.eclipse.uml2.resources_1. 1.0.jar;%ECL_PLUG%\org.eclipse.uml2_1.1.0.jar;%ECL_PLUG%\org .eclipse.xsd.ecore.importer_2.1.0.jar;%ECL_PLUG%\org.eclipse .xsd.edit_2.1.0.jar;%ECL_PLUG%\org.eclipse.xsd.editor_2.1.0. jar;%ECL_PLUG%\org.eclipse.xsd_2.1.0.jar
>
>
> set MAIN_DIR=C:\test\eclipse\workspace
> set WORKSPACE=%MAIN_DIR%\..\codegenWorkspace
>
>
> startup.jar org.eclipse.core.launcher.Main -clean -data %MAIN_DIR%
> -application org.eclipse.xsd.ecore.importer.XSD2GenModel
> %MAIN_DIR%\testp\model\test.xsd %MAIN_DIR%\testp\emf\test.genmodel
> -modelProject %MAIN_DIR%\testp src -packages
> http://www.example.com/Example1 -copyright "This is my code."
>
>
> This is the .log file:
>
> !SESSION 2005-09-23 09:37:22.938
> -----------------------------------------------
> eclipse.buildId=I20050627-1435
> java.version=1.4.2_09
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
> Framework arguments: org.eclipse.core.launcher.Main -application
> org.eclipse.xsd.ecore.importer.XSD2GenModel
> C:\test\eclipse\workspace\testp\model\test.xsd
> C:\test\eclipse\workspace\testp\emf\test.genmodel -modelProject
> C:\test\eclipse\workspace\testp src -packages
> http://www.example.com/Example1 -copyright This is my code.
> Command-line arguments: org.eclipse.core.launcher.Main -clean -data
> C:\test\eclipse\workspace -application
> org.eclipse.xsd.ecore.importer.XSD2GenModel
> C:\test\eclipse\workspace\testp\model\test.xsd
> C:\test\eclipse\workspace\testp\emf\test.genmodel -modelProject
> C:\test\eclipse\workspace\testp src -packages
> http://www.example.com/Example1 -copyright This is my code.
>
> !ENTRY org.eclipse.emf.importer 2 0 2005-09-23 09:37:26.534
> !MESSAGE Error
> !STACK 1
> org.eclipse.core.runtime.CoreException[0]:
> java.lang.IllegalArgumentException: Error: No schema file (.xsd or
> .wsdl) specified
> at
> org.eclipse.xsd.ecore.importer.XSDImporterApplication.proces sArguments(XSDImporterApplication.java:134)
>
> at
> org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:143)
>
> at
> org.eclipse.emf.importer.ModelImporterApplication$1.run(Mode lImporterApplication.java:99)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1719)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1739)
> at
> org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:117)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
> !SUBENTRY 1 org.eclipse.emf.importer 4 0 2005-09-23 09:37:26.534
> !MESSAGE Error
> !STACK 0
> java.lang.IllegalArgumentException: Error: No schema file (.xsd or
> .wsdl) specified
> at
> org.eclipse.xsd.ecore.importer.XSDImporterApplication.proces sArguments(XSDImporterApplication.java:134)
>
> at
> org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:143)
>
> at
> org.eclipse.emf.importer.ModelImporterApplication$1.run(Mode lImporterApplication.java:99)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1719)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1739)
> at
> org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:117)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
>
Re: Trying to generate model using headless invocation throws Exception [message #395810 is a reply to message #395803] Fri, 23 September 2005 08:15 Go to previous messageGo to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
I was despereate. That`s the reason I have added almost everything to the
classpath. :-)
The issues were the same before.
Re: Trying to generate model using headless invocation throws Exception [message #395811 is a reply to message #395810] Fri, 23 September 2005 08:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050607040305070106010605
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Enrique,

I know these kind of problems can be really frustrating. Maybe you
should try running it under debug control.

You've stated that running just this doesn't print the usage

startup.jar org.eclipse.core.launcher.Main -clean -data %MAIN_DIR%
-application org.eclipse.xsd.ecore.importer.XSD2GenModel

so I would try setting a breakpoint in
org.eclipse.emf.importer.ModelApplicationImporter and see what's going
on with the arguments since there should be none for this simple case

public void run(IProgressMonitor progressMonitor, String[]
arguments) throws Exception
{
try
{
progressMonitor.beginTask("", 1);

if (arguments.length == 0 ||
"-help".equalsIgnoreCase(arguments[0].toString()))
{
printUsage();
}
else
{
processArguments(arguments, 0);
execute(new SubProgressMonitor(progressMonitor, 1));
}
}
finally
{
progressMonitor.done();
}
}



Enrique wrote:

> I was despereate. That`s the reason I have added almost everything to
> the classpath. :-)
> The issues were the same before.
>


--------------050607040305070106010605
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Enrique,<br>
<br>
I know these kind of problems can be really frustrating.
Re: Trying to generate model using headless invocation throws Exception [message #395849 is a reply to message #395811] Mon, 26 September 2005 10:01 Go to previous messageGo to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
Thanks a lot for your help!
I knew that I missed something. I`ve deleted everything(eclipse, ...) and
cleaned up my classpath and added step by step only a few paths. After
each step I`ve tried to run the generator. Every time the same exception
came. At the end IŽve added the startup.jar to the classpath, then the
help instruction was displayed, you have already shown me. I was really
absolutely sure taht IŽve added it before, but ...

Now I`m trying to generate the model.

My model looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="testApp" type="xsd:string"/>
</xsd:schema>

Of course I tried also some schemas with more complexity, but it didn`t
work either. And I get the following exception:


!SESSION 2005-09-26 15:57:00.285
-----------------------------------------------
eclipse.buildId=I20050627-1435
java.version=1.4.2_09
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Framework arguments: -application
org.eclipse.xsd.ecore.importer.XSD2GenModel
C:\test\eclipse\workspace\testp\model\test.xsd
C:\test\eclipse\workspace\testp\emf\test.genmodel -modelProject
C:\test\eclipse\workspace\testp src
Command-line arguments: -data C:\test\eclipse\workspace -application
org.eclipse.xsd.ecore.importer.XSD2GenModel
C:\test\eclipse\workspace\testp\model\test.xsd
C:\test\eclipse\workspace\testp\emf\test.genmodel -modelProject
C:\test\eclipse\workspace\testp src

!ENTRY org.eclipse.emf.importer 2 0 2005-09-26 15:57:03.179
!MESSAGE Error
!STACK 1
org.eclipse.core.runtime.CoreException[0]: java.lang.NullPointerException
at org.apache.crimson.tree.ElementNode2.getAttributeNodeNS(Unkn own Source)
at org.apache.crimson.tree.ElementNode2.hasAttributeNS(Unknown Source)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEcoreAttribute(XSDE coreBuilder.java:2336)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEcoreAttribute(XSDE coreBuilder.java:2329)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEStructuralFeature( XSDEcoreBuilder.java:2004)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:2117)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:2067)
at
org.eclipse.xsd.ecore.importer.XSDImporter.doComputeEPackage s(XSDImporter.java:123)
at
org.eclipse.emf.importer.ModelImporter.computeEPackages(Mode lImporter.java:664)
at
org.eclipse.emf.importer.ModelImporterApplication.computeEPa ckages(ModelImporterApplication.java:350)
at
org.eclipse.emf.importer.ModelImporterApplication.execute(Mo delImporterApplication.java:186)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:144)
at
org.eclipse.emf.importer.ModelImporterApplication$1.run(Mode lImporterApplication.java:99)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1719)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1739)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:117)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
!SUBENTRY 1 org.eclipse.emf.importer 4 0 2005-09-26 15:57:03.179
!MESSAGE Error
!STACK 0
java.lang.NullPointerException
at org.apache.crimson.tree.ElementNode2.getAttributeNodeNS(Unkn own Source)
at org.apache.crimson.tree.ElementNode2.hasAttributeNS(Unknown Source)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEcoreAttribute(XSDE coreBuilder.java:2336)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEcoreAttribute(XSDE coreBuilder.java:2329)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEStructuralFeature( XSDEcoreBuilder.java:2004)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:2117)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:2067)
at
org.eclipse.xsd.ecore.importer.XSDImporter.doComputeEPackage s(XSDImporter.java:123)
at
org.eclipse.emf.importer.ModelImporter.computeEPackages(Mode lImporter.java:664)
at
org.eclipse.emf.importer.ModelImporterApplication.computeEPa ckages(ModelImporterApplication.java:350)
at
org.eclipse.emf.importer.ModelImporterApplication.execute(Mo delImporterApplication.java:186)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:144)
at
org.eclipse.emf.importer.ModelImporterApplication$1.run(Mode lImporterApplication.java:99)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1719)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1739)
at
org.eclipse.emf.importer.ModelImporterApplication.run(ModelI mporterApplication.java:117)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)

!ENTRY org.eclipse.osgi 2005-09-26 15:57:03.259
!MESSAGE An error occurred while automatically activating bundle
org.eclipse.team.core (66).
!STACK 0
org.osgi.framework.BundleException: Exception in
org.eclipse.team.internal.core.TeamPlugin.start() of bundle
org.eclipse.team.core.
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1013)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:969)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:321)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:266)
at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:116)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:275)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1259)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:152)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:142)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:129)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 48)
at
org.eclipse.core.internal.resources.Workspace.initializeTeam Hook(Workspace.java:1300)
at
org.eclipse.core.internal.resources.Workspace.getTeamHook(Wo rkspace.java:1181)
at org.eclipse.core.internal.resources.Rules.<init>(Rules.java:40)
at
org.eclipse.core.internal.resources.Workspace.getRuleFactory (Workspace.java:1161)
at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBu ildJob.java:132)
at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJ ob.java:200)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Caused by: java.lang.NoClassDefFoundError:
org/eclipse/team/internal/core/UserStringMappings
at org.eclipse.team.core.Team.<clinit>(Team.java:64)
at org.eclipse.team.internal.core.TeamPlugin.start(TeamPlugin.j ava:75)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:994)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:988)
... 23 more
Root exception:
java.lang.NoClassDefFoundError:
org/eclipse/team/internal/core/UserStringMappings
at org.eclipse.team.core.Team.<clinit>(Team.java:64)
at org.eclipse.team.internal.core.TeamPlugin.start(TeamPlugin.j ava:75)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:994)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:988)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:969)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:321)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:266)
at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:116)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:275)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1259)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:152)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:142)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:129)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 48)
at
org.eclipse.core.internal.resources.Workspace.initializeTeam Hook(Workspace.java:1300)
at
org.eclipse.core.internal.resources.Workspace.getTeamHook(Wo rkspace.java:1181)
at org.eclipse.core.internal.resources.Rules.<init>(Rules.java:40)
at
org.eclipse.core.internal.resources.Workspace.getRuleFactory (Workspace.java:1161)
at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBu ildJob.java:132)
at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJ ob.java:200)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Re: Trying to generate model using headless invocation throws Exception [message #395850 is a reply to message #395849] Mon, 26 September 2005 10:05 Go to previous messageGo to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
IŽve just seen that there is a popular bug from crimson ...
I guess it is this one. I try to fix that.
Thanks
Re: Trying to generate model using headless invocation throws Exception [message #395855 is a reply to message #395850] Mon, 26 September 2005 10:32 Go to previous messageGo to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
Finally it works!!!

set MAIN_DIR=C:\test\eclipse\workspace
set WORKSPACE=%MAIN_DIR%\..\codegenWorkspace
java org.eclipse.core.launcher.Main -data %MAIN_DIR% -application
org.eclipse.xsd.ecore.importer.XSD2GenModel
%MAIN_DIR%\testp\model\test.xsd %MAIN_DIR%\testp\emf\test.genmodel
-modelProject %MAIN_DIR%\testp src

:-)
Re: Trying to generate model using headless invocation throws Exception [message #395857 is a reply to message #395855] Mon, 26 September 2005 10:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Enrique,

I'm glad to hear it finally worked. Sorry it was such a hassle.


Enrique wrote:

> Finally it works!!!
>
> set MAIN_DIR=C:\test\eclipse\workspace
> set WORKSPACE=%MAIN_DIR%\..\codegenWorkspace
> java org.eclipse.core.launcher.Main -data %MAIN_DIR% -application
> org.eclipse.xsd.ecore.importer.XSD2GenModel
> %MAIN_DIR%\testp\model\test.xsd %MAIN_DIR%\testp\emf\test.genmodel
> -modelProject %MAIN_DIR%\testp src
>
> :-)
>
Re: Trying to generate model using headless invocation throws Exception [message #395860 is a reply to message #395857] Mon, 26 September 2005 12:11 Go to previous messageGo to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
Now ,there is even one issue.
How do invoke the generation using RSA (version 6.0.1)?
IŽve found an eclipse sub directory of it, having a startup.jar file.
Trying to start an invocation by adding this startup.jar file to the
classpath failed.
Do you know how get this invocation?
If not, I think IŽm gonne ask some guys of the RSA development team. (If
there one)
Re: Trying to generate model using headless invocation throws Exception [message #395862 is a reply to message #395860] Mon, 26 September 2005 16:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Enrique,

Sorry, I can't really provide help for product specific issues.


Enrique wrote:

> Now ,there is even one issue.
> How do invoke the generation using RSA (version 6.0.1)?
> IŽve found an eclipse sub directory of it, having a startup.jar file.
> Trying to start an invocation by adding this startup.jar file to the
> classpath failed.
> Do you know how get this invocation?
> If not, I think IŽm gonne ask some guys of the RSA development team.
> (If there one)
>
>
Re: Trying to generate model using headless invocation throws Exception [message #395868 is a reply to message #395862] Tue, 27 September 2005 02:02 Go to previous messageGo to next message
Enrique is currently offline Enrique
Messages: 44
Registered: July 2009
Member
Ok, no problem.
I`m gonna ask some guys of RSA.
Thanks a lot for you help.
Re: Trying to generate model using headless invocation throws Exception [message #718793 is a reply to message #395860] Thu, 25 August 2011 07:20 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising name
Messages: 500
Registered: June 2011
Senior Member
Hi,

i want to do the similar task, I am creating ecore dynamically and i want to generate classes from ecore model, i think, i also need to use headless invocation. Can you please guide me how to do that?

i will be very thankful to you

Warmest Regards,
Re: Trying to generate model using headless invocation throws Exception [message #718905 is a reply to message #718793] Thu, 25 August 2011 11:08 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
You've considered using the Ant tasks?

On 25/08/2011 4:20 AM, ModelGeek wrote:
> Hi,
>
> i want to do the similar task, I am creating ecore dynamically and i
> want to generate classes from ecore model, i think, i also need to use
> headless invocation. Can you please guide me how to do that?
>
> i will be very thankful to you
>
> Warmest Regards,
Previous Topic:(no subject)
Next Topic:creating genmodel and generating code from genmodel in standalone application
Goto Forum:
  


Current Time: Thu Aug 21 12:14:24 EDT 2014

Powered by FUDForum. Page generated in 0.02271 seconds