[11G] Java Bean OracleBarCode -  Error in barcodemaker.renderBarCode

Hi,
I managed to get the bar codes to print on Windows using OracleBarCode.jar.
On Windows I have JAVA 1.6.
Now I am trying to do the same on Linux 2.6.18 with Java 1.4.2.
The error message displays in the EM Console:
Message     C Engine Job ID = 4254 ERR REP-1401: A fatal PL/SQL error occurred in program unit cf_cabformula.
Détails supplémentaires     ORA-39565: Message 39565 not found; product=RDBMS; facility=ORA
I have some Java instructions working, but there is a problem with the /temp/file management.
I have set the directory properties to 777.
After having scanned all web site for answers, I am at the end of my options.
Many thanks if you can help.

What are the java requirements for OracleBarCode.jar?
Have you considered upgrading java?
For instance:
# yum install java-1.6*
or just the runtime package
# yum install java-1.6.0-openjdk
For example:
# uname -a
Linux oel54.example.com 2.6.32-100.0.19.el5 #1 SMP Fri Sep 17 17:51:41 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
# java -version
java version "1.4.2"
# yum install java-1.6.0-openjdk
# alternatives --config java
There are 2 programs which provide 'java'.
  Selection    Command
+ 1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*  2           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
Enter to keep the current selection[+], or type selection number: 2
# java -version
java version "1.6.0"

