Nuxeo doesn't resolve any Action Seam

I set up eclipse on a windows 7 machine with the 5.6 tomcat release of nuxeo. I created a fresh new workspace. I'm using java 1.6.0_37 to run the server. I installed the latest stable version of Nuxeo IDE. I've created a Nuxeo Plugin Project using the wizard and then an Action Seam called 'test' using the wizard without modyfing any code.

Nuxeo complains with:


ERROR [org.nuxeo.ecm.platform.actions.DefaultActionFilter] evaluation of condition SeamContext.get("test").accept() failed: returning false

and if i delete the filter condition from the xml then i get this error

ERROR [javax.enterprise.resource.webcontainer.jsf.application] javax.el.PropertyNotFoundException: Target Unreachable, identifier 'test' resolved to null

what could have happened?

0 votes

2 answers

1535 views

ANSWER

What should I try to solve this? Should I use a particular version of Eclipse (I'm using Juno) or Java (1.6.0_37)?
12/03/2012

I can't reproduce with the last stable IDE release (1.1.10.R11x_v20121116_1232) on juno. Can you enable the following trace in NUXEO_HOME/lib/log4j.xml and watch in NUXEO_HOME/log/server.log for something going wrong.

<pre> <category name="org.nuxeo">

&lt;priority value=&quot;DEBUG&quot; /&gt;

</category> <category name="javax.faces">

&lt;priority value=&quot;DEBUG&quot; /&gt;

</category> <category name="org.apache.myfaces">

&lt;priority value=&quot;DEBUG&quot; /&gt;

</category> <category name="com.sun.faces">

&lt;priority value=&quot;DEBUG&quot; /&gt;

</category> </pre>

12/04/2012

I don't know, these are the lines just before and after the error.

<code><pre> 2012-12-04 13:16:25,874 DEBUG [org.nuxeo.ecm.platform.actions.ActionService] Checking access for action 'com.example.Test'… 2012-12-04 13:16:25,874 ERROR [org.nuxeo.ecm.platform.actions.DefaultActionFilter] evaluation of condition SeamContext.get("test").accept failed: returning false 2012-12-04 13:16:25,874 DEBUG [org.nuxeo.ecm.platform.actions.ActionService] Filter 'com.example.Test' denied access 2012-12-04 13:16:25,874 DEBUG [org.nuxeo.ecm.platform.actions.ActionService] Denying access for action 'com.example.Test' </pre></code>

According to the log the component and the action are regularly registered.

12/04/2012

I'm using the same version of Nuxeo IDE as yours (the current stable). I tried on two different Windows and on a Linux computer and I get the same error. For more information, because all the OS are 64 bit I'm using 64 bit versions for both java and eclipse. Should I use 32 bit?
12/04/2012

No, I don't think the architecture is related to. Can you give me an access to the your project sources ?
12/05/2012

Can you check you don't have a duplicate component for "test" in your log. Using a such generic name may be the error cause.
12/05/2012

There are no project sources: this happens to me by simply creating a new plugin project, then an action seam by the wizard, without touching any code apart from that automatically generated.
12/05/2012

No, I tried in a friend's computer which didn't even have eclipse installed, and also in a new installation of linux, there were no other project in the workspace and I tried with random names like "sdgdsd". But still the problem persists
12/05/2012

Do you have a line like this in your server.log ?

<pre> 2012-12-05 11:02:57,729 INFO [org.jboss.seam.Component] Component: yop, scope: CONVERSATION, type: JAVA_BEAN, class: org.nuxeo.sample.YopBean </pre>

12/05/2012

No it seems there is no line like this related to my component
12/05/2012

Did you activated logs for the package 'org.jboss.seam' ?

<pre> <category name="org.jboss.seam">

&lt;priority value=&quot;DEBUG&quot;/&gt;

</category> </pre>

12/05/2012

I've enabled debug on org.jboss.seam and that's what I've got:

<code><pre> 2012-12-05 13:34:37,337 DEBUG [org.nuxeo.ecm.platform.actions.ActionService] Checking access for action 'org.nuxeo.sample.MyOwnUniqueTestBean'… 2012-12-05 13:34:37,337 DEBUG [org.jboss.seam.Component] seam component not found: myOwnUniqueTest 2012-12-05 13:34:37,337 ERROR [org.nuxeo.ecm.platform.actions.DefaultActionFilter] evaluation of condition SeamContext.get("myOwnUniqueTest").accept() failed: returning false 2012-12-05 13:34:37,337 DEBUG [org.nuxeo.ecm.platform.actions.ActionService] Filter 'org.nuxeo.sample.MyOwnUniqueTestBean' denied access 2012-12-05 13:34:37,337 DEBUG [org.nuxeo.ecm.platform.actions.ActionService] Denying access for action 'org.nuxeo.sample.MyOwnUniqueTestBean' </pre></code>

12/05/2012

Okay, your bean is not deployed in seam. Can you give me the log output just after the hot-reload of your project please.
12/05/2012

It's a bit long, I've posted in on pastebin

http://pastebin.com/5H60Dvrp

12/05/2012



The seam action bean is not loaded because the nuxeo runtime used is not a SDK. The SDK distribution includes is pre-bundled with all sources and also some development components that we don't want in a standard distribution. The seam hot-reloader is bundled in that way.

1 votes



Thanks, I think I've got it. The bean deployment is not taken in account because you're not in dev mode. Can you edit 'NUXEO_HOME/bin/nuxeo-sdk.conf' and uncomment the line 'org.nuxeo.dev=true' and restart the nuxeo instance. It should work then.

The key-point in the log was the message

2012-12-05 14:56:02,544 INFO  [org.nuxeo.ecm.platform.ui.web.reload.NuxeoJSFReloadHandler] Do not flush the JSF application: debug mode is not set

The next IDE hot fix release will fix this configuration problem NXIDE-234. Sorry for the time you've lost on this.

1 votes



I still have the same problem, plus

Now I get this error:

<code><pre> 2012-12-05 16:27:11,991 WARN [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction active: turn on debug logs for more information about the faulty call. 2012-12-05 16:27:11,991 DEBUG [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction java.lang.Throwable

at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.checkTxActiveRequired(TransactionalCoreSessionWrapper.java:104)
at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:130)
at $Proxy43.query(Unknown Source)
at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingTreePersister.getDocumentRoutesStructure(DocumentRoutingTreePersister.java:214)

[…] </code></pre>

12/05/2012

Not related, just a warn about an init done in auto commit mode.
12/05/2012

Let me state again each step I made:

I downloaded eclipse: eclipse-java-juno-SR1-win32-x86_64

I set up eclipse to use my java 1.6.0_37 by going to Preferences -> Java -> Installed JREs and selecting the right one

I downloaded and installed the Nuxeo Ide (I tried both the stable version and the dev version but it's the same)

I enabled dev mode in the nuxeo.conf file

I created a new workspace in an empty folder

I created a Nuxeo Plugin Project using the Wizard

I created an Action Bean with a strange name to avoid naming conflicts

still Nuxeo complains that <code><pre> 2012-12-06 12:34:39,395 ERROR [org.nuxeo.ecm.platform.actions.DefaultActionFilter] evaluation of condition SeamContext.get("nameOfMyBean").accept failed: returning false </pre></code>

And I tried this in different computers and OS (in the same phisical building) always getting the same results.

Could you reproduce it?

12/06/2012

No I don't. Can we plan a meeting session and share your screen ?
12/06/2012

I'll ask my boss and let you know ASAP
12/06/2012

It's ok to share my screen, let me know what to do
12/07/2012

Hello,

Could you please tell us if you found something why you obtain this message :

2012-12-06 12:34:39,395 ERROR [org.nuxeo.ecm.platform.actions.DefaultActionFilter] evaluation of condition SeamContext.get("nameOfMyBean").accept failed: returning false

I have the same problem with a specific Actionbean created in eclipse IDE. Thanks

03/05/2013