Servicegen- Any what to find what class uses a class?

I'm trying to use the servicegen ant task to make a webservice out of an existing
Java class. Servicegen is failing, however, with the complaint that something
is using the PrintWriter class which has no default constructor and, hence, can't
be made serializable.
Looking though my code, however, I could only find two places where a System.out.println()
was used and no other obvious cases of a PrintWriter instance. I've removed both
of the println() calls and recompiled, but still get the same error from servicegen.
Unfortunately, the only diagnostic output I can see is the stacktrace from ant
itself which isn't very helpful. So, I was wondering, does anyone know how I could
figure out where this PrintWriter class is coming from?
Thanks...
<<<John>>>
John Ruschmeyer
Viecore FSD
[email protected]

Hi John,
You can try adding -v to the ant task, it may provide additional
information. Concerning servicegen, be sure to remove the ".class" from
yourjavaClassComponents, e.g. just use the class name without the
".class"
What version of WLS?
Thanks,
Bruce
John Ruschmeyer wrote:
>
I'm trying to use the servicegen ant task to make a webservice out of an existing
Java class. Servicegen is failing, however, with the complaint that something
is using the PrintWriter class which has no default constructor and, hence, can't
be made serializable.
Looking though my code, however, I could only find two places where a System.out.println()
was used and no other obvious cases of a PrintWriter instance. I've removed both
of the println() calls and recompiled, but still get the same error from servicegen.
Unfortunately, the only diagnostic output I can see is the stacktrace from ant
itself which isn't very helpful. So, I was wondering, does anyone know how I could
figure out where this PrintWriter class is coming from?
Thanks...
<<<John>>>
John Ruschmeyer
Viecore FSD
[email protected]

Similar Messages

  • What is the advantage of using Wrapper Classes ?

    Hi friends,
    I am happy to join Java/J2EE tech. My project is scaled over the network. MVC-II struts, EJB based architecture, we are using.
    We are asked to use Wrapper Classes in in Java programs and not the primitive data types. I could not understand the reason.
    Pls tell me what is the advantage of using Wrapper Classes over the primitive data types ?
    means Integer instead of int, etc....

    Hi friends,
    I am happy to join Java/J2EE tech. My project is
    scaled over the network. MVC-II struts, EJB based
    architecture, we are using.
    We are asked to use Wrapper Classes in in Java
    programs and not the primitive data types. I could
    not understand the reason.
    Pls tell me what is the advantage of using Wrapper
    Classes over the primitive data types ?
    means Integer instead of int, etc....I am not sure why use Integer over int; but Wrapper classes are used to remove coupling between classes and create one hand doesn't know what the other hand does effect.
    for example:
    when you have a SFTP java package but doesn't do everything that your application needs to do in one step and you need to do sftp stuff at many places in your application, it would be wise not to use SFTP java package directly from all the classes that need to do sftp stuff. Because if you were to change the SFTP package later due to say some bug fix or newer version or ... you would have to go and modify all the classes that had sftp stuff to update.
    Instead you could write a custom sftp wrapper that handles all the sftp stuff for your application needs and that wrapper deals with the SFTP java package. So all the classes don't need to know which SFTP java package is being used only the custom-wrapper needs to know.

  • Java class uses another class in a Jar file (How do I make Java see it)?

    I am trying to figure out how do I make Javac see the thinlet.class in the thinlet.jar.
    I have developed an XUL xml interface and a java program that calls the interface shown below:
    //package thinlet.demo;
    import thinlet.*;
    public class UI extends Thinlet
    { public UI () throws Exception {add(parse("UI.xml"));}
    public static void main(String[] args) throws Exception
    { new FrameLauncher("UI", new UI(), 600, 600); }}
    when I do the normal compile, I get an error:
    UI.java:4: cannot find symbol
    symbol: class Thinlet
    public class UI extends Thinlet {
    ^
    UI.java:7: cannot find symbol
    symbol : method parse(java.lang.String)
    location: class thinlet.demo.UI
    add(parse("UI.xml"));
    ^
    UI.java:12: cannot find symbol
    symbol : class FrameLauncher
    location: class thinlet.demo.UI
    new FrameLauncher("UI", new UI(), 600, 600);
    ^
    3 errors
    This thinlet class should be in the thinlet.jar that I have added the directory to the path, the directory and jarfile name to the System CLASSPATH and it couldn't see it. So finally I tried putting the thinlet.jar in the same directory to no avail. I've searched the web for some time an cannot find anything that specifically speaks to compiling a program that has parent classes in a Jar.
    Any help is definitely appreciated.

    This thinlet class should be in the thinlet.jar that I have added the directory to the path, the directory and jarfile name to the System CLASSPATH and it couldn't see it. So finally I tried putting the thinlet.jar in the same directory to no avail. I've searched the web for some time an cannot find anything that specifically speaks to compiling a program that has parent classes in a Jar.
    Any help is definitely appreciated.You just still haven't provided the jar in the classpath, or you're not using the right class name. Is the class really named thinlet.Thinlet? Or are you thinking "import thinlet.*" means to import all classes in a jar named thinlet.jar? Because the latter is not true. You need to import classes, not jar file names.

  • Class using another class access

    I'm sure this is not difficult, but finding the answer has been quite elusive for me. I'd like to start simple. I have two classes, Place and Address that look like this:
    public class Address{
       private String street;
       private String town;
      ...some other address stuff
       public void setStreet(String streetname) {
         this.street = streetname;
    public String getStreet() {
         return this.street;
    ...same f or town and others
    }//end of Address class
    Now I have the Place class:
    public class Place {
       private String name;
       private Address address **here begins my questionsI currently have the private address declaration as:
       private Address address = new Address();1. Is this Address address declaration correct, or should it be different?
    2. Do I, create setAddress and getAddress methods in the Place class, and if so, so they just use the object 'address', i.e. 'return address;' ?
    After I understand how to do these two things, I need help in accessing the address parts, like street and town, from a third class, the PlaceTest class which has a 'main' method.
    Thanks in advance for your help.

    Check out this as a for-instance. Here is a sample Address class
        class Address
            private String street;
            private String town;
            private String state;
            private String zip;
            public Address(String street, String town, String state, String zip)
                this.street = street;
                this.town = town;
                this.state = state;
                this.zip = zip;
            public void setStreet(String street)
                this.street = street;
            public String getStreet()
                return street;
            @Override
            public String toString()
                return street + ", " + town + ", " + state + ", " + zip;
        }And here is a Place2 class that uses Address
    class Place2
        private Address address;
        public Place2() {}
        public Place2(Address address)  // <== **** here I'm passing an addresss param
            this.address = address;
        public void setAddress(Address address) // <== **** and here too
            this.address = address;
        @Override
        public String toString()
            return address.toString();
        public static void main(String[] args)
            Place2 myPlace = new Place2(
                new Place2().new Address("100 Main St", "AnyTown", "IL", "60022"));
            System.out.println("My address is: " + myPlace);
            // let's change the address:
            Address address2 = new Place2().new Address("123 First St", "Podunckville", "State of Confusion", "10101");
            // then pass this address to myPlace
            myPlace.setAddress(address2);
            // then show it
            System.out.println("My new address is: " + myPlace);
    }

  • My husband keeps setting my restriction passcode is there any way to find what it is?

    my husband set my passcode restriction and wont tell me my passcode how do i get it off?

    The only way is to restore the iPOd to factory defaults/new iPOd. If you only restore from backup the Restrictions passcode will also be restored.

  • Find folders that use item class

    Hi,
    Is there a way that I can find the folders that have items using a specific item class?
    Thanks.
    Leah

    Hi Leah
    The following script will display a list of all items in a prompted Business Area that use a single, prompted for LOV. if you leave off the prompt for the business area you will find all items and all folders that use the LOV. Modifying it further you could display only the folders.
    SELECT
    DOM.DOM_NAME "LOV Name",
    OBJ.OBJ_NAME "Folder Name",
    EXP.EXP_NAME "Item Name"
    FROM
    EUL5_BA_OBJ_LINKS BOL,
    EUL5_BAS BA,
    EUL5_OBJS OBJ,
    EUL5_EXPRESSIONS EXP,
    EUL5_DOMAINS DOM
    WHERE
    BOL.BOL_BA_ID = BA.BA_ID
    AND BOL.BOL_OBJ_ID = OBJ.OBJ_ID
    AND EXP.IT_OBJ_ID = OBJ.OBJ_ID
    AND EXP.IT_DOM_ID = DOM.DOM_ID
    AND BA_NAME = :BA_NAME
    AND DOM_NAME = :LOV_NAME
    ORDER BY 2,3;
    Best wishes
    Michael

  • Help: Factory Class using Inner Class and Private Constructor?

    The situation is as follows:
    I want a GamesCollection class that instantiates Game objects by looking up the information needed from a database. I would like to use Game outside of GamesCollection, but only have it instantiated by GamesCollection to ensure the game actually exist. Each Game object is linked to a database record. If a Game object exist, it must also exist in the database. Game objects can never be removed from the database.
    I thought about making the Game object an inner class of GamesCollection, but this means that Game class constructor is still visible outside. So what if I made Game constructor private? Well, now I can't create Game objects without a static method inside Game class (static Object factory).
    Basically what I need is a constructor for the inner Game class accessible to GamesCollection, but not to the rest of the world (including packages). Is there a way to do this?

    leesiulung wrote:
    As a second look, I was initially confused about your first implementation, but it now makes more sense.
    Let me make sure I understand this:
    - the interface is needed to make the class accessible outside the outer classBetter: it is necessary to have a type that is accessible outside of GameCollection -- what else could be the return type of instance?
    - the instance() method is the object factory
    - the private modifier for the inner class is to prevent outside classes to instantiate this objectRight.
    However, is a private inner class accessible in the outer class? Try it and see.
    How does this affect private/public modifiers on inner classes?Take about five minutes and write a few tests. That should answer any questions you may have.
    How do instantiate a GameImpl object? This basically goes back to the first question.Filling out the initial solution:
    public interface Game {
        String method();
    public class GameCollection {
        private static  class GameImpl implements Game {
            public String method() {
                return "GameImpl";
        public Game instance() {
            return new GameImpl();
        public static void main(String[] args) {
            GameCollection app = new GameCollection();
            Game game = app.instance();
            System.out.println(game.method());
    }Even if you were not interested in controlling game creation, defining interfaces for key concepts like Game is always going to be a good idea. Consider how you will write testing code, for example. How will you mock Game?

  • Classes using a class

    Hy,
    Is there a way of knowing which classes(instances) are using a certain instance of another class?
    For example :
    class a
    class b
    class c
    an instance of 'a' is being used at a certain time by 'b' and 'c'. Is this info possible to capture at runtime?
    Thanx in advance,
    Daniel Campelo

    no existing ways to do it.
    but you can do it easily.
    see:
    //A
    class A{
    vector v;
    //B
    class B{
    public B(A a){
    a.v.add(this);
    through v,you can trace who use it.

  • How to use StreamTokenizer class ?

    i want to use StreamTokenizer class in my program so that when i read from a file i want to make tokens of words present in the file, but i dont know how to use this class in my program, as i didnt find any example which shows how to use StreamTokenizer class. Can nebody knows how to use it in a program ?

    Hi,
    here's some sample code of how to use the StreamTokenizer.
    in = new StreamTokenizer(
    new BufferedReader(
    new FileReader(fname)));
    You can iterate through the file with:
    while(in.nextToken() != StreamTokenizer.TT_EOF)
    when you call nextToken() ttype is filled with the type of token, you can't test ttype for what kind of token,
    test for word:
    if (in.ttype == StreamTokenizer.TT_WORD)
    test for word:
    if (in.ttype == StreamTokenizer.TT_WORD)
    I think you can grasp the rest in javadoc

  • Relationships used in class diagrams

    What are the different relationship used in class diagram

    <Flame>
    Well, th emost usual relationship would be something like "parent", or occassionaly "sibling". This however does not apply if you are modelling the new Java Redneck API, where its quite normal to have relationships like "sister == mother".
    </Flame>

  • Instantiation an inner class using reflection

    I want to instantiate an inner class using the Class.newInstance() method called within the Outer class constructor:
    public Outer
    public Outer()
    Inner.class.newInstance();
    private Class Inner { }
    When I try it, however, I get an InstantiationException.
    Is there some way to do this?
    Thanks for the help.
    Scott

    Here is a consolidation of what everyone posted and it does appear to work. In one of your post you used the getDeclaredConstructors() method and said it was less than ideal; I am not sure what you meant but I suspect it was the hard coded array reference. Anyhow I used the getDeclaredConstructor() method which appears to get non-public constructors also and is basically the same as using the getConstructor() method.
    import java.lang.reflect.*;
    public class Test35 {
        static public void main(String[] args) {
            Test35 t35 = new Test35();
            t35.testIt();
        private class Inner {
            public String toString() {
                return "Hear I am";
        public void testIt() {
            try {
                Constructor con = Inner.class.getDeclaredConstructor(new Class[] {Test35.class});
                Inner in = (Inner)con.newInstance(new Object[] {this});
                System.out.println(in);
            } catch (Exception e) {
                e.printStackTrace();

  • Is there any Open source Reporting Toll for using in swing application ?

    Is there any reporting system like crystal report or any thing for report generation. Using JTable class it is so time taking job. I have downloaded Eclipse with crystal report embedded, and have created a report but can not integrate the report with JFrame with any menu item action. All the code i got releted to JSP. and few code get that are using
    //Crystal Java Reporting Component (JRC) imports.
    import com.crystaldecisions.reports.sdk.*;
    import com.crystaldecisions.sdk.occa.report.lib.*;
    //Java Imports.
    import javax.swing.*;
    public class JRCViewReport {
         private static final String REPORT_NAME = "JRCViewReport.rpt";
         public static void launchApplication() {
              try {
                   //Open report.
                   ReportClientDocument reportClientDoc = new ReportClientDocument();
                   reportClientDoc.open(REPORT_NAME, 0);
                   //Launch JFrame that contains the report viewer.
                   new ReportViewerFrame(reportClientDoc);          
              catch(ReportSDKException ex) {     
                   System.out.println(ex);
              catch(Exception ex) {
                   System.out.println(ex);               
         public static void main(String [] args) {
              //Event-dispatching thread to run Swing GUI.  This is good practice for Swing applications
              //to help ensure that events are dispatched in a predicatable order.
              //For more information on using this method, refer to the SUN site below for more details:
              //http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        //Hand-off to worker function to start application.
                        launchApplication();                    
    }Also there is one file ReportViewerFrame.java
    but the error is "*com.crystaldecisions.reports.sdk*" not found
    Please help ..........................................................

    I have already use Jasper Report. Thakns a lot for your suggestion. Now I think i have solved your problem...... View the code.. this code will not open the JasperViewer but from the background it will be printed and after calling the printing function you can save a data in the database ------------------------
    JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
            Connection con = Database.getConnection(); // your database connection
            jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, con);
            for(int i=0;;i++) { //print all pages
                try{
                    JRPrinterAWT.printPages(jasperPrint,i,i,false);
                }catch(Exception e) {
                    break;
            }

  • Using JAXP classes in Jserv

    Hi,
    I have added 3 jar files to the server class path jaxp.jar, crimson.jar, and xalan.jar. and added the this file paths in jserv.preperties and when i moved the jsp file to server and run the application it shows the Internal server 500.
    added paths in jserv.properties like:
    wrapper.classpath=/ed22/oracle/eld2ora/iAS/lib/jaxp.jar
    wrapper.classpath=/ed22/oracle/eld2ora/iAS/lib/xalan.jar
    wrapper.classpath=/ed22/oracle/eld2ora/iAS/lib/crimson.jar
    am i missing any other jar file I am using the classes
    <%@ page import= "javax.xml.parsers.DocumentBuilder"%>
    <%@ page import= "javax.xml.parsers.DocumentBuilderFactory"%>
    <%@ page import= "javax.xml.parsers.ParserConfigurationException"%>
    <%@ page import= "javax.xml.transform.OutputKeys"%>
    <%@ page import= "javax.xml.transform.Transformer"%>
    <%@ page import= "javax.xml.transform.TransformerConfigurationException"%>
    <%@ page import= "javax.xml.transform.TransformerException"%>
    <%@ page import= "javax.xml.transform.TransformerFactory"%>
    <%@ page import= "javax.xml.transform.dom.DOMSource"%>
    <%@ page import= "javax.xml.transform.stream.StreamResult"%>
    <%@ page import= "org.w3c.dom.Document"%>
    <%@ page import= "org.w3c.dom.Element"%>
    <%@ page import= "org.w3c.dom.Node"%>
    <%@ page import= "org.w3c.dom.NodeList"%>
    suggest the solution please.
    Thanks
    Rama

    Would you consider posting it?
    Best Regards
    mseberg

  • TS1382 I have a ipod classic 160GB and it's not showing any music anymore, but there is still 7GB of memory being used, and I don't have it back up on my itunes, since I had to put a new hard drive on my computer. Any suggestion to find out whats on that

    I have a ipod classic 160GB and it's not showing any music anymore, but there is still showing 7GB of memory being used, and I don't have it backed up on my itunes, since I had to put a new hard drive on my computer. Any suggestion to find out whats on that memory or to get it the music back, there is approximately over 1400 songs on it?

    What is the memory being used by, is it Other? If it is, that means the iPod can no longer read the music, so it has put it all in "Other".
    The usual fix for this is to allow the iPod to Sync with its iTunes Library. If that doesn't work, the next option is to Restore the iPod using the Restore command in iTunes, on the Device/Summary pane.
    Unless you are very (very) lucky, I suspect that you are going to have to Restore your iPod. Restoring will remove everything form the iPod and put back onto it only what it finds in your iTunes Library, which you say is currently empty.
    If you have to rebuild your Library after this issue, by adding all the music back again, this is going to be hard to hear, but for the future, you may want to consider always having a backup of your library. The easiset way to back the Library up is;
    if the Library is small enough, burn it to a DVD, as digital files, not a "music CD".
    If your Library is too large for a DVD, buy yourself an external hard drive and copy the Library onto the drive. Remember to update the backup every so often.

  • IN MATERIAL MASTER RECORD WHAT IS THE USE OF CLASS TYPE(CLASSIFICATION VIEW

    Hi Guys,
    Can you please explain what are the different critiria to use different class type and what exactly meaning of the each class type with respect to Material classification.
    Any material available on this to study. Please give link.
    Thanks,
    Dhanu

    Hi,
    Purpose
    The classification system allows you to use characteristics to describe all types of objects, and to group similar objects in classes u2013 to classify objects, in other words, so that you can find them more easily later.
    You then use the classes to help you to find objects more easily, using the characteristics defined in them as search criteria. This ensures that you can find objects with similar or identical characteristics as quickly as possible.
    Integration
    The classification system allows you to classify all types of object. First, you must define certain settings in Customizing for the classification system. For more information, see Customizing for the Classification System.
    SAP has predefined a number of object types (for example, materials, and equipment). The settings for these object types have already been defined in Customizing, so you can start to set up your classification system for these object types without defining further settings.
    Features
    Before you can use classification functions, you need to set up your classification system.
    The there are three steps to setting up a classification system:
    Defining the Properties of Objects
    You use characteristics to describe the properties of objects. You create characteristics centrally in the SAP R/3 System.
    See the SAP Library, Characteristics (CA-CL-CHR).
    Creating Classes
    You need classes to classify objects. These classes must be set up. During set up you must assign characteristics to the classes.
    Assigning Objects
    Once you have created the classes you require for classification, you can assign objects to these classes. You use the characteristics of the class to describe the objects you classify.
    This completes the data you require to use your classification system. You can then use your classification system to find objects that match the criteria you require.
    Once you have set up the classification system you can use it to find certain objects. To do this:
    Find a class in which objects are classified
    Find the object(s) you require in the class
    When you use classification to find objects, you use the characteristics as search criteria, and the system compares the values you enter with the values of the classified objects.
    Uts
    Award if helpfull

Maybe you are looking for

  • "Accounting-Start" and "Accounting-Stop" with same "user name" and "session Id" recorded in different RADIUS servers.

    Hi, I have questions about "Accounting-Start" and "Accounting-Stop". 1.If a NAS configured to have a primary and a backup RADIUS server. To start with all the “Accounting-Start” records will be in the primary RADIUS server. Later on the primary serve

  • Display the 0 fiscper3 (posting period)and 0fiscyear (fiscal year) in bw re

    Hi I need a quick help, please resolve my issue in step by step. Report is required to display the 0 fiscper3 (posting period)and 0fiscyear (fiscal year) in bw report. I have a  0fiscper Fiscal Yr / Period in my datasource and infosource but not 0fis

  • BI 7.0 Best practise

    hi  all, I need a the best practise of BI 7.0 ?(latest verison). could anybody help out. currently i have SAP Best Practices for Business Intelligence V1.30(2009). Thanks Ashok

  • Apps stuck in 'waiting' status

    I've seen a few similar posts, but adding mine here.  iPad2 software version 5.1 - last two days, app downloads and updates stuck in 'waiting' status.  Tried signing out, powering off and back on, and then signing back in, but no luck.  Works fine wh

  • How to install SP for WAS

    Hi I installed WAS 6.40. The version.txt says "Cluster-Version: 6.30   PatchLevel 70836.32". Which SP do I have? I need to upgrade to J2EE engine 6.40 to install the EP. I have downloaded the *.sar files for SP04 and SP09. I understand from the forum