[JBoss Tools (users)] - Re: Step away from the tool and nobody gets hurt
by max.andersen@jboss.com
"bostroff" wrote : "max.andersen(a)jboss.com" wrote : "bostroff" wrote : I guess I'm working too hard to make this work...
| | |
| | | I have successfully created a seam project in the past (say a month ago) from an existing database schema using seam-gen from the command line. Pretty much just ran the tool, built it (as an ear), deployed it in JBoss, and CRUD just worked. I was using seam 2.0 with JBoss AS 4.2.2.
| | |
| | | Now, I'm trying to get effectively the same thing working using the seam tools in Eclipse (Europa 3.3.1.1) and I ran into a number of problems:
| | |
| |
| | ok.
| | so using the seam-gen command line tool give you different results than running it via the tooling ?
| |
| |
| | anonymous wrote :
| | | 1. Missing serialVersionUID everywhere - added it.
| | |
| |
| | That is not a bug, that is fully intentional. See http://opensource.atlassian.com/projects/hibernate/browse/HBX-964
| |
| | anonymous wrote :
| | | 2. The loginout.xhtml apparently missing the ui:composition tag - modified it
| | |
| |
| | not sure what you are referring to...things works for me...please more details.
| |
|
| So, the loginout.xhtml file was generated as:
|
|
| |
| | <div class="loginout"
| | xmlns="..."
| | ...
| | >
| | ...
| | </div>
| |
|
| Eclipse whined about the xmlns attribute and I assumed that maybe it should read:
|
|
| | <ui:composition
| | xmlns="..."
| | ...
| | >
| | <div class="loginout">
| | ...
| | </div>
| | </ui:composition>
| |
|
|
| "max.andersen(a)jboss.com" wrote : "bostroff" wrote :
| | | 3. Some generated xhtml pages not recognizing the messages bundle - added bundle to faces-config.xml - doesn't seem to help - warnings still exist.
| | |
| |
| | this is a limitaiton of the validations of the tools. Is anything actually failing when you run the app?
| |
| | anonymous wrote :
| | | 4. Try a deploy anyway - complains about missing MethodBinding among others.
| | |
| |
| | details please...War and Ear works for me out of box so need more details to reproduce.
| |
| |
| So, the log reveals a number of these:
|
|
| | 11:30:08,495 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.locale
| | 11:30:08,499 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.manager
| |
|
| followed later by this warning:
|
| | 11:30:08,549 WARN [Initialization] Did not install PojoCache due to NoClassDefFoundError: org/jgroups/MembershipListener
| |
|
| and ultimately by this:
|
|
| | 11:30:09,625 ERROR [StandardContext] Error listenerStart
| | 11:30:09,625 ERROR [StandardContext] Context [/cehc] startup failed due to previous errors
| | 11:30:09,720 WARN [ServiceController] Problem starting service jboss.web.deployment:war=cehc.war,id=558207986
| | org.jboss.deployment.DeploymentException: URL file:/Users/bostroff/Downloads/jboss-4.2.2.GA/server/default/deploy/cehc.ear/cehc.war/ deployment failed
| |
|
| It almost looks like I have two different versions of the seam jar on the runtime classpath?
|
| "max.andersen(a)jboss.com" wrote : "bostroff" wrote :
| | | So, did I answer some of the wizard questions incorrectly (like should I have NOT picked seam 2.0 technology preview)? Is there a blindingly simple tutorial where I could create a small seam 2.0 application from scratch inside Eclipse (Europa) and have it successfully deploy and execute?
| | |
| |
| | Yes, its in the Getting Started Guide.
| |
| | The only explanation I can come up with is that you have something specfic in your db that creates bad seamgen output....just weird you are not seeing that when using seamgen commandline.
| |
| |
|
| Also, now I DO vaguely remember having to drop a jar into my JBoss server default lib directory. This allowed the command line generated version to work (this was done on the vague advice gleaned from another thread somewhere on the net) .
|
| "max.andersen(a)jboss.com" wrote :
| |
| | /max
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119818#4119818
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119818
18 years, 4 months
[EJB 3.0] - Re: problems with optimistic locking/persistence data in EJB
by wiggy
wayne
thats not all complete problem -
as the remote debugger reported problems with the transaction failure when remote debugging into the server, i rewrote the removeLinks method in the local application client using an application scoped EM.
that way i could run the debugger in local mode.
| public static boolean removeLink (Node fromNode, Node remoteNode)
| {
| EntityManager em;
| EntityManagerFactory emf ;
| List<Link> res;
| boolean result = false;
|
| emf = Persistence.createEntityManagerFactory("embedDS");
|
| em = emf.createEntityManager();
|
| try
| {
| EntityTransaction t = em.getTransaction();
|
| t.begin();
| fromNode = em.merge(fromNode);
| remoteNode = em.merge(remoteNode);
| Query q = em.createNamedQuery("findLinksBetweenNodes");
| q.setParameter("toNode", remoteNode);
| q.setParameter("fromNode", fromNode);
|
| res = (List<Link>)q.getResultList();
| if (res != null && res.size () == 1)
| {
| Link link = res.get(0);
| remoteNode.deleteLinkFrom(link);
| fromNode.deleteLinkTo(link);
| em.remove(link);
| result = true;
| }
| else
| {result = false;}
|
| t.commit();
| return result;
| }
| finally
| {
| em.close();
| emf.close();
| }
|
| }
|
this essentally throws the same optimistic lock error - so its something to do with the transaction that this lives in updates the version for the attached elements. when this completes the next step in the main application path
|
| //local if (removeLink(uNode, zNode))
| if (nodeEAO.removeLink(uNode, zNode))
| {
|
| System.out.println ("deleted link : \n");
| }
|
| //update to latest version number
| yNode = nodeEAO.refresh(uNode);
|
the code errors with optimistic lock when i try and do an em.merge within the nodeEAO.refresh routine.
what this kind of implies i think is that i have to issue another "find" operation to reread a fresh copy of the entity back to avoid this rather than being able to "merge" the starting uNode back into the persistence context.
Is this the only/correct way to proceed - or am i not understanding properly and theres a easy 'correct' fix that would allow me to avoid the exception (I havnt tried to take the version annonation of yet - and see if it handles it without the optimistic lock force enabled.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119816#4119816
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119816
18 years, 4 months
[JBossWS] - Re: Writing a client - no examples for BindingProvider based
by mjhammel
You can override the hard coded path set in this class. I'm assuming you're writing a remote client, re: one that doesn't live on the same host as the Web Services server. In that case, you're packaging of the remote client just installs the WSDL file under a directory relative to the application file. At runtime of the client you find out where you're installed and generate the runtime location of the WSDL file from that. That way you don't have to ask the server for the WSDL information at startup time.
anonymous wrote : As for getting the QName, do you have an @WebService annotation in your generated client service class (e.g. SubscriberServicesService)? If you do, it should have name and targetNamespace parameters.
Oh sure, they're there. But how do I reference parameters in an annotation directly from my java code? The reference is in SubscriberServicesService.java and looks like this:
@WebServiceClient(name = "SubscriberServicesService", targetNamespace = "http://SubscriberServices.ws.server.crunch.cei.com/",
| wsdlLocation = "file:/home/mjhammel/src/cei/crunch/build/server/resources/SubscriberServicesService.wsdl")
|
or if you prefer, in the SubscriberServicesEndpoint.java:
@WebService(name = "SubscriberServicesEndpoint", targetNamespace = "http://SubscriberServices.ws.server.crunch.cei.com/")
| public interface SubscriberServicesEndpoint {
But how do I reference these parameters from my client code that instantiates the SubscriberServicesService class? Something like the following doesn't appear to work and there are not getters for these values either:
SubscriberServicesService service = new SubscriberServicesService();
| System.out.println(ss.targetNamespace);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119815#4119815
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119815
18 years, 4 months
[JBoss Seam] - IllegalStateException on WebLogic Restart
by neilac333
I am attempting to deploy a Seam 2.0 application to WebLogic 9.2 and having a heck of a time with it. At first, Hibernate couldn't find the datasource I set up through the WL Admin Console in the JNDI tree. So I made some changes to my WAR file and tried to redeploy. Then the Admin Console started acting up on me, so I shut down WL, restarted the server, and redeployed the application. No datasource error, but I got this:
| 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.endApplication(Lifecycle.java:50)
| at org.jboss.seam.contexts.ServletLifecycle.endApplication(ServletLifecycle.java:118)
| at org.jboss.seam.servlet.SeamListener.contextDestroyed(SeamListener.java:39)
| at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:377)
| at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
| at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
| at weblogic.servlet.internal.EventsManager.notifyContextDestroyedEvent(EventsManager.java:101)
| at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:2827)
| at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:236)
| at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:440)
| at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:916)
| at weblogic.servlet.internal.WebAppModule.unprepare(WebAppModule.java:357)
| at weblogic.application.internal.flow.ModuleStateDriver$1.previous(ModuleStateDriver.java:167)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
| at weblogic.application.internal.flow.ModuleStateDriver.unprepare(ModuleStateDriver.java:84)
| at weblogic.application.internal.flow.ScopedModuleDriver.unprepare(ScopedModuleDriver.java:212)
| at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(ModuleListenerInvoker.java:136)
| at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(DeploymentCallbackFlow.java:366)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
| at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(DeploymentCallbackFlow.java:107)
| at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(DeploymentCallbackFlow.java:98)
| at weblogic.application.internal.BaseDeployment$1.previous(BaseDeployment.java:621)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
| at weblogic.application.internal.BaseDeployment.unprepare(BaseDeployment.java:255)
| at weblogic.application.internal.DeploymentStateChecker.unprepare(DeploymentStateChecker.java:196)
| at weblogic.deploy.internal.targetserver.AppContainerInvoker.unprepare(AppContainerInvoker.java:118)
| at weblogic.deploy.internal.targetserver.operations.AbstractOperation.silentUnprepare(AbstractOperation.java:684)
| at weblogic.deploy.internal.targetserver.operations.RedeployOperation.unprepareDeployment(RedeployOperation.java:195)
| >
| ####<Jan 14, 2008 3:39:37 PM EST> <Warning> <HTTP> <TSP617758> <AdminServer> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1200343177031> <BEA-101162> <User defined listener com.sun.faces.application.WebappLifecycleListener failed: java.lang.NullPointerException.
| java.lang.NullPointerException
| at com.sun.faces.application.WebappLifecycleListener.contextDestroyed(WebappLifecycleListener.java:273)
| at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:377)
| at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
| at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
| at weblogic.servlet.internal.EventsManager.notifyContextDestroyedEvent(EventsManager.java:101)
| at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:2827)
| at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:236)
| at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:440)
| at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:916)
| at weblogic.servlet.internal.WebAppModule.unprepare(WebAppModule.java:357)
| at weblogic.application.internal.flow.ModuleStateDriver$1.previous(ModuleStateDriver.java:167)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
| at weblogic.application.internal.flow.ModuleStateDriver.unprepare(ModuleStateDriver.java:84)
| at weblogic.application.internal.flow.ScopedModuleDriver.unprepare(ScopedModuleDriver.java:212)
| at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(ModuleListenerInvoker.java:136)
| at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(DeploymentCallbackFlow.java:366)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
| at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(DeploymentCallbackFlow.java:107)
| at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(DeploymentCallbackFlow.java:98)
| at weblogic.application.internal.BaseDeployment$1.previous(BaseDeployment.java:621)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
| at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
| at weblogic.application.internal.BaseDeployment.unprepare(BaseDeployment.java:255)
| at weblogic.application.internal.DeploymentStateChecker.unprepare(DeploymentStateChecker.java:196)
| at weblogic.deploy.internal.targetserver.AppContainerInvoker.unprepare(AppContainerInvoker.java:118)
| at weblogic.deploy.internal.targetserver.operations.AbstractOperation.silentUnprepare(AbstractOperation.java:684)
| at weblogic.deploy.internal.targetserver.operations.RedeployOperation.unprepareDeployment(RedeployOperation.java:195)
| at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(RedeployOperation.java:110)
| at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
| at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
|
What the heck does that mean? Does this mean at least my datasource issue has been resolved? How can I "clean out" any serialized Seam stuff from a previous deployment?
In case it matters, the application is a WAR file (with Seam components and seam.properties in WEB-INF/classes) containing two JAR files, each of which contains Seam components and seam.properties in META-INF.
Any insight is appreciated.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119814#4119814
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119814
18 years, 4 months