Similar Messages

  • An error in jsp page useBean when i try to include the java bean package?

    Hi Sir,
    I am using import com.project.ShowData in java beans inorder to connect to the jsp.
    The jsp code goes like this:-
    <%@ page import="com.project.ShowData" %>
    <jsp:useBean id="jspuser1" class="com.viman.ShowData" scope="session"/>
    <jsp:setProperty name="jspuser1" property="*"/>
    Here the error is showing as cannot resolve symbols in com.project.ShowData.But i have given the same in java beans like this:-
    Package com.project;
    //import of package goes here
    public class ShowData
    //code goes here
    It seems that all are correct here.I have done few programs using this without any problem.But suddenly it is giving a problem like this.What is the problem here?It is quite Urgent.Thank u.
    Regards,
    m.ananthu

    Greetings,
    Here the error is showing as cannot resolve symbols in com.project.ShowData.But i have given the
    same in java beans like this:-Seeing the actual error would be more helpful. ;)
    Regards,
    m.ananthu Regards,
    Tony "Vee Schade" Cook

  • Column Not found error while trying to access databse through JSP+Java Bean

    I am trying to acees MS Access 2003 db through JSP using Tomcat 5.0.28.The code for accessing the databse is incorporated in the bean.The jsp only calls the particular method of the bean .
    Code for Java Bean:
    package ActiveViewer;
    import java.sql.*;
    import java.util.*;
    public class CompanyBean
    Connection con;
    ResultSet rs=null;
    Statement st;
         public CompanyBean(){}
         public void connect()
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Here4");
    con=DriverManager.getConnection("jdbc:odbc:activeviewer","","");
         System.out.println("Here1");
         catch (ClassNotFoundException e)
         System.out.println("Could not locate driver.");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
         catch (Exception e)
    System.out.println("An unknown Exception has occured :: "+e);
         e.printStackTrace();
    public void disconnect()
         try
         if (con!=null)
    con.close();
         catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
    public ResultSet select(String username)
    if(con!=null)
         try
    st=con.createStatement();
         rs=st.executeQuery("select * from company where username='" + username + "'");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
    catch (Exception e)
    System.out.println("An Exception has occured while retrieving :: "+e);
    e.printStackTrace();
    else
    System.out.println("Connection to database was lost.");
    return rs;
    The code for JSP that uses the above bean is:
    <%@ page language="java" import="java.sql.*,ActiveViewer.* " contentType="text/html"%>
    <jsp:useBean id="conn" scope="session" class="ActiveViewer.CompanyBean" />
    <html>
    <body>
    <% String username=request.getParameter("username");
    String password=request.getParameter("password");
    System.out.println("username:"+username);
    System.out.println("password:"+password);
    conn.connect();
    ResultSet rs=conn.select(username);
    System.out.println("Below select ");
    while (rs.next())
    String dbusername=rs.getString("username");
         String dbpassword=rs.getString("password");
         if(dbusername.equals(username) && dbpassword.equals (password))
    { %> out.println("OK");
              <% }
    else { %>Invalid Username and / or Password.
    <br>Clickhere to go back to Login Page.
    <% }
    } %>
    </body>
    </html>
    I get the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Column not found
    though the database is not int he same folder as the jsp, the DSN is set correctly to pint to the db location.The jsp does print in stdout file:
    Here4 (from connect method above)
    Here 1 (from connect method above)
    Below Select (from jsp)
    This means that the jsp does connect to db but it gives the above error.Also the field name also matches that in the database and data is present in the db too.
    All other things like creating package for bean,incorporating the packakage are done.
    Can someone please help me with their precious advice?

    U're getting this error because there is no field called 'password' in ur database, the field in ur database is named 'cpassword' and not 'password'. So change the statement rs.getString("password"); to rs.getString("cpassword");

  • First use of jsp and java bean and "Unable to compile class for JSP" error

    Hi,
    I am trying to create my first jsp + java bean and I get a basic error (but I have no clue what it depends on exactly). Tomcat seems to cannot find my class file in the path. Maybe it is because I did not create a web.xml file. Did I forgot to put a line in my jsp file to import my bean?
    Thank you very much for your help.
    Here is my error:
    An error occurred at line: 2 in the jsp file: /login.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    /usr/local/tomcat/jakarta-tomcat-5/build/work/Catalina/localhost/test/org/apache/jsp/login_jsp.java:43: cannot resolve symbol
    symbol : class CMBConnect
    location: class org.apache.jsp.login_jsp
    CMBConnect test = null;
    I only have this in my directory:
    test/login.jsp
    test/WEB-INF/classes/CMBConnect.java
    test/WEB-INF/classes/CMBConnect.class
    Do I need to declare another directory in classes to put my class file in it and package my bean differently?
    Here is my login.jsp:
    <%@ page errorPage="error.jsp" %>
    <jsp:useBean id="test" type="CMBConnect" scope="session" />
    <html>
    <head>
    <title>my test</title>
    </head>
    <body>
    <h3>Login information</h3>
    <b><%=session.getValue("customerinfo.message")%></b>
    <form> ....... </form>
    </body>
    </html>
    and here is my CMBConnect.java:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class CMBConnect
    public CMBConnect () { }
    public String openConnection(String id, String password) {
    String returnText = "";
    try {
    Connection con = null;
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection("jdbc:oracle:thin:@myserver.abc.com:1521:TEST", id, password);
    if(con.isClosed())
    returnText = "Cannot connect to Oracle server using TCP/IP...";
    else
    returnText = "Connection successful";
    } catch (Exception e) { returnText = returnText + e; }
    return returnText;
    Thanks again!

    Thanks for you help
    I created the package and I get this error this time:
    javax.servlet.ServletException: bean test not found within scope
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:822)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:755)
         org.apache.jsp.login_jsp._jspService(login_jsp.java:68)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:268)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:277)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:223)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

  • Error in calling Java Beans

    Hi.
    I was trying to use a bean that i will run on my jsp. Basically, i have this Matiss_Import.jsp that calls the Matiss_DB_Trans.java by using the
    <jsp:useBean id="db_trans" class="Matiss_DB_Trans"/>
    My Matiss_DB_Trans.java and Matiss_Import.jsp are both in the same folder (c:\jakarta-tomcat-4.0\webapps\onjava). When i tried to run it, it gave me this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 13 in the jsp file: /Matiss_Import.jsp
    Generated servlet error:
    C:\jakarta-tomcat-4.0\work\localhost\onjava\Matiss_0005fImport$jsp.java:76: Class org.apache.jsp.Matiss_DB_Trans not found.
    Matiss_DB_Trans db_trans = null;
    ^
    An error occurred at line: 13 in the jsp file: /Matiss_Import.jsp
    Generated servlet error:
    C:\jakarta-tomcat-4.0\work\localhost\onjava\Matiss_0005fImport$jsp.java:79: Class org.apache.jsp.Matiss_DB_Trans not found.
    db_trans= (Matiss_DB_Trans)
    ^
    An error occurred at line: 13 in the jsp file: /Matiss_Import.jsp
    Generated servlet error:
    C:\jakarta-tomcat-4.0\work\localhost\onjava\Matiss_0005fImport$jsp.java:84: Class org.apache.jsp.Matiss_DB_Trans not found.
    db_trans = (Matiss_DB_Trans) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "Matiss_DB_Trans");
    ^
    3 errors
    Can anyone please help me with this one. The tutorials i read mentioned about a qualified classname. But don't you think mine is a qualified classname already? I mean, i didn't put my Matiss_DB_Trans.java in any package.
    Thank you very much in advance.

    Try to put Matiss_DB_Trans.class in c:\jakarta-tomcat-4.0\webapps\onjava\WEB-INF\classes. If the folder doesn't exist create it.
    Hope it'll work.
    Regards,
    Anton

  • Java Bean Error in JSP: Cannot Resolve Symbol FirstBean

    I have created a java bean with following package statement
    package mybeans;
    and my bean name is
    FirstBean
    it compile secessfully and now my directory structure is following
    WebAppRootDir \ WEB-INF \ classes \ mybeans \ FirstBean.class
    I am using Tomcat 4.1 and in JSP i am declaring the bean with following line
    <jsp:useBean id="b" class="mybeans.FirstBean" />
    and tomcat 4.1 is failed to find this bean and giving me following error
    cannot resolve symbol
    symbol  : class StudentBean 
    location: package mybeans
    mybeans.FirstBean b = null;
    all my class and directory structure is ok i am puzzle why this error is coming, plz help me quickly i need solution quickly ...

    Error is for StudentBean, not for FirstBean. So check for it.

  • Java Bean Error in JSP: Cannot Resolve Symbol Error

    I have created a java bean with following package statement
    package mybeans;
    and my bean name is
    FirstBean
    it compile secessfully and now my directory structure is following
    WebAppRootDir \ WEB-INF \ classes \ mybeans \ FirstBean.class
    I am using Tomcat 4.1 and in JSP i am declaring the bean with following line
    <jsp:useBean id="b" class="mybeans.FirstBean" />
    and tomcat 4.1 is failed to find this bean and giving me following error
    cannot resolve symbol
    symbol  : class FirstBean 
    location: package mybeans
    mybeans.FirstBean b = null;
    all my class and directory structure is ok i am puzzle why this error is coming, plz help me quickly i need solution quickly ...

    It seem to be ok... why dont your try with a newer versi�n of Tomcat?

  • Generate Java Bean Steleton with WSDL error

    Hi everyone:
    We are using CE 7.1 EHP1 SP01. We use ESR to create model and use NWDS to create java Bean Steleton for ESR model. It works fine in CE7.1. But when we upgrade to CE7.1 EHP1 SP01. An error occurs. When we create the skeleton. We find an error in the wsdl. The error is like "The 'EmbeddedSupport' port type specified for the  'EmbeddedSupportBinding' binding is undefined. Check the 'EmbeddedSupport' port type name and ensure it is defined."
    Due to everything is generated automatically by Java Bean skeleton wizard. I think there is sth wrong with ESR wsdl. Does anyone encount this issue?
    Thanks
    Elliot

    Hi,
    you have to delete some tags.
    k.      When imported, the wsdl file is validated. Open the wsdl file to check the errors.
    If you get the following error: '<Your service>_In' port type specified for the '<Your Service Binding>' binding is undefined.  Delete the policy tag wsp:Policy under the tag wsdl:portType and under the tag wsdl:binding.
    This is an extract of the blog:
    /people/abdelmorhit.elrhazi/blog/2009/10/30/how-to-consume-an-inbound-backend-web-service-in-nwdsjboss-environment
    Regards,
    Christoph

  • Java Beans in 11g !

    Hi everyone,
    We are using 11gr2 Forms/Reports 64-bit on Windows Server 2008 64-bit.
    Now we want to use JAVA BEANS in our application.
    Suggest me link and steps for installing/using JAVA BEANS compatible for 11gr2 Forms/Reports.
    Kindly tell me benefits of using JAVA BEANS in our applications.
    Thanks vth Regards.
    Bhatt.

    Advantage of java beans is you can enhance the behavior of forms. Forms is as you know applet based running on the client. (There is a different technology associated with inserting your own java code into the loop on the application server, should you want to do that.) So with beans in theory you can get more code to run on the client and do things like read and write files on the client, communicate with devices on the client, etc.
    Regarding doing that I think the executive summary is mostly look up Fbean in forms builder help.
    How I came to that tentative conclusion (I haven't gotten mybean to work yet! What do I know?) follows.
    Home of much forms info:
    http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html
    Java beans are java obviously one has to acquire a certain level of expertise in java to deal with them but more importantly how to understand how to communicate between forms and the bean? It's hard for formists, living their lives at the outside of forms, who come up with an idea of something exceptional they want to do in forms, to translate that into the bean world. Then you have to think like a form and that's unknown territory.
    One problem is terminology: what is a PJC and what is a bean? Is a bean a PJC? I have yet to definitely figure that out. The paper below says: "A javabean is a pjc which is of an unspecialized type". However after that was written seems like in many cases when people are referring to "pjc"'s they are thinking the pjc is a specialized type.
    "Oracle9i Forms provides two mechanisms for extending the client with Java. The
    Pluggable Java Component (PJC) mechanism, which was introduced with Forms
    6i, and the newer Oracle9i Forms specific, enhanced JavaBean support
    mechanism." (paper 2 below).
    I was reading this document from 2000 which is interesting:
    Paper 1:
    http://www.oracle.com/technetwork/developer-tools/forms/documentation/269054-130573.pdf
    It's talking about handlers and views and it's quickly getting over my head as I don't know enough forms internals to make much of this. For example I would like to write a bean that can print a small form. I have a proof of concept in java (6) that can print text to the default printer. So next step, create a bean that can get the data out of the form. From my formist perspective here I am in a bean how do I access some fields in a record in a block in forms? It's tough going. What does that mean in this handler/view world? Or do I have to be in the form and think of sending data to the bean and telling it to print it?
    Paper 2:
    http://www.oracle.com/technetwork/developer-tools/forms/documentation/269054-130573.pdf
    Starts out with more on the handler/view thing. Unfortunately I am totally mvc or handler-view impaired. It escapes me totally.
    "The Handler class is responsible for both maintaining the current value of any data and controlling the visual representation of the data."....vs.... "The View class is singularly responsible for presenting the data to the user in some
    manner and handling user input. The View class may allow the data to be changed
    by the user.". What? I am lost I have no idea what the handler does and what the view does. How about a discussion that is strictly goal oriented? If you want to do this, you have to talk to the (Handler| View)? Don't leave it to me to understand the handler/view thing and then figure it out from that. (This mvc thing is precisely what repels me about jdeveloper. You can't embrace jdev if you haven't drunk the mvc koolaid.)
    Further on in the paper they bring up fbean:
    "So in Oracle9i Forms a new simpler mechanism was introduced to allow you to integrate JavaBeans and Java
    Applets as custom components without writing any Java Code at all. This is all handled using a PL/SQL package in Forms called FBean.
    "FBean provides a full PL/SQL API to allow interaction with any public methods,
    properties and events that a JavaBean or Applet exposes."
    Now you're talking! This is more like it!:
    "Executing Methods
    Methods on the JavaBean are executed using one of the variety of
    FBean.Invoke methods. Like the property getters and setters there are various
    versions of this method which handle calling methods on the JavaBean that return
    different datatypes (or return void):
    • FBean.Invoke_Char()
    • FBean.Invoke_Bool()
    • FBean.Invoke_Num()
    • FBean.Invoke()
    Ok now that we know about the fbean thing we can find fbean in the forms builder help system. Looking good. I am pretty sure that somewhere in there you have to get your bean in a jar file and sign it (not a trivial proposition) and
    change the forms server configuration to include your jar file. I also think that the bean has to import frmall.jar and some of the packages regarding that view stuff. A tutorial about fbean and all these details from start to finish would be super!
    So you can talk to another applet? Really? Can this still be done considering all the security concerns in current browsers?

  • Problem with java beans and jsp on web logic 6.0 sp1

              HI ,
              I am using weblogic6.0 sp1.
              i have problem with jsp and java beans.
              i am using very simple java bean which stores name and email
              from a html form.
              but i am getting following errors:
              Full compiler error(s):
              D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              cannot resolve symbol
              symbol : class userbn
              location: class jsp_servlet._savename2
              userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              ^
              D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              cannot resolve symbol
              symbol : class userbn
              location: class jsp_servlet._savename2
              userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              ^
              D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:94:
              cannot resolve symbol
              symbol : class userbn
              location: class jsp_servlet._savename2
              ud = (userbn) java.beans.Beans.instantiate(getClass().getClassLoader(),
              "userbn"); //[ /SaveName2.jsp; Line: 7]
              ^
              3 errors
              in which directory should i place java bean source file(.java file)
              here is my jsp file:
              <%@ page language = "java" contentType = "text/html" %>
              <html>
              <head>
              <title>bean2</title>
              </head>
              <body>
              <jsp:usebean id = "ud" class = "userbn" >
              <jsp:setProperty name = "ud" property = "*" />
              </jsp:usebean>
              <ul>
              <li> name: <jsp:getProperty name = "ud" property = "name" />
              <li> email : <jsp:getProperty name = "ud" property = "email" />
              </ul>
              </body>
              <html>
              here is my bean :
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              import java.io.*;
              public class userbn implements Serializable
                   private String name ;
                   private String email;
                   public void setName(String n)
                        name = n;
                   public void setEmail(String e)
                        email = e;
                   public String getName()
                        return name;
                   public String getEmail()
                        return email;
                   public userbn(){}
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              pls help me.
              Thanks
              sravana.
              

              You realy can do it like Xiang says, but the better way is to use packages. That's
              the way BEA is designed for. If you use packages you can but your bean classes
              in every subfolder beneath Classes. Here for example we have the subfolders test
              and beans:
              You have to declare the package on top of your Bean Source Code:
              package test.beans;
              In your JSP you don't need the import code of Xiang. You only have to refer the
              path of your bean class:
              <jsp:useBean id="testBean" scope="session" class="test.beans.TestBean" />
              There are some other AppServers that only can deploy Java Beans in packages. So
              if you use packages you are always on the right side.
              ciao bernd
              "sravana" <[email protected]> wrote:
              >
              >Thank you very much Xiang Rao, It worked fine.
              >Thanks again
              >sravana.
              >
              >"Xiang Rao" <[email protected]> wrote:
              >>
              >><%@ page import="userbn" language = "java" contentType = "text/html"
              >>%> should
              >>work for you.
              >>
              >>
              >>"sravana" <[email protected]> wrote:
              >>>
              >>>HI ,
              >>>
              >>>I am using weblogic6.0 sp1.
              >>>
              >>>i have problem with jsp and java beans.
              >>>
              >>>i am using very simple java bean which stores name and email
              >>>
              >>>from a html form.
              >>>
              >>>but i am getting following errors:
              >>>
              >>>________________________________________________________________
              >>>
              >>>Full compiler error(s):
              >>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              >>>cannot resolve symbol
              >>>symbol : class userbn
              >>>location: class jsp_servlet._savename2
              >>> userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              >>> ^
              >>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              >>>cannot resolve symbol
              >>>symbol : class userbn
              >>>location: class jsp_servlet._savename2
              >>> userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              >>> ^
              >>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:94:
              >>>cannot resolve symbol
              >>>symbol : class userbn
              >>>location: class jsp_servlet._savename2
              >>> ud = (userbn) java.beans.Beans.instantiate(getClass().getClassLoader(),
              >>>"userbn"); //[ /SaveName2.jsp; Line: 7]
              >>> ^
              >>>3 errors
              >>>
              >>>____________________________________________________________
              >>>
              >>>in which directory should i place java bean source file(.java file)
              >>>
              >>>here is my jsp file:
              >>>--------------------------------------------------------
              >>>
              >>><%@ page language = "java" contentType = "text/html" %>
              >>><html>
              >>><head>
              >>><title>bean2</title>
              >>></head>
              >>><body>
              >>><jsp:usebean id = "ud" class = "userbn" >
              >>><jsp:setProperty name = "ud" property = "*" />
              >>></jsp:usebean>
              >>><ul>
              >>><li> name: <jsp:getProperty name = "ud" property = "name" />
              >>><li> email : <jsp:getProperty name = "ud" property = "email" />
              >>></ul>
              >>></body>
              >>><html>
              >>>
              >>>-------------------------------------------------------------
              >>>
              >>>here is my bean :
              >>>
              >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              >>>
              >>>import java.io.*;
              >>>
              >>>public class userbn implements Serializable
              >>>{
              >>>
              >>>     private String name ;
              >>>
              >>>     private String email;
              >>>
              >>>     public void setName(String n)
              >>>     {
              >>>
              >>>          name = n;
              >>>     }
              >>>
              >>>     public void setEmail(String e)
              >>>     {
              >>>
              >>>          email = e;
              >>>     }
              >>>
              >>>     public String getName()
              >>>     {
              >>>
              >>>          return name;
              >>>     }
              >>>
              >>>     public String getEmail()
              >>>     {
              >>>
              >>>          return email;
              >>>     }
              >>>
              >>>     public userbn(){}
              >>>}
              >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              >>>
              >>>pls help me.
              >>>Thanks
              >>>sravana.
              >>>
              >>
              >
              

  • WDVisibility type paramter in Java Bean(Web Dynpro DC in CE 7.1)

    Hi All,
    I need to set a WDVisibility type paramter in a java bean and i am able to do so.It imports com.sap.tc.webdynpro.progmodel.api.WDVisibility class .
    The problem is when i am creating a Java Bean model  it is not allowing me to select the Java bean class it gives an error message" Invalid Class : No class files found for JavaBean : com/sap/tc/webdynpro/progmodel/api/WDVisibility".
    The java Bean class exists in Web Dynpro DC>src folder.
    Any Pointers?
    Regards
    Avinash

    Hi Ondrej ,
    Refer the above links to convert the component of the first dc as a public part.
    Then declare the methods which are written in the component controller of the first DC in the interface controller with the same signature.( When method is called automatically component controller method is called)
    In second dc in component controller properties tab add the reference of the first dc.
    Then access the method in second dc as
    wdthis.wdget<UsedComponent name>Interface.methodname();
    Thanks & Regards,
    Ardhendu

  • Java.sql.SQLException: Error in allocating a connection

    hi,
    I have developed enterprise application using net beans IDE 5.5.I created one enity bean using sql server database.When i tried deploy this project i am getting following error...
    Internal Exception: java.sql.SQLException: Error in allocating a connection.
    Cause: Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSourceError
    can anybody please help me.....where i went wrong...i am new to netbeans IDE
    regrds
    patel

    u need to download the three jar files.
    download the following jar files and add in ur classpath.
    msutil-2000.sp2-lib.jar
    msbase-2000.sp2-lib.jar
    mssqlserver-2000.sp2-lib.jar
    This is sample program...
    u can test in standalone first and do in netbeans....
    import java.sql.*;
    public class querybean {
    public String getdata(String sql) {
         try {
    System.out.println("testing connection ");
              Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
         Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;databaseName=master;user=sa;password=userpass;");
         Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery(sql);
    System.out.println("testing connection pooling");
    while(rs.next()) {
    System.out.println(rs.getString(1));
    } catch(Exception e1) {
    System.out.println("exception caught" + e1);
    return "";
    public static void main (String args[]) throws Exception {
    querybean qb = new querybean();
    qb.getdata("select * from sampletable");
    I belive it will work now

  • Web Service from an EJB with an Java Bean: createSAXParseException

    Hi I am using Together to develop Web Services from an EJB+a Java Bean.
    I used the Trader Example, which includes an EJB + a Java Bean.
    Running the utility "ant" I get the following exception:
    "C:\bea\jdk131\jre\lib\rt.jar;C:\bea\jdk131\lib\rt.jar;c:\bea\wlserver6.1\lib\weblogic.jar;C:\Programme\Together5.5\lib\javax.jar;;"
    org.apache.tools.ant.Main
    WLS61: Error at line:6 col:12 ':' Already got a ':' in name
    WLS61:      at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseException(SAXElementFactory.java:60)
    WLS61:      at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:45)
    WLS61:      at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(BabelXMLEventStream.java:28)
    WLS61:      at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:600)
    WLS61:      at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:577)
    WLS61:      at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java:225)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.java:1125)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:1285)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper.java:1418)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:1486)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1520)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
    WLS61:      at org.apache.tools.ant.Target.execute(Target.java:153)
    WLS61:      at org.apache.tools.ant.Project.runTarget(Project.java:898)
    WLS61:      at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    WLS61:      at org.apache.tools.ant.Project.executeTargets(Project.java:510)
    WLS61:      at org.apache.tools.ant.Main.runBuild(Main.java:421)
    WLS61:      at org.apache.tools.ant.Main.main(Main.java:149)
    WLS61: Buildfile: build.xml
    WLS61:
    WLS61: wsgen:
    WLS61:
    WLS61: BUILD SUCCESSFUL
    WLS61:
    WLS61: Total time: 7 seconds
    WLS61: Finished with 19 Errors, 0 Warnings.

    Hi,
    try these links
    http://www.baigzeeshan.com/2010/11/creating-webservice-from-java-class-in.html
    http://www.baigzeeshan.com/2010/11/calling-webservice-in-oracle-adf-by.html
    Hope it help,
    Zeeshan

  • Problems with a java bean in Weblogic 5.1

    Hello,
              I am having a problem deploying a java bean in Weblogic 5.1:
              I have been given a .class and a .jar file for a java bean (not an EJB). I
              placed the .class file into e:\temp\WEB-INF\classes and added the following
              line to my weblogic.properties file:
              weblogic.httpd.webApp.testApp=e:/temp/
              I have also updated the web.xml file in the WEB-INF directory as follows:
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
              Application 1.2//EN"
              "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <servlet>
              <servlet-name>EdIface</servlet-name>
              <jsp-file>test.jsp</jsp-file>
              </servlet>
              <servlet-mapping>
              <servlet-name>EdIface</servlet-name>
              <url-pattern>EdIface</url-pattern>
              </servlet-mapping>
              </web-app>
              When I try to access my http:\\server:port\testApp\test I get an "Error
              500 - internal server error".
              Has anyone had experice with deploying a java bean with jsut the .class and
              .jar file? Where should I put the .jar file?
              I appreciate any advice!
              

    Bump

  • How to get an XML string from a Java Bean without wrting to a file first ?

    I know we can save a Java Bean to an XML file with XMLEncoder and then read it back with XMLDecoder.
    But how can I get an XML string of a Java Bean without writing to a file first ?
    For instance :
    My_Class A_Class = new My_Class("a",1,2,"Z", ...);
    String XML_String_Of_The_Class = an XML representation of A_Class ?
    Of course I can save it to a file with XMLEncoder, and read it in using XMLDecoder, then delete the file, I wonder if it is possible to skip all that and get the XML string directly ?
    Frank

    I think so too, but I am trying to send the object to a servlet as shown below, since I don't know how to send an object to a servlet, I can only turn it into a string and reconstruct it back to an object on the server side after receiving it :
    import java.io.*;
    import java.net.*;
    import java.util.*;
    class Servlet_Message        // Send a message to an HTTP servlet. The protocol is a GET or POST request with a URLEncoded string holding the arguments sent as name=value pairs.
      public static int GET=0;
      public static int POST=1;
      private URL servlet;
      // the URL of the servlet to send messages to
      public Servlet_Message(URL servlet) { this.servlet=servlet; }
      public String sendMessage(Properties args) throws IOException { return sendMessage(args,POST); }
      // Send the request. Return the input stream with the response if the request succeeds.
      // @param args the arguments to send to the servlet
      // @param method GET or POST
      // @exception IOException if error sending request
      // @return the response from the servlet to this message
      public String sendMessage(Properties args,int method) throws IOException
        String Input_Line;
        StringBuffer Result_Buf=new StringBuffer();
        // Set this up any way you want -- POST can be used for all calls, but request headers
        // cannot be set in JDK 1.0.2 so the query string still must be used to pass arguments.
        if (method==GET)
          URL url=new URL(servlet.toExternalForm()+"?"+toEncodedString(args));
          BufferedReader in=new BufferedReader(new InputStreamReader(url.openStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
        else     
          URLConnection conn=servlet.openConnection();
          conn.setDoInput(true);
          conn.setDoOutput(true);           
          conn.setUseCaches(false);
          // Work around a Netscape bug
          conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
          // POST the request data (html form encoded)
          DataOutputStream out=new DataOutputStream(conn.getOutputStream());
          if (args!=null && args.size()>0)
            out.writeBytes(toEncodedString(args));
    //        System.out.println("ServletMessage args: "+args);
    //        System.out.println("ServletMessage toEncString args: "+toEncodedString(args));     
          BufferedReader in=new BufferedReader(new InputStreamReader(conn.getInputStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
          out.flush();
          out.close(); // ESSENTIAL for this to work!          
        return Result_Buf.toString();               // Read the POST response data   
      // Encode the arguments in the property set as a URL-encoded string. Multiple name=value pairs are separated by ampersands.
      // @return the URLEncoded string with name=value pairs
      public String toEncodedString(Properties args)
        StringBuffer sb=new StringBuffer();
        if (args!=null)
          String sep="";
          Enumeration names=args.propertyNames();
          while (names.hasMoreElements())
            String name=(String)names.nextElement();
            try { sb.append(sep+URLEncoder.encode(name,"UTF-8")+"="+URLEncoder.encode(args.getProperty(name),"UTF-8")); }
    //        try { sb.append(sep+URLEncoder.encode(name,"UTF-16")+"="+URLEncoder.encode(args.getProperty(name),"UTF-16")); }
            catch (UnsupportedEncodingException e) { System.out.println(e); }
            sep="&";
        return sb.toString();
    }As shown above the servlet need to encode a string.
    Now my question becomes :
    <1> Is it possible to send an object to a servlet, if so how ? And at the receiving end how to get it back to an object ?
    <2> If it can't be done, how can I be sure to encode the string in the right format to send it over to the servlet ?
    Frank

Maybe you are looking for