Deploying the JEE6 Archetype
Join the DZone community and get the full member experience.Join For Free
Well, the good news is it is possible to get the new Weld archetype to work. The bad news is, the process, at least to me, is a treatise on why the Balkanized Java ‘platform‘ is actually like a schizoid portrait in madness. And it‘s nobody‘s fault. I am deeply impressed by all the great stuff that the Red Hat team has pumped out in the past 5–6 years, but it‘s not enough. Why? Read on. Maybe it is enough for you.
Here‘s the simple recap:
- Generated the project.
- Tried to deploy on Glassfish and got spurious error, found out the logger classnotfounds were the real problem.
- Commented out the solder dependency and was able to get to the Hello World screen.
That was where I was as of the last post.
- Went back and could not believe I got the logger errors again.
- Double, triple checked that the solder dep was commented out in the pom.
- That there were no imports of the loggers.
- Did clean
- Removed and readded the app
- Restarted eclipse
- (Yeah does remind you of Windoze doesn‘t it?)
- Gave up on that.
- Go back to 3.0 and the original project.
- Go make an empty project and add the JEE6 dependencies.
- Try JBoss 6.
I opted for #3. Then:
- Downloaded JBoss-6.0.0.Final.
- Dropped in /usr/local, made a softlink to /usr/local/jboss6.
- Installed the JBoss Tools.
- Added it in the Servers view.
- Generated a new project from the archetype.
- Went to deploy.
- Got an error: data source was not found (JNDI).
- Read the readme a whole bunch of times. Found some disturbing things: a. it is written to have you deploy from the command line and b. it kept mentioning the need to deploy the default-ds.xml file. Who deploys resources files?
Then suddenly, the light came on: I am getting an error because of the heinous m2Eclipse nonsense about adding the filter on the resource files. Sure enough, there they were, then I went to deploy again (inside eclipse) and it didn‘t work, but for a new reason: the logger! Again! It was saying that the injection was ambiguous. OMG.
I gave up on that and went to the command line and got it to deploy. So the redux: gotta use JBoss and from the command line. Is that where I want to be after 15 years? Um, no. Sorry. Go ahead and flame me now for saying so.
Opinions expressed by DZone contributors are their own.