[Installation, Configuration & Deployment] - JBoss issue
by akhil_gupta_in
Dear All,
We are using Jboss 4.0.4 for our J2EE application and we are facing a very strange issue only when working inside company network (means while working from internet, application runs fine). Our application architecture includes Struts in web, Spring & EJB in business and Hibernate in persistence tier.
In our application, home page is a login page which is a jsp. When we deploy this application on Jboss, this home page is rendered with no issue. However, when we enter valid username and password and click on login page, it gives null exception.
At first, we thought it to be an application problem. So, we put few System.out.println with dummy messages. After deployment this time, application started working. We had made no code change except adding SOPs. Just to confirm what we had done, we again restarted the server and deployed the application (code with SOP), this time application didn?t work and we got null exception again. Surprisingly, we didn?t see any SOP message on console.
Then, we changed the logging level of JBoss server console from INFO to DEBUG to check server messages. This time application again worked.
Then, we restarted JBoss server and deployed application again. Unfortunately, application didn?t work.
This is a very strange behaviour. Please provide your inputs.
Regards,
Akhil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052065#4052065
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052065
18Â years, 10Â months
[Persistence, JBoss/CMP, Hibernate, Database] - CachedConnectionManager:Closing a connection for you
by skymic
Hello,
I am using a clsutered JBoss4.0.5 with EJB3 profile.
I have defined an Oracle10 datasource.
The datasource is defoned in the following file SDOCI-ds.xml:
<?xml version="1.0" encoding="UTF-8"?>
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- JBoss Server Configuration -->
| <!-- -->
| <!-- ===================================================================== -->
|
| <!-- $Id: oracle-ds.xml 23720 2004-09-15 14:37:40Z loubyansky $ -->
| <!-- ==================================================================== -->
| <!-- Datasource config for Oracle originally from Steven Coy -->
| <!-- ==================================================================== -->
|
|
| <datasources>
| <local-tx-datasource>
| <jndi-name>idmDS</jndi-name>
| <connection-url>jdbc:oracle:oci:@myDatabase</connection-url>
| <!--
|
| Here are a couple of the possible OCI configurations.
| For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.92...
|
| <connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url>
| or
| <connection-url>jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>
|
| Clearly, its better to have TNS set up properly.
| -->
| <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
| <user-name>user</user-name>
| <password>password</password>
| <min-pool-size>1</min-pool-size>
| <max-pool-size>20</max-pool-size>
| <idle-timeout-minutes>40</idle-timeout-minutes>
| <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
| <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
| <!-- Checks the Oracle error codes and messages for fatal errors -->
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <!-- sql to call when connection is created
| <new-connection-sql>some arbitrary sql</new-connection-sql>
| -->
|
| <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered
| <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
| -->
|
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <metadata>
| <type-mapping>Oracle10i</type-mapping>
| </metadata>
| </local-tx-datasource>
|
| </datasources>
|
The datasource is injected in a stateful session bean:
Every time after I use this datasource in the login business method of the SFSB I get the following exception:
2007-06-07 12:42:36,399 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@2fc479
| java.lang.Throwable: STACKTRACE
| at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:417)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
| at ch.skyguide.aim.interfaces.businesslogic.SDOCIBusinessServiceImpl.login(Unknown Source)
| 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.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
|
I do not close the underlying connection of the datasource explicitly.
Does anyone know why this exception happens and if I should open/close connections in datasources explicitly?
Thanks for helping.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052062#4052062
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052062
18Â years, 10Â months
[JBoss Seam] - Re: @In (create=true)
by blackers
I should have said They should both be referencing a separate instance each.
not 2 instances each if that is not clear.
I have a set up simplified to the following.
Table Game
========
game_id
home_team_id --> fkey to table team field team_id
opp_team_id --> fkey to table team field team_id
Table Team
========
team_id
team_name
eg.
Table Game
========
game_id | home_team_id | opp_team_id
-------------------------------------------------
1 | 1 | 2
2 | 3 | 2
Table Team
========
team_id | team_name
--------------------------
1 | Team A
2 | Team B
3 | Team C
So what I want is to have is for the record with game_id 1 should have homeTeamHome pointing to an instance of team with team_id 1 (Team A) and oppTeamHome pointing to an instance of team with team_id 2 (Team B).
So from my facelet page i could reference Team B by #{gameHome.oppTeamHome.instance.team_name} and Team A by #{gameHome.homeTeamHome.instance.team_name}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052059#4052059
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052059
18Â years, 10Â months