[JBoss Seam] - EntityManager problem...Urgent
by argomauro
Hi,
I've a problem with EntityManager configuration on my Seam project,because when i use the Entity manager components, Jboss retrive an EntityMangaer not bound exception.
My persistence.xml file is:
| <persistence-unit name="DAPem">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/MysqlDS</jta-data-source>
| <property name="hibernate.show_sql" value="true" />
| <!-- These are the default for JBoss EJB3, but not for HEM: -->
| <property name="hibernate.cache.provider_class"
| value="org.hibernate.cache.HashtableCacheProvider" />
| <property name="hibernate.transaction.manager_lookup_class"
| value="org.hibernate.transaction.JBossTransactionManagerLookup" />
| <property name="jboss.entity.manager.factory.jndi.name"
| value="java:/DAPem" />
| </persistence-unit>
|
My components.xml file is:
| <components>
| <component name="org.jboss.seam.core.init">
| <property name="myFacesLifecycleBug">true</property>
| <property name="jndiPattern">DAP/#{ejbName}/local</property>
| </component>
| <!-- 120 second conversation timeout -->
| <component name="org.jboss.seam.core.manager">
| <property name="conversationTimeout">120000</property>
| </component>
|
| <component class="org.jboss.seam.core.Ejb" installed="false" />
|
| <component name="em"
| class="org.jboss.seam.core.ManagedPersistenceContext">
| <property name="persistenceUnitJndiName">
| java:/DAPem
| </property>
| </component>
| </components>
|
The code where I call the "em" component is:
| public Object getAsObject(FacesContext facesContext,
| UIComponent component,
| String str)
| throws ConverterException{
| Object objReturn = null;
| if (str == null || str.length()==0 || EMPTY.equals(str)) {
| return objReturn;
| }
| EntityManager em = (EntityManager)Component.getInstance("em", true);
| EntityProfilo profilo = (EntityProfilo)em.find(EntityProfilo.class,new Integer(str));
| objReturn = profilo;
| return objReturn;
| }
|
I've read The Seam Reference Guide, step to step in the percistence section, but my application don't work.
If you have an idea or if i have ommitted something, please help me.
Thanks...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981593#3981593
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981593
19 years, 6 months
[JBoss Portal] - JBoss Portal Startup - Issue
by rameshkumar132
Hi All,
I am facing some issues with the jboss portal startup.
The following is the details:
C:\jboss-portal>dir
Volume in drive C is WINDOWSXP
Volume Serial Number is 2812-FC38
Directory of C:\jboss-portal
09/18/2006 07:11 AM .
09/18/2006 07:11 AM ..
05/02/2005 08:28 PM 49,270 jar-versions.xml
06/19/2005 04:58 PM 942 jboss-portal-bin.README
05/02/2005 08:28 PM 21,259 readme.html
05/02/2005 08:28 PM 3,869 readme_j2ee.html
09/18/2006 07:11 AM server
09/18/2006 07:11 AM lib
09/18/2006 07:11 AM docs
09/18/2006 07:11 AM client
09/18/2006 07:11 AM bin
4 File(s) 75,340 bytes
7 Dir(s) 1,239,015,424 bytes free
C:\jboss-portal>cd bin
C:\jboss-portal\bin>dir
Volume in drive C is WINDOWSXP
Volume Serial Number is 2812-FC38
Directory of C:\jboss-portal\bin
09/18/2006 07:11 AM .
09/18/2006 07:11 AM ..
05/02/2005 08:23 PM 3,539 classpath.sh
05/02/2005 08:24 PM 1,671 deployer.bat
05/02/2005 08:24 PM 2,649 deployer.sh
05/02/2005 08:24 PM 2,463 jboss_init_redhat.sh
05/02/2005 08:24 PM 3,750 jboss_init_suse.sh
05/02/2005 08:23 PM 3,180 run.bat
05/02/2005 08:23 PM 1,491 run.conf
05/02/2005 08:28 PM 33,305 run.jar
05/02/2005 08:23 PM 4,672 run.sh
05/02/2005 08:24 PM 1,813 shutdown.bat
05/02/2005 08:28 PM 17,289 shutdown.jar
05/02/2005 08:24 PM 2,001 shutdown.sh
05/02/2005 08:25 PM 2,149 twiddle.bat
05/02/2005 08:28 PM 39,901 twiddle.jar
05/02/2005 08:25 PM 2,342 twiddle.sh
15 File(s) 122,215 bytes
2 Dir(s) 1,239,015,424 bytes free
C:\jboss-portal\bin>run -c
===============================================================================
.
JBoss Bootstrap Environment
.
JBOSS_HOME: C:\jboss-portal\bin\\..
.
JAVA: C:\Java\j2sdk1.4.2_12\bin\java
.
JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
.
CLASSPATH: C:\Java\j2sdk1.4.2_12\lib\tools.jar;C:\jboss-portal\bin\\run.jar
.
===============================================================================
.
run.bat: option requires an argument -- c
Press any key to continue . . .
C:\jboss-portal\bin>run -c minimal
===============================================================================
.
JBoss Bootstrap Environment
.
JBOSS_HOME: C:\jboss-portal\bin\\..
.
JAVA: C:\Java\j2sdk1.4.2_12\bin\java
.
JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
.
CLASSPATH: C:\Java\j2sdk1.4.2_12\lib\tools.jar;C:\jboss-portal\bin\\run.jar
.
===============================================================================
.
13:59:33,453 INFO [Server] Starting JBoss (MX MicroKernel)...
13:59:33,453 INFO [Server] Release ID: JBoss [Zion] 4.0.2 (build: CVSTag=JBoss_
4_0_2 date=200505022023)
13:59:33,468 INFO [Server] Home Dir: C:\jboss-portal
13:59:33,468 INFO [Server] Home URL: file:/C:/jboss-portal/
13:59:33,468 INFO [Server] Library URL: file:/C:/jboss-portal/lib/
13:59:33,468 INFO [Server] Patch URL: null
13:59:33,468 INFO [Server] Server Name: minimal
13:59:33,468 INFO [Server] Server Home Dir: C:\jboss-portal\server\minimal
13:59:33,468 INFO [Server] Server Home URL: file:/C:/jboss-portal/server/minima
l/
13:59:33,468 INFO [Server] Server Data Dir: C:\jboss-portal\server\minimal\data
13:59:33,468 INFO [Server] Server Temp Dir: C:\jboss-portal\server\minimal\tmp
13:59:33,468 INFO [Server] Server Config URL: file:/C:/jboss-portal/server/mini
mal/conf/
13:59:33,468 INFO [Server] Server Library URL: file:/C:/jboss-portal/server/min
imal/lib/
13:59:33,468 INFO [Server] Root Deployment Filename: jboss-service.xml
13:59:33,468 INFO [Server] Starting General Purpose Architecture (GPA)...
13:59:34,343 INFO [ServerInfo] Java version: 1.4.2_12,Sun Microsystems Inc.
13:59:34,343 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_12-b03
,Sun Microsystems Inc.
13:59:34,343 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
13:59:34,703 INFO [Server] Core system initialized
Failed to boot JBoss:
org.jboss.deployment.DeploymentException: url file:/C:/jboss-portal/server/minim
al/conf/jboss-service.xml could not be opened, does it exist?
at org.jboss.deployment.DeploymentInfo.(DeploymentInfo.java:175)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
at org.jboss.Main.boot(Main.java:195)
at org.jboss.Main$1.run(Main.java:463)
at java.lang.Thread.run(Thread.java:534)
13:59:34,750 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
Shutting down
13:59:34,750 INFO [Server] Shutdown complete
Shutdown complete
Halting VM
Press any key to continue . . .
Need your help and support regarding this.
Regards,
Rameshkumar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981591#3981591
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981591
19 years, 6 months
[JBoss Seam] - Re: Scheduling in Seam?
by modoc
Ok. So the javadoc and chapter 7 are wrong. I still can't get it to work with a long. I've tried on the assumption that it's millis and then when that didn't work seconds.
I may be doing something wrong. There aren't any examples of it that I can find.
Here's my code:
@Asynchronous
| public void processEmailsRecurring(@Expiration
| Date pDate, @IntervalDuration
| long pInterval) {
| mLog.info("proccessEmailsReccurring running...");
| processNewEmails(mIMAPClient.getNewMessages());
| }
|
Which gets called by:
| @Create
| public void doStartService() {
| mLog.info("Starting up...");
| mLog.info("Kicking off recurring email processor.");
| processEmailsRecurring(new Date(), 2);
| }
|
I've tried with 2 and with 60000.
Either way, it starts up, calls the method, which runs once, and never runs again:
| 22:25:17,277 INFO [EmailManager] Starting up...
| 22:25:17,277 INFO [EmailManager] Kicking off recurring email processor.
| 22:25:17,277 INFO [EmailManager] proccessEmailsReccurring running...
|
Any ideas what I'm doing wrong?
Thanks!
Modoc
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981590#3981590
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981590
19 years, 6 months
[JBoss Seam] - Re: Scheduling in Seam?
by modoc
in Chapter 13, it refers to the IntervalDuration as a long (millis I assume?):
@Asynchronous public Timer scheduleAlerts(Alert alert, @Expiration Date date, @IntervalDuration long interval) { ... }
But in Chapter 7, it refers to it as a Date:
@Asynchronous
public void processRecurringPayment(Payment payment, @Expiration Date date, @IntervalDuration Date interval)'
A long doesn't seem to work, and the seam source java comments refer to a Date, however, it doesn't make any sense to me to measure an interval with a date... A date is a fixed date, not a duration or interval. If I am supposed to use a date, how do I create a date for one minute?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981586#3981586
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981586
19 years, 6 months