Bug 919361 - Imported Deltaspike Beanmanager quickstart shows a warning in JBDS 6
Summary: Imported Deltaspike Beanmanager quickstart shows a warning in JBDS 6
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: DeltaSpike, Examples
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: CR1
: 2.3.0
Assignee: Jason Porter
QA Contact: Ron Šmeral
URL:
Whiteboard: JBDS
Depends On:
Blocks: 919366
TreeView+ depends on / blocked
 
Reported: 2013-03-08 09:15 UTC by Marek Novotny
Modified: 2016-11-01 01:36 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 919366 (view as bug list)
Environment:
JBoss Developer Studio Version: 6.0.0.GA Build id: GA-v20121206-1855-B186 Build date: 20121206-1855 WFK 2.2.0.ER2
Last Closed: 2013-07-16 11:32:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Eclipse Project 406824 0 None None None Never
Red Hat Bugzilla 980900 0 unspecified CLOSED deltaspike-beanbuilder and kitchensink-deltaspike show JPA warning in JBDS 7 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 982193 0 unspecified CLOSED DeltaSpike Quickstarts imported in JBDS show warnings 2021-02-22 00:41:40 UTC

Internal Links: 980900 982193

Description Marek Novotny 2013-03-08 09:15:37 UTC
Description of problem:
Imported quickstart deltaspike-beanmanagerprovider into JBoss Developer Studio 6.0.0.GA shows warning
Console configuration "jboss-as-deltaspike-beanmanagerprovider" does not exist.	jboss-as-deltaspike-beanmanagerprovider		line 0	JPA Problem


Version-Release number of selected component (if applicable):
2.2.0.ER2

Steps to Reproduce:
1. Import existing Maven project into JBoss Developer Studio 6.0.0.GA

Comment 1 Jason Porter 2013-03-11 14:03:26 UTC
Is there something special I need to do to get this all setup? I downloaded JBDS 6.0.0.GA and the quickstarts version 2.2.0.ER2 and did not see this warning, however I saw errors, which are not mentioned here in this bug.

Comment 2 Jason Porter 2013-03-11 16:43:10 UTC
I spoke with Max on IRC. He said they have many issues like this and it's an overactive warning detector. It has nothing to do with the quickstart.

Comment 3 Jason Porter 2013-03-11 16:54:48 UTC
Added a JBIDE ticket https://issues.jboss.org/browse/JBIDE-13765

Comment 5 Karel Piwko 2013-03-12 11:30:23 UTC
My understanding is that this happens when JBDS detects JPA module. However, this JPA module is not configured as there is no JPA connection defined.

It can be easily fixed via:

Properties/Validators/ [Uncheck] JPA validator

This can be a part of the example:

.settings/org.eclipse.wst.validation.prefs content:

vals/org.eclipse.jpt.jpa.core.jpaValidator/global=FF01

Comment 6 Jason Porter 2013-03-12 15:26:07 UTC
I didn't think we were shipping with a .settings file, are we?

Comment 7 Max Rydahl Andersen 2013-04-29 16:34:55 UTC
Jason - we have falled back to ship .settings files for cases where it is the only way.

For this specific issue i'm most inclined to say this warning is expected since no connection is specified thus JPA validation cannot validate any mappings used in here.

What could be great is that we dont activate JPA on this project but not sure how we can do that reliably when JavaEE allow usage of JPA even without a persistence.xml ?

Comment 8 Fred Bricon 2013-04-29 17:04:21 UTC
Would a maven property like <m2e.jpa.activation>false</m2e.jpa.activation>, disabling the m2e/jpa connector be useful?

Comment 9 Jason Porter 2013-04-29 17:08:20 UTC
If we could do it with a simple maven property like Fred is suggesting, that would work very well.

Comment 10 Fred Bricon 2013-04-29 17:18:54 UTC
See upstream feature request in m2e-wtp : https://bugs.eclipse.org/bugs/show_bug.cgi?id=406824

I should be able to hack something in the next couple days.

Comment 11 Jason Porter 2013-04-29 17:29:01 UTC
Great, will that make it into the whichever version we're targeting for WFK?

Comment 12 Fred Bricon 2013-04-29 17:31:14 UTC
It'll be available in JBDS 7.0.0.Beta1, hopefully. In JBDS 7.0.0.GA for sure.

