[JBoss Tools] - jar files as deployments resources in server view
by Maxym Pendyshchuk
Maxym Pendyshchuk [http://community.jboss.org/people/Aeternitas] created the discussion
"jar files as deployments resources in server view"
To view the discussion, visit: http://community.jboss.org/message/613130#613130
--------------------------------------------------------------
I donn't know if this question to JBoss Tools team, maybe to Eclipse... At first I will try to ask here.
I have project, which consists from
- Dynamic Web Project "Presentation"
- EJB Project "Engine"
-…
[View More]Enterprise Application Project "EARPackaging".
Last one packs both EJB and Web Project to EAR. Now, I add this EAR project to JBoss Runtime Server (6.x or 7.0, does not matter for now).
Now in Enterprise Application Project, in EarContent I create 'lib' folder, and add there freemarker.jar, now when I expand related resource added to Runtime Server in servers view, I see
JBoss 6.x Runtime Server
- EARPackaging
- Engine
- freemarker.jar
- Presentation
most of jars from EarContent\lib folder is not added here (and all of them should not, imho). I noticed that only freemarker and yuicompressor are added as ear resource (and my EarContent\lib has 41 jar files)... Why is it so? In Deployment Assembly of Enterprise Application Project I don't see these jars to remove.
This simplified example is attached. I used Eclipse 3.7, night build of JBoss Tooles 3.3 (and actually I had the same issue with JBoss Tools 3.2, but as I menation at the beginning, I don't know if it is related to JBoss Tools at all)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/613130#613130]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
[View Less]
13 years, 7 months
[JBoss Tools] - m2e(clipse)-wtp 0.13.0 : New & Noteworthy
by Fred Bricon
Fred Bricon [http://community.jboss.org/people/fbricon] modified the blog post:
"m2e(clipse)-wtp 0.13.0 : New & Noteworthy"
To view the blog post, visit: http://community.jboss.org/community/tools/blog/2011/06/23/m2eclipse-wtp-...
--------------------------------------------------------------
h3. Embracing Indigo
So, Eclipse 3.7 a.k.a. Indigo has been released. This year, 62 Eclipse projects were made available on the same day. Part of the release train is M2E 1.0.0, which …
[View More]succesfully graduated from the Eclipse incubator. Congrats to all the teams involved!
m2e-wtp 0.13.0 is finally available as well. Last minute bugs prevented an earlier release and made our lives a bit difficult, but thanks to Igor Fedorenko, we made it. As you will discover, the WTP integration with Maven is thighter than ever! The complete release notes are available here (https://issues.sonatype.org/secure/ReleaseNote.jspa?projectId=10310&versi...), but let's take a quick look at what's new and noteworthy :
h3. Discovery / installation
Once m2e is installed, there are several ways to install m2e-wtp. First you need to wipe the m2eclipse-extras update site from your memory (and eclipse), it only contains m2e 0.12.0 compatible plugins :
*IMPORTANT UPDATE* : m2e-wtp has been temporarily removed from the m2e marketplace (http://dev.eclipse.org/mhonarc/lists/m2e-users/msg00938.html). Please consider option #3 while we're working on fixing the problem.
1) Import existing Java EE projects into the workspace; You'll be proposed to install the m2e-wtp plugin :
http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3913-1657... (http://community.jboss.org/servlet/JiveServlet/showImage/38-3913-16576/m2...)
click on Finish and the installation will proceed. Your projects will be imported but the workspace will have to be restarted.
2) Go to Window > Preferences > Maven > Discovery and click on "Open catalog". Select m2e and proceed with the installation.
3) Old school installation : Use this update site : https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0...
h3. Experimental war overlay support
Finally, after all these years, m2e-wtp offers support for http://maven.apache.org/plugins/maven-war-plugin/overlays.html maven war overlays. The idea is to share common resources between several web applications. One use case could be to easily share logos, style sheets etc... in a corporate environment. All you need to do is declare in your web application pom.xml a dependency to another war artifact.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>foo.bar</groupId>
<artifactId>war</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>foo.bar</groupId>
<artifactId>overlaid</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>
</project>
By default, all the contents of the overlaid artifact will be copied to the deployment directory of the web application, minus the MANIFEST.MF. *The resources of the web application take precedence, in case of duplicate files*.
If your project depends on a war archive (from your local repository), that dependency will be unzipped under target/m2e-wtp/overlays/<dependency>/ before being deployed to your server, according to the overlay configuration (you can select what files are included/excluded). For instance :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<overlays>
<overlay>
<groupId>foo.bar</groupId>
<artifactId>overlaid</artifactId>
<excludes>
<exclude>WEB-INF/lib/*</exclude>
</excludes>
</overlay>
</overlays>
</configuration>
</plugin>
... won't deploy the jars from overlaid (project or archive)/WEB-INF/lib
If the dependency is another web project in your workspace, the deployed resources will be dynamically determined from the overlay configuration and any file changed in the overlaid project will be automatically redeployed to the target server.
Below is an example where the "war" project depends on an "overlaid" war project and hudson-war-2.0.1.war(before you asked, it's because this one is available in central). The images/hudson.png file is present in both overlay artifacts. The file is picked from "overlaid", since it's declared first in the pom. The deployed "war" project is a fully fledged CI server
http://community.jboss.org/servlet/JiveServlet/showImage/38-3913-16569/wa... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3913-1656...
As of now, unsupported features of war overlays are :
- filtering
- exclusions of resources from the main project (defined as <overlay></overlay>)
There's plenty of room for performance optimizations, and it still needs to be tested "on the field" so please, please, do not consider this feature as production ready, it's still experimental.
Also note that the WTP overlay metadata format (in .settings/org.eclipse.wst.common.component) has changed and is incompatible with older development builds of m2e-wtp 0.13.0. So if you used previous nightly builds, you should reimport your projects without their eclipse metadata (.project, .classpath, .settings/)
h3. Removal of WTP classpath libraries
http://community.jboss.org/servlet/JiveServlet/showImage/38-3913-16570/cl... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3913-1657...
Since its infancy, m2e-wtp suffered from outstanding classpath resolution issues when unit tests were being run. It turned out some dependencies were being leaked by the WebApp and EAR classpath libraries, installed by default on Java EE projects. Having these libraries also required extra code complexity to move workspace dependencies from one library to the other. In m2e-wtp 0.13.0, a rather radical solution was taken : remove these WTP libraries after they're being automatically added by WTP. Guess what? it solved all the classpath issues occurring during tests and simplified the code. So from now on, you will just see the following libraries in the project explorer
:
h3.
h3. 'Deployed Resources' node in the Project View
http://community.jboss.org/servlet/JiveServlet/showImage/38-3913-16572/de... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3913-1657...
Previous m2-wtp versions displayed a *Web Resources* node, for Web projects, or *Application Resources* for EARs, in the Project View. These nodes aggregate the content that must be deployed on the server / packaged in the final archive. A *Web Resources* node is already provided by JBoss Tools for projects having the JSF Facet installed. So, in order to avoid confusion, the nodes contributed by m2e-wtp have been renamed more appropriately to *Deployed Resources* :
h3. Maven-generated MANIFEST.MF
Up until now, in m2e-wtp, the manifest was generated "manually" using WTP's API, for web projects only. In the process, the man
ifest kinda fixed some maven shortcomings in order to handle skinny wars (didn't add a classpath prefix for EJBs, contrary to maven). Now, for Web, EAR, EJB, Utility and Connector projects, the manifest is generated via a call to the Maven's archiver.
That means no more impedance mismatch between Maven and Eclipse manifests. http://maven.apache.org/shared/maven-archiver/index.html Manifest customization is reflected on the fly in the generated file.
For jar, ejb and connector projects, it is generated under target/classes. For web projects, it goes under
target/m2e-wtp/web-resources/ and for EARs, goes under target/m2e-wtp/ear-resources/
http://community.jboss.org/servlet/JiveServlet/showImage/38-3913-16571/ma... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3913-1657...
Since the EAR library is gone, the manifest is no longer used to reflect compile classpath within Eclipse and is only used for runtime classpath resolution.
Since it now follows the same rules as Maven, how do you handle skinny wars with EJBs and classpath prefix? One solution is to use your own Class-Path entry, which will be appended with the classpath computed by the maven archiver. So, for instance :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
<manifestEntries>
<Class-Path>sample-ejb-${pom.version}.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
</plugin>
will generate something like :
> Manifest-Version: 1.0
> Built-By: fbricon
> Build-Jdk: 1.6.0_24
> Class-Path: *sample-ejb-0.0.1-SNAPSHOT.jar* lib/sample-util-0.0.1-SNAPSH
> OT.jar
> Created-By: Maven Integration for Eclipse
Of course, the *"Created-By: Maven Integration for Eclipse"* entry can be overwritten using your own value :
<manifestEntries>
<Created-By>My kick-ass IDE</Created-By>
</manifestEntries>
Finally, we tried to delete all MANIFESTS.MFs automatically generated by WTP. So hopefully, your source control shouldn't be polluted anymore.
h3. Support for EAR Resource filtering
m2e-wtp now supports http://maven.apache.org/plugins/maven-ear-plugin/examples/filtering-sourc... EAR resource filtering, pretty much the same way http://community.jboss.org/en/tools/blog/2011/05/03/m2eclipse-wtp-0120-ne... Web projects do. Just add the filtering attribute to your maven-ear-plugin configuration :
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.6</version>
<configuration>
<filtering>true</filtering>
...
</configuration>
</plugin>
</plugins>
Filtered resources are generated under target/m2e-wtp/ear-resources/
http://community.jboss.org/servlet/JiveServlet/showImage/38-3913-16573/ea... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-3913-1657...
h3. Dropped support for Eclipse 3.5 and older versions
In order to support war overlays, m2e-wtp 0.13.0 is taking advantage of several APIs that were made available in Eclipse 3.6 ( Helios). The direct consequence is it's not longer compatible with Eclipse 3.5 (Galileo) based platforms and of course older versions. However it's been tested against Eclipse 3.6 and 3.7 on the continuous integration server at JBoss.
h3. Now, what next?
Well, we're gonna see how the overlay support stands in the wild. If necessary, one or more 0.13.x bugfixes can be made available "quickly". One of the problem that delayed this release is a https://bugs.eclipse.org/bugs/show_bug.cgi?id=350138 conflict between m2e-wtp and the pom properties configurator. This lead us to remove the latter from m2e marketplace catalog to avoid confusion. I hope we can find a solution quickly in order to restore that plugin in the marketplace.
Next version (0.14.) should include Dali support, Application Client packaging support, bug fixes and https://issues.sonatype.org/browse/MECLIPSEWTP#selectedTab=com.atlassian.... more...
As always, if you find any issue or would like to see new useful features in m2e-wtp, please open a ticket at https://issues.sonatype.org/browse/MECLIPSEWTP https://issues.sonatype.org/browse/MECLIPSEWTP
Enjoy,
Fred.
https://twitter.com/#!/fbricon https://twitter.com/#!/fbricon
PS: Again, special kudos to Igor Fedorenko who supported me during this not-so-trivial release.
--------------------------------------------------------------
[View Less]
13 years, 7 months
[jBPM] - HTTP Status 404 - /jbpm-console/
by Sameer Kumar
Sameer Kumar [http://community.jboss.org/people/sameer82] created the discussion
"HTTP Status 404 - /jbpm-console/"
To view the discussion, visit: http://community.jboss.org/message/609697#609697
--------------------------------------------------------------
Hi,
I have downloaded https://hudson.jboss.org/jenkins/job/jBPM5/lastSuccessfulBuild/artifact/j... jbpm-5.1-SNAPSHOT-installer.zip from the following path " https://hudson.jboss.org/jenkins/job/jBPM5/lastSuccessfulBuild/artifact/j... …
[View More]https://hudson.jboss.org/jenkins/job/jBPM5/lastSuccessfulBuild/artifact/j...".
Then continued with installation and starting the services successfully using
ant install.demo and ant start.demo.
The following sample project is throwing 404 error:
" http://localhost:8080/jbpm-console http://localhost:8080/jbpm-console".
While building I am getting the following error:
[unchecked] unchecked cast
[javac] found : java.lang.Object
[javac] required: java.util.Map<java.lang.String,org.jbpm.task.User>
[javac] Map<String, User> users = ( Map<String, User> ) eval( reader, vars );
[javac] ^
[javac] /home/mantis/jbpm5/task-service/src/org/jbpm/DemoTaskService.java:54: warning: [unchecked] unchecked cast
[javac] found : java.lang.Object
[javac] required: java.util.Map<java.lang.String,org.jbpm.task.Group>
[javac] Map<String, Group> groups = ( Map<String, Group> ) eval( reader, vars );
Please suggest how to proceed.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/609697#609697]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
[View Less]
13 years, 7 months
[jBPM] - Error in Sample Task Service
by Mike Panetta
Mike Panetta [http://community.jboss.org/people/blarevil] created the discussion
"Error in Sample Task Service"
To view the discussion, visit: http://community.jboss.org/message/613053#613053
--------------------------------------------------------------
I just downloaded the jbpm 5.1 full installer. After installing and starting the demo, I went into the jbpm console and created a new instance
of the evaulation process. Upon doing this, I get an error in the human task service (…
[View More]see below).
Any idea what I may be missing here? Looks like some data is missing in the OrganizationalEntity table and I'm not sure how to go about loading this. Does this have anything to with the LoadUsers.mvel and LoadGroups.mvel files that are loaded when the task starts? I tried connecting to the H2 Database through eclipse, but I do not see any tables in this system.
I treid out the jbpm 5.0 installer and have the same problem. Several months ago I was able to get this demo running under the Drools Flow project, but I cannot find a download page for this project anymore.
javax.persistence.RollbackException: Error while commiting the transaction
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:71)
at org.jbpm.task.service.TaskServiceSession.doOperationInTransaction(TaskServiceSession.java:820)
at org.jbpm.task.service.TaskServiceSession.addTask(TaskServiceSession.java:134)
at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:109)
at org.jbpm.task.service.mina.MinaTaskServerHandler.messageReceived(MinaTaskServerHandler.java:41)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.filter.logging.LoggingFilter.messageReceived(LoggingFilter.java:176)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)
... 29 more
Caused by: org.h2.jdbc.JdbcBatchUpdateException: Referential integrity constraint violation: "FK27A9A59E619A0: PUBLIC.TASK FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.ORGANIZATIONALENTITY(ID)"; SQL statement:
update Task set allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processInstanceId=?, skipable=?, status=?, workItemId=? where id=? [23002-124]
at org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1082)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 37 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/613053#613053]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
[View Less]
13 years, 7 months
[jBPM] - H2 database problems, running jBPM 5.1 demo
by Michael Wagner
Michael Wagner [http://community.jboss.org/people/michael.wagner] created the discussion
"H2 database problems, running jBPM 5.1 demo"
To view the discussion, visit: http://community.jboss.org/message/612944#612944
--------------------------------------------------------------
Hi,
I am very new to jBPM, features looks impressive. I tried the demo since yesterday and run always again in problems with the database. Yesterday I had some "transaction not possible" problems, now I run into: "…
[View More]Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-157] 90020/90020"
What I have done to get this error:
1) download the full installer
2) run "ant install.demo"
3) run "ant start.demo"
4) play with the example in eclipse (works very well)
5) start the console in the browser and clicked on "process history"
Then the error occurs. Restarting by calling "ant stop.demo" and then "ant start.demo" does not help. Cosole login is showing up, after login just a white site is displayed. The log showing:
2011-07-01 11:27:36,882 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (main) Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.h2.jdbc.JdbcSQLException: Datenbank wird wahrscheinlich bereits benutzt: "Locked by another process". Mögliche Lösungen: alle Verbindungen schliessen; Server Modus verwenden
Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-124]
at org.h2.message.Message.getSQLException(Message.java:111)
at org.h2.message.Message.getSQLException(Message.java:122)
at org.h2.message.Message.getSQLException(Message.java:75)
at org.h2.store.FileLock.getExceptionAlreadyInUse(FileLock.java:474)
at org.h2.store.FileLock.lockFile(FileLock.java:333)
at org.h2.store.FileLock.lock(FileLock.java:131)
I will no reboot windows and hope this helps ;)
Is there something about the H2 installation I overlooked? It is important for us the the process engine NEVER runs into such a lock. So I have to find out why this happens. Somebody had the same problems?
Michael
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/612944#612944]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
[View Less]
13 years, 7 months