NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114)

View: New views
10 Messages — Rating Filter:   Alert me  

NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114)

by zhazha1984 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm trying to deploy a web application which uses webwork 2.2.4 on SAP Netweaver application server (Windows OS). The app uses JDK 1.4.2.

We get a NullPointerException as seen below.
Can someone please assist?

Thanks,
Milan

com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
        at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
        at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
        at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
[b]Caused by: java.lang.NullPointerException
        at com.opensymphony.xwork.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:114)[/b]
        at com.opensymphony.webwork.dispatcher.mapper.ActionMapperFactory.getMapper(ActionMapperFactory.java:33)
        ... 16 more
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111621&messageID=181545#181545

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114

by zhazha1984 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Milan,

Does the log files say anything that WebWork-Spring integartion failed?

Looks like Spring is not being started up properly, its ApplciationContext can't be found in ServletContext using WebApplicationContextUtils.

rgds.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111621&messageID=181609#181609

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114

by zhazha1984 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[b]Copying the complete trace info:[/b]

I'm wondering what does the "unknown location" signify?

Processing HTTP request to servlet [webwork] finished with error. The error is: Could not create ActionMapper: WebWork will *not* work! - [b][unknown location][/b] at com.opensymphony.webwork.dispatcher.mapper.ActionMapperFactory.getMapper(ActionMapperFactory.java:41)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:101)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
        at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
        at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
        at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
        at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
        at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
        at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
        at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.NullPointerException
        at com.opensymphony.xwork.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:114)
        at com.opensymphony.webwork.dispatcher.mapper.ActionMapperFactory.getMapper(ActionMapperFactory.java:33)
        ... 16 more
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111621&messageID=181620#181620

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114

by zhazha1984 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is the code (or other libs etc.) compiled such that it includes debug information? If not, jvm will not be able to determine the location of the exception in the code.

When start up, is there any errors? Maybe Spring isn't started up properly.

rgds
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111621&messageID=181625#181625

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114

by zhazha1984 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I do have the following tags specified in the web.xml

<context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>
                        /WEB-INF/classes/applicationContext.xml
                </param-value>
        </context-param>

<listener>
                <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>


<filter>
                <filter-name>webwork</filter-name>
                <filter-class>com.opensymphony.webwork.dispatcher.FilterDispatcher</filter-class>
        </filter>
        <filter-mapping>
                <filter-name>webwork</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111621&messageID=181890#181890

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114

by zhazha1984 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is the complete log: We do have the listerner configured in web.xml

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

FATAL SAPEngine_Application_Thread[impl:3]_10 com.opensymphony.webwork.spring.WebWorkSpringObjectFactory - ********** FATAL ERROR STARTING UP SPRING-WEBWORK INTEGRATION **********
Looks like the Spring listener was not configured for your web app!
Nothing will work until WebApplicationContextUtils returns a valid ApplicationContext.
You might need to add the following to web.xml:
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
FATAL SAPEngine_Application_Thread[impl:3]_2 com.opensymphony.webwork.dispatcher.mapper.ActionMapperFactory - Could not create ActionMapper: WebWork will *not* work!
java.lang.NullPointerException
        at com.opensymphony.xwork.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:114)
        at com.opensymphony.webwork.dispatcher.mapper.ActionMapperFactory.getMapper(ActionMapperFactory.java:33)
        at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:172)
        at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:58)
        at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:384)
        at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
        at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
        at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
        at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
        at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
        at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
        at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111621&messageID=181920#181920

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114

by zhazha1984 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try using this instead
[code]
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
</param-value>
</context-param>
[/code]
If you want it in the classpath, it shoudl be prefixed with classpath:// More information could be found in Spring's excellent docs.

rgds
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111621&messageID=182196#182196

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114

by zhazha1984 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
We are porting our application from Weblogic 8.1 to SAP Netweaver 7.0 we are facing the same problem, since we are not using any AJAX stuff, we are not using the Filter Dispatcher, we are using the Servlet Dispatcher, The Spring Application context xml is in the Classpath

[code]
<context-param>
          <param-name>contextConfigLocation</param-name>
          <param-value>classpath:com/dj/fic/resource/applicationContext-web.xml</param-value>
        </context-param>
<listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

<servlet>
        <servlet-name>webwork</servlet-name>
        <servlet-class>
          com.opensymphony.webwork.dispatcher.ServletDispatcher
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
<servlet-mapping>
       <servlet-name>webwork</servlet-name>
       <url-pattern>*.action</url-pattern>
    </servlet-mapping>
[/code]


The Stack Trace:
[code]
Exception id: [001D09FEBB16006B0000003C000013BC00044F3216DE9244]#
#1.5#001D09FEBB1600600000001E000013BC00044F3216E874E3#1212976458187#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#sap.com/FirstGen20080411#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#Guest#0##n/a##f89dc9b035c611ddbc24001d09febb16#SAPEngine_Application_Thread[impl:3]_22##0#0#Error##Plain###application [FirstGen] Processing HTTP request to servlet [webwork] finished with error. The error is: java.lang.RuntimeException: Could not create ActionMapper: WebWork will *not* work!
        at com.opensymphony.webwork.dispatcher.mapper.ActionMapperFactory.getMapper(ActionMapperFactory.java:40)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:93)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:117)
        at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:62)
        at com.firstapex.v4.wui.EncodingFilter.doFilter(EncodingFilter.java:102)
        at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:58)
        at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:384)
        at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
        at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
        at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
        at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
        at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
        at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
        at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
        at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Caused by: java.lang.NullPointerException
        at com.opensymphony.xwork.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:114)
        at com.opensymphony.webwork.dispatcher.mapper.ActionMapperFactory.getMapper(ActionMapperFactory.java:32)
        ... 20 more
[/code]


I am using Webwork 2.2.2 with Sun JDK 1.4.2_17. The webwork.properties looks like this

[code]
webwork.objectFactory = spring
webwork.objectFactory.spring.autoWire = name
[/code]

Need your help plz.

Thanks
Raghav
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111621&messageID=443488#443488


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114

by zhazha1984 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fixed it, the spring context listener doesn't seem to be working, on the SAP Netweaver 7.0 changed it to Context Loader Servlet and it works.

[code]
 <servlet>
            <servlet-name>ContextLoaderServlet</servlet-name>
            <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
[/code]

regards,
Raghav
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111621&messageID=448471#448471


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: NullPointer: SpringObjectFactory.buildBean(SpringObjectFactory.java:114

by zhazha1984 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alright, thanks for posting back to let us know.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111621&messageID=454993#454993


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price!