-
1. Re: I can't run sample codes
kcbabo Feb 2, 2012 10:05 AM (in response to kita)Can you provide a bit more detail on what you're running and where you're running it? For example,
- Which application is this? A quickstart or something you created on your own?
- Where are you seeing the error? In Eclipse, when building from the command line (e.g. mvn install)?
thanks,
keith
-
2. Re: I can't run sample codes
kita Feb 2, 2012 2:02 PM (in response to kcbabo)I am running maven from quickstart (shipped with switchyard)
I tried all the applications and failled all.
I see error maven tried to install the app, it happens at <artifactId>switchyard-plugin</artifactId> in pom.xml of each of the sample code shipped with switchard.
[ERROR] Failed to execute goal org.switchyard:switchyard-plugin:0.3.0.Final:configure (default) on project switchyard-quickstart-bpm-service: Model [
org.switchyard.config.model.switchyard.v1.V1SwitchYardModel] is invalid: cvc-complex-type.3.2.2: Attribute 'name' is not allowed to appear in element 'component'. -> [Help 1]
-
3. Re: I can't run sample codes
kcbabo Feb 2, 2012 9:22 PM (in response to kita)I downloaded the SwitchYard AS7 0.3 distribution from here:
http://www.jboss.org/switchyard/downloads
Unzipped it and ran the following in the quickstarts/ directory:
mvn install
All quickstarts built successfully. I even cleaned my maven repo and disabled local Maven settings, so I'm not sure what you are hitting in your environment. FWIW, the quickstarts build as part of our CI environment here as well:
-
4. Re: I can't run sample codes
kita Feb 3, 2012 11:55 AM (in response to kcbabo)Keith,
I tried both maven and eclipse, and it did not work.
Here is stack trace for eclipse
java.lang.RuntimeException: Model [org.switchyard.config.model.switchyard.v1.V1SwitchYardModel] is invalid: cvc-complex-type.3.2.2: Attribute 'name' is not allowed to appear in element 'component'.
at org.switchyard.config.model.Validation.assertValid(Validation.java:78)
at org.switchyard.config.model.BaseModel.assertModelValid(BaseModel.java:179)
at org.switchyard.test.SwitchYardTestKit.createSwitchYardModel(SwitchYardTestKit.java:744)
at org.switchyard.test.SwitchYardTestKit.<init>(SwitchYardTestKit.java:141)
at org.switchyard.test.SwitchYardRunner.createTest(SwitchYardRunner.java:55)
at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:251)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:248)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.switchyard.test.SwitchYardRunner.run(SwitchYardRunner.java:78)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'name' is not allowed to appear in element 'component'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown Source)
at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Unknown Source)
at org.switchyard.config.model.BaseModel.validateModel(BaseModel.java:164)
... 22 more
-
5. Re: I can't run sample codes
dward Feb 3, 2012 5:48 PM (in response to kita)Seme,
- Can you please post the plugin/scanner output here? You'll find it in the quickstart's target/classes/META-INF/switchyard.xml
- Were you previously using 0.2, and just moved to 0.3? If so, and you use maven, you'll want to make sure you clean and re-install the switchyard core and components repos before quickstarts.
- What exact java version are you using, and on what OS?
Thanks,
David
-
6. Re: I can't run sample codes
kita Feb 6, 2012 7:11 AM (in response to dward)David,
I am using version .3 and removed everything from my repo and ran mvn still it did not work.
java version "1.6.0_27" and windows 7 64 bits.
Here is my switchyard.xml.
<?xml version="1.0" encoding="UTF-8"?>
<switchyard xmlns="urn:switchyard-config:switchyard:1.0">
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="osdemo" targetNamespace="urn:switchyard-quickstart:bpm-service:1.0">
<service name="ProcessOrder" promote="ProcessOrder">
<interface.wsdl interface="wsdl/ProcessOrder.wsdl#wsdl.porttype(ProcessOrder)"/>
<binding.soap xmlns="urn:switchyard-component-soap:config:1.0">
<wsdl>wsdl/ProcessOrder.wsdl</wsdl>
<socketAddr>localhost:18001</socketAddr>
<contextPath>swydws</contextPath>
</binding.soap>
</service>
<component name="ProcessOrder">
<implementation.bpm xmlns="urn:switchyard-component-bpm:config:1.0" processDefinition="META-INF/ProcessOrder.bpmn" processId="ProcessOrder">
<taskHandler class="org.switchyard.component.bpm.task.SwitchYardServiceTaskHandler" name="SwitchYard Service"/>
</implementation.bpm>
<service name="ProcessOrder">
<interface.java interface="org.switchyard.quickstarts.bpm.service.ProcessOrder"/>
</service>
</component>
</composite>
</switchyard>
-
7. Re: I can't run sample codes
dward Feb 6, 2012 10:29 AM (in response to kita)Seme,
Other than a missing newline at the end of the file, your switchyard.xml is exactly the same as quickstarts/bpm-service/src/main/resources/META-INF/switchyard.xml. What I would rather see, however, is what gets generated in quickstarts/bpm-service/target/classes/META-INF/switchyard.xml.
Thanks,
David
-
8. Re: I can't run sample codes
kcbabo Feb 6, 2012 10:43 AM (in response to dward)I replied on this a few days ago, but I think my post was swallowed by the forum. Can you post the output from "mvn -version" and "java -version" ? Wild guess here, but are you using an IBM JDK on your Windows machine? I saw this once or twice during our Asia workshops. It only happened on Windows, but the vast majority of Windows installs worked fine. I think the common thread was IBM JDK, but I can't say for certain.
-
9. Re: I can't run sample codes
dward Feb 6, 2012 11:02 AM (in response to kcbabo)Seme,
Also, please compile, run, and copy/paste the output of this program here:
public class SysProps {
public static void main(String... args) {
System.getProperties().list(System.out);
}
}
Thanks,
David
-
10. Re: I can't run sample codes
kita Feb 6, 2012 11:59 AM (in response to kcbabo)Keith,
It is Sun JDK on Windows 7.
Here are my JDL and MVN details.
Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
Maven home: C:\apache-maven-3.0.3\bin\..
Java version: 1.6.0_27, vendor: Sun Microsystems Inc.
Java home: C:\Java\jdk1.6.0_27\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
-
11. Re: I can't run sample codes
kita Feb 6, 2012 12:04 PM (in response to dward)David.
-- listing properties --
java.runtime.name=Java(TM) SE Runtime Environment
sun.boot.library.path=C:\Java\jdk1.6.0_27\jre\bin
java.vm.version=20.2-b06
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=;
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg=sun.io
user.country=US
sun.java.launcher=SUN_STANDARD
sun.os.patch.level=
java.vm.specification.name=Java Virtual Machine Specification
user.dir=C:\Users\user\workspace
java.runtime.version=1.6.0_27-b07
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\Java\jdk1.6.0_27\jre\lib\endorsed
os.arch=amd64
java.io.tmpdir=C:\Users\user\AppData\Local\Temp\
line.separator=
java.vm.specification.vendor=Sun Microsystems Inc.
user.variant=
os.name=Windows 7
sun.jnu.encoding=Cp1252
java.library.path=C:\Java\jdk1.6.0_27\jre\bin;C:\WINDOW...
java.specification.name=Java Platform API Specification
java.class.version=50.0
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
os.version=6.1
user.home=C:\Users\user
user.timezone=
java.awt.printerjob=sun.awt.windows.WPrinterJob
file.encoding=Cp1252
java.specification.version=1.6
user.name=user
java.class.path=C:\Users\user\workspace\
java.vm.specification.version=1.0
sun.arch.data.model=64
java.home=C:\Java\jdk1.6.0_27\jre
sun.java.command=Test
java.specification.vendor=Sun Microsystems Inc.
user.language=en
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode
java.version=1.6.0_27
java.ext.dirs=C:\Java\jdk1.6.0_27\jre\lib\ext;C:\WI...
sun.boot.class.path=C:\Java\jdk1.6.0_27\jre\lib\endorsed\...
java.vendor=Sun Microsystems Inc.
file.separator=\
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
sun.desktop=windows
sun.cpu.isalist=amd64
Thanks
-
12. Re: I can't run sample codes
dward Feb 6, 2012 1:11 PM (in response to kita)Seme,
Thanks for the details. Please also provide the generated quickstarts/bpm-service/target/classes/META-INF/switchyard.xml. You had instead given us the source quickstarts/bpm-service/src/main/resources/META-INF/switchyard.xml.
Best,
David
-
13. Re: I can't run sample codes
mageshbk Feb 7, 2012 4:10 AM (in response to kita)I just tried with Windows 7 64 bit, JDK 1.6.0u30 and all went smooth. Seme, does the user who is running the maven build and eclipse have the right permissions? Is it possible for you to test with update 30?
-
14. Re: I can't run sample codes
kita Feb 7, 2012 6:25 AM (in response to dward)David,
Here is generated switchyard.xml
<?xml version="1.0" encoding="UTF-8"?><switchyard xmlns="urn:switchyard-config:switchyard:1.0">
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="osdemo" targetNamespace="urn:switchyard-quickstart:bpm-service:1.0">
<service name="ProcessOrder" promote="ProcessOrder">
<interface.wsdl interface="wsdl/ProcessOrder.wsdl#wsdl.porttype(ProcessOrder)"/>
<binding.soap xmlns="urn:switchyard-component-soap:config:1.0">
<wsdl>wsdl/ProcessOrder.wsdl</wsdl>
<socketAddr>localhost:18001</socketAddr>
<contextPath>swydws</contextPath>
</binding.soap>
</service>
<component name="ProcessOrder">
<implementation.bpm xmlns="urn:switchyard-component-bpm:config:1.0" processDefinition="META-INF/ProcessOrder.bpmn" processId="ProcessOrder">
<taskHandler class="org.switchyard.component.bpm.task.SwitchYardServiceTaskHandler" name="SwitchYard Service"/>
</implementation.bpm>
<service name="ProcessOrder">
<interface.java interface="org.switchyard.quickstarts.bpm.service.ProcessOrder"/>
</service>
</component>
<component xmlns="" name="Shipping">
<implementation.bean xmlns="urn:switchyard-component-bean:config:1.0" class="org.switchyard.quickstarts.bpm.service.ShippingBean"/>
<service xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="Shipping">
<interface.java interface="org.switchyard.quickstarts.bpm.service.Shipping"/>
</service>
</component>
<component name="BackOrder">
<implementation.bean xmlns="urn:switchyard-component-bean:config:1.0" class="org.switchyard.quickstarts.bpm.service.BackOrderBean"/>
<service xmlns="" name="BackOrder">
<interface.java xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" interface="org.switchyard.quickstarts.bpm.service.BackOrder"/>
</service>
</component>
<component xmlns="" name="Inventory">
<implementation.bean xmlns="urn:switchyard-component-bean:config:1.0" class="org.switchyard.quickstarts.bpm.service.InventoryBean"/>
<service xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="Inventory">
<interface.java interface="org.switchyard.quickstarts.bpm.service.Inventory"/>
</service>
</component>
</composite>
</switchyard>