[JBoss Seam] - Re: Scheduling in Seam?
by modoc
Ok. It seems to work correctly now. Thank you for all your help!
The only thing that isn't quite right, and it doesn't seem to keep the timer from running, is this error:
| 18:37:45,877 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
|
This only appears when I invoke the Asynchronous method from a @Create method on a component annotated with @Startup. I.e. when it's invoked by the container at startup, and not in the course of a user action.
If I invoke the Async method from a page, I don't see the error. Either way, the timer appears to function correctly after that error message.
Are Seam timers not meant to be used for server level (non-user based) processes?
Thanks!
Modoc
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981939#3981939
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981939
19 years, 5 months
[JBossWS] - EJB3 Webservice Exception
by cfrostrun
Hello All,
It appears to execute the webservice fine but then throws the exception on the way out, and returning the data to the client.
I'm getting the following exceptions...
21:05:13,924 INFO [STDOUT] Howdy. 1
21:05:13,928 INFO [STDOUT] url = http://www.test.com description = This is a Description hiperDate = Thu Oct 26 21:05:03 CDT 2006
21:05:14,239 ERROR [AbstractServlet] Error processing web service request
javax.xml.rpc.JAXRPCException: org.jboss.ws.binding.BindingException: javax.xml.bind.MarshalException: java.lang.ClassNotFoundException: com.frostylabs.hiperlinx.dto.loader.HiperlinxEntry
Does anybody have any idea why? My HiperlinxEntry class is part of the EJB project... Here's the Bean Implementation
@Stateless
@Remote(HiperlinxLoaderRemote.class)
@RemoteBinding (jndiBinding="HiperlinxLoaderBean/remote")
@WebService (endpointInterface="com.frostylabs.hiperlinx.services.loader.HiperlinxLoaderEndPoint")
public class HiperlinxLoaderBean implements HiperlinxLoaderRemote, HiperlinxLoaderEndPoint{
public boolean execute(HiperlinxEntry[] entries) {
System.out.println(" Howdy. " + entries.length);
// this is
// 21:05:13,928 INFO [STDOUT] url = http://www.test.com description =
// This is a Description hiperDate = Thu Oct 26 21:05:03 CDT 2006
System.out.println(entries[0].toString());
return true;
}
public String getServiceName() {
return "Hiperlinx Service";
}
}
My EndPoint Interface...
@WebService
public interface HiperlinxLoaderEndPoint {
@WebMethod
public boolean execute(HiperlinxEntry[] entries);
}
I'm on jboss 4.0.4.... any ideas? My EJB & EAR is in the deploy/ directory... So I'm not sure why I'd have to put the classes somewhere else?
Any Help would be greatful.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981938#3981938
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981938
19 years, 5 months
[JBoss Seam] - Re: Scheduling in Seam?
by modoc
The latest cvs checkout i have won't actually build. The example seam pay built and deployed just fine, but trying to build new seam jars fails, which I assume means that the fixes you made aren't making it into the example and it's picking up the old seam.jar file:
| Buildfile: /Users/modoc/Documents/workspaces/digitalsanctuary/jboss-seam/build.xml
| init:
| [echo] Build JBoss Seam 1.1
| compile:
| [javac] Compiling 69 source files to /Users/modoc/Documents/workspaces/digitalsanctuary/jboss-seam/build/classes
| [javac] /Users/modoc/Documents/workspaces/digitalsanctuary/jboss-seam/src/main/org/jboss/seam/security/SeamSecurityManager.java:210: cannot find symbol
| [javac] symbol : method actions()
| [javac] location: @interface org.jboss.seam.annotations.AclProvider
| [javac] for (String action : p.actions().split("[,]"))
| [javac] ^
| [javac] Note: Some input files use or override a deprecated API.
| [javac] Note: Recompile with -Xlint:deprecation for details.
| [javac] Note: Some input files use unchecked or unsafe operations.
| [javac] Note: Recompile with -Xlint:unchecked for details.
| [javac] 1 error
|
Secondly, I just noticed that by default all the timers are persisted. So as I modified code, each time the server started up again, it loaded up old timers that weren't valid, hence causing me many errors. But turning off all timer persistence, I was able to get things work, i think. I need to change a few things, but I think I'm on the right track.
I'll post back when I'm sure either way.
Thanks!
Modoc
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981936#3981936
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981936
19 years, 5 months
[JBoss Seam] - Re: Weird async/timer related error, collection not processe
by rdewell
Code, sure thing:
| @Local
| public interface OrderProcessor {
| @Asynchronous
| public void process(@Duration long startInMS, String id);
| }
|
| @Stateless
| @Name("OrderProcessor")
| @Interceptors(SeamInterceptor.class)
| public class OrderProcessorImpl implements OrderProcessor, Serializable {
| private static final long serialVersionUID = -8591335166721681758L;
| private static final Log LOG = LogFactory.getLog(OrderProcessorImpl.class);
|
| @In(value="bright", create=true)
| private transient EntityManager em;
|
| public void process(long initialStartMS, String id) {
| LOG.info("Processing transaction: " + id);
|
| AcquisitionTransaction acquisition = em.find(AcquisitionTransaction.class, id);
|
| OrderUtil.process(em, acquisition);
|
| LOG.info("Finished processing txn: " + id + " = " + acquisition.getLifecycle());
| }
| }
|
So obviously there's a bunch of work going on in the static OrderUtil.process method. OrderProcessor.process(String id) is called from a JSF action method on another stateless Seam component.
If I leave "@Asynchronous" on the interface, and therefore give it to the timer service, it blows up with the flush error, rolls back, etc.
If I comment out the @Asynchronous on the interface, and therefore just execute this inline with the JSF request, then everything works just as it has been (fine). Transaction commits, no errors, etc.
Since all I'm doing to make it work / not work is comment / uncomment @Asynchronous, it's almost like there's a difference of environment going on between a Seam / facelets request lifecycle, and a timer environment wtr to hibernate?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981934#3981934
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981934
19 years, 5 months