[BLOSSOM-155] RegistrationException with Blossom 3.0-rc1 and Magnolia 5.1-rc1 on JBoss eap 6.1 Created: 23/Sep/13  Updated: 27/Jan/14  Resolved: 27/Jan/14

Status: Closed
Project: Blossom
Component/s: None
Affects Version/s: 3.0
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Sigurd Rolfes Assignee: Tobias Mattsson
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 Professional
JBoss eap 6.1


Attachments: Text File ShopFlow.java     Text File ShopModule.java     XML File am-shop.xml     XML File applicationContext.xml     XML File blossom-servlet.xml     XML File pom.xml     Text File stacktrace-registration-exception-blossom-component.txt    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

I tried to use the new Blossom 3.0-rc1 with Magnolia 5.1-rc1.

Startup looks ok. I created a Controller for a Spring webflow named shop-flow and made it available as a component for a page template.

In the edit page view of admincentral I clicked "New component", but there is nothing to chose.

In the logfile I see a RegistrationException for the components id.

See file attached.

Also I'm using Spring MVC 3.2.3.

Find configuration files and classes attached.



 Comments   
Comment by Tobias Mattsson [ 23/Sep/13 ]

Hi Sigurd,

It fails to find the component saying: No template definition registered for id: am-shop:components/shop-flow

Which is indeed the correct id.

Does your log show errors before that, perhaps when the module started causing it not to register this component?

Comment by Sigurd Rolfes [ 23/Sep/13 ]

Hi Tobias,

that's what I'm trying to get at the moment. But there are so much messages when starting up.

I did not see any Exceptions yet. There is a warning specific to Spring MVC 3.2.3 exactly what this guy has:

https://community.jboss.org/thread/231235?start=0&tstart=0

What message may I expect when blossom registers my components at module installation time? Is there a log output "register component bla" or anything else?

Sigurd

Comment by Sigurd Rolfes [ 23/Sep/13 ]

Hi Tobias,

one question:

is it possible to have multiple Spring configurations (blossom-servlet.xml) in different modules?

We have the demo included. For me it seems that either the annotation scan does not work or the Spring configuration isn't loaded at all.

Sigurd

Comment by Tobias Mattsson [ 23/Sep/13 ]

You should see something like:

2013-09-23 10:34:25,306 INFO info.magnolia.module.ModuleManagerImpl : Initializing module blossomSampleModule
2013-09-23 10:34:25,310 INFO info.magnolia.module.ModuleManagerImpl : Starting module blossomSampleModule
2013-09-23 10:34:25,861 INFO lia.module.blossom.render.BlossomDispatcherServlet: FrameworkServlet 'blossom': initialization started
2013-09-23 10:34:46,469 INFO lia.module.blossom.render.BlossomDispatcherServlet: FrameworkServlet 'blossom': initialization completed in 206 ms

Comment by Sigurd Rolfes [ 23/Sep/13 ]

just to let you know:

I removed the demo and put my stuff in another module. Now it works. There seems to be a problem with the project setup or the demo include.

Therefore it looks like that the problem is not related to the blossom module itself.

Comment by Tobias Mattsson [ 23/Sep/13 ]

So you have it working now?

Could this have been a mixup of package names? I see you have de.aktionmensch in some places and org.aktionmensch in others?

Comment by Sigurd Rolfes [ 23/Sep/13 ]

No, nothing to do with the package names, I've made a 1:1 copy in another module.

It worked, yes. Theres's something messed up with the project setup or whatever.

I've got to look into it.

Comment by Sigurd Rolfes [ 23/Sep/13 ]

Hi Tobias,

we've got a very huge shop jar (spring webflow) that we use for the webflow.

Well, I made a simple test webflow with a startstate and a simple view and everything is fine.

Looks like it has nothing to do with the new blossom, but what I really wonder about:

we already had the shop webflow working with Blossom 2.0 on Magnolia 4.5 with exactly the same files.

Sigurd

Comment by Tobias Mattsson [ 25/Sep/13 ]

Hi Sigurd,

I'm very interested in what changed in your project setup, do you have any suspicions would could have caused it?

Comment by Tobias Mattsson [ 25/Sep/13 ]

I'm adding INFO level logging of all registered templates, should make troubleshooting problems like this easier. BLOSSOM-136

Comment by Sigurd Rolfes [ 25/Sep/13 ]

Hi Tobias,

I had a problem with console bubbeling because of a hidden debug level so I've overseen an Exception that the Spring ApplicationContext could not be initialized.

I think the demo caused the problem because an ApplicationContext is already registered.

Then the main module didn't have module descriptor dependencies for my module. I'm not sure if that also made problems.

I still have problems with my webflow,although the component is there and the first page is shown:

The next transition does not work and I always get the first page.

Did you test the samples webflow? Does it work?

With 4.5 I had no problems with the flow definition.

<input type="submit" class="submit btn-red" name="_eventId_next" value="Blabla" >

Now the execution key always remains the same e1s1.

I use the AbstractSingleFlowController from the webflow example to have the execution key in the forms action.

Sigurd

Comment by Sigurd Rolfes [ 25/Sep/13 ]

I've made a test and changed _eventId_next to _eventId_next123 which should cause an exception, but does not. I always get the startpage.

Comment by Sigurd Rolfes [ 25/Sep/13 ]

Hi Tobias,

the problem is solved, seemed to be a validation return in the flow.

A bit off topic, but one question:

We are using Spring MVC 3.2.3 as we are told by Spring support because of a Hibernate bug in the former versions. Spring 3.2.4 stable release has been published in August this year.

I've seen that you're still using Spring version 3.1.4 and Java 1.6 (pom).

Are you going to upgrade?

Sigurd

Comment by Tobias Mattsson [ 26/Sep/13 ]

I'm confident that it works with 3.2.4. It's been tested with 3.0 3.1 and 3.2.

Blossom builds against 3.1.4 at the moment and the maven dependencies are set to <scope>provided</scope> to allow you to choose the version on your own.

// Tobias

Generated at Sun Feb 11 23:30:41 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.