[ http://issues.apache.org/jira/browse/GERONIMO-1750?page=all ]

Lin Sun updated GERONIMO-1750:
------------------------------

    Description: 
I performed the following command:
   java -jar client.jar tradeStreamerAppclient
then got the following exception:

09:37:12,203 INFO  [Log4jService] ----------------------------------------------
09:37:12,203 INFO  [Log4jService] Started Logging Service
09:37:12,203 INFO  [JvmVendor] IBM JVM detected from IBM Corporation
09:37:14,578 INFO  [CommandLine] Server startup completed
TradeStreamer getInitial Context
09:37:17,047 INFO  [ActiveMQConnection] channel status changed: Channel: 
TcpTransportChannel:
Socket[addr=localhost/127.
0.0.1,port=61616,localport=4290] has connected
Caught an unexpected exception!
java.lang.NullPointerException
        at javax.swing.ImageIcon.<init>(ImageIcon.java:168)
        at 
org.apache.geronimo.samples.daytrader.client.TradeClientGUI.<init>(TradeClientGUI.java:59)
        at 
org.apache.geronimo.samples.daytrader.client.TradeClient.startClient(TradeClient.java:81)
        at 
org.apache.geronimo.samples.daytrader.client.TradeClient.main(TradeClient.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
        at java.lang.reflect.Method.invoke(Method.java:391)
        at 
org.apache.geronimo.client.AppClientContainer.main(AppClientContainer.java:143)
        at 
org.apache.geronimo.client.AppClientContainer$$FastClassByCGLIB$$b5beae18.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:835)
        at 
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
        at 
org.apache.geronimo.system.main.CommandLine.invokeMainGBean(CommandLine.java:90)
        at 
org.apache.geronimo.system.main.ClientCommandLine.<init>(ClientCommandLine.java:71)
        at 
org.apache.geronimo.system.main.ClientCommandLine.main(ClientCommandLine.java:46)
09:37:21,328 INFO  [CommandLine] Server shutdown begun
09:37:21,344 ERROR [GBeanInstance] GBeanInstance should already be stopped 
before die() is called:
objectName=geronimo.c
lient:J2EEApplication=client-application,J2EEServer=client,JCAResource=activemq/activemq-ra/3.2.2.ibm/rar,j2eeType=JCACo
nnectionFactory,name=jms/TopicConnectionFactory state=starting
09:37:21,344 ERROR [GBeanInstance] GBeanInstance should already be stopped 
before die() is called:
objectName=geronimo.c
lient:J2EEApplication=client-application,J2EEServer=client,j2eeType=ResourceAdapterModule,name=activemq/activemq-ra/3.2.
2.ibm/rar state=starting
09:37:21,359 INFO  [CommandLine] Client shutdown completed

The reason caused this exception is that the client tries to load a picture 
file named
"/images/tradeLogoSmall.gif", but can't find it.   

Here's an excerpt from TradeClientGUI.java:
------------------------------------------------
        private static final String TRADELOGO_FILENAME = 
"/images/tradeLogoSmall.gif";
        private static final String WEBSPHERELOGO_FILENAME = 
"/images/WEBSPHERE_18P_UNIX.GIF";
        ...
                ImageIcon iconTrade = new 
ImageIcon(this.getClass().getResource(TRADELOGO_FILENAME));
                ImageIcon iconWS = new 
ImageIcon(this.getClass().getResource(WEBSPHERELOGO_FILENAME));

The fix is to supply these two images logo images to 
geronimo\daytrader\streamer\src\images directory .  I used the existing images 
(DayTraderHead_red.gif & GLogo_450x50.gif)  from the web directory:

        private static final String TRADELOGO_FILENAME = 
"/images/DayTraderHead_red.gif";
        private static final String GERONIMOLOGO_FILENAME = 
"/images/GLogo_450x50.gif";
        ...
                ImageIcon iconTrade = new 
ImageIcon(this.getClass().getResource(TRADELOGO_FILENAME));
                ImageIcon iconWS = new 
ImageIcon(this.getClass().getResource(GERONIMOLOGO_FILENAME));

And add the following to the geronimo\daytrader\streamer\project.xml file: 
(below the </resource> tag)

      <resource>
          <directory>src</directory>
          <includes>
              <include>images/*.*</include>
          </includes>
      </resource>





  was:
I performed the following command:
   java -jar client.jar tradeStreamerAppclient
then got the following exception:

09:37:12,203 INFO  [Log4jService] ----------------------------------------------
09:37:12,203 INFO  [Log4jService] Started Logging Service
09:37:12,203 INFO  [JvmVendor] IBM JVM detected from IBM Corporation
09:37:14,578 INFO  [CommandLine] Server startup completed
TradeStreamer getInitial Context
09:37:17,047 INFO  [ActiveMQConnection] channel status changed: Channel: 
TcpTransportChannel:
Socket[addr=localhost/127.
0.0.1,port=61616,localport=4290] has connected
Caught an unexpected exception!
java.lang.NullPointerException
        at javax.swing.ImageIcon.<init>(ImageIcon.java:168)
        at 
org.apache.geronimo.samples.daytrader.client.TradeClientGUI.<init>(TradeClientGUI.java:59)
        at 
org.apache.geronimo.samples.daytrader.client.TradeClient.startClient(TradeClient.java:81)
        at 
org.apache.geronimo.samples.daytrader.client.TradeClient.main(TradeClient.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
        at java.lang.reflect.Method.invoke(Method.java:391)
        at 
org.apache.geronimo.client.AppClientContainer.main(AppClientContainer.java:143)
        at 
org.apache.geronimo.client.AppClientContainer$$FastClassByCGLIB$$b5beae18.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:835)
        at 
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
        at 
org.apache.geronimo.system.main.CommandLine.invokeMainGBean(CommandLine.java:90)
        at 
org.apache.geronimo.system.main.ClientCommandLine.<init>(ClientCommandLine.java:71)
        at 
org.apache.geronimo.system.main.ClientCommandLine.main(ClientCommandLine.java:46)
09:37:21,328 INFO  [CommandLine] Server shutdown begun
09:37:21,344 ERROR [GBeanInstance] GBeanInstance should already be stopped 
before die() is called:
objectName=geronimo.c
lient:J2EEApplication=client-application,J2EEServer=client,JCAResource=activemq/activemq-ra/3.2.2.ibm/rar,j2eeType=JCACo
nnectionFactory,name=jms/TopicConnectionFactory state=starting
09:37:21,344 ERROR [GBeanInstance] GBeanInstance should already be stopped 
before die() is called:
objectName=geronimo.c
lient:J2EEApplication=client-application,J2EEServer=client,j2eeType=ResourceAdapterModule,name=activemq/activemq-ra/3.2.
2.ibm/rar state=starting
09:37:21,359 INFO  [CommandLine] Client shutdown completed

The reason caused this exception is that the client tries to load a picture 
file named
"/images/tradeLogoSmall.gif", but can't find it.   

Here's an excerpt from TradeClientGUI.java:
------------------------------------------------
        private static final String TRADELOGO_FILENAME = 
"/images/tradeLogoSmall.gif";
        private static final String WEBSPHERELOGO_FILENAME = 
"/images/WEBSPHERE_18P_UNIX.GIF";
        ...
                ImageIcon iconTrade = new 
ImageIcon(this.getClass().getResource(TRADELOGO_FILENAME));
                ImageIcon iconWS = new 
ImageIcon(this.getClass().getResource(WEBSPHERELOGO_FILENAME));

The fix is to supply these two images logo images to 
geronimo\daytrader\streamer\src\images directory .  I used the existing images 
(DayTraderHead_red.gif & GLogo_450x50.gif)  from the web directory:

        private static final String TRADELOGO_FILENAME = 
"/images/DayTraderHead_red.gif";
        private static final String GERONIMOLOGO_FILENAME = 
"/images/GLogo_450x50.gif";
        ...
                ImageIcon iconTrade = new 
ImageIcon(this.getClass().getResource(TRADELOGO_FILENAME));
                ImageIcon iconWS = new 
ImageIcon(this.getClass().getResource(GERONIMOLOGO_FILENAME));

And add the following in the 




> Unable to run tradeStreamerAppclient
> ------------------------------------
>
>          Key: GERONIMO-1750
>          URL: http://issues.apache.org/jira/browse/GERONIMO-1750
>      Project: Geronimo
>         Type: Bug
>   Components: sample apps
>     Versions: 1.0
>  Environment: winXP,
>     Reporter: Lin Sun
>     Priority: Minor

>
> I performed the following command:
>    java -jar client.jar tradeStreamerAppclient
> then got the following exception:
> 09:37:12,203 INFO  [Log4jService] 
> ----------------------------------------------
> 09:37:12,203 INFO  [Log4jService] Started Logging Service
> 09:37:12,203 INFO  [JvmVendor] IBM JVM detected from IBM Corporation
> 09:37:14,578 INFO  [CommandLine] Server startup completed
> TradeStreamer getInitial Context
> 09:37:17,047 INFO  [ActiveMQConnection] channel status changed: Channel: 
> TcpTransportChannel:
> Socket[addr=localhost/127.
> 0.0.1,port=61616,localport=4290] has connected
> Caught an unexpected exception!
> java.lang.NullPointerException
>         at javax.swing.ImageIcon.<init>(ImageIcon.java:168)
>         at 
> org.apache.geronimo.samples.daytrader.client.TradeClientGUI.<init>(TradeClientGUI.java:59)
>         at 
> org.apache.geronimo.samples.daytrader.client.TradeClient.startClient(TradeClient.java:81)
>         at 
> org.apache.geronimo.samples.daytrader.client.TradeClient.main(TradeClient.java:63)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
>         at java.lang.reflect.Method.invoke(Method.java:391)
>         at 
> org.apache.geronimo.client.AppClientContainer.main(AppClientContainer.java:143)
>         at 
> org.apache.geronimo.client.AppClientContainer$$FastClassByCGLIB$$b5beae18.invoke(<generated>)
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at 
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
>         at 
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:835)
>         at 
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
>         at 
> org.apache.geronimo.system.main.CommandLine.invokeMainGBean(CommandLine.java:90)
>         at 
> org.apache.geronimo.system.main.ClientCommandLine.<init>(ClientCommandLine.java:71)
>         at 
> org.apache.geronimo.system.main.ClientCommandLine.main(ClientCommandLine.java:46)
> 09:37:21,328 INFO  [CommandLine] Server shutdown begun
> 09:37:21,344 ERROR [GBeanInstance] GBeanInstance should already be stopped 
> before die() is called:
> objectName=geronimo.c
> lient:J2EEApplication=client-application,J2EEServer=client,JCAResource=activemq/activemq-ra/3.2.2.ibm/rar,j2eeType=JCACo
> nnectionFactory,name=jms/TopicConnectionFactory state=starting
> 09:37:21,344 ERROR [GBeanInstance] GBeanInstance should already be stopped 
> before die() is called:
> objectName=geronimo.c
> lient:J2EEApplication=client-application,J2EEServer=client,j2eeType=ResourceAdapterModule,name=activemq/activemq-ra/3.2.
> 2.ibm/rar state=starting
> 09:37:21,359 INFO  [CommandLine] Client shutdown completed
> The reason caused this exception is that the client tries to load a picture 
> file named
> "/images/tradeLogoSmall.gif", but can't find it.   
> Here's an excerpt from TradeClientGUI.java:
> ------------------------------------------------
>       private static final String TRADELOGO_FILENAME = 
> "/images/tradeLogoSmall.gif";
>       private static final String WEBSPHERELOGO_FILENAME = 
> "/images/WEBSPHERE_18P_UNIX.GIF";
>       ...
>               ImageIcon iconTrade = new 
> ImageIcon(this.getClass().getResource(TRADELOGO_FILENAME));
>               ImageIcon iconWS = new 
> ImageIcon(this.getClass().getResource(WEBSPHERELOGO_FILENAME));
> The fix is to supply these two images logo images to 
> geronimo\daytrader\streamer\src\images directory .  I used the existing 
> images (DayTraderHead_red.gif & GLogo_450x50.gif)  from the web directory:
>       private static final String TRADELOGO_FILENAME = 
> "/images/DayTraderHead_red.gif";
>       private static final String GERONIMOLOGO_FILENAME = 
> "/images/GLogo_450x50.gif";
>         ...
>               ImageIcon iconTrade = new 
> ImageIcon(this.getClass().getResource(TRADELOGO_FILENAME));
>               ImageIcon iconWS = new 
> ImageIcon(this.getClass().getResource(GERONIMOLOGO_FILENAME));
> And add the following to the geronimo\daytrader\streamer\project.xml file: 
> (below the </resource> tag)
>       <resource>
>           <directory>src</directory>
>           <includes>
>               <include>images/*.*</include>
>           </includes>
>       </resource>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to