-
1. Re: Any way to debug why Seam isn't registering a component?
christian.bauer Jul 24, 2007 11:51 PM (in response to smokingapipe)A components.xml in META-INF/ means Seam will scan it. You could look at the startup log of Seam and find out which JARs it is scanning.
-
2. Re: Any way to debug why Seam isn't registering a component?
samdoyle Jul 24, 2007 11:52 PM (in response to smokingapipe)revert to 1.2.1?
I dunno I encountered the same problem with 2.0 if that is what you are using so went back to 1.2.1. I'm trying to use a NetBeans 5.5.1, GlassFish v2 configuration and trying to get things deployed and working properly with Seam is proving to be a NightMare. The thing is there is no informative debugging information a lot of the time. Just some crazy stacktrace or some odd xml parsing error in the browser. -
3. Re: Any way to debug why Seam isn't registering a component?
smokingapipe Jul 25, 2007 12:03 AM (in response to smokingapipe)I'm using 1.2.1. I'm having a devil of a time with it, so I'm not even going to try to use pre-release stuff right now.
There is definitely a components.xml in META-INF and Seam is scanning it. I setup a component like this:<factory name="remoteAddr" auto-create="true" value="#{facesContext.externalContext.request.remoteAddr}" />
and then I can use ${remoteAddr} to see my browser IP address. So certainly the components.xml file is working.
But what's weird is a) it's not creating the entityManager and b) it's not registering any of my other Seam components.
Any ideas? I've spent about two days on this. When it works, Seam is the greatest thing since sliced bread. When there is a configuration problem, Seam is a nightmare. -
4. Re: Any way to debug why Seam isn't registering a component?
christian.bauer Jul 25, 2007 12:06 AM (in response to smokingapipe)Again, what does the Seam startup log in DEBUG mode say?
-
5. Re: Any way to debug why Seam isn't registering a component?
smokingapipe Jul 25, 2007 12:08 AM (in response to smokingapipe)Ah... let's see, how do I start it in debug mode?
This might solve my problems. -
6. Re: Any way to debug why Seam isn't registering a component?
samdoyle Jul 25, 2007 12:11 AM (in response to smokingapipe)"SmokingAPipe" wrote:
Ah... let's see, how do I start it in debug mode?
This might solve my problems.
Your components.xml should have something like this as far as I can tell based on the examples.<core:init jndi-pattern="java:comp/env/SeamGlassFishBooking/#{ejbName}/local" debug="true"/>
-
7. Re: Any way to debug why Seam isn't registering a component?
smokingapipe Jul 25, 2007 12:12 AM (in response to smokingapipe)And by the way, Christian, you are partially responsible for me being in this mess because I wouldn't have gotten launched into the whole ORM thing if I hadn't read the first edition of your book! I read it, realized that I had to be using ORM because trying to mess around with SQL in an object world is a major pain, and then I realized that LazyInitializationErrors are a pain and I need to use Seam, and then I realized that Seam is the greatest web development system I've ever used, but that figuring out what is wrong with a config file or why a component isn't working can be quite a frustrating mystery. Hopefully I'll figure out all the nuances of this soon enough, and be able to use it productively without these roadblocks.
-
8. Re: Any way to debug why Seam isn't registering a component?
samdoyle Jul 25, 2007 12:23 AM (in response to smokingapipe)Oh you'll also need the jboss-seam-debug.jar included I assume.
-
9. Re: Any way to debug why Seam isn't registering a component?
christian.bauer Jul 25, 2007 12:34 AM (in response to smokingapipe)Edit server/default/conf/jboss-log4j.xml (or server/default/conf/log4j.xml in AS < 4.2):
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="Target" value="System.out"/> <layout class="org.apache.log4j.PatternLayout"> <!-- The default pattern: Date Priority [Category] Message\n --> <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/> </layout> </appender> <category name="org.jboss.seam"> <priority value="DEBUG"/> </category> <root> <priority value="INFO"/> <appender-ref ref="CONSOLE"/> </root> </log4j:configuration>
-
10. Re: Any way to debug why Seam isn't registering a component?
christian.bauer Jul 25, 2007 12:35 AM (in response to smokingapipe)You do not need the debug.jar or the debug="true" setting. This is for component/context debugging with the special http://localhost:8080/myapp/debug.seam URL once the application is actually running.
-
11. Re: Any way to debug why Seam isn't registering a component?
smokingapipe Jul 25, 2007 12:51 AM (in response to smokingapipe)Thanks for the hint on enabling debugging. Now it is getting stranger, because it is finding the components:
21:38:36,965 DEBUG [Scanner] found: rbcworkflow/beans/TestAction.class 21:38:36,967 DEBUG [ComponentScanner] found component class: rbcworkflow/beans/TestAction.class
So the ComponentScanner found the component class. But it never does anything further with it. There's no "initializing component" for those classes.
Any idea what could be lacking or incorrect? -
12. Re: Any way to debug why Seam isn't registering a component?
smokingapipe Jul 25, 2007 2:13 AM (in response to smokingapipe)I've looked through all the detailed logs. It is completely strange. It does in fact identify that there is a test component, it just never installs it and doesn't say why. Is there any way to solve this? I assume I'm not the first to try Seam 1.2.1 with JBoss 4.2.1? What's strange is that the other components install and my other app, based on a very modified seam-gen, does have components that work.
Totally baffling. -
13. Re: Any way to debug why Seam isn't registering a component?
smokingapipe Jul 25, 2007 8:05 PM (in response to smokingapipe)I got it working, using:
http://chiralsoftware.com/blog/PropertyNotFoundException-Target-Unreachable-identifier-resolved-to-ead71296c05a98ec.html blog entry
Conclusion: Wrong seam jar file in WEB-INF/lib. I'm not sure how that prevented the ejbs from being installed, but it did. Debugging was by tediously going over exploded archives, modifying until it worked. I hope this helps someone else. -
14. Re: Any way to debug why Seam isn't registering a component?
bensonfungjava Aug 23, 2007 4:12 AM (in response to smokingapipe)Mine doesn't work. If I get rid of seam jar in war file, I got the following exception.
java.lang.IllegalArgumentException: Class org.jboss.seam.jsf.SeamApplicationFactory is no javax.faces.application.ApplicationFactory
Please help.