fmarchioni / mastertheboss Goto Github PK
View Code? Open in Web Editor NEWSource code for mastertheboss.com
License: MIT License
Source code for mastertheboss.com
License: MIT License
I've tried running this on Wildfly 10 and it fails with the following exception when trying to list the queues:
java.lang.IllegalArgumentException
at org.jboss.dmr.ModelValue.asList(ModelValue.java:140)
at org.jboss.dmr.ModelNode.asList(ModelNode.java:1384)
at com.mastertheboss.jmsbrowser.EJBBrowser.getListQueues(EJBBrowser.java:160)
I created the project mentioned in the example of this article and tried running using jberet in java SE mode. But, i have been facing several issues while executing from my windows command prompt as a java SE application.
The issue details are listed here in this stackoverflow question.
Could you help in sharing your project, especially the POM and any other settings or configurations to run the final executable JAR in command prompt
Cloning the project appears to have an issue on Windows because of the inclusion of the reserved word "con" in the path (this works fine on Linux). Could this please be resolved by renaming that package to avoid the use of that reserved word?
git clone https://github.com/fmarchioni/mastertheboss.git
Cloning into 'mastertheboss'...
remote: Enumerating objects: 9491, done.
remote: Counting objects: 100% (1645/1645), done.
remote: Compressing objects: 100% (824/824), done.
remote: Total 9491 (delta 577), reused 1564 (delta 535), pack-reused 7846
Receiving objects: 100% (9491/9491), 64.73 MiB | 4.17 MiB/s, done.
Resolving deltas: 100% (2771/2771), done.
error: invalid path 'ejb/ejb-singleton/src/main/java/con/mastertheboss/ejb/ServletClient.java'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
When I do mvn clean install
on the CdI application I get several ugly looking warning messages.
How can I get rid of these?
mvn clean install
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cdi-j2se 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cdi-j2se ---
[INFO] Deleting /home/anton/git/mastertheboss/cdi/cdi-j2se/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cdi-j2se ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ cdi-j2se ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to /home/anton/git/mastertheboss/cdi/cdi-j2se/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cdi-j2se ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/anton/git/mastertheboss/cdi/cdi-j2se/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ cdi-j2se ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/anton/git/mastertheboss/cdi/cdi-j2se/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ cdi-j2se ---
[INFO] Surefire report directory: /home/anton/git/mastertheboss/cdi/cdi-j2se/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.mastertheboss.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.042 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:java (default) @ cdi-j2se ---
Apr 23, 2018 1:08:20 PM org.jboss.weld.bootstrap.WeldStartup <clinit>
INFO: WELD-000900: 3.0.0 (CR1)
Apr 23, 2018 1:08:21 PM org.jboss.weld.bootstrap.WeldStartup startContainer
INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
Apr 23, 2018 1:08:21 PM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
INFO: WELD-000119: Not generating any bean definitions from com.mastertheboss.Hello because of underlying class loading error: Type com.mastertheboss.Hello not found. If this is unexpected, enable DEBUG logging to see the full error.
Apr 23, 2018 1:08:21 PM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
INFO: WELD-000119: Not generating any bean definitions from com.mastertheboss.SimpleService because of underlying class loading error: Type com.mastertheboss.SimpleService not found. If this is unexpected, enable DEBUG logging to see the full error.
Apr 23, 2018 1:08:21 PM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
INFO: WELD-000119: Not generating any bean definitions from com.mastertheboss.SimpleEvent because of underlying class loading error: Type com.mastertheboss.SimpleEvent not found. If this is unexpected, enable DEBUG logging to see the full error.
Apr 23, 2018 1:08:21 PM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
INFO: WELD-000119: Not generating any bean definitions from com.mastertheboss.CDI2Demo because of underlying class loading error: Type com.mastertheboss.CDI2Demo not found. If this is unexpected, enable DEBUG logging to see the full error.
Apr 23, 2018 1:08:21 PM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
INFO: WELD-000119: Not generating any bean definitions from com.mastertheboss.App because of underlying class loading error: Type com.mastertheboss.App not found. If this is unexpected, enable DEBUG logging to see the full error.
Apr 23, 2018 1:08:22 PM org.jboss.weld.environment.se.WeldContainer complete
INFO: WELD-ENV-002003: Weld SE container ea3c0b70-f079-46c8-be2c-c30850841ea9 initialized
Apr 23, 2018 1:08:22 PM org.jboss.weld.environment.se.WeldContainer shutdown
INFO: WELD-ENV-002001: Weld SE container ea3c0b70-f079-46c8-be2c-c30850841ea9 shut down
[WARNING] thread Thread[ForkJoinPool.commonPool-worker-1,5,com.mastertheboss.CDI2Demo] was interrupted but is still alive after waiting at least 15000msecs
[WARNING] thread Thread[ForkJoinPool.commonPool-worker-1,5,com.mastertheboss.CDI2Demo] will linger despite being asked to die via interruption
[WARNING] thread Thread[ForkJoinPool.commonPool-worker-2,5,com.mastertheboss.CDI2Demo] will linger despite being asked to die via interruption
[WARNING] thread Thread[ForkJoinPool.commonPool-worker-3,5,com.mastertheboss.CDI2Demo] will linger despite being asked to die via interruption
[WARNING] NOTE: 3 thread(s) did not finish despite being asked to via interruption. This is not a problem with exec:java, it is a problem with the running code. Although not serious, it should be remedied.
[WARNING] Couldn't destroy threadgroup org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=com.mastertheboss.CDI2Demo,maxpri=10]
java.lang.IllegalThreadStateException
at java.lang.ThreadGroup.destroy (ThreadGroup.java:776)
at org.codehaus.mojo.exec.ExecJavaMojo.execute (ExecJavaMojo.java:328)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
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:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ cdi-j2se ---
[INFO] Building jar: /home/anton/git/mastertheboss/cdi/cdi-j2se/target/cdi-j2se-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ cdi-j2se ---
[INFO] Installing /home/anton/git/mastertheboss/cdi/cdi-j2se/target/cdi-j2se-1.0-SNAPSHOT.jar to /home/anton/.m2/repository/com/mastertheboss/cdi-j2se/1.0-SNAPSHOT/cdi-j2se-1.0-SNAPSHOT.jar
[INFO] Installing /home/anton/git/mastertheboss/cdi/cdi-j2se/pom.xml to /home/anton/.m2/repository/com/mastertheboss/cdi-j2se/1.0-SNAPSHOT/cdi-j2se-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.157 s
[INFO] Finished at: 2018-04-23T13:08:37+12:00
[INFO] Final Memory: 21M/70M
[INFO] ------------------------------------------------------------------------
Is this line correct?
Shouldn't it be:
spring.datasource.xa.data-source-class-name=org.postgresql.xa.PGXADataSource
spring.datasource.driver-class-name=org.postgresql.Driver
Dispatcher error: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"springbootwildfly.war\".undertow-deployment" => "java.lang.ExceptionInInitializerError
Caused by: java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalStateException: Could not detect JBoss VFS infrastructure
Caused by: java.lang.ClassNotFoundException: org.jboss.vfs.VFS from [Module \"deployment.springbootwildfly.war\" from Service Module Loader]"}}
We like to use mastertheboss, however, we need a proper license on the project. Something like Apache2, MIT or BSD would suit the project well. Would it be possible to add one?
(I come from http://www.mastertheboss.com/jboss-frameworks/resteasy/getting-started-with-jakarta-restful-services/, thank you for the great article!)
Typically, one injects the ObjectMapper using following class:
public class ObjectMapperContextResolver implements ContextResolver<ObjectMapper> {
Now that ContextResolver
will be deprecated, how to add an ObjectMapper
?
Hi @fmarchioni - I saw your blog post on MP GraphQL at http://www.mastertheboss.com/javaee/eclipse-microservices/getting-started-with-graphql-using-java-applications - nice article!
The sample code that you use and currently host in this repo is intellectual property of IBM licensed under the Eclipse Public License, but the copy of the code you have on this site has removed those copyright headers. For example:
The WeatherService.java file from here:
https://github.com/fmarchioni/mastertheboss/blob/master/micro-services/mp-graphql/src/main/java/graphql/sample/WeatherService.java
is the same as this file from the OpenLiberty/sample-mp-graphql repository, but without the "io.openliberty" package or the IBM copyright header:
https://github.com/OpenLiberty/sample-mp-graphql/blob/276906169284333c09cacfe496d4c561106476a6/src/main/java/io/openliberty/graphql/sample/WeatherService.java
Repackaging is allowed under the EPL, but removal of the copyright header is not. Can you please add the copyright headers back to these source files?
Thanks, Andy
Hi,
This isn't exactly an issue, and more of a question instead. I have been using mastertheboss quite a bit as a point of reference, whilst I have spent a considerable amount of time researching and playing the trial and error game.
So the question, I have 10 different servers, each running multiple JBoss instances (not in domain mode).
The standalone.xml files vary a little between each and it isn't each trying to manage them all. Without setting up a whole platform that would cover this plus any future activities, what is the best way to manage just this setup alone?
Thanks :)
Hello,
i've had some issues trying to run the JMSBrowser on JBoss EAP 6.1. i'll attach a patch to this issue that fixes this for me. But i'm not quite sure if this can be applied to the project.
The point where the queues are discoverd and the JSON is parsed, it's assumed that the string to parse is a simple String but actually was an JSON Array containing only one element. The patched Version just takes the first element from that array and set's it as queuename.
Furthermore the JSF file contained an xml namespace for jsf which resulted in the problem that the primefaces resources (css, javascript) weren't inserted in the generated html. So that clicks on the buttons didn't do anything more than bring a error message in the browser console. And the layout wasn't displayed correclty.
But anyhow i'd like to thank you for your work. I had quite some trouble setting up HermesJMS and explaining that to colleagues. JMSBrowser will be much easier to use.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.