- This topic has 40 replies, 7 voices, and was last updated 9 years, 2 months ago by support-swapna.
-
AuthorPosts
-
Tony HerstellParticipantsome Maven-Dependencies are not being copied across …
See image
One jar is spring-web.jar
Causing:
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/WebApplicationContext
Attachments:
You must be logged in to view attached files.
Tony HerstellParticipantFound the missing file, why it is here?
What does this mean?Attachments:
You must be logged in to view attached files.
Brian FernandesModeratorTony,
Can you help with some more context?
I assume you were deploying a Spring + Maven project? To which server?
Can you stop the server (if not already stopped) and see if the project can be removed?
I’ll ask someone from the server team to look into this.
Tony HerstellParticipantWhat context do you need?
Yes its Spring-Maven.
I am not that familiar with Spring as I have fortunately not used it since EE 6 overtook it.
Anyhow; this may be end up being a IDE problem and nothing to do with Spring.
Sadly; I have literally spent hours on this.
I have fiddled with every imaginable setting in MyEclipse/Eclipse to try to figure out what is going in and done repeated re-installs.
The deployment *works* on *2014* and does not work on *2015*. Both use the provided Tomcat 7 server.
Sadly the client, for some unknown reason, is hanging onto the legacy Spring framework, as opposed to embracing JEE 7, so I have to progress with this.
I would assume, like all the new EE projects I get involved in, that this would have worked as seasmlessly as them had we not had to build up our own app server, from scratch, using Spring.
If we go the usual route then you will ask for access to the project; you have my contact details.
I will carry on encouraging the client to move away from Spring and be sure to charge more for getting involved in spring projects in future.
Brian FernandesModeratorTony,
We isolated the problem – it’s due to a specific bug in web fragment deployment (the problematic JAR is a web fragment, or contains a web fragment) and we were able to reproduce this locally. This is a high priority fix for our next release in the CI stream.
As a general note, I would not recommend reinstalling to fix issues of this nature, it would not help anything and would simply be a waste of your time. A reinstall would help if you see vast areas of MyEclipse completely missing or malfunctioning to a high degree (large number of errors in log, actions which do nothing, wizards not showing up, etc.) Trying a new workspace can help some deployment problems though.
We certainly appreciate you trying 2015 CI; I would like to reiterate, however, that this is pre-release software so there will be some bits that aren’t tested thoroughly enough. Unfortunate tradeoff of doing a development stream, but we know users like you will help us catch issues before we go to GA.
Tony HerstellParticipantGreat that you found the bug.
I am glad that you released 2015 CI year early in 2014; I still can’t find the Continuous Integration integration bits like Hudson/Jenkins 😉 but I am very very pleased to be able to use Java 8 bits in my other projects.
The reason I reinstalled was due to me hacking huge amounts of the files (config etc.) to try to see what effect they had hoping to “stumble” upon why the deployment was not working. The only way to be sure I restored the files was to reinstall 😉
I look forward to a push of the next release and hopefully more “el->validation vs code” for JSF and AngularJS support.
keep up the good work!
Tony HerstellParticipantI am also finding that renaming a .js file is causing real problems with the SVN plugin where the rename fails but leaves files hanging about in MyEclipse 2014
I have to kill MyEclipse and go into the filesystem and delete files; restart myeclipse and refresh.
Anyhow since SVN is not formally supported then its probably not worth mentioning.
:/
I think I selected Subclipe 1.8
Tony HerstellParticipantJEE as well…
This is a JEE 7 project.
All these files listed under the project are NOT being exported.Attachments:
You must be logged in to view attached files.
Brian FernandesModeratorTony,
The rewrite-servlet JAR is a web fragment, so it suffers from the same problem that we have now fixed.
As far as the others are concerned, are you saying that classes from simple-essentials for instance are not being copied into WEB-INF/lib in your deployed project? Just to be sure, we’re expecting the classes within to be copied and not the projects themselves.
Tony HerstellParticipant>> The rewrite-servlet JAR is a web fragment, so it suffers from the same problem that we have now fixed.
Did I miss the memo? where is the update to CI stream?
>> As far as the others are concerned, are you saying that classes from simple-essentials for instance are not being copied into WEB-INF/lib in your deployed project?
That is correct; the .jars are NOT appearing in the WEB-INF/lib for these dependent projects…
This is what a co-worker sees with Normal Eclipse (web-inf/lib)
-rw-r–r– 1 xxxx staff 23286 7 Jul 18:51 simple-essentials-0.0.1-SNAPSHOT.jar
-rw-r–r– 1 xxxx staff 14164 7 Jul 18:51 simple-persistence-0.0.1-SNAPSHOT.jar
-rw-r–r– 1 xxxx staff 51970 7 Jul 18:52 simple-security-core-0.0.1-SNAPSHOT.jarOn his Mac…
Brian FernandesModerator>> The rewrite-servlet JAR is a web fragment, so it suffers from the same problem that we have now fixed.
Did I miss the memo? where is the update to CI stream?
Sorry, I misspoke, we’re testing the fix in our dev builds today – nothing released just yet.
That is correct; the .jars are NOT appearing in the WEB-INF/lib for these dependent projects…
a) I’m assuming those referenced projects (simple-essentials for instance), exist in your workspace?
b) I’ll confirm with my team, but it’s my understanding that the JARs themselves (i.e. project exported to JAR) wouldn’t be copied in this case (if the projects ARE in your workspace), but the classes within them would directly be placed into WEB_INF/classes. This allows you to modify classes in the dependent projects and have them hotsynched immediately (without having to deploy a new version of the JAR). Note that your co-worker’s path is WEB-INF/lib and your deployment assembly maps to WEB-INF/classes.
c) Can you paste the snippet of your pom.xml where your project depends on simple-essentials?
Tony HerstellParticipant>. Sorry, I misspoke, we’re testing the fix in our dev builds today – nothing released just yet.
Send me the jar to add to MyEclipse… will get overwritten anyhow when you do release…and based on what I am saying next… ill take the dev jar asap.
> a) I’m assuming those referenced projects (simple-essentials for instance), exist in your workspace?
Yup; imported as Maven projectsYou are correct; they are in the classes area….
So; NO bug there!<dependency> <groupId>nz.co.nomadconsulting</groupId> <artifactId>simple-security-core</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> <dependency> <groupId>nz.co.nomadconsulting</groupId> <artifactId>simple-persistence</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency>
Tony HerstellParticipantOk,
The plot thickens….
When I deploy as exploded deployment I get this exception:
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type HibernateFilterExtension with qualifiers @Default at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedMethod] @Inject public nz.co.nomadconsulting.simplepersistence.TransactionInterceptor.setFilterDefinitions(HibernateFilterExtension) at nz.co.nomadconsulting.simplepersistence.TransactionInterceptor.setFilterDefinitions(TransactionInterceptor.java:0)
BUT when I deploy as a WAR it works…
You better talk to your developers as by moving the “location” it may avoid the scanning of the classes that is done by CDI…
You really need to talk to a CDI developer on this one…
and that was on MyEclipse 2014…. as can’t try on 2015 yet due to above bug,
I am using Weld 2.2.2.Final
Tony HerstellParticipantPLEASE confirm you have passed this onto the developers too (its related)…
Sadly; even using packaged we cannot get “republish’ to work on another self contained project… on MyEclipse 2015 CI
Server runs:
14:54:18,276 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" started in 27992ms - Started 360 of 412 services (91 services are lazy, passive or on-demand)
change a file and select republish (like the 1980s) and…
14:57:03,285 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015009: Scan found incompletely copied file content for deployment C:\wildfly-8.1.0.Final\standalone\deployments\xxx.war. Deployment changes will not be processed until all content is complete. 14:57:59,527 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015051: Deployment content C:\wildfly-8.1.0.Final\standalone\deployments\xxx.war appears to be incomplete and is not progressing toward completion. This content cannot be auto-deployed. A previous version of this content was deployed and remains deployed. 14:57:59,528 WARN [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015013: Scan found content configured for auto-deploy that could not be safely auto-deployed. See details above. Deployment changes will not be processed until all problematic content is either removed or whether to deploy the content or not is indicated via a .dodeploy or .skipdeploy marker file. Problematic deployments are [xxx.war] 14:57:59,531 WARN [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015001: Cannot remove extraneous deployment marker file xxx.war.pending
support-piotrParticipantTony,
MyEclipse 2015 and previous versions as well, by default, use so-called “Merged Utility deployment”. Classes from utility modules (which are mapped in Deployment Assembly to WEB-INF/lib) are merged into classes folder of web project, which allows for hot-syncing. When this happens utility modules have “project” icon, not “jar”. You can switch off this behaviour in Deployment Assembly of web project. It may help with your CDI deployment.
Jared Web Fragment deployment does not work in exploded and packaged mode. The file is just not copied. So any deployment of such projects in ME 2015 will not work.
We are going to release an update to CI stream on Friday or at latest on Monday, so I guess there is no need to play with jars.
Packaged deployment is meant to be the production level testing, so a whole archive is published to the server and because of this, there is no hot-syncing. You need to manually republish and that’s a feature, not a bug. If you need hot-syncing you have exploded mode.
-
AuthorPosts