-
-
2. Re: @Logger is null
pmuir Jan 24, 2008 11:24 AM (in response to kasim)Let's see how you use @Logger.
-
3. Re: @Logger is null
kasim Jan 24, 2008 1:41 PM (in response to kasim)@Logger private Log log;
i even tried@Logger("substanceSetRun") private Log log;
Then of course accessing it with "log.debug" ... but its the log object thats null.
Interestingly enough I've noticed, that its only null when using it with a Session Bean. When i am using a regular Java Bean it works fine.
I am honestly guessing its some configuration. They had Seam 1.2 here, and I'm upgrading them to Seam 2.0. They used seam-gen here before to set it up. So i have replaced ALL their old jar files with a new seam-gen's one. And I have replaced the build.xml with a new one as well.
So this code WAS working before I started the upgrade path. -
4. Re: @Logger is null
kasim Jan 24, 2008 3:15 PM (in response to kasim)
you know, it looks like none of my injectable items are getting injected.
the interceptors are working because I do see them in the stack trace. -
5. Re: @Logger is null
nickarls Jan 24, 2008 3:39 PM (in response to kasim)You could try running seam-gen for 2.0.0 and copypaste the code into that structure...
-
6. Re: @Logger is null
pmuir Jan 24, 2008 6:14 PM (in response to kasim)And you have @Name on the components?
-
7. Re: @Logger is null
kasim Jan 25, 2008 9:49 AM (in response to kasim)
Pete - yup i have @Name on all the componets.
Checking the debug window when it loads up i see it registering the component. And it accesses it via the xhtml page, which it would not be able to do if it wasnt.
Heck when i check the stack trace i see it passing through SeamBeanInterceptor (aroundInvoke) i believe.
nickarls> I actually did that for the most part. I was trying not to at first. Personally i am sure its something very stupid or its an app server issue. So i am going to deploy my "demo" i have been cutting and pasting from to upgrade and go from there.
Again, parts of this structure were here when i got here, but nothing stands out at me as the "issue" -
8. Re: @Logger is null
svadu Jan 25, 2008 9:56 AM (in response to kasim)Would this help? http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ
-
9. Re: @Logger is null
kasim Jan 25, 2008 10:23 AM (in response to kasim)
svadu> Thanks but no. That seems to be only when you are accessing injected components in constructors. Which would make sense since those objects cant be injected before instantiation of the class.
Like .. here is a simple example that doesnt work -@Name("joeBean") @Stateless public class JoeBeanImpl implements JoeBean { @Logger Log log; public void test() { log.info("Test this shiznit"); } }
produces stack trace -
(like 17 is the log.debug)Caused by: java.lang.NullPointerException at session.JoeBeanImpl.test(JoeBeanImpl.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:101) at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50) at sun.reflect.GeneratedMethodAccessor228.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerIntercep
-
10. Re: @Logger is null
kasim Jan 25, 2008 10:38 AM (in response to kasim)
Eh FWIW .. its somekind of configuration/deployment issue on my behalf when upgrading from 1.2 to 2.0,
I launched my demo app and tried it, worked fine, so i know i didn't corrupt the jboss server (which i once did with jBPM and had a nightmare time figuring out why it wasnt working) -
11. Re: @Logger is null
kasim Jan 25, 2008 1:17 PM (in response to kasim)
Anyway never mind.
Looks like i have the issue resolved.
Something with the way it was building. Their must have been some error in the building. I think it had to do with where it wsa placing webservices etc ... at least thats what i adjusted.