[JBoss JIRA] (SWITCHYARD-543) jaxb error when doing a show-config after adding a camel-service and running mvn package
by Tom Cunningham (Created) (JIRA)
jaxb error when doing a show-config after adding a camel-service and running mvn package
----------------------------------------------------------------------------------------
Key: SWITCHYARD-543
URL: https://issues.jboss.org/browse/SWITCHYARD-543
Project: SwitchYard
Issue Type: Bug
Components: component-camel
Affects Versions: 0.3
Reporter: Tom Cunningham
Assignee: Tom Cunningham
Fix For: 0.3
Seeing the following after these steps :
[myApp] tmp $ new-project --named tomtest3 --topLevelPackage org.switchyard.example
? Use [/tmp/tomtest3] as project directory? [Y/n] y
***SUCCESS*** Created project [tomtest3] in new working directory [/tmp/tomtest3]
Wrote /tmp/tomtest3
Wrote /tmp/tomtest3/pom.xml
Wrote /tmp/tomtest3/src/main/java
Wrote /tmp/tomtest3/src/test/java
Wrote /tmp/tomtest3/src/main/resources
Wrote /tmp/tomtest3/src/test/resources
Wrote /tmp/tomtest3/src/main/resources/META-INF/forge.xml
[tomtest3] tomtest3 $ project install-facet switchyard
Please select a version to install:
1 - [org.switchyard:switchyard-api:::0.1.0-M1]
2 - [org.switchyard:switchyard-api:::0.1.0-SNAPSHOT]
3 - [org.switchyard:switchyard-api:::0.1.0]
4 - [org.switchyard:switchyard-api:::0.2.0-SNAPSHOT]
5 - [org.switchyard:switchyard-api:::0.2.0]
6 - [org.switchyard:switchyard-api:::0.3.0-SNAPSHOT]
7 - [org.switchyard:switchyard-api:::0.3.0.CR1]
? Choose an option by typing the number of the selection: 7
? Application name (e.g. myApp) looo
***SUCCESS*** Installed [switchyard] successfully.
Wrote /tmp/tomtest3/pom.xml
[tomtest3] tomtest3 $ project install-facet switchyard.camel
***SUCCESS*** Installed [switchyard.camel] successfully.
Wrote /tmp/tomtest3/pom.xml
[tomtest3] tomtest3 $ camel-service create --serviceName ServiceB
Created route service interface [ServiceB.java]
Created route service implementation [ServiceBBuilder.java]
NOTE: Run 'mvn package' to make ServiceB visible to SwitchYard shell.
Created Camel service ServiceB
Wrote /tmp/tomtest3/src/main/resources/../../main/java/org/switchyard/example/ServiceB.java
Wrote /tmp/tomtest3/src/main/resources/../../main/java/org/switchyard/example/ServiceBBuilder.java
[tomtest3] tomtest3 $ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building tomtest3 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for rome:rome:jar:0.9 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ tomtest3 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ tomtest3 ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /tmp/tomtest3/target/classes
[INFO]
[INFO] --- switchyard-plugin:0.3.0.CR1:configure (default) @ tomtest3 ---
[INFO] SwitchYard plugin scanning: [file:/tmp/tomtest3/target/classes/]
[INFO] Outputting SwitchYard configuration model to /tmp/tomtest3/target/classes/META-INF/switchyard.xml
[INFO] Validating SwitchYard configuration model...
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ tomtest3 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ tomtest3 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ tomtest3 ---
[INFO] Surefire report directory: /tmp/tomtest3/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ tomtest3 ---
[INFO] Building jar: /tmp/tomtest3/target/tomtest3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.282s
[INFO] Finished at: Tue Nov 15 15:23:56 EST 2011
[INFO] Final Memory: 18M/153M
[INFO] ------------------------------------------------------------------------
(note: i have monkeyed with the failing static block so we can see the exception being thrown here)
[tomtest3] tomtest3 $ switchyard show-config
java.util.MissingResourceException: Can't find bundle for base name javax.xml.bind.Messages, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:705)
at javax.xml.bind.Messages.format(Messages.java:36)
at javax.xml.bind.Messages.format(Messages.java:21)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:289)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:412)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:375)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:279)
at org.switchyard.component.camel.config.model.v1.V1CamelImplementationModel.createJAXBInstance(V1CamelImplementationModel.java:91)
at org.switchyard.component.camel.config.model.v1.V1CamelImplementationModel.<init>(V1CamelImplementationModel.java:64)
at org.switchyard.component.camel.config.model.v1.V1CamelModelMarshaller.read(V1CamelModelMarshaller.java:94)
at org.switchyard.config.model.BaseModel.readModel(BaseModel.java:247)
at org.switchyard.config.model.BaseModel.getModelChildren(BaseModel.java:145)
at org.switchyard.config.model.BaseModel.primeModelChildren(BaseModel.java:321)
at org.switchyard.config.model.BaseModel.primeModelChildren(BaseModel.java:322)
at org.switchyard.config.model.BaseModel.primeModelChildren(BaseModel.java:322)
at org.switchyard.config.model.BaseModel.primeModelChildren(BaseModel.java:316)
at org.switchyard.config.model.BaseModel.orderModelChildren(BaseModel.java:306)
at org.switchyard.config.model.Models.merge(Models.java:79)
at org.switchyard.config.model.Models.merge(Models.java:55)
at org.switchyard.config.model.Models.merge(Models.java:42)
at org.switchyard.tools.forge.plugin.SwitchYardFacet.getMergedSwitchYardConfig(SwitchYardFacet.java:231)
at org.switchyard.tools.forge.plugin.SwitchYardPlugin.listServices(SwitchYardPlugin.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.forge.shell.command.Execution.perform(Execution.java:147)
at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:125)
at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:63)
at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:711)
at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:495)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)
at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:87)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException: javax.xml.bind.Messages cannot be cast to ResourceBundle
at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2297)
at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1364)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1328)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1282)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1282)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1224)
... 58 more
[Public]
[Private]
component: ServiceBBuilder
service: ServiceB
interface: org.switchyard.example.ServiceB
[tomtest3] tomtest3 $
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira