[JNDI/Naming/Network] - Order of service initialization
by tbolpauly
We have a connection pool (xa-datasource), accessed through JNDI, specified in
[JBoss]\server\default\deploy\oracle-xa-ds.xml, and we're having difficulty accessing it during servlet (filter) init. Our filters (in their init methods) access other global objects that are themselves initialized and require the data connection.
>From the log file it's clear that the connection pool service starts after the filters initialize, which is too late, because the filters and other objects have already failed to initialize properly. Of course, if we add a try block surrounding the context.lookup("java:[ourConnectionPool]") and subsequent catch block containing the hard-coded connection process, everything works fine. It's an ok work-around for now, but there ought to be an elegant way of doing this.
We've tried moving the xml code to other files, namely jboss-service.xml and server.xml, but that doesn't seem to change anything.
Can anyone give me an answer as to whether this works as it does by design or whether I'm just not setting it up properly? Is there any way to ensure that the connection pool is set up before the filters start their initialization?
TIA
Paul T.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999657#3999657
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999657
19 years, 3 months
[JBoss jBPM] - Timer not created in database, yet the hibernate log shows i
by jtyrrell
I am running through the example getting started with jBPM examples on the JBoss wiki. I modified the example app to have the following:
<state name="auction">
| <timer name="testTimer"
| duedate='1 business minutes'
| repeat='.5 business minutes'
| transition='time-out-transition' >
| <action class="com.jboss.test.Reminder"/>
| </timer>
| </state>
However, when I am running this as the default created project in Eclipse I get the followiing error:
17:47:12,865 [main] DEBUG SchedulerThread : checking for timers
17:47:12,884 [main] WARN JDBCExceptionReporter : SQL Error: -22, SQLState: S0002
17:47:12,884 [main] ERROR JDBCExceptionReporter : Table not found in statement [select top ? timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where (timer0_.EXCEPTION_ is null) and timer0_.ISSUSPENDED_<>1 order by timer0_.DUEDATE_ asc]
17:47:12,885 [main] ERROR SchedulerSession : org.hibernate.exception.SQLGrammarException: could not execute query using iterate
17:47:12,885 [main] DEBUG JbpmContext : closing JbpmContext
17:47:12,886 [main] DEBUG Services : closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@19855ed
17:47:12,886 [main] DEBUG DbPersistenceService : committing hibernate transaction
17:47:12,887 [main] DEBUG DbPersistenceService : closing hibernate session
17:47:12,888 [main] INFO SchedulerThread : runtime exception while executing timers
org.jbpm.JbpmException: couldn't find timers from the database
at org.jbpm.db.SchedulerSession.findTimersByDueDate(SchedulerSession.java:99)
Looking at the source the code is trying to get the Timer table...but in looking further up my stack of code I see this:
17:47:08,746 [main] INFO Configuration : Reading mappings from resource: org/jbpm/scheduler/exe/Timer.hbm.xml
17:47:08,761 [main] INFO HbmBinder : Mapping class: org.jbpm.scheduler.exe.Timer -> JBPM_TIMER
I have read through the forms and copied the contents of the jbpm.cfg.xml file into my eclipse created jBPM project and also the hibernate.cfg.xml file.
If anyone can shed some light on what other knobs I need to twist to make this work in a standalone environment.
Please note I have the following code running, and this is where the code that can not find the Timer table is executed within:
| SchedulerThread scheduler = new SchedulerThread();
| scheduler.setInterval(2000);
| scheduler.run();
|
and this is from where the error is created.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999656#3999656
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999656
19 years, 3 months
[JBoss Seam] - Re: a4j:mediaOutput and SeamFaceletViewHandler
by joff
I get a very similar exception myself, using Seam 1.1GA, and Ajax4JSF 1.0.5 with the <a4j:mediaOutput> tag.
I'm wanting to display an image I have stored in my database, but also, in order to eliminate mis-configuration of my own application as a factor, I've modified the Hotel booking example thus:
in Hotel.java, I've added:
@Transient private byte[] image;
|
| public Hotel() {
| try {
| FileInputStream fis = new FileInputStream("/testimage.png");
| image = new byte[8000];
| fis.read(image);
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
|
| public void renderImage(OutputStream out, Object data) throws IOException {
| out.write(this.image);
| }
and in view/hotel.xhtml:
<div class="label">Image:</div>
| <div class="output">
| <a4j:mediaOutput createContent="#{hotel.renderImage}" value="#{hotel.name}.png" element="img" mimeType="image/png" />
| </div>
and I get this exception:
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seam-booking].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
|
| java.lang.IllegalStateException: No application context active
| at org.jboss.seam.Component.forName(Component.java:1559)
| at org.jboss.seam.Component.getInstance(Component.java:1609)
| at org.jboss.seam.Component.getInstance(Component.java:1592)
| at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:46)
| at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
| at com.sun.el.parser.AstValue.getTarget(AstValue.java:62)
| at com.sun.el.parser.AstValue.invoke(AstValue.java:147)
| at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
| at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
| at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
| at org.ajax4jsf.framework.resource.UserResource.send(UserResource.java:92)
| at org.ajax4jsf.framework.resource.ResourceLifecycle.send(ResourceLifecycle.java:79)
| at org.ajax4jsf.framework.resource.InternetResourceService.sendResource(InternetResourceService.java:192)
| at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:177)
| at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:97)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:200)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
Can someone help?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999655#3999655
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999655
19 years, 3 months
[Messaging, JMS & JBossMQ] - Install with 'all' option does not setup HA-JMS?
by batter
Not sure if this is an MQ or clustering question, but somewhere in the documentation it stated that the all option when installing jboss would setup MQ to be a HA singleton. Unfortunately my deploy-hasingleton is completely empty.
Is it enough to move the deploy/jms directory to the deploy-hasingleton, or is there some documentation on the steps one should take to make this a singleton?
Another somewhat related question is on how to setup MDB's or services that are dependent on queues and topics. My current thinking is that I have one service which really only contains my queue and topic dependencies that get deployed in the hasingleton directory. Then I have another service that depends on the barrier and that gets deployed on all nodes in a cluster. Other services can then depend on this service and be guaranteed that the queues and topics are up and running.
Now I am a complete n00wbie with this environment and open for suggestions on the best way to set this up.
Thanks in advance for pointers.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999654#3999654
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999654
19 years, 3 months
[JBoss Seam] - Re: Seam-gen
by ector7280
Here's the stacktrace:
| $ ant -verbose generate-entities
| Apache Ant version 1.6.5 compiled on June 2 2005
| Buildfile: build.xml
| Detected Java version: 1.5 in: c:\Program Files\Java\jdk1.5.0_08\jre
| Detected OS: Windows XP
| parsing buildfile C:\jboss-seam-1.1.0.GA\seam-gen\build.xml with URI = file:///C:/jboss-seam-1.1.0.GA/seam-gen/build.xml
|
| Project base dir set to: C:\jboss-seam-1.1.0.GA\seam-gen
| [property] Loading C:\jboss-seam-1.1.0.GA\seam-gen\build.properties
| Build sequence for target(s) `generate-entities' is [validate-workspace, validate-project, generate-entities]
| Complete build sequence is [validate-workspace, validate-project, generate-entities, undeploy, setup-filters, deploy, fi
| le-copy-wtp, action-input, new-conversation, entity-input, copy-lib, new-form, new-entity, setup, update-project, clean,
| restart, explode, help, delete-project, file-copy, new-project, new-action, settings, reset, unexplode, ]
|
| validate-workspace:
|
| validate-project:
|
| generate-entities:
| [hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
| [hibernate] 1. task: hbm2java (Generates a set of .java files)
| [hibernate] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files)
| [hibernate] To get the full stack trace run ant with -verbose
| [hibernate] org.hibernate.exception.DataException: Error while reading column meta data for SYS.SYSNTQ/5M5j/MQNSejz17KVY
| onQ==
| [hibernate] java.sql.SQLException: ORA-01424: missing or illegal character following the escape character
| [hibernate]
|
| BUILD FAILED
| C:\jboss-seam-1.1.0.GA\seam-gen\build.xml:665: org.hibernate.exception.DataException: Error while reading column meta da
| ta for SYS.SYSNTQ/5M5j/MQNSejz17KVYonQ==
| at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:222)
| at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:185)
| at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
| at org.apache.tools.ant.Task.perform(Task.java:364)
| at org.apache.tools.ant.Target.execute(Target.java:341)
| at org.apache.tools.ant.Target.performTasks(Target.java:369)
| at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
| at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
| at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
| at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
| at org.apache.tools.ant.Main.runBuild(Main.java:668)
| at org.apache.tools.ant.Main.startAnt(Main.java:187)
| at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
| at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
| Caused by: org.hibernate.exception.DataException: Error while reading column meta data for SYS.SYSNTQ/5M5j/MQNSejz17KVYo
| nQ==
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
| at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:146)
| at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:546)
| at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:84)
| at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:828)
| at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:118)
| at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:89)
| at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
| at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:82)
| at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
| at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:298)
| at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:314)
| at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
| at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask.java:34)
| at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
| at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:182)
| ... 12 more
| Caused by: java.sql.SQLException: ORA-01424: missing or illegal character following the escape character
|
| at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
| at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
| at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
| at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
| at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
| at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
| at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1061)
| at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
| at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
| at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
| at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)
| at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:262)
| at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:124)
| ... 26 more
| --- Nested Exception ---
| org.hibernate.exception.DataException: Error while reading column meta data for SYS.SYSNTQ/5M5j/MQNSejz17KVYonQ==
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
| at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:146)
| at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:546)
| at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:84)
| at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:828)
| at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:118)
| at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:89)
| at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
| at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:82)
| at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
| at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:298)
| at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:314)
| at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
| at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask.java:34)
| at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
| at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:182)
| at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
| at org.apache.tools.ant.Task.perform(Task.java:364)
| at org.apache.tools.ant.Target.execute(Target.java:341)
| at org.apache.tools.ant.Target.performTasks(Target.java:369)
| at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
| at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
| at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
| at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
| at org.apache.tools.ant.Main.runBuild(Main.java:668)
| at org.apache.tools.ant.Main.startAnt(Main.java:187)
| at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
| at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
| Caused by: java.sql.SQLException: ORA-01424: missing or illegal character following the escape character
|
| at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
| at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
| at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
| at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
| at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
| at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
| at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1061)
| at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
| at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
| at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
| at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)
| at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:262)
| at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:124)
| ... 26 more
|
| Total time: 3 minutes 50 seconds
|
|
It worked fine when I set default_schema.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999652#3999652
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999652
19 years, 3 months