Comment 14 Jason Porter 2013-06-11 18:21:10 UTC
Pull Request sent to the jboss-as-quickstarts with the new property (https://github.com/jboss-jdf/jboss-as-quickstart/pull/524)

Comment 15 Jason Porter 2013-06-11 18:26:54 UTC
Now it's in upstream.

Comment 16 Marek Novotny 2013-06-12 08:47:02 UTC
Jason, does that really require that property? see my comment https://bugzilla.redhat.com/show_bug.cgi?id=919366#c3

It seems that JBDS 6.0.1 and 7.0.0.Beta1 works without this property correctly now.

Comment 17 Jason Porter 2013-06-12 17:43:29 UTC
Hm, okay then. I may have misunderstood the commit / fix that was done to JBDS. If things are working correctly w/o the property then not a problem.

Comment 18 Marek Novotny 2013-06-13 07:03:00 UTC
@Marek S.: i can see that JBDS 7.0.0.Beta1 and 6.0.1.GA is fixed in this particular issue. Please verify my experience.

Comment 19 Fred Bricon 2013-06-13 08:06:03 UTC
You *need* that property if you don't want to enable JPA Support automatically.

You can see the same results if you manually disable JPA configuration in the workspace preferences though (maven > java ee integration), but that would not be the default behavior.

Comment 20 Marek Novotny 2013-06-13 08:11:57 UTC
Fred, I am confused now. Why JBDS 7.0.0.Beta1 is not showing that Warning without that property used?

Comment 21 Fred Bricon 2013-06-13 08:25:43 UTC
Is window > preferences > maven > java ee integration > jpa configurator disabled?

If you create a new html5 project for instance, you'll see the warning.

Make sure you import (as maven) your project without any local eclipse settings file (./setting/, .classpath, .project)

Comment 22 Marek Novotny 2013-06-13 08:32:08 UTC
No it is enabled, look at http://download.englab.brq.redhat.com/scratch/mnovotny/Screenshot%20from%202013-06-13%2010:27:33.png and I did remove .classpath, .project and .settings before I tried that and wrote comment https://bugzilla.redhat.com/show_bug.cgi?id=919361#c18

Comment 23 Fred Bricon 2013-06-13 08:57:54 UTC
If I import the deltaspike-beanmanagerprovider from the master branch of https://github.com/jboss-jdf/jboss-as-quickstart/ in JBDS 7 Beta1, JPA Activation is not active, due to https://github.com/jboss-jdf/jboss-as-quickstart/commit/88d1a8f63662f7c1149a0c69848a176f8386af35 

If you remove the m2e.jpa.activation property and update project configuration, JPA is enabled and the warning shows up.

BTW, I had to switch to <version.jboss.bom>1.0.7.CR4</version.jboss.bom>, as CR3 is missing from https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.jboss.bom~jboss-javaee-6.0-with-tools~~~~kw,versionexpand. Projects fail to build OOTB

Comment 24 Marek Novotny 2013-06-13 09:14:10 UTC
Fred, even upstream is important to check, WFK productized quicstarts are at
http://download.devel.redhat.com/devel/candidates/JBWFK/2.3.0.ER1/jboss-wfk-quickstarts-2.3.0.ER1-dist.zip

So please check the issue on extracted zip. There is not any warning/error.

I did that on clean empty new workspace.

Comment 25 Marek Novotny 2013-06-13 09:15:21 UTC
And versions I have are:
Version: 6.0.1.GA
Build id: GA-v20130327-2052-B361
Build date: 20130327-2052

and 

Version: 7.0.0.Beta1
Build id: Beta1-v20130529-0631-B257
Build date: 20130529-0631

Comment 26 Marek Novotny 2013-06-13 09:18:13 UTC
I would add that I should change 
"There is not such warning" from my comment #24 on JBDS 6.0.1.GA.

There is a related warning, but not the reported warning:
No connection specified for project. No database-specific validation will be performed.

Comment 27 Fred Bricon 2013-06-13 09:29:45 UTC
I don't have jboss-wfk-2.3.0.ER1-maven-repository.zip  installed -yet- so the project won't compile, but that's irrelevant as the JPA Configurator is only based on persistence.xml detection

The JPA Facet is installed automatically and I DO see a "No connection specified for project. No database-specific validation will be performed." warning when importing from jboss-wfk-quickstarts-2.3.0.ER1-dist.zip into JBDS 7.0.0.Beta1 (same build as you).

I believe you have gremlins in your computer ;-)

Comment 28 Marek Novotny 2013-06-13 09:49:24 UTC
Well, I was referencing that 

Console configuration "jboss-as-deltaspike-beanmanagerprovider" does not exist.	jboss-as-deltaspike-beanmanagerprovider		line 0	JPA Problem

from this issue description is gone and now there is 

No connection specified for project. No database-specific validation will be performed.

And that is a different warning ;-) although the result of the warning may be the same, the message of warning is changed, isn't it? 

And it is true that if you have that property set up like <m2e.jpa.activation>false</m2e.jpa.activation>, you can import the project without warnings, but that needs to be in pom.xml before importing.
In already imported project the warning won't disapper.

Comment 29 Fred Bricon 2013-06-13 10:10:39 UTC
Ok so we had a warning mismatch :-)

I never saw the "Console configuration "jboss-as-deltaspike-beanmanagerprovider" does not exist" warning, neither in JBDS 6 nor 7.

After a bit of googling it appears this is caused by the hibernate tooling : http://stackoverflow.com/questions/11425932/eclipse-dali-jpa-error-console-configuration-does-not-exist. I need to look more into it.

For the "No connection specified for project" to disappear, you need to remove the JPA Facet manually in the project properties and do a clean build.

Comment 30 Marek Novotny 2013-06-13 11:07:11 UTC
fixed by cherry picked Jason's commit https://github.com/jboss-eap/quickstart/commit/010253cf8401c3a59fe4849d600824e76f66f2ed

Comment 32 Ron Šmeral 2013-07-03 10:31:00 UTC
Verified.
The quickstart does not show the "Console configuration [..] does not exist" warning anymore, but still does show, and so do several other quickstarts, the "No connection specified for project. No database-specific validation will be performed" warning. I will file another issue for that.

Comment 33 Petr Penicka 2013-07-08 11:50:18 UTC
Removing doc text, the issue will be release noted as part of bug 982193.


Note You need to log in before you can comment on or make changes to this bug.