Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Error when using flex+seam+flamingo

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

when iam running a sample application iam encountering this error .
iam using jboss 4.2+flexbuilder 3+seam 2.0+flamingo 1.7.1

java.lang.IllegalStateException: Attempted to invoke a Seam component outside the an initialized application
at org.jboss.seam.contexts.Lifecycle.getApplication(Lifecycle.java:36)
at org.jboss.seam.contexts.Lifecycle.mockApplication(Lifecycle.java:111)
at org.jboss.seam.servlet.SeamResourceServlet.loadResourceProviders(SeamResourceServlet.java:42)
at org.jboss.seam.servlet.SeamResourceServlet.init(SeamResourceServlet.java:35)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Unknown Source)
ERROR [[Seam Resource Servlet]] Allocate exception for servlet Seam Resource Servlet


[b]File contents are displayed here:


Seam Component:

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.remoting.WebRemote;

@Scope(ScopeType.STATELESS)
@Name("helloAction")
@WebRemote public class HelloAction {

public String hello(String name) {
return "Hello, " + name;
}}

web.xml:

<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>

<servlet>
<servlet-name>Seam Resource Servlet</servlet-name>
<servlet-class>org.jboss.seam.servlet.SeamResourceServlet</
servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Seam Resource Servlet</servlet-name>
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>

Servies-config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<service
id="hello-service"
class="flex.messaging.services.RemotingService"
messageTypes="flex.messaging.messages.RemotingMessage">
<destination id="helloAction">
<channels>
<channel ref="seam-amf"/>
</channels>
</destination>
</service>
</services>
<channels>
<channel-definition id="seam-amf"
class="mx.messaging.channels.AMFChannel">
<endpoint
uri="http://{server.name}:{server.port}/FlexSeamIntegration/seam/resource/amf"
class="flex.messaging.endpoints.AMFEndpoint"/>
</channel-definition>
</channels>
</services-config>

client.mxml:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:word="*">

<mx:RemoteObject id="service" destination="helloAction"/>

<mx:Panel
title="Seam-Flex AMF Hello World"
paddingTop="10" paddingBottom="10" paddingLeft="10"
paddingRight="10">
<mx:HBox>
<mx:Label text='Whom do you want to say "Hello" to?'/>
<mx:TextInput
id="who"
maxChars="20"
enter="service.hello(who.text)"/>
<mx:Button label="Say Hello" click="service.hello
(who.text)"/>
</mx:HBox>
<mx:Label text='The server said: "{service.hello.lastResult}"'/
></mx:Panel>
</mx:Application>

please help me in resolving this error
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic