[JNDI/Naming/Network] - Re: Name not Bound
by bacooper81
I took a look at the jboss server log to see what's going on with the ejb jar. With my limited knowledge of jboss, it looks like its deploying the jar. However, I noticed it didn't mention anything about the beans. Do you have any idea why its finding the jar, but not binding the beans? Here are the lines from the log that have the term "Shadows.jar" in them.
2009-02-26 11:14:08,066 DEBUG [org.jboss.deployment.EARDeployer] Extracted deployable content: Shadows.jar
| 2009-02-26 11:14:09,269 DEBUG [org.jboss.deployment.EARDeployer] Deployment Info: org.jboss.deployment.DeploymentInfo@c5ef8fe8 { url=file:/C:/dev/jboss-4.0.5.GA/server/all/tmp/deploy/tmp6695379174028898419shadows.ear-contents/Shadows.jar }
| deployer: null
| status: null
| state: CONSTRUCTED
| watch: file:/C:/dev/jboss-4.0.5.GA/server/all/tmp/deploy/tmp6695379174028898419shadows.ear-contents/Shadows.jar
| altDD: null
| lastDeployed: 0
| lastModified: 0
| mbeans:
| , isDirectory: false
| 2009-02-26 11:14:10,082 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/dev/jboss-4.0.5.GA/server/all/tmp/deploy/tmp6695379174028898419shadows.ear-contents/Shadows.jar
| 2009-02-26 11:14:10,082 DEBUG [org.jboss.deployment.JARDeployer] looking for nested deployments in : file:/C:/dev/jboss-4.0.5.GA/server/all/tmp/deploy/tmp6695379174028898419shadows.ear-contents/Shadows.jar
| 2009-02-26 11:14:10,082 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] Added url: file:/C:/dev/jboss-4.0.5.GA/server/all/tmp/deploy/tmp6695379174028898419shadows.ear-contents/Shadows.jar, to ucl: org.jboss.mx.loading.UnifiedClassLoader3@1ff3900{ url=file:/C:/dev/jboss-4.0.5.GA/server/all/tmp/deploy/tmp6695379174028898419shadows.ear ,addedOrder=42}
| 2009-02-26 11:14:10,082 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/C:/dev/jboss-4.0.5.GA/server/all/tmp/deploy/tmp6695379174028898419shadows.ear-contents/Shadows.jar
| 2009-02-26 11:14:11,785 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/dev/jboss-4.0.5.GA/server/all/tmp/deploy/tmp6695379174028898419shadows.ear-contents/Shadows.jar
| 2009-02-26 11:14:11,785 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying Shadows.jar
| 2009-02-26 11:14:11,800 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/C:/dev/jboss-4.0.5.GA/server/all/tmp/deploy/tmp6695379174028898419shadows.ear-contents/Shadows.jar
| 2009-02-26 11:14:11,800 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: Shadows.jar
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213474#4213474
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213474
17 years, 1 month
[Tomcat, HTTPD, Servlets & JSP] - @Resource Injection fails in servlet the second time
by tomnicholls
I am trying to inject a JDBC DataSource into a servlet running on JBoss 5.0.0.GA
The DataSource injection appears to work the first time the servlet is called (after deployment) and I get a Connection successfully.
However, when the servlet is called the second time, I get an error:
anonymous wrote : 16:53:59,687 ERROR [STDERR] org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
| 16:53:59,687 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
This is a test project for training purposes. I am using a mysql datasource thus:
| <local-tx-datasource>
| <jndi-name>bank</jndi-name>
| <use-java-context>false</use-java-context>
| <connection-url>jdbc:mysql://localhost:3306/bank</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>training</user-name>
| <password>codeclass</password>
| </local-tx-datasource>
|
and injecting into the servlet as follows:
| @Resource(mappedName="bank")
| private DataSource dataSource;
|
Either the datasource is timing out or I have misunderstood the lifecycle of dependency injection into servlets somehow.
A straight lookup of the datasource works, incidentally, on each servlet call:
| Context ctxt = new InitialContext();
| dataSource = (DataSource)(ctxt).lookup("bank");
|
Clearly I've missed something important here. I've had similar issues injecting EJBs into servlets with JBoss 5 (i.e. works first time then fails subsequently) but I realise there are issues with this in any case.
Any help gratefully appreciated.
- Tom
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213454#4213454
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213454
17 years, 1 month
[Installation, Configuration & DEPLOYMENT] - Re: Freeze and Server killed without any logs
by erache
I did what you told me... It goes further than last time but it still dies after a while... just annoying
Here is what I get during deployment:
top:
| Cpu0 : 1.2%us, 57.3%sy, 0.0%ni, 0.0%id, 39.5%wa, 2.0%hi, 0.0%si, 0.0%st
| Mem: 1024224k total, 1015156k used, 9068k free, 60k buffers
| Swap: 0k total, 0k used, 0k free, 3420k cached
|
| 19656 root 20 0 1204m 840m 488 S 54.4 84.0 2:39.46 java
| ...
|
The %MEM is not going up than 88%..
SO you think it's a memory problem ? Why didn't it just say in the trace or log OutOfMemory...???
Anyway thanks for helping me :)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213452#4213452
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213452
17 years, 1 month