Simple JMS example.

simple JMS example.
i am trying to execute this simple example SimpleQueueSender.java from the tutorial provided at http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/client.html#1027210
in this example it is creating empty initial context;
jndiContext = new InitialContext();
with empty InitialContext i got (javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial)
so i have modified it to
Properties prop = new Properties();
prop.setProperty(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
prop.setProperty(Context.PROVIDER_URL, "t3://192.168.3.91:7001");
jndiContext = new InitialContext(prop);
after making this changes and looking up for
queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("QueueConnectionFactory"); // here it is returning weblogic.jms.common.DestinationImpl.classs
i am still getting java.lang.ClassCastException
i have configured weblogic 8.1 and created new JMS server and created JMSQueue named 'QueueConnectionFactory' and JNDI name 'jndi_QueueConnectionFactory'
what else do i need to add or change to my code or environment
also tell me is this
Context.INITIAL_CONTEXT_FACTORY = "weblogic.jndi.WLInitialContextFactory" right value
******************************************************************************************

hmnn...well if I remember correctly you need to create an instance of a ConnectionFactory or a QueueConnectionFactory in weblogic and then request that via jndi.
To explain, what I believe is happening is that you've said you created a Queue in weblogic and named it xxxQueueConnectionFactory. You are then trying to cast this Queue to a QueueConnectionFactory. Based on what I thought I understood of jms this doesn't work. You need to lookup an instance of an actual ConnectionFactory and then use that to create a queue.
good luck.

Similar Messages

  • Error running A Simple MDB example with oc4j

    Hi All,
    I am new to OC4J, I am trying the example for MDB from OTN's site, A Simple MDB example with OC4J. When I start my OC4J on the command line > java -jar oc4j.jar
    I get the following exception:
    Error deploying file:/C:/unzipped/mdb_hello_world/build/mdb/mdb.jar homes: No lo
    cation set for Topic resource MessageDrivenBean MDB
    Error in application mdb: Error loading package at file:/C:/unzipped/mdb_hello_w
    orld/build/mdb/mdb.jar, Error deploying file:/C:/unzipped/mdb_hello_world/build/
    mdb/mdb.jar homes: No location set for Topic resource MessageDrivenBean MDB
    04/07/09 15:21:40 Error instantiating application 'mdb' at file:/C:/unzipped/mdb
    helloworld/build/mdb.ear: Error initializing ejb-module; Exception Error in ap
    plication mdb: Error loading package at file:/C:/unzipped/mdb_hello_world/build/
    mdb/mdb.jar, Error deploying file:/C:/unzipped/mdb_hello_world/build/mdb/mdb.jar
    homes: No location set for Topic resource MessageDrivenBean MDB
    04/07/09 15:21:41 Error starting HTTP-Server: Address already in use: JVM_Bind
    04/07/09 15:21:41 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)
    initialized
    I have just followed all the steps provided to run the example exactly as given.
    I did add my Topic and TopicConnectionFatory entries in my jms.xml -
    <topic name="The Topic" location="jms/theTopic">
    <description>A MDB topic</description>
    </topic>
    <topic-connection-factory location="jms/theTopicConnectionFactory" />
    Here is the ejb-jar.xml given in the example:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar>
    <ejb-jar>
    <enterprise-beans>
    <message-driven>
    <description>My message driven bean</description>
    <ejb-name>MDB</ejb-name>
    <ejb-class>MDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>NonDurable</subscription-durability>
    </message-driven-destination>
    <resource-ref>
    <description>The log topic where log events are broadcasted...</description>
    <res-ref-name>jms/theTopic</res-ref-name>
    <res-type>javax.jms.Topic</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
    <description>The Factory used to produce connections to the log topic...</description>
    <res-ref-name>jms/theTopicConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MDB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Here is my orion-ejb-jar.xml:
    <?xml version="1.0"?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar deployment-version="1.0.2.2" deployment-time="e7f5a3f42d">
    <enterprise-beans>
    <message-driven-deployment name="MDB" destination-location="jms/theTopic" connection-factory-location="jms/theTopicConnectionFactory">
    <resource-ref-mapping name="jms/theTopic" />
    <resource-ref-mapping name="jms/theTopicConnectionFactory" />
    </message-driven-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="&lt;default-ejb-caller-role&gt;" impliesAll="true" />
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    I don't know what is wrong. Please help me.
    Rohini

    Hello,
    I guess that you didn't define the Topic and/or TopicConnectionFactory on your OC4J
    Inside $J2EE_HOME/config (see: subfolders .../j2ee/home/config e.g.)folder are several xml files appropriate for OC4J configuration. There's also jms.xml. Please, verify this one, it should have some entries for your settings.
    Just like in an example below:
    <topic-connection-factory name="TopicConnectionFactory" location="jms/TopicConnectionFactory"/>
    <topic name="theTopic" location="jms/theTopic"/>
    The names should be the same like in your MDB deployment descriptors. It works of course after next OC4J server restart.
    I hope helped you
    Krzysztof

  • Simple JMS Configuration on OC4J Developers Preview

    What is the minumum required to configure the default OC4J JMS.
    I have a client deployed with the server that tries to get a Topic Connection Factory ....
    InitialContext ctx = new InitialContext();
    tConFactory = (TopicConnectionFactory)ctx.lookup("java:comp/env/jms/TopicConnectionFactory");
    tCon = tConFactory.createTopicConnection();
    tSession = tCon.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
    but the lookup fails with:
    javax.naming.NameNotFoundException: jms/TopicConnectionFactory not found in DriveStartup
    In jms.xml I have the following:
    <jms-server port="9127">
    <topic-connection-factory location="jms/TopicConnectionFactory" port="9127" password="2143768880" username="admin" />
         <!-- path to the log-file where JMS-events/errors are stored -->
         <log>
              <file path="../log/jms.log" />
         </log>
    </jms-server>
    What else do i have to do ?
    Cheers paul

    Hi Paul,
    I had similiar problems like the one you describe.
    I got the JMS example (CoffeeMaker) running, but had problems with my own application ( Object not bound).
    In my case, I got it running now when I only use the absolute necessary (oc4j.jar, junit.jar in my case) in my classpath
    (of course the application client xml's must contain your lookup names, but I did not !!! have to setup
    my queue in jms.xml (wonder why).
    You might try this (oc4j.jar references the required libs for jms,jndi,etc. internally)
    [Comment to "absolute necessary": of course I have a CLASSPATH which contains only the necessary libs.
    But since we are working on a framework which does not only want to connect to OC4J JMS (or EJB), I have
    a CLASSPATH containing other libs. I have to find the correct order, I guess.]
    But still my question to this forum: how is it possible that a queue is started "implicitly" (that means it is
    not configured in jms.xml). Is this desired or mandatory (Sun J2EE reference implementation does the same).
    Or am I missing something ?
    Regards,
    Armin

  • Simple Java Example for DI API

    Hello,
    I have a Java Application and would like to connect to a SAP BO Database using JCO and DI API.
    I want a simple java example that just connects to the BO Database and returns an item name or value or a recordset from the database.
    Since i dont have the names of what kind of fields, items , tables exist in the SAP BO Demo database i need a basic example to make sure that i can connect to the database and retrieve data from the DB.
    Any help in this regard would be appreciated...
    Amit

    Dear Amit Hingher,
    The B1 JCO is a java wrapper for DI API so basically you could refer to DI help for all objects, methods and properties.
    Here the jave sample for connection function:
    package test;
    import com.sap.smb.sbo.api.*;
    public class ConnectSAP {
         // company interface
         public ICompany company;
         private SBOErrorMessage errMsg = null;
         public static void main(String[] args) {
              ConnectSAP company = new ConnectSAP();
              company.conn();
         //method make connection andinitialize company instance
         public int conn() {
              int rc = 0;
              try {
                   company = SBOCOMUtil.newCompany();
                   company.setServer("(local)");
                   company.setCompanyDB("test");
                   company.setUserName("manager");
                   company.setPassword("manager");
                   company.setDbServerType(...);
                   company.setUseTrusted(new Boolean(false));
                   company.setLanguage(SBOCOMConstants.BoSuppLangs_ln_English);
                   company.setDbUserName("Sa");
                   company.setDbPassword("123");
                   company.setAddonIdentifier("...");     
                   company.setLicenseServer("...");
                   rc = company.connect();
                   if (rc == 0) {
                        System.out.println("Connected!");
                   } else {
                        errMsg = company.getLastError();
                        System.out.println(
                             "I cannot connect to database server: "
                                  + errMsg.getErrorMessage()
                                  + " "
                                  + errMsg.getErrorCode());
              } catch (Exception e) {
                   e.printStackTrace();
                   return -1;
              return rc;
         public void freeConnection(){
              company.disconnect();
    Best Regards
    Jane Jing
    SAP Business One Forums team

  • 1 "simple" JMS topic and 2 cluster elements with OSB

    Hi,
    I have 1 simple jms topic (not distributed, not on migratable target) and cluster with 2 members - OSB as main application. My OSB proxy service reads from this topic and saves data to file.
    The problem is that reading from topic appears twice - once by each cluster member. How to configure topic or proxy service for only one reading?

    FYI - At this year's Oracle OpenWorld, which is being held in conjunction with this year's JavaOne, Oracle will be announcing a set of enhancements that are designed to cover this exact use case.
    Tom Barnes
    Session ID: S317469
    Title: New Service-Oriented Architecture Patterns with Enterprise Grid Messaging
    Abstract: Messaging systems are essential in enabling the flexibility and loosely coupled nature of a service-oriented architecture (SOA). Oracle WebLogic Java Message Service (JMS) includes new pub-sub capabilities that make architectures more adaptable, allowing message producers to be ignorant of who is the consumer of a message or how many consumers there are. It also enables easy scale out and dynamic adaptability through clustering and message-driven bean (MDB) enhancements, all while still guaranteeing strict message ordering. This session will outline new JMS capabilities and show how they enable new designs with Oracle WebLogic Server and Oracle Service Bus.
    Speaker(s): Dongbo Xiao, Oracle, Principal Member of Technical Staff
    Biography not available.
    David Cabelus, Oracle USA, Senior Principal Product Manager
    Dave Cabelus is a Senior Principal Product Manager in the WebLogic Server group at Oracle. Dave's responsibilities include product strategy and direction for various pieces of WebLogic Server, including Java Messaging, Operations and Management, Diagnostics, and various other initiatives, and previously included database connectivity, transactions, and Web tier integration. In the industry since 1996 and involved in Java since 1999, Dave worked at various software companies including Logic Works, Platinum Software, Kana, and a few startups before coming to Oracle (BEA) in 2001.
    Event: JavaOne and Oracle Develop
    Stream(s): ORACLE DEVELOP, DEVELOP
    Track(s): Application Grid and Oracle WebLogic
    Tags: Add
    Session Type: Conference Session
    Session Category: Features
    Duration: 60 min.
    Schedule: Thursday, September 23, 11:00AM | Hotel Nikko, Nikko Ballroom II Available
    Edited by: TomB on Aug 12, 2010 1:21 PM

  • Need a simple Dashboard example

    Hello All,
    Can any one provide me an simple Dashboard example (Charts)  using Flex 3 .
    The dashboard should use a MYSQL database as a source.
    Many thanks,

    this is the mxml file
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.rpc.events.ResultEvent;
                [Bindable] private var dataColl:ArrayCollection;
                private function init():void{
                    xmlServ.send();
                private function handleResult(event:ResultEvent):void{
                    dataColl = (event.result as ArrayCollection).getItemAt(0).main as ArrayCollection;
            ]]>
        </mx:Script>
        <mx:HTTPService id="xmlServ" url="data.xml" resultFormat="array" result="handleResult(event)"/>
        <mx:TabNavigator id="myTabz" width="100%" height="100%">
            <mx:Canvas label="DataGrid" width="100%" height="100%">
                <mx:DataGrid dataProvider="{dataColl}" width="100%" height="100%">
                    <mx:columns>
                        <mx:DataGridColumn dataField="Products" headerText="Products"/>
                        <mx:DataGridColumn dataField="stock" headerText="Stock"/>
                    </mx:columns>
                </mx:DataGrid>
            </mx:Canvas>
            <mx:Canvas label="Line Chart" width="100%" height="100%">
                <mx:LineChart id="myLineChart" dataProvider="{dataColl}" showDataTips="true" width="100%" height="100%">
                    <mx:horizontalAxis>
                        <mx:CategoryAxis dataProvider="{dataColl}" categoryField="Products"/>
                    </mx:horizontalAxis>
                    <mx:series>
                        <mx:LineSeries yField="stock" displayName="Stock"/>
                    </mx:series>
                </mx:LineChart>
            </mx:Canvas>
            <mx:Canvas label="Bar Chart" width="100%" height="100%">
                <mx:BarChart id="myBarChart" dataProvider="{dataColl}" showDataTips="true" width="100%" height="100%">
                    <mx:verticalAxis>
                        <mx:CategoryAxis dataProvider="{dataColl}" categoryField="Products"/>
                    </mx:verticalAxis>
                    <mx:series>
                        <mx:BarSeries yField="Products" xField="stock" displayName="Stock"/>
                    </mx:series>
                </mx:BarChart>
            </mx:Canvas>
            <mx:Canvas label="Pie Chart" width="100%" height="100%">
                <mx:PieChart id="myPieChart" dataProvider="{dataColl}" showDataTips="true" width="100%" height="100%">
                    <mx:series>
                        <mx:PieSeries field="stock" nameField="Products" labelPosition="inside"/>
                    </mx:series>
                </mx:PieChart>
            </mx:Canvas>
        </mx:TabNavigator>
    </mx:Application>
    and the data.xml is
    <?xml version="1.0"?>
    <main>
        <Products>Products 1</Products>
        <stock>36</stock>
    </main>
    <main>
        <Products>Products 2</Products>
        <stock>48</stock>
    </main>
    <main>
        <Products>Products 3</Products>
        <stock>46</stock>
    </main>
    <main>
        <Products>Products 4</Products>
        <stock>78</stock>
    </main>

  • Testing simple JMS application

    I have written a very simple JMS application.
    I am trying to get it to run with the SUN App Server 8. I accepted the default values when installing the server. I have the app server up and running. The following code is suppose to create the Session:
    Context context = new InitialContext();
    ConnectionFactory connectionFactory =
    (ConnectionFactory)context.lookup("ConnectionFactory");
    Connection connection = connectionFactory.createConnection();
    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    I ave tried to run this from both the command line and from JBuilder. I have include the J2EE.jar in the classpath. I get the following error.
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    I know that I can set properties for the InitialContext constructor, but is this required? If so, what would the properties be for the default server?

    Looks like you're missing the initial context factory class which is:
    java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
    But I believe Sun recommends not settting it directly. You should include appserv-rt.jar in your classpath. That jar file has a file called jndi.properties which specifies the above property I just mentioned. Open it up and take a look for yourself.

  • Simple jsp example of using BI Bean in Myeclipse

    hi
    anyone can show me a simple jsp example of using BI Bean in Myeclipse
    or how to import BI Bean into Myeclipse
    I would so thankful for who can answer me.. please its urgent
    thanks

    Sorry, I was not very clear in my last message.
    I need all my webservices to share the same bean during one user session.
    Then, if a page calls 2 different web services, only 1 database connection is made instead of 2. And if the user opens other pages which call other webservices, they will use the connection kept into the session bean.
    Anyway, I tried to do like it is said in your website but I can not build my project. I have an error : java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/.../build/web/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. I do not understand because I have downloaded the jax-ws 2.1.1 api and no other libraries are imported in my project. :-(
    I wonder if it is not related to netbeans...

  • Simple JSP example problems

    Hello, I am new to JSP and I was wondering if I could get some help from some people that know what they are doing. I'm trying to run a simple JSP example that I got out of a book. But I've modified it a bit to just play around with it. But it doesn't want to run. I'm starting to think it's something wrong with the way I'm building/installing the stuff. I'm running IBM WebSphere 4 and JBuilder 8. I was just wondering if you could look at my code just to make sure I'm doing this right.
    It's a pretty simple example. A JSP calls a class to get a message to print out.
    Here's the code for the class: (HelloWorld.java)
    package helloworld;
    public class HelloWorld
    private String message = "No message specified";
    public String getMessage()
    return(message);
    public void setMessage(String message)
    this.message = message;
    =================================================================
    Here's the code for the JSP: (HelloWorld.jsp)
    <html>
    <head>
    <title>Using JavaBeans with JSP</title>
    </head>
    <body>
    <jsp:useBean id="helloWorld" class = "helloworld.HelloWorld" />
    <ol>
    <li>Initial Value (JSP Expression):
    <%= helloWorld.getMessage() %></li>
    <li><jsp:setProperty name="helloWorld"
    property="message"
    value="Hello World" />
    Value after setting property with setProperty:
    <jsp:getProperty name="helloWorld"
    property="message" /></li>
    </ol>
    </body>
    </html>
    I just wanted to be able to test out a JSP hitting a class file. Does someone have a better/easier way to do this? Or do you see anything wrong with my example? Thanks in advance.

    The 1 thing missing in your example is the import directive for the helloworld.HelloWorld class.
    Add the following line somewhere around the start of your jsp and things should be fine
    <%@ page import="helloworld.HelloWorld" %>
    Cheers

  • Simple DataSocket example hangs the DataSocket server

    Hi,
    I am having problems with the Simple DataSocket example. As soon as I try to connect to the DataSocket server on the local machine using dstp the server crashes. The error signature is:
    AppName: cwdss.exe          AppVer: 4.2.3.1                 ModName: mfc42.dll
    ModVer: 6.2.4131.0            Offset: 0001bc9b
    By restarting the server I am sometimes able to connect but most of the time this only results in a repeated crash. Furthermore when I try to close either the reader or the writer after such a crash I get the error message “the RPC-server is not available”. The only way to close the program is to use the task manager. I am using Measurement Studio 7.1 and Visual Studio 2003 version 7.1.3088 and I have successfully used DataSocket to communicate with an OPC server on the local machine. I would appreciate any suggestions on how to solve the problems since I would like use dstp in my own applications.
    Adam

    As I wrote in the original post, it is the simple datasocket example that I am having trouble with. I have managed to get the reader and writer to talk to each other by restarting the datasocket server repeatedly, but since the datasocket server crashes most of the times when I try to connect to it (i.e. I press either manual or auto update connect) this is rather tedious work. I think that the files were replaced correctly; at least the file cwdss.exe reappeared. The version of cwdss.exe is 4.2.3.1. Which other files should I check? The version of nids.dll is the same, i.e. 4.2.3.1.
    Adam

  • Simple struts example but it doesn't work

    Hello everybody,
    I'm new in struts technology and I wanted try a simple struts example, but it didn't work. Here are listings of code:
    *** struts-config .xml (is located in WEB-INF/) :
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="registerForm" type="app.RegisterForm"/>
    </form-beans>
    <action-mappings>
    <action path="/register"
    type="app.RegisterAction"
    name="registerForm">
    <forward name="success" path="/success.html"/>
    <forward name="failure" path="/failure.html"/>
    </action>
    </action-mappings>
    </struts-config>
    *** RegisterAction.java (located in WEB-INF/classes/app):
    package app;
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class RegisterAction extends Action {
         public ActionForward perform(ActionMapping mapping, ActionForm form,
                   HttpServletRequest req, HttpServletResponse res) {
              // b Cast the form to the RegisterForm
              RegisterForm rf = (RegisterForm) form;
              String username = rf.getUsername();
              String password1 = rf.getPassword1();
              String password2 = rf.getPassword2();
              // c Apply business logic
              if (password1.equals(password2)) {
                   return mapping.findForward("success");
              // E Return ActionForward for failure
              return mapping.findForward("failure");
    *** RegisterForm.java (located in WEB-INF/classes/app):
    package app;
    import org.apache.struts.action.*;
    public class RegisterForm extends ActionForm {
    protected String username;
    protected String password1;
    protected String password2;
    public String getUsername() {return this.username;};
    public String getPassword1() {return this.password1;};
    public String getPassword2() {return this.password2;};
    public void setUsername(String username) {this.username = username;};
    public void setPassword1(String password) {this.password1 = password;};
    public void setPassword2(String password) {this.password2 = password;};
    *** faulire.html ( located webapps/NAME_APPLICATION/ )
    <HTML>
    <HEAD>
    <TITLE>FAILURE</TITLE>
    </HEAD>
    <BODY>
    Registration failed!
    <P>try again?</P>
    </BODY>
    </HTML>
    *** success.html ( located webapps/NAME_APPLICATION/ )
    <HTML>
    <HEAD>
    <TITLE>SUCCESS</TITLE>
    </HEAD>
    <BODY>
    Registration succeeded!
    <P>try another?</P>
    </BODY>
    </HTML>
    *** register.jsp ( located webapps/NAME_APPLICATION/ )
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:form action="register.do">
    UserName:<html:text property="username"/><br>
    enter password:<html:password property="password1"/><br>
    re-enter password:<html:password property="password2"/><br>
    <html:submit value="Register"/>
    </html:form>
    *** web.xml (located in WEB-INF/)
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <!-- Standard Action Servlet Configuration (with debugging) -->
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>
         org.apache.struts.action.ActionServlet
         </servlet-class>
    <init-param>
    <param-name>application</param-name>
    <param-value>ApplicationResources</param-value>
    </init-param>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Standard Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    </web-app>
    After start of NAME_APPLICATION it show register form (register.jsp) but when I fill out all information and submit those information it show empty window in internet browser and in url box is something like this:
    http://localhost:8084/StrutsTest/register.do;jsessionid=2304C0A9820E7FCC23106C16564D51A8
    where is a problem? Thank you

    Employing a descendent of the Action class that does not implement the perform() method while using the Struts 1.0 libraries. Struts 1.1 Action child classes started using execute() rather than perform(), but is backwards compatible and supports the perform() method. However, if you write an Action-descended class for Struts 1.1 with an execute() method and try to run it in Struts 1.0, you will get this "Document contained no data" error message in Netscape or a completely empty (no HTML whatsoever) page rendered in Microsoft Internet Explorer.
    Also check this URL http://www.geocities.com/Colosseum/Field/7217/SW/struts/errors.html

  • Urgent ...JMS example client run problem

    HI
    I am facing following error while running a simple JMS client. Please help.
    Regards
    Jaisinh
    D:\jai>java com.monex.prototype.SimpleTopicPublisher
    Exception in thread "main" java.lang.NoClassDefFoundError: java/lang/AssertionError
    at weblogic.security.subject.DelegatingSubjectStack.<clinit>(DelegatingSubjectStack.java:18)
    at weblogic.security.service.SubjectManagerImpl.<init>(SubjectManagerImpl.java:40)
    at weblogic.security.service.SubjectManagerImpl.ensureInitialized(SubjectManagerImpl.java:277)
    at weblogic.jndi.WLInitialContextFactoryDelegate.<clinit>(WLInitialContextFactoryDelegate.java:137)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:131)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
    at javax.naming.InitialContext.init(InitialContext.java:222)
    at javax.naming.InitialContext.<init>(InitialContext.java:198)
    at com.monex.prototype.SimpleTopicPublisher.main(SimpleTopicPublisher.java:54)

    Thank you sam,
    You are correct.
    I found solution for the problem the same day. Actually it was classpath error.
    I was testing with j2sdk1.3 env instead of j2sdk 1.4. I was not able to access
    the website so posting a reply little late.
    Regards
    Jaisinh
    Sam Pullara <[email protected]> wrote:
    You are running under 1.3 instead of 1.4.
    Sam
    Jaisinh Nimbalkar wrote:
    HI
    I am facing following error while running a simple JMS client. Pleasehelp.
    Regards
    Jaisinh
    D:\jai>java com.monex.prototype.SimpleTopicPublisher
    Exception in thread "main" java.lang.NoClassDefFoundError: java/lang/AssertionError
    at weblogic.security.subject.DelegatingSubjectStack.<clinit>(DelegatingSubjectStack.java:18)
    at weblogic.security.service.SubjectManagerImpl.<init>(SubjectManagerImpl.java:40)
    at weblogic.security.service.SubjectManagerImpl.ensureInitialized(SubjectManagerImpl.java:277)
    at weblogic.jndi.WLInitialContextFactoryDelegate.<clinit>(WLInitialContextFactoryDelegate.java:137)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:131)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
    at javax.naming.InitialContext.init(InitialContext.java:222)
    at javax.naming.InitialContext.<init>(InitialContext.java:198)
    at com.monex.prototype.SimpleTopicPublisher.main(SimpleTopicPublisher.java:54)

  • Bug in Teststand 2014 Simple UI Example ?

    Hi,
    I am using Teststand 2014 and LabVIEW 2013 SP1.
    I would like to create a UI for a Teststand sequence that I have created.
    I have started with the Simple UI example (Source Code) shipped with NI.
    Located at  - C:\Users\Public\Documents\National Instruments\TestStand 2014 (32-bit)\UserInterfaces\Simple\LabVIEW\Source Code
    I have encountered with an unexpected behaviour - when running the User Interface VI and selecting a Sequence, it works fineat first, but if I Exit the application (the VI return to edit mode), I cannot run the application again until I close LabVIEW completely.
    There seems to be more resources that are open.\\
    Steps to reproduce - 
    1. Create an Empty VI (called 1.vi for example)
    2. Create a Sequence that only calls the 1.vi in the Main Group. (called 1.seq for example)
    3. Open 'Build Script.lvproj' located at "C:\Users\Public\Documents\National Instruments\TestStand 2014 (32-bit)\UserInterfaces\Simple\LabVIEW\Source Code"
    4. Open and run Top-Level.vi.
    5. Click on 'Open Sequence File' and Select the 1.seq, Click on 'Single Pass' and the application should finish running the sequence (with the one VI in it) very fast.
    6. Exit the application.
    7. repeat on steps 4 and 5.
    Am I missing something ?
    When using the compiled application (exe), it works fine when called repeatedly.
    I would like to be able to add changes to the VI and to be able to run it again and again... 
    Amitai.
     

    Hi,
    I tried with the same combination and did the exact steps to reproduce.
    With the "Reserve Loaded VIs for execution" enabled i am seeing this :
    After execution is completed if i click on close execution and close sequence file, the empty test vi is read only (reserved - not in edit mode)
    However when i disable this :
    After execution and clickingon "close execution" + "close sequence file" -- i can edit the test vi.
    Probably i am missing something from the steps to reproduce?
    Additionally did you observe this behaviour with other UI/Sequence editor?
    Regards,
    Ravi

  • HelP for understanding simple JMS program

    I am trying to compile and run a simple jms requester/server program. The sample code asks to deffine jndi as follow and run wtih jmsadmin
    def qcf(sampleQCF) qmanager(TEST.QMGR) tempmodel(QUEUE.TEMP)
    def q(qSrv) qu(QUEUE.SERVER)
    def q(qReq) qu(QUEUE.REQUESTER)
    Should not a qcf has to have channel and port as a part of defnition? How can this app connect to a queue managger? BTW, my jms provicer is MQ.
    I understand that I have to have a qmgr called TEST.QMGR created and two queues called QUEUE.REQUESTER and QUEUE,SERVER.
    Thanks
    kiran
    Edited by: xmlcrazy on Jan 2, 2010 3:21 PM
    Edited by: xmlcrazy on Jan 2, 2010 4:57 PM

    I was experiencing the same problem. There is probably a mismatch (not the same release) between the ojdbc14.jar and the orai18n.jar. Using http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html I downloaded the latest libraries (10.2.0.3) and moved them to the lib directory of my project. This worked for me.
    Good luck!

  • Simple bluetooth example labview pda

    hi, im trying to use the simple bluetooth examples on the pda, i can compile and run the client  on the pda no problems but when i try running the server on the computer it just stops straight off, i thought it was the timeout but thats still at 3000 and i havent changed anything on it.
    i running xp pro sp2, broadcom 2045 adapter and a ipaq 5550 with bluetooth
    any help would be ace
    cheers
    andy

    Hi Andy,
    LabVIEW will only support devices that use Microsoft's Bluetooth Stack, and unfortunatly it appears yours does not. The following list of bluetooth devices are supported by Microsoft's bluetooth stack and therefore LabVIEW:
    Belkin F8T012UK1 EDR Bluetooth USB Adapter
    Belkin F8T003 Bluetooth USB Adapter - 10 Meters ( Belkin F8T003 ver. 2 don't seems to work )
    Billionton GUBTCR41 - 100 m (Software included in the package not installed)
    Conceptronic "Bluetooth 2.0 USB Adapter 200M" CBTU2A / CBT200U2A (Software in the package not installed)
    Dell Wireless 350 Bluetooth Module
    D-Link DBT-120 Bluetooth Adaptor
    Encore USB Dongle (Microsoft Stack)
    Exwell BD-U08 EDR Bluetooth USB Adapter
    Exwell BD-U01 Bluetooth USB Adapter - 10 Meters
    Kensington USB K33085 (Microsoft Stack)
    GigaByte Bluetooth USB Adapter GN-BT05D (Software included in the package not installed)
    Hama Bluetooth Dongle 00049207 (Software included in the package not installed). Inquiries seems to hang after a while ..
    IBM Integrated Bluetooth II on ThinkPad T40 (with driver from Microsoft; file version: 5.1.2600.2180, xpsp_sp2_rtm.040803-2158)
    Trust BT 1300 TP Bluetooth USB adapter (Software included in the package not installed)
    Trust BT 2200 TP Bluetooth USB adapter (Software included in the package not installed) (Microsoft Stack and Widcomm)
    Perfect choice USB Adapter (Microsoft Stack and Widcomm)
    Sorry I can't give you a more possive resolution but unless your device is compatible with the Microsoft Bluetooth Stack it won't work I'm afraid.
    Best Regards,
    Ian Colman
    Applications Engineer
    National Instruments UK & Ireland

Maybe you are looking for