You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by cellterry <ce...@gmail.com> on 2010/10/18 04:34:01 UTC
jqGrid with Struts and Spring
Hello all,
I get a bug in firebug Net console which is strange as I thought I have
already correct configurations in the struts.xml and applicationContext.xml.
The table frame can be seen without data loaded.
Bug:
java.lang.RuntimeException: Invalid action class configuration that
references an unknown class named [ajaxEmps]
org.apache.struts2.convention.ConventionsServiceImpl.determineResultPath(ConventionsServiceImpl.java:100)
:
:
applicationContext.xml:
:
:
<bean id="ajaxEmps" class="ajax.Emps" scope="prototype">
<property name="serviceEmp" ref="serviceEmp" />
</bean>
:
:
struts.xml:
<package name="ajax" namespace="/" extends="json-default">
:
:
<action name="ajaxEmps" class="ajaxEmps">
<result type="json" />
</action>
:
:
</package>
emps.jsp:
:
:
<script>
$(document).ready(function() {
jQuery("#emps").jqGrid({
url : "ajaxEmps.action",
:
:
Emps.java
package ajax;
:
:
@SuppressWarnings("serial")
public class Emps extends ActionSupport {
:
:
Do anyone know why?
Terry.
--
View this message in context: http://old.nabble.com/jqGrid-with-Struts-and-Spring-tp29986994p29986994.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: jqGrid with Struts and Spring
Posted by Dave Newton <da...@gmail.com>.
Cool; glad you worked it out.
Dave
On Mon, Oct 18, 2010 at 10:10 PM, cellterry <ce...@gmail.com> wrote:
>
> Yes, you are right. After removing it, the error is removed.
>
> Terry.
>
>
> Dave Newton-6 wrote:
>>
>> If the Spring plugin is deployed the object factory should already be
>> set to "spring" by the plugin, IIRC.
>>
>> I'm more concerned by the reference to the convention plugin: are you
>> intending to use it? If not, it should not be deployed. If you are,
>> and are *also* using XML config, you'll need to include more details
>> about your S2 config to determine why there's a conflict.
>>
>> Dave
>>
>> On Monday, October 18, 2010, Chris Pratt <th...@gmail.com> wrote:
>>> The only things I can think of to check would be, do you have the
>>> struts2-spring-plugin.jar file in your WEB-INF/lib directory? And have
>>> you
>>> set the struts.objectFactory property to "spring"?
>>>
>>> <constant name="struts.objectFactory" value="spring"/>
>>>
>>> (*Chris*)
>>>
>>> On Sun, Oct 17, 2010 at 7:34 PM, cellterry <ce...@gmail.com> wrote:
>>>
>>>>
>>>> Hello all,
>>>>
>>>> I get a bug in firebug Net console which is strange as I thought I have
>>>> already correct configurations in the struts.xml and
>>>> applicationContext.xml.
>>>>
>>>> The table frame can be seen without data loaded.
>>>>
>>>> Bug:
>>>>
>>>> java.lang.RuntimeException: Invalid action class configuration that
>>>> references an unknown class named [ajaxEmps]
>>>>
>>>> org.apache.struts2.convention.ConventionsServiceImpl.determineResultPath(ConventionsServiceImpl.java:100)
>>>> :
>>>> :
>>>>
>>>> applicationContext.xml:
>>>> :
>>>> :
>>>> <bean id="ajaxEmps" class="ajax.Emps" scope="prototype">
>>>> <property name="serviceEmp" ref="serviceEmp" />
>>>> </bean>
>>>> :
>>>> :
>>>>
>>>> struts.xml:
>>>>
>>>> <package name="ajax" namespace="/" extends="json-default">
>>>> :
>>>> :
>>>> <action name="ajaxEmps" class="ajaxEmps">
>>>> <result type="json" />
>>>> </action>
>>>> :
>>>> :
>>>> </package>
>>>>
>>>> emps.jsp:
>>>>
>>>> :
>>>> :
>>>>
>>>> <script>
>>>> $(document).ready(function() {
>>>> jQuery("#emps").jqGrid({
>>>> url : "ajaxEmps.action",
>>>> :
>>>> :
>>>>
>>>> Emps.java
>>>>
>>>> package ajax;
>>>>
>>>> :
>>>> :
>>>>
>>>> @SuppressWarnings("serial")
>>>> public class Emps extends ActionSupport {
>>>>
>>>> :
>>>> :
>>>>
>>>>
>>>> Do anyone know why?
>>>>
>>>> Terry.
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/jqGrid-with-Struts-and-Spring-tp29986994p29986994.html
>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/jqGrid-with-Struts-and-Spring-tp29986994p29996381.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: jqGrid with Struts and Spring
Posted by cellterry <ce...@gmail.com>.
Yes, you are right. After removing it, the error is removed.
Terry.
Dave Newton-6 wrote:
>
> If the Spring plugin is deployed the object factory should already be
> set to "spring" by the plugin, IIRC.
>
> I'm more concerned by the reference to the convention plugin: are you
> intending to use it? If not, it should not be deployed. If you are,
> and are *also* using XML config, you'll need to include more details
> about your S2 config to determine why there's a conflict.
>
> Dave
>
> On Monday, October 18, 2010, Chris Pratt <th...@gmail.com> wrote:
>> The only things I can think of to check would be, do you have the
>> struts2-spring-plugin.jar file in your WEB-INF/lib directory? And have
>> you
>> set the struts.objectFactory property to "spring"?
>>
>> <constant name="struts.objectFactory" value="spring"/>
>>
>> (*Chris*)
>>
>> On Sun, Oct 17, 2010 at 7:34 PM, cellterry <ce...@gmail.com> wrote:
>>
>>>
>>> Hello all,
>>>
>>> I get a bug in firebug Net console which is strange as I thought I have
>>> already correct configurations in the struts.xml and
>>> applicationContext.xml.
>>>
>>> The table frame can be seen without data loaded.
>>>
>>> Bug:
>>>
>>> java.lang.RuntimeException: Invalid action class configuration that
>>> references an unknown class named [ajaxEmps]
>>>
>>> org.apache.struts2.convention.ConventionsServiceImpl.determineResultPath(ConventionsServiceImpl.java:100)
>>> :
>>> :
>>>
>>> applicationContext.xml:
>>> :
>>> :
>>> <bean id="ajaxEmps" class="ajax.Emps" scope="prototype">
>>> <property name="serviceEmp" ref="serviceEmp" />
>>> </bean>
>>> :
>>> :
>>>
>>> struts.xml:
>>>
>>> <package name="ajax" namespace="/" extends="json-default">
>>> :
>>> :
>>> <action name="ajaxEmps" class="ajaxEmps">
>>> <result type="json" />
>>> </action>
>>> :
>>> :
>>> </package>
>>>
>>> emps.jsp:
>>>
>>> :
>>> :
>>>
>>> <script>
>>> $(document).ready(function() {
>>> jQuery("#emps").jqGrid({
>>> url : "ajaxEmps.action",
>>> :
>>> :
>>>
>>> Emps.java
>>>
>>> package ajax;
>>>
>>> :
>>> :
>>>
>>> @SuppressWarnings("serial")
>>> public class Emps extends ActionSupport {
>>>
>>> :
>>> :
>>>
>>>
>>> Do anyone know why?
>>>
>>> Terry.
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/jqGrid-with-Struts-and-Spring-tp29986994p29986994.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/jqGrid-with-Struts-and-Spring-tp29986994p29996381.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: jqGrid with Struts and Spring
Posted by Dave Newton <da...@gmail.com>.
If the Spring plugin is deployed the object factory should already be
set to "spring" by the plugin, IIRC.
I'm more concerned by the reference to the convention plugin: are you
intending to use it? If not, it should not be deployed. If you are,
and are *also* using XML config, you'll need to include more details
about your S2 config to determine why there's a conflict.
Dave
On Monday, October 18, 2010, Chris Pratt <th...@gmail.com> wrote:
> The only things I can think of to check would be, do you have the
> struts2-spring-plugin.jar file in your WEB-INF/lib directory? And have you
> set the struts.objectFactory property to "spring"?
>
> <constant name="struts.objectFactory" value="spring"/>
>
> (*Chris*)
>
> On Sun, Oct 17, 2010 at 7:34 PM, cellterry <ce...@gmail.com> wrote:
>
>>
>> Hello all,
>>
>> I get a bug in firebug Net console which is strange as I thought I have
>> already correct configurations in the struts.xml and
>> applicationContext.xml.
>>
>> The table frame can be seen without data loaded.
>>
>> Bug:
>>
>> java.lang.RuntimeException: Invalid action class configuration that
>> references an unknown class named [ajaxEmps]
>>
>> org.apache.struts2.convention.ConventionsServiceImpl.determineResultPath(ConventionsServiceImpl.java:100)
>> :
>> :
>>
>> applicationContext.xml:
>> :
>> :
>> <bean id="ajaxEmps" class="ajax.Emps" scope="prototype">
>> <property name="serviceEmp" ref="serviceEmp" />
>> </bean>
>> :
>> :
>>
>> struts.xml:
>>
>> <package name="ajax" namespace="/" extends="json-default">
>> :
>> :
>> <action name="ajaxEmps" class="ajaxEmps">
>> <result type="json" />
>> </action>
>> :
>> :
>> </package>
>>
>> emps.jsp:
>>
>> :
>> :
>>
>> <script>
>> $(document).ready(function() {
>> jQuery("#emps").jqGrid({
>> url : "ajaxEmps.action",
>> :
>> :
>>
>> Emps.java
>>
>> package ajax;
>>
>> :
>> :
>>
>> @SuppressWarnings("serial")
>> public class Emps extends ActionSupport {
>>
>> :
>> :
>>
>>
>> Do anyone know why?
>>
>> Terry.
>>
>> --
>> View this message in context:
>> http://old.nabble.com/jqGrid-with-Struts-and-Spring-tp29986994p29986994.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: jqGrid with Struts and Spring
Posted by Chris Pratt <th...@gmail.com>.
The only things I can think of to check would be, do you have the
struts2-spring-plugin.jar file in your WEB-INF/lib directory? And have you
set the struts.objectFactory property to "spring"?
<constant name="struts.objectFactory" value="spring"/>
(*Chris*)
On Sun, Oct 17, 2010 at 7:34 PM, cellterry <ce...@gmail.com> wrote:
>
> Hello all,
>
> I get a bug in firebug Net console which is strange as I thought I have
> already correct configurations in the struts.xml and
> applicationContext.xml.
>
> The table frame can be seen without data loaded.
>
> Bug:
>
> java.lang.RuntimeException: Invalid action class configuration that
> references an unknown class named [ajaxEmps]
>
> org.apache.struts2.convention.ConventionsServiceImpl.determineResultPath(ConventionsServiceImpl.java:100)
> :
> :
>
> applicationContext.xml:
> :
> :
> <bean id="ajaxEmps" class="ajax.Emps" scope="prototype">
> <property name="serviceEmp" ref="serviceEmp" />
> </bean>
> :
> :
>
> struts.xml:
>
> <package name="ajax" namespace="/" extends="json-default">
> :
> :
> <action name="ajaxEmps" class="ajaxEmps">
> <result type="json" />
> </action>
> :
> :
> </package>
>
> emps.jsp:
>
> :
> :
>
> <script>
> $(document).ready(function() {
> jQuery("#emps").jqGrid({
> url : "ajaxEmps.action",
> :
> :
>
> Emps.java
>
> package ajax;
>
> :
> :
>
> @SuppressWarnings("serial")
> public class Emps extends ActionSupport {
>
> :
> :
>
>
> Do anyone know why?
>
> Terry.
>
> --
> View this message in context:
> http://old.nabble.com/jqGrid-with-Struts-and-Spring-tp29986994p29986994.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>