Menu
  • HOME
  • TAGS

java.lang.IllegalStateException: Already installed InitialContextProperties

unit-testing,java-ee,jboss,testng,seam

I would suggest please clear all the build path and testng libraries, clean your project and start afresh, it would certainly work. if not try it in different workspace altogether.

Get both the current modified entity and the database entity snapshot with Hibernate

java,hibernate,jpa,orm,seam

You can do it like this: You clone the currently attached entity, using a deep-copy serialization/deserialization (that means all your entities should be serialable): MyEntity clonedObject = org.apache.commons.lang3.SerializationUtils.clone(object); Then you refresh the currently attached object: session.refresh(object); Now you have both the modified object (e.g. clonedObject) and the original entity version...

Trying to catch ehcache Element ClassCastException

java,exception-handling,seam,ehcache,classcastexception

Your exception is ClassCastException: net.sf.ehcache.Element cannot be cast to net.sf.ehcache.Element This is an indication of a bigger problem. You most probably have 2 ehcace core or related jars in classpath. Catching the exception is not a solution. The exception should not happen in the first place.

EJB / MDB Cannot persist data mid-method

ejb,quartz-scheduler,seam,seam2

In the end I have achieved this using Bean Managed Transactions that allow you to determine the transaction boundaries manually... @TransactionManagement(value=TransactionManagementType.BEAN) @AutoCreate @Name("processSession") public class ProcessSession{ @Resource private UserTransaction userTransaction; @Logger private Log log; @In private SessionDAO sessionDAO; public ProcessingRun processNewSession(Session session){ userTransaction.begin(); session.setProcessingStartTime(new Date()); sessionDAO.persist(session);...

Correct way of initialize variables seam

java,xhtml,seam

If you want to initialize variablen in your orderUploadAction.decideWhatToDo() action event. I think your form tag should move to start. eg. <h:form> <s:div styleClass="block bgcolor-6" id="orderSearchFields"> ... <s:decorate id="refNumBer" template="/layout/editShort.xhtml"> <h:inputText id="refNumBer" value="#{orderUploadAction.refNumber}" styleClass="txt" /> </s:decorate> ... decideWhatToDo() action.. ... </h:form> ...

Init method is not filled in even with parameters

jsf,jboss,seam

Not sure what your <a:commandLink/> component is? (Im assumed you re-mapped a4j:commandLink somehow?) I think the problem you are having is that the @RequestParameter variables are only populated when the page first renders, when you click the commandLink you are performing a postback so the values are lost. You should...

Add your own vocabulary [Nuxeo]

java,seam,ecm,nuxeo

You can do it from the Admin Center: see USERDOC/Managing+Vocabularies Or you can use an extension point: see SQLDirectoryFactory--directories...

Seam pageflow example NumberGuess Not landing on to the second page

seam,jboss-seam,page-flow,jpdl

Resolved the issue.Weld is scanning the archive, which seems to cause the problem.The Weld Docs says: You can either set this up for your deployment only by adding the following content to the META-INF/jboss-all.xml file of your application. jboss-all.xml file goes to your META-INF for ear archive and likely to...

datatable refreshing while selecting dropdown

java,jsf,primefaces,seam

You can handle it with ajax in jsf 1.2 also with p:ajax provided by primefaces. First of all remove onChange="document.datsForm.submit()" from h:selectOneMenu and add as child component of your select menu. <p:ajax event="change" process="@this" partialSubit="true" update="datatable" listener="#transactionListAction.onYearChange}"/> You haven't given any id to the form contaning datatable which is not...

Seam Quartz Dispatcher not firing on seconds and minutes field for a given cron expression

java,jboss,quartz-scheduler,seam,cronexpression

0/5 0 0 * * ? The above cron expression will schedule the job to trigger every 5 seconds during minute 0 and hour 0 daily. In other words, the first minute every day, the job will execute 12 times. I assume you want it to trigger any hour, that...

how to get name of application in facelets app

java,logging,facelets,seam

I ended up with: ServletContext ctx = ServletLifecycle.getServletContext(); String appName = ctx.getContextPath().replace("/",""); which meets my needs....

How to load config.properties file in a Seam Application using web.xml context-param

jboss,seam,web.xml

Move the config.properties file into WEB-INF/classes. It will not be accessible from the class loader if it's just in WEB-INF....

How to generate new web page programmatically

jsf,jsf-2,seam,seam2

Its a bad approach. I am not aware about seam. But better way will be keeping the articles in DB and get it rendered in one template. Create a data access POJO for your article which is having fields like 1.articleHeader. 2.articleName. 3.articleContent. 4.articlePics 5.articleLinks In the template use these...