j2ee related problem

Discussions

General J2EE: j2ee related problem

  1. j2ee related problem (2 messages)

    Hi there,
    Ive been programming in Java for about a year, but am new to the wierd and wonderful world of J2EE.
    I have a few problems with the set up of j2ee on my PC (Win XP Pro) at home.
    First off- I can start up the j2ee server in DOS using the command:

    "j2ee -verbose"

    Or at least I think so- I get several dozen lines of output, including a whole load of exceptions, the last output line is:

    "stopping service j2ee(tm) web server"

    After which if I try "j2ee -stop" I get 2 lines of output:

    "shutting down the j2ee server
    unable to shutdown the j2ee server"

    Which I suppose could be because the server never started in the first place. I have no process running (in Task Manager)that resembles a j2ee server. Any ideas?

    I also have a big problem with Tomcat - I can start the Tomcat server using the command "Startup", but it refuses to shutdown using the command "Shutdown". When I check inside Task Manager the darned thing is still running and I have to kill the process from inside Task Manager, which is less than ideal. The error message I get is:

    "Cataline.stop: java.net.connectException: Connection refused: Connect
     java.net.connectException Connection refused: connect
      at Java.net.PlainSocketImpl.socketConnect(NativeMethod)
      at etc etc etc...
    "

    Im also having a problem getting Cloudscape to run (the version that comes with j2ee), but I think I'll save that for another time.

    Thank you in advance for any help or advice.
    Jon

    Threaded Messages (2)

  2. Re: j2ee related problem[ Go to top ]

    When you start Sun J2EE RI, it is trying to listen to a few TCP ports (e.g. 1050 for JNDI, 8000 for WS, 7000 for secure WS). Would there be a possibility that some of those ports are being used by some other apps? If you can get the whole printout, that would help me to analyst.

    It looks like your problem with Tomcat is also port related ......

    I suggest you to download some software such as "Active Ports" (you've to have admin right) to monitor your port(s) and what process(es) are using them.
  3. Re: j2ee related problem[ Go to top ]

    OK. Here goes-

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\Jonathan Poulton>j2ee -verbose
    J2EE server listen port: 1050
    Naming service started: 1050
    Binding DataSource, name = jdbc/EstoreDB, url = jdbc:cloudscape:rmi:CloudscapeDB
    ;create=true
    Binding DataSource, name = jdbc/Cloudscape, url = jdbc:cloudscape:rmi:Cloudscape
    DB;create=true
    Binding DataSource, name = jdbc/InventoryDB, url = jdbc:cloudscape:rmi:Cloudscap
    eDB;create=true
    Binding DataSource, name = jdbc/DB1, url = jdbc:cloudscape:rmi:CloudscapeDB;crea
    te=true
    Binding DataSource, name = jdbc/DB2, url = jdbc:cloudscape:rmi:CloudscapeDB;crea
    te=true
    Binding DataSource, name = jdbc/XACloudscape, url = jdbc/XACloudscape__xa
    Binding DataSource, name = jdbc/XACloudscape__xa, dataSource = COM.cloudscape.co
    re.RemoteXaDataSource@9bad5a
    Binding DataSource, name = jdbc/_ejb_container, url = jdbc/_ejb_container__xa
    Binding DataSource, name = jdbc/_ejb_container__xa, dataSource = COM.cloudscape.
    core.XaDataSource@77eb97
    Starting JMS service...
    java.util.logging.ErrorManager: 5
    java.lang.NullPointerException
            at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBund
    le.java:103)
            at java.util.ResourceBundle.getObject(ResourceBundle.java:308)
            at java.util.ResourceBundle.getString(ResourceBundle.java:274)
            at java.util.logging.Formatter.formatMessage(Formatter.java:108)
            at com.sun.logging.ConsoleLoggingFormatter.format(ConsoleLoggingFormatte
    r.java:31)
            at java.util.logging.StreamHandler.publish(StreamHandler.java:178)
            at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:87)
            at java.util.logging.Logger.log(Logger.java:424)
            at java.util.logging.Logger.doLog(Logger.java:446)
            at java.util.logging.Logger.log(Logger.java:469)
            at java.util.logging.Logger.warning(Logger.java:968)
            at com.sun.jms.service.CloudscapeDAO.initializeDatabaseTables(Cloudscape
    DAO.java:310)
            at com.sun.jms.service.DBManager.<init>(DBManager.java:74)
            at com.sun.jms.service.CloudscapeDAO.<init>(CloudscapeDAO.java:71)
            at com.sun.jms.service.CloudscapeDAO.<clinit>(CloudscapeDAO.java:63)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sun.jms.service.DBManager.getInstance(DBManager.java:105)
            at com.sun.jms.service.TxnContextManager.initializeRecovery(TxnContextMa
    nager.java:303)
            at com.sun.jms.service.JMSServiceImpl.<init>(JMSServiceImpl.java:133)
            at com.sun.jms.service.JMSServiceImpl.getInstance(JMSServiceImpl.java:36
    6)
            at com.sun.jms.service.JMSManagerImpl.startJMSService(JMSManagerImpl.jav
    a:88)
            at com.sun.enterprise.jms.JmsUtil.startJmsService(JmsUtil.java:176)
            at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:239)
            at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:720)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.commons.launcher.ChildMain.run(ChildMain.java:280)
    java.util.logging.ErrorManager: 5
    java.lang.NullPointerException
            at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBund
    le.java:103)
            at java.util.ResourceBundle.getObject(ResourceBundle.java:308)
            at java.util.ResourceBundle.getString(ResourceBundle.java:274)
            at java.util.logging.Formatter.formatMessage(Formatter.java:108)
            at com.sun.logging.LoggingFormatter.format(LoggingFormatter.java:45)
            at java.util.logging.StreamHandler.publish(StreamHandler.java:178)
            at com.sun.logging.ServerLogHandler.publish(ServerLogHandler.java:54)
            at java.util.logging.Logger.log(Logger.java:424)
            at java.util.logging.Logger.doLog(Logger.java:446)
            at java.util.logging.Logger.log(Logger.java:469)
            at java.util.logging.Logger.warning(Logger.java:968)
            at com.sun.jms.service.CloudscapeDAO.initializeDatabaseTables(Cloudscape
    DAO.java:310)
            at com.sun.jms.service.DBManager.<init>(DBManager.java:74)
            at com.sun.jms.service.CloudscapeDAO.<init>(CloudscapeDAO.java:71)
            at com.sun.jms.service.CloudscapeDAO.<clinit>(CloudscapeDAO.java:63)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sun.jms.service.DBManager.getInstance(DBManager.java:105)
            at com.sun.jms.service.TxnContextManager.initializeRecovery(TxnContextMa
    nager.java:303)
            at com.sun.jms.service.JMSServiceImpl.<init>(JMSServiceImpl.java:133)
            at com.sun.jms.service.JMSServiceImpl.getInstance(JMSServiceImpl.java:36
    6)
            at com.sun.jms.service.JMSManagerImpl.startJMSService(JMSManagerImpl.jav
    a:88)
            at com.sun.enterprise.jms.JmsUtil.startJmsService(JmsUtil.java:176)
            at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:239)
            at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:720)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.commons.launcher.ChildMain.run(ChildMain.java:280)
    Recover failed, could not get XA resource: SQL Exception: Database 'C:\j2sdkee1.
    4\repository\dbJMSDB' not found.
    Could not recover initialize transaction recovery: Recover failed, could not get
     XA resource: Database 'C:\j2sdkee1.4\repository\dbJMSDB' not found.
    Recover failed, could not get XA resource: Database 'C:\j2sdkee1.4\repository\db
    JMSDB' not found.
    Error recoving destinations from db
    Error recoving destinations from db
    Initialization complete - waiting for client requests
    Starting JMS via Resource Adapter
    Deploying jmsra.rar in C:\j2sdkee1.4\lib\system_apps\jmsra.rar
    ResourceAdapter jmsra.rar started...
    Initializing Coyote HTTP/1.1 on port 8000
    Initializing Coyote HTTP/1.1 on port 7000
    Starting service J2EE(TM) Web Server
    Apache Tomcat/5.0
    Missing application web.xml, using defaults only StandardEngine[Standard-Engine]
    .StandardHost[localhost].StandardContext[]
    Added certificates -> request attribute Valve
    Starting Coyote HTTP/1.1 on port 8000
    Starting Coyote HTTP/1.1 on port 7000
    JACC:Policy Repository set to C:\j2sdkee1.4\repository\policy
    Added certificates -> request attribute Valve
    Configured an authenticator for method FORM
    J2EE Web Admin Tool started
    JAXR:Installing JAXR RA
    Deploying jaxr-ra.rar in C:\j2sdkee1.4\lib\system_apps\jaxr-ra.rar
    Binding Connection Factory, name = TopicConnectionFactory
    Binding Connection Factory, name = eis/JAXR
    Binding Connection Factory, name = jms/TopicConnectionFactory
    Binding Connection Factory, name = jms/QueueConnectionFactory
    Binding Connection Factory, name = QueueConnectionFactory
    Failed to create database 'C:\j2sdkee1.4\repository\dbJMSDB', see the next excep
    tion for details.
    Error loading durable subscription for destination null from database because Fa
    iled to create database 'C:\j2sdkee1.4\repository\dbJMSDB', see the next excepti
    on for details.
    Failed to create database 'C:\j2sdkee1.4\repository\dbJMSDB', see the next excep
    tion for details.
    Binding Administered Object, name = jms/Topic
    Failed to create database 'C:\j2sdkee1.4\repository\dbJMSDB', see the next excep
    tion for details.
    Failed to create database 'C:\j2sdkee1.4\repository\dbJMSDB', see the next excep
    tion for details.
    Error loading logged messages
    Binding Administered Object, name = jms/Queue

    J2EE server startup error
    javax.ejb.EJBException: nested exception is: java.sql.SQLException
    java.sql.SQLException
            at com.sun.enterprise.resource.SystemJdbcDataSource.internalGetConnectio
    n(SystemJdbcDataSource.java:81)
            at com.sun.enterprise.resource.SystemJdbcDataSource.getConnection(System
    JdbcDataSource.java:44)
            at com.sun.ejb.persistence.PersistenceManagerImpl.getConnection(Persiste
    nceManagerImpl.java:620)
            at com.sun.ejb.persistence.PersistenceManagerImpl.getConnection(Persiste
    nceManagerImpl.java:605)
            at com.sun.ejb.persistence.PMDeployerImpl.createTable(PMDeployerImpl.jav
    a:200)
            at com.sun.ejb.persistence.PMDeployerImpl.ejbJarDeployed(PMDeployerImpl.
    java:73)
            at com.sun.enterprise.tools.deployment.backend.JarManagerImpl.loadApp(Ja
    rManagerImpl.java:169)
            at com.sun.enterprise.tools.deployment.backend.JarManagerImpl.loadApp(Ja
    rManagerImpl.java:83)
            at com.sun.ejb.containers.ContainerFactoryImpl.initEJBTimerService(Conta
    inerFactoryImpl.java:93)
            at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:289)
            at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:720)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.commons.launcher.ChildMain.run(ChildMain.java:280)
    Caused by: com.sun.enterprise.resource.PoolingException
            at com.sun.enterprise.resource.SystemJdbc20XaAllocator.createResource(Sy
    stemJdbc20XaAllocator.java:50)
            at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolM
    anagerImpl.java:167)
            at com.sun.enterprise.resource.SystemJdbcDataSource.internalGetConnectio
    n(SystemJdbcDataSource.java:66)
            ... 15 more
    Caused by: SQL Exception: Failed to create database 'C:\j2sdkee1.4\repository\db
    JMSDB', see the next exception for details.
            at c8e.p.i._h1(Unknown Source)
            at c8e.p.i._h1(Unknown Source)
            at c8e.p.i.generateCsSQLException(Unknown Source)
            at c8e.p.n._m16(Unknown Source)
            at c8e.p.n.<init>(Unknown Source)
            at c8e.ct.e.<init>(Unknown Source)
            at c8e.ct.c.getNewLocalConnection(Unknown Source)
            at c8e.p.r.connect(Unknown Source)
            at COM.cloudscape.core.AbstractDataSource.getConnectionViaDriver(Unknown
     Source)
            at COM.cloudscape.core.AbstractDataSource.getDatabaseConnection(Unknown
    Source)
            at COM.cloudscape.core.XaDataSource.setupResourceAdapter(Unknown Source)

            at COM.cloudscape.core.XaDataSource.getXAConnection(Unknown Source)
            at com.sun.enterprise.resource.SystemJdbc20XaAllocator.createResource(Sy
    stemJdbc20XaAllocator.java:42)
            ... 17 more
    javax.ejb.EJBException: nested exception is: java.sql.SQLException
            at com.sun.ejb.persistence.PersistenceManagerImpl.getConnection(Persiste
    nceManagerImpl.java:624)
            at com.sun.ejb.persistence.PersistenceManagerImpl.getConnection(Persiste
    nceManagerImpl.java:605)
            at com.sun.ejb.persistence.PMDeployerImpl.createTable(PMDeployerImpl.jav
    a:200)
            at com.sun.ejb.persistence.PMDeployerImpl.ejbJarDeployed(PMDeployerImpl.
    java:73)
            at com.sun.enterprise.tools.deployment.backend.JarManagerImpl.loadApp(Ja
    rManagerImpl.java:169)
            at com.sun.enterprise.tools.deployment.backend.JarManagerImpl.loadApp(Ja
    rManagerImpl.java:83)
            at com.sun.ejb.containers.ContainerFactoryImpl.initEJBTimerService(Conta
    inerFactoryImpl.java:93)
            at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:289)
            at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:720)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.commons.launcher.ChildMain.run(ChildMain.java:280)
    J2EE server fatal error
    java.lang.RuntimeException: nested exception is: java.sql.SQLException
            at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:334)
            at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:720)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.commons.launcher.ChildMain.run(ChildMain.java:280)
    Caused by: javax.ejb.EJBException: nested exception is: java.sql.SQLException
            at com.sun.ejb.persistence.PersistenceManagerImpl.getConnection(Persiste
    nceManagerImpl.java:624)
            at com.sun.ejb.persistence.PersistenceManagerImpl.getConnection(Persiste
    nceManagerImpl.java:605)
            at com.sun.ejb.persistence.PMDeployerImpl.createTable(PMDeployerImpl.jav
    a:200)
            at com.sun.ejb.persistence.PMDeployerImpl.ejbJarDeployed(PMDeployerImpl.
    java:73)
            at com.sun.enterprise.tools.deployment.backend.JarManagerImpl.loadApp(Ja
    rManagerImpl.java:169)
            at com.sun.enterprise.tools.deployment.backend.JarManagerImpl.loadApp(Ja
    rManagerImpl.java:83)
            at com.sun.ejb.containers.ContainerFactoryImpl.initEJBTimerService(Conta
    inerFactoryImpl.java:93)
            at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:289)
            ... 6 more
    Stopping service J2EE(TM) Web Server
    C:\Documents and Settings\Jonathan Poulton>

    I'll try and get hold of that tool you suggested.
    Jon