[Persistence, JBoss/CMP, Hibernate, Database] - Re: How to do a Max in a sub query...
by arnieOag
This compiles and runs but doesn't get rid of the first record.
| from us.tx.state.oag.olrap.db.InfoApplication as apps
| where
| apps.codeStatus.statusId = :codeStatus
| and apps.infoWorkflows.emplid = :emplId
| and apps.infoWorkflows.entryDate = ( select max(wf.entryDate)
| from apps.infoWorkflows wf
| where wf.infoApplication.applicationId = apps.applicationId
| )
| order by apps.createdDate asc
|
The SQL generated is a little off...
| 13:13:04,031 INFO [STDOUT] Hibernate: select infoapplic0_.application_id as applicat1_494_, infoapplic0_.fiscal_year_id as fiscal2_494_, infoapplic0_.evaluation_id as evaluation3_494_, infoapplic0_.status_id as status4_494_, infoapplic0_.base_award as base5_494_, infoapplic0_.closed_date as closed6_494_, infoapplic0_.created_date as created7_494_, infoapplic0_.emplid as emplid494_, infoapplic0_.hire_date as hire9_494_, infoapplic0_.job_code as job10_494_, infoapplic0_.last_eval_date as last11_494_, infoapplic0_.months_of_service as months12_494_, infoapplic0_.ok_with_bar as ok13_494_, infoapplic0_.submitted_date as submitted14_494_, infoapplic0_.calculated_award as calculated15_494_, infoapplic0_.actual_award as actual16_494_, infoapplic0_.award_date as award17_494_, infoapplic0_.cr_who as cr18_494_, infoapplic0_.cr_when as cr19_494_, infoapplic0_.up_who as up20_494_, infoapplic0_.up_when as up21_494_ from info_application infoapplic0_, info_workflow infoworkfl1_, info_workflow infoworkfl2_ where infoapplic0_.application_id=infoworkfl2_.application_id and infoapplic0_.application_id=infoworkfl1_.application_id and infoapplic0_.status_id=? and infoworkfl1_.emplid=? and infoworkfl2_.entry_date=(select max(infoworkfl3_.entry_date) from info_workflow infoworkfl3_ where infoapplic0_.application_id=infoworkfl3_.application_id and infoworkfl3_.application_id=infoapplic0_.application_id) order by infoapplic0_.created_date asc
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118813#4118813
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118813
18 years, 6 months
[JBoss Seam] - Re: Strange behaviour of Seam Mail when sending unsynchonize
by MSchmidke
Yes, but to explain it I must go a little deeper.
My template looks like
| <ui:repeat value="#{recipients}" var="rec">
| <m:to>#{rec}</m:to>
| ....
| </ui:repeat>
|
and recipients gets into the context by
| @Asynchronous
| public void send(List<String> recipients) {
| Context c=Contexts.getEventContext();
| c.set("recipients", recipients);
| renderer.render("...");
| }
|
The caller is a jBPM action class with:
| Mailhandler mh=(Mailhandler)Components.getInstance(Mailhandler.class);
| mh.send(new Vector<String>(getRecipients()));
|
If I only send one mail, everything works fine. If I send two at the same time (two mail actions in jBPM which are executed immediately one after the other), I get some error from class InternetAddress telling the recipient's syntax is wrong ("@domain" is missing). I think either the ui:repeat or the m:to gets confused in some way when simultaneously used in multiple threads.
I checked everything, I can't find any other synchronizity side effect (for example in the recipients list - everything is copied before usage), so I think it must be some issue with the renderer.
(I wrote this all from memory; if you need even more info, let me know, I'll post the exact strack trace when I'm back in office tomorrow)
Marcus.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118810#4118810
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118810
18 years, 6 months
[Performance Tuning] - Re: jboss420GA, Out of memory, with -Xmx1300m -XX:PermSize=3
by javahollic
Thanks but that's been done, the problem is that by setting those values (in subject) my web application still only sees 353MB total memory as opposed to 1G+ that should be available.
I'm getting out of memory errors during high load (complex page/backup etc) but I cant figure out where / if there are any internal jboss settings for memory allocation to web application etc....
my jboss startup screen looks like:
anonymous wrote :
| ===============================================================================
|
| JBoss Bootstrap Environment
|
| JBOSS_HOME: D:\apps\jboss-4.2.0.GA
|
| JAVA: d:\apps\jdk1.6.0_03\bin\java
|
| JAVA_OPTS: -Dprogram.name=run.bat -server -Xmx1300m -XX:MaxPermSize=378m -XX:PermSize=378M -Dsun.rmi.dgc.client.gcInterval=360000 -Dsun.rmi.dgc.server.gcInterval=360000 -Djava.awt.headless=true -Dcom.sun.management.jmxremote
|
| CLASSPATH: d:\apps\jdk1.6.0_03\lib\tools.jar;D:\apps\jboss-4.2.0.GA\bin\run.jar
|
| ===============================================================================
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118780#4118780
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118780
18 years, 6 months
[JBoss Portal] - Re: PortletBridge: Facelets not working
by ebephil
Concerning Facelets: configuration error :-) I didn't pass the path to my taglib in the web.xml. I don't know why it worke before, maybe I just overwrote it when I updated my configuration. At least it's easy to fix:
| <context-param>
| <param-name>facelets.LIBRARIES</param-name>
| <param-value>/WEB-INF/facelets/tags/foo.taglib.xml</param-value>
| </context-param>
|
|
That's one of the things I learned to love about Facelets: Verbose error messages that pop right into your eye :-)
I also get quite a few 'Prefix for attributes in portlet session scope not found' warnings. I didn't dig into that yet, I assumed it was caused by the early development stage of the AjaxFacesPortlet. However, it still seems to happen with the portlet bridge (but hey, I'm using an svn snapshot). I pasted the warning below, but won't take a further look at it until tomorrow. BTW: It doesn't seem to affect my app, it just fills the log (quite often indeed as I use <a4j:poll />).
Thanks again for the hint Wesley and, according to the svn log, thank you even more for the comprehensive RichFacesPortlet :-)
| 18:48:46,072 WARN [lifecycle] executePhase(RESTORE_VIEW 1,org.ajax4jsf.portlet.context.FacesContextImpl@1e9b9ae) threw exception
| javax.faces.FacesException: Prefix for attributes in portlet session scope not found
| at org.ajax4jsf.portlet.context.ServletContextImpl.getSessionPrefix(ServletContextImpl.java:255)
| at org.ajax4jsf.portlet.context.ServletContextImpl.getSession(ServletContextImpl.java:352)
| at org.ajax4jsf.portlet.application.PortletStateHolder.getInstance(PortletStateHolder.java:62)
| at org.ajax4jsf.portlet.application.PortalStateManager.restoreStateFromSession(PortalStateManager.java:39)
| at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:221)
| at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290)
| at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
| at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
| at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
| at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
| at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
| at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:143)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| 18:48:46,074 ERROR [[FacesServlet]] Servlet.service() for servlet FacesServlet threw exception
| javax.faces.FacesException: Prefix for attributes in portlet session scope not found
| at org.ajax4jsf.portlet.context.ServletContextImpl.getSessionPrefix(ServletContextImpl.java:255)
| at org.ajax4jsf.portlet.context.ServletContextImpl.getSession(ServletContextImpl.java:352)
| at org.ajax4jsf.portlet.application.PortletStateHolder.getInstance(PortletStateHolder.java:62)
| at org.ajax4jsf.portlet.application.PortalStateManager.restoreStateFromSession(PortalStateManager.java:39)
| at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:221)
| at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290)
| at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
| at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
| at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
| at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
| at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
| at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:143)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118779#4118779
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118779
18 years, 6 months
[Management, JMX/JBoss] - Class loader with Scheduler service
by bbleafs
I have deployed Jar file with my classes, and I have a JBoss scheduler service defined in my deploy directory.
When I copy a new Jar file to deploy a new version of my application, the scheduler seems to execute old code. It's like the schedule classloader is holding onto references to the old code.
The only way I've figured out how to fix this is to restart JBoss, which is obviously not desirable.
Is there any way around this?
Here is how my schedule is setup:
| <mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=ScoFTP">
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableClass">com.lvlomas.erp.scheduler.ScoTenderConfirmationProcessor</attribute>
| <attribute name="SchedulableArguments"></attribute>
| <attribute name="SchedulableArgumentTypes"></attribute>
| <attribute name="InitialStartDate">0</attribute>
| <attribute name="SchedulePeriod">50000</attribute>
| <attribute name="InitialRepetitions">-1</attribute>
| <attribute name="FixedRate">true</attribute>
| </mbean>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118778#4118778
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118778
18 years, 6 months
[Persistence, JBoss/CMP, Hibernate, Database] - Re: How to do a Max in a sub query...
by arnieOag
I've tried this:
| from us.tx.state.oag.olrap.db.InfoApplication as apps
| where apps.codeStatus.statusId = :codeStatus
| and apps.infoWorkflows.emplid = :emplId
| and apps.infoWorkflows.entryDate = (
| select max(entryDate) from apps.infoWorkflows wf
| where wf.infoApplication.applicationId = apps.applicationId
| )
| order by apps.createdDate asc
|
but I'm getting:
|
| java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.AggregateNode
| \-[AGGREGATE] AggregateNode: 'max'
| \-[IDENT] IdentNode: 'entryDate' {originalText=entryDate}
|
| at org.hibernate.hql.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:145)
| at org.hibernate.hql.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:712)
| at org.hibernate.hql.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:536)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:645)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4049)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3528)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1762)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1690)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:577)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
| at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
| at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
| at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
| at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77)
| at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56)
| at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
| at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:400)
| at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:351)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
| at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:231)
| at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:155)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy7.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:490)
| at java.lang.Thread.run(Thread.java:619)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118772#4118772
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118772
18 years, 6 months
[JBoss Seam] - Datasource Issue in WebLogic 9.2
by neilac333
My Seam-JPA application can't be deployed to WebLogic 9.2 because there is a JNDI error when trying to locate the datasource. I have set up a datasource in the Admin Console called java:/myWebAppDS. Then, in my persistence.xml I have this:
| <persistence-unit name="srmWebapp" transaction-type="JTA">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/myWebAppDS</jta-data-source>
| <properties>
| [Some stuff...]
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup" />
| <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.CMTTransactionFactory" />
| [More stuff...]
| </properties>
| </persistence-unit>
|
This seems right to me, but then I get this exception:
| javax.naming.NameNotFoundException: While trying to look up /myWebAppDS in /app/webapp/myProject.war/3153055.; remaining name '/myWebAppDS'
| at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
| at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:142)
| at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:269)
| at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:362)
| at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
| at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
| at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
| at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
| at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
| at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
| at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
| at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
| at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81)
| at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
| at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
| at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
|
|
I cannot figure out what the issue is, so any insight is appreciated.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118769#4118769
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118769
18 years, 6 months
[Persistence, JBoss/CMP, Hibernate, Database] - How to do a Max in a sub query...
by arnieOag
I need to select records that are linked together based on two parameters, one in table a the other in table b. The named query below is the item in question.
| <class name="us.tx.state.oag.olrap.db.InfoApplication" table="info_application">
|
| <id name="applicationId" type="java.math.BigDecimal">
| <column name="application_id" precision="18" scale="0" />
| <generator class="assigned" />
| </id>
| <many-to-one name="codeFiscalYear" class="us.tx.state.oag.olrap.db.CodeFiscalYear"
| fetch="select" lazy="false">
| <column name="fiscal_year_id" precision="18" scale="0" not-null="true" />
| </many-to-one>
| <many-to-one name="codeEvalStatus" class="us.tx.state.oag.olrap.db.CodeEvalStatus"
| fetch="select" lazy="false">
| <column name="evaluation_id" precision="18" scale="0" not-null="true" />
| </many-to-one>
| <many-to-one name="codeStatus" class="us.tx.state.oag.olrap.db.CodeStatus"
| fetch="select" lazy="false">
| <column name="status_id" precision="18" scale="0" not-null="true" />
| </many-to-one>
| <property name="baseAward" type="java.math.BigDecimal">
| <column name="base_award" precision="11" not-null="true" />
| </property>
| <property name="closedDate" type="java.sql.Timestamp">
| <column name="closed_date" length="23" />
| </property>
| <property name="createdDate" type="java.sql.Timestamp">
| <column name="created_date" length="23" not-null="true" />
| </property>
| <property name="emplid" type="java.lang.String">
| <column name="emplid" length="11" not-null="true" />
| </property>
| <property name="hireDate" type="java.sql.Timestamp">
| <column name="hire_date" length="23" not-null="true" />
| </property>
| <property name="jobCode" type="java.lang.String">
| <column name="job_code" length="6" not-null="true" />
| </property>
| <property name="lastEvalDate" type="java.sql.Timestamp">
| <column name="last_eval_date" length="23" />
| </property>
| <property name="monthsOfService" type="java.math.BigDecimal">
| <column name="months_of_service" precision="4" scale="0" not-null="true" />
| </property>
| <property name="okWithBar" type="java.lang.Integer">
| <column name="ok_with_bar" not-null="true" />
| </property>
| <property name="submittedDate" type="java.sql.Timestamp">
| <column name="submitted_date" length="23" not-null="false" />
| </property>
| <property name="calculatedAward" type="java.math.BigDecimal">
| <column name="calculated_award" precision="11" not-null="true" />
| </property>
| <property name="actualAward" type="java.math.BigDecimal">
| <column name="actual_award" precision="18" not-null="true" />
| </property>
| <property name="awardDate" type="java.sql.Timestamp">
| <column name="award_date" length="23" />
| </property>
| <property name="crWho" type="java.lang.String">
| <column name="cr_who" length="20" not-null="true" />
| </property>
| <property name="crWhen" type="java.sql.Timestamp">
| <column name="cr_when" length="23" not-null="true" />
| </property>
| <property name="upWho" type="java.lang.String">
| <column name="up_who" length="20" not-null="true" />
| </property>
| <property name="upWhen" type="java.sql.Timestamp">
| <column name="up_when" length="23" not-null="true" />
| </property>
| <set name="infoLogs" inverse="true" lazy="true" fetch="select" cascade="all-delete-orphan">
| <key>
| <column name="application_id" precision="18" scale="0" not-null="true" />
| </key>
| <one-to-many class="us.tx.state.oag.olrap.db.InfoLog" />
| </set>
| <set name="infoLenders" inverse="true" lazy="true" fetch="select" cascade="all-delete-orphan">
| <key>
| <column name="application_id" precision="18" scale="0" not-null="true" />
| </key>
| <one-to-many class="us.tx.state.oag.olrap.db.InfoLender" />
| </set>
| <set name="infoWorkflows" inverse="true" lazy="false" fetch="select" cascade="all-delete-orphan">
| <key>
| <column name="application_id" precision="18" scale="0" not-null="true" />
| </key>
| <one-to-many class="us.tx.state.oag.olrap.db.InfoWorkflow" />
| </set>
| <set name="infoLoans" inverse="true" lazy="true" fetch="select" cascade="all-delete-orphan">
| <key>
| <column name="application_id" precision="18" scale="0" not-null="true" />
| </key>
| <one-to-many class="us.tx.state.oag.olrap.db.InfoLoan" />
| </set>
| <set name="infoEmployees" inverse="true" lazy="false" fetch="select" cascade="all-delete-orphan" >
| <key>
| <column name="application_id" precision="18" scale="0" not-null="true" />
| </key>
| <one-to-many class="us.tx.state.oag.olrap.db.InfoEmployee"/>
| </set>
| </class>
|
| <query name="ApplicationsByHrEmployee">
| from us.tx.state.oag.olrap.db.InfoApplication as apps
| where apps.codeStatus.statusId = :codeStatus
| and apps.infoWorkflows.emplid = :emplId
| order by apps.createdDate asc
| </query>
|
The workflow definition is:
| <?xml version="1.0" encoding="utf-8"?>
| <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
| "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
| <!--
| Mapping file autogenerated by MyEclipse Persistence Tools
| -->
| <hibernate-mapping>
| <class name="us.tx.state.oag.olrap.db.InfoWorkflow" table="info_workflow">
| <id name="workflowId" type="java.math.BigDecimal">
| <column name="workflow_id" precision="18" scale="0" />
| <generator class="assigned" />
| </id>
| <many-to-one name="infoApplication" class="us.tx.state.oag.olrap.db.InfoApplication"
| fetch="select" lazy="proxy">
| <column name="application_id" precision="18" scale="0" not-null="true" />
| </many-to-one>
| <many-to-one name="codeStatus" class="us.tx.state.oag.olrap.db.CodeStatus"
| fetch="select" lazy="false">
| <column name="status_id" precision="18" scale="0" not-null="true" />
| </many-to-one>
| <property name="commentary" type="java.lang.String">
| <column name="commentary" not-null="true" />
| </property>
| <property name="emplid" type="java.lang.String">
| <column name="emplid" length="11" not-null="true" />
| </property>
| <property name="entryDate" type="java.sql.Timestamp">
| <column name="entry_date" length="23" not-null="true" />
| </property>
| <property name="crWho" type="java.lang.String">
| <column name="cr_who" length="20" not-null="true" />
| </property>
| <property name="crWhen" type="java.sql.Timestamp">
| <column name="cr_when" length="23" not-null="true" />
| </property>
| <property name="upWho" type="java.lang.String">
| <column name="up_who" length="20" not-null="true" />
| </property>
| <property name="upWhen" type="java.sql.Timestamp">
| <column name="up_when" length="23" not-null="true" />
| </property>
| </class>
|
| <sql-query name="getCurrentWorkflowForApplication" callable="true">
| <return alias="workflow" class="us.tx.state.oag.olrap.db.InfoWorkflow"/>
| { call get_crnt_wkfl_for_app_spr(?) }
| </sql-query>
| </hibernate-mapping>
|
The problem is, the named query needs to include a max() on entry_date from the workflow table, basically, this the SQL I need:
| select * from info_application a, info_workflow b
| where a.application_id = b.application_id
| and b.entry_date = (select max(entry_date) from info_workflow c
| where a.application_id = c.application_id)
| and a.status_id = :codeStatus and b.emplid = :emplId
|
The SQL works, in that it gives me the most recent record for that employee and type. But I cannot figure out how to write that in HQL.
Can anyone help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118765#4118765
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118765
18 years, 6 months
[JBoss Seam] - Re: HTTPS Scheme in pages.xml without httpsport or default p
by nkhilnani
oh, for info for others... the precedence should be FRAMEWORK , not BUILT_IN. Using built gives and error indicating two components were defined with the same precedence.
>From the source code for the Install annotation
| /**
| * Precedence of all built-in Seam components
| */
| public static final int BUILT_IN = 0;
| /**
| * Precedence to use for components of frameworks
| * which extend Seam
| */
| public static final int FRAMEWORK = 10;
| /**
| * Predence of application components (the
| * default precedence)
| */
| public static final int APPLICATION = 20;
| /**
| * Precedence to use for components which override
| * application components in a particular deployment
| */
| public static final int DEPLOYMENT = 30;
|
| /**
| * Precedence to use for mock objects in tests
| */
| public static final int MOCK = 40;
|
Thanks All!
Nik
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118760#4118760
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118760
18 years, 6 months