[JBoss Seam] - Re: How to deploy seam with oracle as ( or oc4j)?
by cedric.lamalle
I bought Michael Yuan's Book from Rough Cuts and got useful informations.
Deploying seam with ejb is "easy" using oc4j ejb stack, but you'll have to define jndi mappings in orion-ejb-jar.xml, which is really annoying.
I had no success deploying a seam app using jboss ejb stack it's always stopping when creating the entity manager factory :
11:16:39,625 INFO [TableMetadata] table found: helloworld.person
11:16:39,625 INFO [TableMetadata] columns: [name, id]
11:16:39,640 INFO [TableMetadata] foreign keys: []
11:16:39,640 INFO [TableMetadata] indexes: [primary]
11:16:39,640 INFO [SchemaUpdate] schema update complete
11:16:39,640 DEBUG [SessionFactoryImpl] obtaining JTA TransactionManager
11:16:39,656 INFO [NamingHelper] JNDI InitialContext properties:{}
07/02/25 11:16:39 oracle.oc4j.admin.internal.DeployerException: [helloworld:helloworld] - Exception lors de la crÚation de EntityManagerFactory utilisant la classe PersistenceProvider org.hibernate.ejb.HibernatePersistence pour l'unité de persistance helloworld.
07/02/25 11:16:39 at com.evermind.server.ejb.exception.DeploymentException.exceptionCreatingEntityManagerFactory(DeploymentException.java:130)
07/02/25 11:16:39 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.createContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:197)
07/02/25 11:16:39 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initializePersistenceUnit(PersistenceUnitManagerImpl.java:159)
07/02/25 11:16:39 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initialize(PersistenceUnitManagerImpl.java:86)
07/02/25 11:16:39 at com.evermind.server.http.HttpApplication.(HttpApplication.java:733)
07/02/25 11:16:39 at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
07/02/25 11:16:39 at com.evermind.server.Application.getHttpApplication(Application.java:545)
07/02/25 11:16:39 at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1990)
07/02/25 11:16:39 at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.(HttpSite.java:1909)
07/02/25 11:16:39 at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1606)
07/02/25 11:16:39 at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:238)
07/02/25 11:16:39 at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:99)
07/02/25 11:16:39 at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:547)
07/02/25 11:16:39 at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:202)
07/02/25 11:16:39 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
07/02/25 11:16:39 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
07/02/25 11:16:39 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
07/02/25 11:16:39 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
07/02/25 11:16:39 at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021979#4021979
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021979
19Â years, 1Â month
[Remoting] - server bind address - documentation
by mazzï¼ jboss.com
On the documentation page describing how the server invoker binds to its server address - section 5.4.3 at http://labs.jboss.com/portal/jbossremoting/docs/guide/ch05.html it says:
anonymous wrote : If the serverBindAddress property is set, it will be used for binding. If the serverBindAddress is not set, but the clientConnectAddress property is set, the server invoker will bind to local host address. If neither the serverBindAddress nor the clientConnectAddress properties are set, then will try to bind to the host specified within the InvokerLocator. If the host value of the InvokerLocator is also not set, will bind to local host.
When serverBindAddress is not set but clientConnectAddress is, "the server invoker will bind to the local host address".
Is that true? Do I read that right - if only clientConnectAddress is given, it will actually bind to the locahost? (what does this mean when it says "the local host address")? That doesn't seem right. If I don't provide a serverBindAddress, then it should automatically assume the host within the InvokerLocater URL should be the one I bind to.
I assume this is a mistake in the documentation - I actually haven't tested what "really" happens, but just reading it seems like its either a wrong way to implement this or its just an error in the docs.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021973#4021973
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021973
19Â years, 1Â month
[EJB 3.0] - Cannot find a suitable constructor
by chrismalan
I have a custom util class called LessonView. It looks like this:
public class LessonView{
| private String subject;
| private int year, count;
|
| public LessonView(){}
|
| public LessonView(String subject, int year, int count){
| sets the variables via setters
| }
|
| public getters and setters
| }
Then I have a query:
"select new LessonView(l.subject, l.year, count(*)) from Lesson l group by l.lesson, l.year order by l.lesson, l.year";
This throws exceptions telling me there is no suitable constructor. When the count(*) is removed everything works fine. I have used custom classes before with sum(whatever.k) and it worked fine. I have also tried count(l.id), same results.
Any idea how to fix this? The database is MySQL.
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021964#4021964
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021964
19Â years, 1Â month
[JBoss Seam] - Re: Seam Email - IllegalStateException: No Factories configu
by bsmithjj
These methods are not called by JSF - rather, they are the points at which I invoke my MailSenderBean.sendEmailMessage() method. In both (all) cases, I put some objects in event scope (for rendering) and invoke sendEmailMessage(). Here's the code for one invokation:
| // contextual email data
| Contexts.getEventContext().set(
| "accessRequest",
| accessRequest
| );
| Contexts.getEventContext().set(
| "accessRequestUser",
| QueryEPeopleUtil.findUserByUid(accessRequest.getUserId())
| );
| mailSender.sendEmailMessage(
| EmailTemplateType.UserManagerRejectedRequest.getTemplateFilePath()
| );
|
Here is the relevant portions of MailSenderBean:
| @Stateless
| @Name("mailSenderBean")
| public class MailSenderBean implements MailSender {
|
| private Log log = LogFactory.getLog(MailSenderBean.class);
|
| @In(required=false)
| private EmailMessage emailMessage;
|
| @In(create = true)
| private Session mailSession;
|
| @PersistenceContext(unitName = "accessControlDatabase")
| private EntityManager em;
|
| @In(create = true)
| private Renderer renderer;
|
| ....
|
| public String sendEmailMessage(String templateFile) {
| try {
| log.info("sending email: "+templateFile);
| renderer.render(templateFile);
| log.info("...mailt sent(?)");
| return "success";
|
| } catch (Exception e) {
| log.error(e,e);
| }
| return null;
| }
|
| }
|
The only other thing I could do is dump the classloaders from a factory method that supplieds a 'mailConfiguration' object during rendering of the email - I tried this, but since the factory method is an SLSB method, both calls show the same classloader - the EAR classloader.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021950#4021950
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021950
19Â years, 1Â month