[Beginner's Corner] - reading application startup files in JBoss 4 vs 5
by Nilesh Thali
Nilesh Thali [http://community.jboss.org/people/jo_atman] created the discussion
"reading application startup files in JBoss 4 vs 5"
To view the discussion, visit: http://community.jboss.org/message/562510#562510
--------------------------------------------------------------
Hello,
We have a slightly modified configuration for our app, that worked in JBoss 4.0.0, but doesn't in JBoss 5.1.0.
We copied the "web" configuration (under JBoss5.1.0/server/web) to create our own setup.
our war file contains a web.xml that specifies a servlet and a properties file that's a parameter for the servlet at startup.
This properties file is at the top level of our JBoss instance.
e.g.
we have
JBoss5.1.0/server/myConfiguration
|-- myServer.properties
|-- deploy
|-- myWar.war
myWar.war has a web.xml containing the following snippet:
<servlet>
<servlet-name>StartListener</servlet-name>
<servlet-class>com.sabre.common.webservices.server.ServerStartupService</servlet-class>
<init-param>
<param-name>startupFile</param-name>
<param-value>*myServer.properties*</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
JBoss 4.0.0 had no problems finding the myServer.properties file located in myConfiguration, but JBoss 5.1.0.GA throws a "FileNotFoundException".
Any ideas on what we need to change to get it to work?
I guess the second question would be - what are other (better) ways of doing this?
Thanks,
Nilesh
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/562510#562510]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[Datasource Configuration] - Jboss-6-M4 + postgreSQL, hbm2DDL task do not update the database schema ?
by Mariano Kocalka Machala
Mariano Kocalka Machala [http://community.jboss.org/people/marianokm] created the discussion
"Jboss-6-M4 + postgreSQL, hbm2DDL task do not update the database schema ?"
To view the discussion, visit: http://community.jboss.org/message/562460#562460
--------------------------------------------------------------
Hi Everyone!
I've just moved from jboss-5 to jboss-6-M4 for test pruposes.
When i was trying to deploy my ejb3 application, i realized that entity beans mapped against my postgreSQL 8.4 database, where actually created under the "public schema" instead of the "adonis schema" which i'd specified in the proper persistence.xml file.
This never happened before with jboss5 and now, when i deploy my ejb application, all tables (Own's + System ones like timers) are being created within the public schema.
Any clue ?
Thks in advance
==================================
This is my postgreDS configuration
==================================
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:postgresql://localhost:5432/adonis</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>adonis</user-name>
<password>adonis</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<metadata>
<type-mapping>PostgreSQL 8.0</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
========================================
This is my persistence.xml configuration
========================================
<?xml version="1.0" encoding="UTF-8"?>
<persistence
version="2.0"
xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit
name="adonis">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/DefaultDS</jta-data-source>
<properties>
<property
name="hibernate.dialect"
value="org.hibernate.dialect.PostgreSQLDialect" />
<property
name="hibernate.query.substitutions"
value="true TRUE, false FALSE" />
<property
name="hibernate.default_schema"
value="adonis" />
<property
name="hibernate.hbm2ddl.auto"
value="update" />
<property
name="hibernate.show_sql"
value="false" />
<property
name="hibernate.format_sql"
value="false" />
<property
name="hibernate.use_sql_comments"
value="false" />
<property
name="hibernate.order_updates"
value="true" />
<property
name="hibernate.generate_statistics"
value="false" />
<property
name="hibernate.cache.use_second_level_cache"
value="true" />
<property
name="hibernate.cache.use_query_cache"
value="false" />
<property
name="hibernate.cache.region.factory_class"
value="org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactory" />
<property
name="hibernate.cache.region.jbc2.cachefactory"
value="java:CacheManager" />
<property
name="hibernate.cache.region.jbc2.cfg.entity"
value="mvcc-entity" />
<property
name="hibernate.cache.region.jbc2.cfg.query"
value="local-query" />
</properties>
</persistence-unit>
</persistence>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/562460#562460]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[jBPM] - JBPM4.4 - tomcat 6.0.29
by Frank B
frankbe [http://community.jboss.org/people/frankbe] created the discussion
"JBPM4.4 - tomcat 6.0.29"
To view the discussion, visit: http://community.jboss.org/message/562171#562171
--------------------------------------------------------------
Hi All,
I think there is a small issue with the JBPM4.4 Tomcat installation. I just downloaded the latest JBPM version 4.4 and tried to install it by using the ant target "demo.setup.tomcat". The target tries to download apache tomcat 6.0.26, but it seems that this version is no longer available?! I checked the apache tomcat download site and recognized the current version is 6.0.29... So I switched the tomcat version property to that version and everything worked fine until I tried to stop tomcat after “demo.setup.tomcat” by calling the ant target " demo.teardown.tomcat" (see logging snippet):
16.09.2010 14:51:28 org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
16.09.2010 14:51:29 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
16.09.2010 14:51:29 org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
16.09.2010 14:51:30 org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
16.09.2010 14:51:31 org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
16.09.2010 14:51:32 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: The web application [/jbpm-console] appears to have started a thread named [com.google.inject.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak.
16.09.2010 14:51:32 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: The web application [/jbpm-console] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
16.09.2010 14:51:32 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: The web application [/jbpm-console] appears to have started a thread named [Dispatch Worker Thread] but has failed to stop it. This is very likely to create a memory leak.
16.09.2010 14:51:32 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: The web application [/jbpm-console] appears to have started a thread named [Dispatch Worker Thread] but has failed to stop it. This is very likely to create a memory leak.
16.09.2010 14:51:32 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: The web application [/jbpm-console] appears to have started a thread named [Dispatch Worker Thread] but has failed to stop it. This is very likely to create a memory leak.
16.09.2010 14:51:32 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: The web application [/jbpm-console] appears to have started a thread named [Dispatch Worker Thread] but has failed to stop it. This is very likely to create a memory leak.
16.09.2010 14:51:32 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: The web application [/jbpm-console] appears to have started a thread named [Dispatch Worker Thread] but has failed to stop it. This is very likely to create a memory leak.
16.09.2010 14:51:32 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: The web application [/jbpm-console] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
16.09.2010 14:51:32 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: The web application [/gwt-console-server] appears to have started a thread named [DispatcherThread] but has failed to stop it. This is very likely to create a memory leak.
16.09.2010 14:51:32 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
So far not really good, but working... After starting and stopping tomcat (and hsqldb) several times by the corresponding ant target, the JBPM-Console refused any attempt to login by throwing the following error (see stack trace):
WARNUNG: Could not obtain connection metadata
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (socket creation error)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
at org.jbpm.pvm.internal.wire.descriptor.HibernateSessionFactoryDescriptor.construct(HibernateSessionFactoryDescriptor.java:62)
at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:487)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:466)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:455)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:429)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:339)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:704)
at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:154)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:711)
at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:132)
at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:123)
at org.jbpm.pvm.internal.wire.descriptor.HibernateSessionDescriptor.construct(HibernateSessionDescriptor.java:63)
at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:487)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:466)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:455)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:429)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:339)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:704)
at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:132)
at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:123)
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:207)
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:196)
at org.jbpm.pvm.internal.cmd.CheckDbCmd.execute(CheckDbCmd.java:44)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:50)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at org.jbpm.pvm.internal.processengine.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:152)
at org.jbpm.pvm.internal.processengine.ProcessEngineImpl.<init>(ProcessEngineImpl.java:105)
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.instantiateProcessEngine(ConfigurationImpl.java:100)
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.buildProcessEngine(ConfigurationImpl.java:92)
at org.jbpm.api.Configuration.getProcessEngine(Configuration.java:126)
at org.jbpm.integration.console.forms.AbstractFormDispatcher.initializeProcessEngine(AbstractFormDispatcher.java:71)
at org.jbpm.integration.console.forms.AbstractFormDispatcher.<init>(AbstractFormDispatcher.java:61)
at org.jbpm.integration.console.forms.TaskFormDispatcher.<init>(TaskFormDispatcher.java:49)
at org.jbpm.integration.console.forms.FormDispatcherComposite.<init>(FormDispatcherComposite.java:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.jboss.bpm.console.server.util.ServiceLoader.loadFromServices(ServiceLoader.java:89)
at org.jboss.bpm.console.server.util.ServiceLoader.loadService(ServiceLoader.java:56)
at org.jboss.bpm.console.server.plugin.PluginMgr.load(PluginMgr.java:54)
at org.jboss.bpm.console.server.InfoFacade.getServerStatus(InfoFacade.java:83)
at org.jboss.bpm.console.server.InfoFacade.getServerInfo(InfoFacade.java:72)
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.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: socket creation error
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 85 more
Does anybody know if Tomcat 6.0.29 is working properly with jBPM 4.4?
Best wishes,
Frank
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/562171#562171]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months