[JBoss Seam] - Re: seam 2.0.1.CR1 with Tomcat 6.0 and Postgres DB
by pabloc2112
Sorry, here is my ds configuration:
| <datasources>
| <local-tx-datasource>
| <jndi-name>PostgresDS</jndi-name>
| <connection-url>jdbc:postgresql://localhost/beta_xxx</connection-url>
| <driver-class>org.postgresql.Driver</driver-class>
| <user-name>genie</user-name>
| <password>genie4.0<password>
| </local-tx-datasource>
| </datasources>
|
And the stack trace:
| jSEVERE: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
| java.lang.ClassCastException: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate cannot be cast to javax.transaction.TransactionManager
| at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:23)
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:325)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
| at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
| at org.jboss.seam.persistence.HibernateSessionFactory.createSessionFactory(HibernateSessionFactory.java:165)
| at org.jboss.seam.persistence.HibernateSessionFactory.startup(HibernateSessionFactory.java:79)
| 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.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
| at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
| at org.jboss.seam.Component.callCreateMethod(Component.java:2005)
| at org.jboss.seam.Component.newInstance(Component.java:1976)
| at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
| at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
| at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
| at org.jboss.seam.init.Initialization.init(Initialization.java:573)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
| at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
| at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
| at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
| at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
| at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
| at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
| at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
| at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
| at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
| at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
| at org.apache.catalina.core.StandardService.start(StandardService.java:516)
| at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
| at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
| 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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
| at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123892#4123892
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123892
18 years, 3 months
[JNDI/Naming/Network] - Problem Retrieving Bean Locally
by Roulf
I've been using JBoss and retrieving beans for some time now successfully, but after taking a break from a project over summer and reinstalling JBoss on my new PC it is no longer working. If it makes a difference, I upgraded to Windows XP x64 edition and NetBeans 6.0, same JBoss version (4.2.2 GA)
The specific error from JBoss is:
13:29:00,524 INFO [STDOUT] An error occured : There was a problem while talking to 216.19.36.215:22
I am attempting to access the bean locally and have tried using the -b 0.0.0.0 option, with no luck. I'm confused because the JBoss server is acknowledging the connection, but there is some sort of internal error that I am unaware of.
Here is some of the code in quesion:
public class ManagerClient {
|
| public static InitialContext INITIAL_CONTEXT = null;
|
| /**
| *Creates the ManagerClient with the provided URL to the Application Server
| *
| *@param providerURL URL of the JBoss Application Server
| *@throws NamingException If something goes wrong with the environement naming
| */
| public ManagerClient(String providerURL) throws NamingException {
|
| Properties env = new Properties();
|
| env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
| env.put(Context.PROVIDER_URL, providerURL);
|
| try {
| ManagerClient.INITIAL_CONTEXT = new InitialContext(env);
| } catch (NamingException ex) {
| ex.printStackTrace();
| System.exit(1);
| }
| }
|
| /**
| * Sets the default location of the JBoss Application Server
| *
| * @throws NamingException If something goes wrong with the environment naming
| */
| public ManagerClient() throws NamingException {
| this("jnp://localhost:1099");
| }
|
|
| /**
| * Creates the ManagerClient environment, then starts the meat of the program
| * in the ManagerFrame.
| * @param args the command line arguments
| */
| public static void main(String[] args) {
|
| try {
| new ManagerClient();
| } catch (NamingException ex) {
| ex.printStackTrace();
| System.exit(1);
| }
|
| new ManagerFrame("Manager");
|
| }
| }
and when I retrieve in the ManagerFrame,
dbm = (DataBaseManager) ManagerClient.INITIAL_CONTEXT.lookup("ResourceGate-server/DataBaseManagerBean/remote");
| ssh = (SSHInterface) ManagerClient.INITIAL_CONTEXT.lookup("ResourceGate-server/SSHBean/remote");
| secureTransfer = (SecureFileTransfer) ManagerClient.INITIAL_CONTEXT.lookup("ResourceGate-server/SecureFileTransfer/remote");
Thanks for any help you can provide -- I am trying to finish this project up for deployment this week and not being able to run it at all is frustrating :(.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123890#4123890
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123890
18 years, 3 months