AutoType Compiler Class Path

I am using NetBeans with their Ant integration. If I put the
"webservices.jar" file in the IDE class path and then run my Ant build
script, it complains that it can not find the autotype task. So what I do
is specify the classpath as part of my task definition in Ant.
But the problem arises when the autotype task attempts to compile its
generated java files. With debugging turned on in Ant, I see that the
compiler's class path is inherited from the IDE. So it does NOT contain the
webservices.jar and therefore pukes when it compiles the generated java
files.
Bottom line is, I need to specify the compiler class path that autotype will
use to compile its generated java files. Is there any way to accomplish
this? Has anyone else had luck with running autotype under NetBeans???
Thanks In Advance,
Pat

You need both weblogic.jar and webservice.jar in your classpath.
Then try this :
<target name="autotypetest">
<autotype schemaFile=" ....">
<classpath>
<pathelement path=" "/> --- You can specify complete
classpath here for compiler to use.
</classpath>
</autotype>
</target>
-Neal
"Pat Regan" <[email protected]> wrote in message
news:[email protected]..
I am using NetBeans with their Ant integration. If I put the
"webservices.jar" file in the IDE class path and then run my Ant build
script, it complains that it can not find the autotype task. So what I do
is specify the classpath as part of my task definition in Ant.
But the problem arises when the autotype task attempts to compile its
generated java files. With debugging turned on in Ant, I see that the
compiler's class path is inherited from the IDE. So it does NOT containthe
webservices.jar and therefore pukes when it compiles the generated java
files.
Bottom line is, I need to specify the compiler class path that autotypewill
use to compile its generated java files. Is there any way to accomplish
this? Has anyone else had luck with running autotype under NetBeans???
Thanks In Advance,
Pat

Similar Messages

  • Java Class path for Oracle package compilation

    Hello
    I am trying to send mail with file attachment, this part is
    done by java program, it is compiled & working fine.
    I am trying to compile the same java program at SQL prompt so
    that I can build a package to execute that Java program from
    Oracle. As java prog requires other class files
    (javax.mail.*,javax.mail.internet.*,javax.activation.*) to be
    include , those class path is set at their respective location
    of OS.
    Other Java programs are compiling fine from SQL but for this
    mail prog, it is giving error as it is not finding the location
    of the include files.
    Can anyone tell me from which class path does Oracle 8i compiles
    Java program ? any additional information reqdng this issue ?
    thanks

    Hello Suresh Vemulapalli
    Thanks for replay & suggestion, I compiled using loadjava on
    OS & it is working fine
    regards
    Prakash K.B.

  • ORABPEL-01005 class path is set correctly while deploying a BPEL composite.

    07:20:08 AM Received HTTP response from the server, response code=500
    07:20:08 AM Error deploying archive sca_HelloSoa1_rev1.0.jar to partition "default" on server soa_server1 http://slc01mrt.us.oracle.com:8001
    07:20:08 AM HTTP error code returned 500
    07:20:08 AM Error message from server:
    There was an error deploying the composite on soa_server1: Deployment Failed: Error occurred during deployment of component: HelloSoa1 to service engine: implementation.bpel, for composite: HelloSoa1: ORABPEL-01005
    Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "HelloSoa1" of composite "default/HelloSoa1!1.0*soa_3764b7a8-b2ca-43ba-a289-1f8e281a50bc"
    The class path setting is incorrect.
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    07:20:08 AM Check server log for more details.
    07:20:08 AM Error deploying archive sca_HelloSoa1_rev1.0.jar to partition "default" on server soa_server1 http://slc01mrt.us.oracle.com:8001
    07:20:08 AM #### Deployment incomplete. ####
    07:20:08 AM Error deploying archive file:/scratch/jdev11117/jdevuserhome/mywork/MMSOAHello/HelloSoa1/deploy/sca_HelloSoa1_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
    My BPEL has a Java Embedding I have posted the entire BPEL below:
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Thu Sep 12 22:41:52 PDT 2013
    Author: mmuppago
    Type: BPEL 1.1 Process
    Purpose: Synchronous BPEL Process
    -->
    <process name="HelloSoa1"
    targetNamespace="http://xmlns.oracle.com/MMSOAHello/HelloSoa1/HelloSoa1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/MMSOAHello/HelloSoa1/HelloSoa1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpel2="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap">
    <bpelx:exec import="oracle.security.jps.*"/>
    <!--
    PARTNERLINKS 
    List of services participating in this BPEL process 
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="hellosoa1_client" partnerLinkType="client:HelloSoa1" myRole="HelloSoa1Provider"/>
    </partnerLinks>
    <!--
    VARIABLES 
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable" messageType="client:HelloSoa1RequestMessage"/>
    <!-- Reference to the message that will be returned to the requester-->
    <variable name="outputVariable" messageType="client:HelloSoa1ResponseMessage"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC 
    Set of activities coordinating the flow of messages across the 
    services integrated within this business process 
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in HelloSoa1.wsdl) -->
    <receive name="receiveInput" partnerLink="hellosoa1_client" portType="client:HelloSoa1" operation="process" variable="inputVariable" createInstance="yes"/>
    <assign name="Assign1">
    <copy>
    <from expression="concat('Hello ', bpws:getVariableData('inputVariable','payload','/client:process/client:input'))"/>
    <to variable="outputVariable" part="payload"
    query="/client:processResponse/client:result"/>
    </copy>
    </assign>
    <bpelx:exec name="Java_Embedding1" version="1.5" language="java">
    <![CDATA[/*Write your java code below e.g.
    System.out.println("Hello, World");
    try {
    System.out.println("Hello from MM World");
    oracle.security.jps.util.SubjectUtil.getUserName(oracle.security.jps.util.SubjectUtil.getCurrentSubject());
    } catch(Exception ex) {
    System.out.println("Exception");
    ex.printStackTrace();
    }]]>
    </bpelx:exec>
    <!-- Generate reply to synchronous request -->
    <reply name="replyOutput" partnerLink="hellosoa1_client" portType="client:HelloSoa1" operation="process" variable="outputVariable"/>
    </sequence>
    </process>

    Hi,
    The problem you are referring above is definitely due to the java embedding you are using.
    This seems to be a simple Hello World example, and if you are looking for the same to work, you can simply use an assign activity to concat the input with the Hello world.
    If you are trying to use a java embedding activity which has some custom java coding in it, please refer to the following:
    Make sure all the dependent classes are explicitly mentioned with their packagename.ClassName.
    Also , make sure you make all the classes as jar and include it in sca-inf\lib directory of the code.
    a) See that your external / dependent Java applications dependent Jar files are copied in csa-inf/lib (e.g all jars like log4j, apache jars, wickets jar etc etc etc )
    b) also make sure u deploy the dependent java application as JAR using jdeveloper deploy wizard.... for example archive1.jar and then copy this jar as well in sca - inf / lib folder
    it will work ....
    Thanks,
    Deepak.

  • How to set class path for mysql

    hai, I have been trying to make a java program read from mysql database. but i don't know how to set the class path for mysql-connector-java-5_1_.0.6-bin. i set the class path in system variable as C:\Program Files\Java\jdk1.5.0_08\jre\lib\ext\mysql-connector-java-5_1_.0.6-bin.
    in the command prompt, i compile C:\javac abc.java and run java abc.
    when run it come out error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    i am using Window xp. can anybody help me??? TQ.

    hai, I have been trying to make a java program read
    from mysql database. but i don't know how to set the
    class path for mysql-connector-java-5_1_.0.6-bin. i
    set the class path in system variable as C:\Program
    Files\Java\jdk1.5.0_08\jre\lib\ext\mysql-connector-jav
    a-5_1_.0.6-bin.
    in the command prompt, i compile C:\javac abc.java
    and run java abc.
    when run it come out error
    java.lang.ClassNotFoundException:
    com.mysql.jdbc.Driver
    i am using Window xp. can anybody help me??? TQ.Right click on my computer icon,
    Goto properties->advanced->environment variables.
    Look for 'classpath' under system variable.
    Select it and click edit.
    put ';' and path of the mysql connector jar at the end
    suppose if u have jar file under d:/driver/mysqlconnector.jar
    thn put this value in variable value text box
    ;d:/driver/mysqlconnector.jar
    or simply put ur driver jar file in jre/lib/ext folder
    D:\j2sdk1.4.2_03\jre\lib\ext
    [Servlet tutorial|http://www.jsptube.com]

  • Package and class path

    for two yrs i am trying to get package right but no result
    i am using window 98
    i have my jdk in d:\jdk1.2\bin; and this works fine if i do not try to use package;somtimes it works well half way with package!
    suppose i want to create a package called rubberband and put classes in it
    i created a folder called rubberband in d:\ and then
    package rubberband;
    import java.awt.*;
    public class RubberbandTest extends Frame{}
    class RubberbandTestPanel {}
    class Colorchoice{}
    this is one unit
    and there are other classes
    package rubberband;
    import java.awt.*;
    abstract class Rubberband {}
    package rubberband;
    import java.awt.*;
    class RubberbandPanel extends Rubberband {}
    and so on
    i opened executive.bat and added to class path as follows:
    path:d:\rubberband\bin;before the already existing d:\jdk1.2\bin;
    then when i come to compile and run the program i have problems
    like:class so and so not found
    please help please step by step tell me what to do

    Another sample might answer your "different location" question.
    Suppose program YourProg in package yourPkg located in directory C:\javaprogs needs to access a class file ExtraClass in package extraPkg in directory C:\differentDir.
    1) Of course the source file must exist in file
    C:\javaprogs\yourPkg\YourProg.java
    and
    C:\differentDir\extraPkg\ExtraClass.class must exist.
    2) Inside the YourProg source, you must import ExtraClass:
    import extraPkg.ExtraClass;
    3) To compile YourProg, you must include location of extraPkg.ExtraClass in the classpath (or the compiler will complain about the inport line above):
    (a -- from C:\javaprogs directory): javac -classpath C:\differentDir yourPkg\YourProg.java
    (b -- from any directory): javac -classpath C:\javaprogs;C:\differentDir yourPkg\YourProg.java
    4) To run YourProg (assuming it contains a main method), you must include all locations in classpath:
    (a -- from C:\javaprogs directory): java -classpath .;C:\differentDir yourPkg.YourProg
    (b -- from any directory): java -classpath C:\javaprogs;C:\differentDir yourPkg.YourProg
    If you get a NoClassDefFoundError, that means that the java was run without the proper location included in the classpath passed to the -classpath argument. The -classpath argument should be ';'-separated and contain no spaces (so if a long directory name contains space you should enclose in double quotes, as this example:
    java -cp "C:\Program Files\somedir;C:\anotherdir" NameOfAClass

  • Unable to compile class for JSP--- help me plz!!!!!

    hi friends;
    Pease suggest me where i am wrong, i think javabean is not instantiated in jsp file.may be it is related to the classpath of javabean. i have not set any variable for javabean classpath. and i put javabean class file in
    TOMCAT_HOME/webapps/test3/WEB-INF/UseDta.class
    and all the jsp and html in /test3. my jsp an javabeans are--
    1. GetName.html
    <HTML>
    <BODY>
    <FORM METHOD=POST ACTION="SaveName.jsp">
    What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20><BR>
    What's your e-mail address? <INPUT TYPE=TEXT NAME=email SIZE=20><BR>
    What's your age? <INPUT TYPE=TEXT NAME=age SIZE=4>
    <P><INPUT TYPE=SUBMIT>
    </FORM>
    </BODY>
    </HTML>
    2. SaveName.jsp
    <jsp:useBean id="user" class="UserData" scope="session">
    <jsp:setProperty name="user" property="*"/>
    </jsp:useBean>
    <HTML>
    <BODY>
    Continue
    </BODY>
    </HTML>
    3. UserData.java
    public class UserData {
    String username;
    String email;
    int age;
    public UserData(){}
    public void setUsername( String value )
    username = value;
    public void setEmail( String value )
    email = value;
    public void setAge( int value )
    age = value;
    public String getUsername() { return username; }
    public String getEmail() { return email; }
    public int getAge() { return age; }
    4. NextPage.jsp
    <jsp:useBean id="user" class="UserData" scope="session"/>
    <HTML>
    <BODY>
    You entered<BR>
    Name: <%= user.getUsername() %><BR>
    Email: <%= user.getEmail() %><BR>
    Age: <%= user.getAge() %><BR>
    </BODY>
    </HTML>
    url: http://localhost:8080/test3/GetName.html
    is it related to context path??
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 2 in the jsp file: /SaveName.jsp
    Generated servlet error:
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\test3\org\apache\jsp\SaveName_jsp.java:44: cannot find symbol
    symbol : class UserData
    location: class org.apache.jsp.SaveName_jsp
    UserData user = null;
    ^
    An error occurred at line: 2 in the jsp file: /SaveName.jsp
    Generated servlet error:
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\test3\org\apache\jsp\SaveName_jsp.java:46: cannot find symbol
    symbol : class UserData
    location: class org.apache.jsp.SaveName_jsp
    user = (UserData) jspxpage_context.getAttribute("user", PageContext.SESSION_SCOPE);
    ^
    An error occurred at line: 2 in the jsp file: /SaveName.jsp
    Generated servlet error:
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\test3\org\apache\jsp\SaveName_jsp.java:48: cannot find symbol
    symbol : class UserData
    location: class org.apache.jsp.SaveName_jsp
    user = new UserData();
    ^
    3 errors
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:437)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.
    Apache Tomcat/5.0.30
    please Reply me ASAP
    i'll be glad if you reply. please

    I am using Tomcat 6.0.
    I have put my UserData class in user package and
    used in below jsp(SaveName.jsp)
    <%@ page import="user.UserData" %>
    <jsp:useBean id="user" class="user.UserData" scope="session"/>
    <jsp:setProperty name="user" property="*"/>
    <HTML>
    <BODY>
    Continue
    </BODY>
    </HTML>
    I have already set my classpath as C:\Documents and Settings\user\My Documents\Java\apache-tomcat-6.0.16\apache-tomcat-6.0.16\webapps\ROOT\WEB-INF\classes;
    UserData class is in C:\Documents and Settings\user\My Documents\Java\apache-tomcat-6.0.16\apache-tomcat-6.0.16\webapps\ROOT\WEB-INF\classes\user
    My UserData class is
    package user;
    public class UserData {
    String username;
    String email;
    int age;
         public UserData(){
              this("","",0);
              System.out.println("najn thanne puli");
         public UserData(String username,String email,int age){
              this.username=username;
              this.email=email;
              this.age=age;
    public void setUsername( String value )
    username = value;
    public void setEmail( String value )
    email = value;
    public void setAge( int value )
    age = value;
    public String getUsername() { return username; }
    public String getEmail() { return email; }
    public int getAge() { return age; }
    But running SaveName.jsp shows exception
    org.apache.jasper.JasperException: /SaveName.jsp(2,0) The value for the useBean class attribute user.UserData is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1200)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1160)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2399)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3372)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    Please help me.thanks in advance.

  • Servlet class path

    Can anybody tell me what is the exact path to put the servlet class file in
    tomcat 4. I was reading a book called more servelet by Marty Hall and its metioned there that i can put them in install_dir/webapps/ROOT/WEB-INF/classes but when i browse to WEB-INF folder there is no folder named classes there.
    Please help.

    firsly i installed jdk 1.3 on my computer. Then i installed tomcat 4. Then i changed port 8080 in server.xml to 80. Then i set the JAVA_HOME path to point to jdk1.3 folder. Then i setup the class path to D:\Documents and Settings\Ashi\Desktop\tomcat\apache-tomcat-4.1.34\apache-tomcat-4.1.34\common\lib\servlet.jar
    Then i downloaded a source file named HelloServlet.java from author's website and compiled it. It compiled successfully. I copied the HelloServlet.class file to the classes directory that you asked me to create. Then i opened my browser and typed http://localhost/servlet/HelloServlet and getting error HTTP Status 404

  • Jar's manifest Class-Path option

    Hey, hopefully this is my last question for a while.
    I downloaded a custom look and feel that's packaged in a jar file.
    Here's the directory structure.
    Main-Program\*.class
    Main-Program\MyProgram.jar (the created jar)
    Main-Program\Data\kunststoff.jar (downloaded look&feel jar)
    I can compile the class files like this:
    javac -classpath .;Data\kunststoff.jar MainClass.java
    and run it like this:
    java.exe -classpath .;Data\kunststoff.jar MainClass
    This works fine. But I want my program to be an executable jar.
    So I create the exec. jar like usual
    jar cf0 MyProgram.jar *.class
    jar umf mainclass.txt MyProgram.jar
    When I package the jar using the manifest file I include the Class-Path var:
    Manifest-Version: 1.0
    Main-Class: Database
    Class-Path: .;Data\kunststoff
    Now when I try to execute the jar it gives me the error:
    "Could not find the main class. Program will exit!"
    Any ideas? thanks.

    Manifest-Version: 1.0
    Main-Class: Database
    Class-Path: .;Data\kunststoff>
    Better change that to "Class-Path: Data/kunststoff.jar"
    (http://java.sun.com/docs/books/tutorial/jar/basics/manifest.html)
    And remember to have a line break after it..
    Now when I try to execute the jar it gives me the
    error:
    "Could not find the main class. Program will exit!">
    But the main class should still be found even if the class-path entry was not totally correct, does Database.class show in jar tf MyProgram.jar?

  • Possible 'Class Path' Issues

    Hi Guys,
    I have problems compiling a file and I suspect it could be something related to classpaths. I am using NetBeans 6.9.1 as my IDE. When I set JDK 1.6 as my platform and complile, there are no issues, the programs compiles fine.
    My 'classpath' and 'path' are as follows:
    classpath:
    .;C:\Program Files\Java\jre1.6.0_07\lib\ext.;c:\java\classes;
    path:
    \....\....\....C:\Program Files\Java\jdk1.6.0_21\
    If I were to set the JDK as in 1.5, I seem to get the follwing error:
    ' cannot access org.red5.server.api.IScope
    bad class file: C:\Program
    Files\Red5\red5.jar(org/red5/server/api/IScope.class)
    class file has wrong version 50.0, should be 49.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    import org.red5.server.api.IScope;
    1 error
    To rectify the problem I maded changes to my classpath and path, and yet the problem persists. The changes I made
    are as follows:
    classpath:
    .;C:\Program Files\Java\jre1.6.0_07\lib\ext.;C:\Program Files\Java\jre1.5.0_22\lib\ext.;c:\java\classes;
    path:
    \....\....\....C:\Program Files\Java\jdk1.6.0_21;C:\Program Files\Java\jdk1.5.0_22;C:\....\
    I hope someone can advise me on how I get rectify the problem and get the program to compile with JDK 1.5. Thanks.

    he wants to use JDK 1.5.Do read the thread before you post. He is* using JDK 1.5 when he gets the error message. He said so. This is the problem.* Not the solution. When he uses 1.6 he doesn't get the error.
    His environment is a bit messed up because he has PATH entries for both JDK versions.There is precisely zero evidence for that assertion.
    If he wants to compile and test with JDK 1.5, then removing 1.6 would make sense.No it wouldn't. He is using classes compiled for 1.6 with a 1.5 compiler. His problem is with red5.jar(org/red5/server/api/IScope.class) whose class version is 50.0. It's all written there above. If he wants to use that .jar file he has to use 1.6. Or else recompile that .jar file with 1.5, if he has the sources.

  • Jar: Manifest-Attribute "Class-Path"

    I've got a problem with the Class-Path-attribute of the JARs manifest-file. So I've written a real simple application to test where the problems occure... but even this trivial app does not work!
    The execution starts at "Starter.java":
    public class Starter{
          public static void main(String args[]){
                packageOne.Caller.callWriter();
    }The class "Caller" is in a JAR ("Caller.jar") in the same directory as Starter.java.
    Caller.java:
    package packageOne;
    public class Caller{
          public static void callWriter(){
                packageTwo.Writer.write("Write this");
    }The class "Writer" is in a JAR ("Writer.jar") in the same directory as Starter.java and Caller.jar.
    Writer.java:
    package packageTwo;
    public class Writer{
          public static void write(String message){
                System.out.println(message);
    }The file Caller.jar consists of Caller.class and the Manifest.mf. The package-structur/the path seams to be all right.
    The file Writer.jar consists of Writer.class and the Manifest.mf. The package-structur/the path seams to be all right.
    If I invoke the Starter with:
    java Starter -classpath Caller.jar;Writer.jareverything's fine.
    Now, I added the following line to the Manifest.mf of Caller.jar:
    Class-Path: Writer.jar(with one empty line between Manifest-Version: 1.0 and the new line.
    So... shouldn't it be possible now, to invoke the application with:
    java Starter -classpath Caller.jar ???
    It doesn't work. So: what have I misunderstood?
    (The error message is:
    Exception in thread "main" java.lang.NoClassDefFoundError: packageTwo/Writer
          at packageOne.Caller.callWriter(packageOne/Caller.java:5)
          at Starter.main(Starter.java:3)

    Hmmm, I tested it and here are the command I ran and their results. Try doing the same on your computer:aleph% mkdir packageOne
    aleph% mkdir packageTwoThat created the directories.aleph% cat > Starter.java
    public class Starter{
          public static void main(String args[]){
                packageOne.Caller.callWriter();
    aleph% cat > packageOne/Caller.java
    package packageOne;
    public class Caller{
          public static void callWriter(){
                packageTwo.Writer.write("Write this");
    aleph% cat > packageTwo/Writer.java
    package packageTwo;
    public class Writer{
          public static void write(String message){
                System.out.println(message);
    }That created the source files: Starter.java in the current directory, Caller.java under packageOne and Writer.java under packageTwo. Next the compiling and creating the manifest file:aleph% javac Starter.java
    aleph% cat > MF
    Class-Path: Writer.jarThat created additional info to be included in manifest file and put it in a file called MF.
    Then I package "caller.jar" with the manifest and "Writer.jar" without it:aleph% jar -cmf MF caller.jar packageOne
    aleph% jar -cf Writer.jar packageTwoDelete the package* directories so java wont get confused...aleph% rm -r package*And finally run the thing. Remember that the path separator is : in unix but ; in DOS, if that is what you are using.aleph% java -cp .:caller.jar Starter
    Write thisNo problems anywhere. What are the steps you did?

  • Org.apache.jasper.JasperException: Unable to compile class...

    Dear all,
    I've used java.util.List in my jsp, but when I import the package into the jsp, the following error occurs, please help:
    Type: Exception Report
    Message: Internal Server Error
    Exception
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    C:\Sun\AppServer7\domains\domain1\server1\generated\jsp\j2ee-modules\EmailTracker2\_jasper\_index_jsp.java:14: class jasper.index_jsp must be declared abstract. It does not define java.util.List getIncludes() from class org.apache.jasper.runtime.HttpJspBase.
    public class indexjsp extends HttpJspBase {
    ^
    1 error, 1 warning
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.loadJSP(JspServlet.java:641)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.access$000(JspServlet.java:501)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:322)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)

    Hi,
    I am using J2EE SDK 1.4 Server and deployed a Stateless Session Bean and used a JSP page as Web Deployment component. When I deploy the application no error is given but when I access application using the given web context name the following error is displayed on the browser.
    type Exception report
    message
    description The server encountered an internal error () that prevented
    it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    No Java compiler was found to compile the generated source for the JSP.
    This can usually be solved by copying manually
    $JAVA_HOME/lib/tools.jar from the JDK
    to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
    If using an alternate Java compiler, please check its installation and
    access path.
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:132)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:356)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:420)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:444)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:557)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
    java.security.AccessController.doPrivileged(Native Method)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
    Can anyone tell me why this error could be generated? I've given the JAVA_HOME environment variable value as C:\Sun\AppServer\jdk and J2EE_HOME variable value as C:\Sun\AppServer.

  • Jar class path in solaris

    Hi
    I am new to solaris environment. I have a java file which is dependent on xerces.jar. to compile the file i need to set the classpath. pleas let me know how to set class path for xerces.jar which is in usr/raj/ folder structure of solaris machine.
    if there is any on the fly method of setting classpath plz let me know....
    thanks a lot
    raj

    What shell are you using?
    csh:  setenv CLASSPATH ${CLASSPATH}:/usr/raj/xerces.jarsh/ksh:  CLASSPATH=${CLASSPATH}:/usr/raj/xerces.jar
      export CLASSPATH

  • User defined classpath setting using "-Djava.class.path="

    Hello,
    I am invoking a JVM from a C++ application ( say A ) which inturn will be started by another C++ application ( say B ).
    The class path for the JVM is set by "-Djava.class.path=" option in application 'A' which will actually supplied by parent application 'B'.
    I want to know how to do it ?
    I tried with the following things but it doesn't work.
    // the application 'A' gets classpath string from appication 'B' the "classpath" variable ( which is a string ) gets from application 'B'
    // this is in application 'A'
    // "classpath" variable in application 'A' holds the class path string optained from application 'B'
    "-Djava.class.path=" classpath ; ---(1)
    // "-Djava.class.path=" %classpath% ; ---(2)
    // "-Djava.class.path=classpath" ; ---(3)
    All the above tries are failed in first 2 tries the application even doesn't get compiled and in third try the appilcation doesn't set the classpath even though it is get compiled.
    Do any one have any Idea !!

    Hi,
    I am not quite sure if I got your problem correctly...
    Your application A has a variable called classpath containing the classpath recieved from B. right? Now you want to call the JVM with that.
    I think what you got to do is something like
    sprintf(myclasspath, "-Djava.class.path=%s", classpath);
    this will build the correct string for the JVM in myclasspath. And that one can be used to call the JVM.
    Does this sound right??

  • Compiling class in a package

    Hi,
    for some reason i can't understand i am having a hard time compiling some of my classes in a particular package.
    Lets say my packages are
    classes\arm\matrix\util\
    classes\arm\pdm\
    I have numerous .class files in the util directory which are precompiled under the matrix\util dir structure.
    I have some classes in pdm folder and in their first line i gave
    package arm.pdm;
    I am trying to compile classes in arm\pdm
    My classes in arm\pdm can read the classes in the matrix\util directroy
    but they can't understand the classes in the same dir
    For example if i have --
    arm\pdm\P1.java and arm\pdm\P2.java
    so if i complie P2.java and am using P1.class in it and i get an error
    saying cannot resolve symbol P1.
    This is the command am using to compile the class
    c:\server\webapps\test\web-inf\classes\arm> javac -classpath . pdm\P2.java
    Please help. .....
    Any help would b greatly apprectiated
    thanks

    Hi,
    for some reason i can't understand i am having a hard
    time compiling some of my classes in a particular
    package.
    Lets say my packages are
    classes\arm\matrix\util\
    classes\arm\pdm\
    I have numerous .class files in the util directory
    which are precompiled under the matrix\util dir
    structure.
    I have some classes in pdm folder and in their first
    line i gave
    package arm.pdm;
    I am trying to compile classes in arm\pdm
    My classes in arm\pdm can read the classes in the
    matrix\util directroy
    but they can't understand the classes in the same dir
    For example if i have --
    arm\pdm\P1.java and arm\pdm\P2.java
    so if i complie P2.java and am using P1.class in it
    and i get an error
    saying cannot resolve symbol P1.
    This is the command am using to compile the class
    c:\server\webapps\test\web-inf\classes\arm> javac
    -classpath . pdm\P2.java
    Please help. .....
    Any help would b greatly apprectiatedDo you have the following file?
    c:\server\webapps\test\web-inf\classes\arm\arm\pdm\P1.class
    That is how your class path is set.
    Try one of the following for your class path
    -classpath ..
    -classpath c:\server\webapps\test\web-inf\classes

  • Javac / Manifest Class-Path

    Hi guys,
    I have problems with javac not finding classes when I use the extension mechanism.
    I have several jars: abc.jar def.jar ghi.jar ...
    To simplify the classpath when trying to compile another project with these jars, I use the extension mechanism and create a new jar (alphabet.jar) containing only a manifest file:
    Manifest-Version:1.0
    Class-Path: abc.jar def.jar ghi.jar ...The following works fine (assuming for example that abc.jar contains org/alphabet/Abc.class):
    > java -classpath alphabet.jar org.alphabet.AbcBut this fails:
    > javac -classpath alphabet.jar Test.java
    Test.java:1: package org.alphabet does not exist
    import org.alphabet.Abc;
    1 errorTest.java:
    import org.alphabet.Abc;
    public class Test {}I've searched on google and co. for more information but could not get anything. Sun's documentation http://java.sun.com/j2se/1.4/docs/tooldocs/findingclasses.html doesn't mention anything about javac not using the extension mechanism.
    This seems to happen on all JDKs (1.2.2, 1.3.1, 1.4 at least).
    Thanks in advance for your help!

    hi again,
    the next what you should know is that a package has to really exist as directories on your harddisk by compile- and runtime and the name of the class-file needs to be the same name as the class-name in it.
    example:
    c:\javalib\org\alphabet\Abc.java
    c:\javalib\Test.java
    compile both with 1 javac-command
    c:\>cd c:\javalib
    c:\javalib\>javac Test.java
    all imported libs (c:\javalib\org\alphabet\Abc.java) will be automatically compiled with this command. you will have now 2 class-files:
    c:\javalib\org\alphabet\Abc.class
    c:\javalib\Test.class
    now you make a 'manifest'-file for creating a autostartable jar-file:
    create a textfile 'mymanifest.txt' (name is not important) in the root of your projekt with the following content:
    c:\javalib\>mymanifest.txt
    Manifest-Version: 1.0
    Main-Class: Test
    Created-By: Your Name
    (if the start-class is in a package you have to write:
    Main-Class: mypackage.Test)
    now you can make a executable jar (a jar with a manifest) with the command:
    c:\javalib>jar cvfm alphabet.jar mymanifest.txt .
    (dont forget the last point!)
    now you can run the jar simply with:
    (it's now a java-executable)
    c:\javalib>java -jar alphabet.jar
    hope to help
    cu
    oliver scorp
    ps: a jar-file is nothing other than a zip-file, rename it and try it out. you will see that the pathes still exist in the compressed file.
    pps: plz dont forget my dukes!

Maybe you are looking for

  • Smartform LOGO Printing -reverse for a User???

    Hi Guy, This is typicial issue which I never got. He says what ever he is printing like PO,STO every logo is printing up in Reverse direction. He is using a Network printer and funny thing is all others are also using the same printer and they are ab

  • Many execution of a query with different selections in the same work book

    Hi all, I have a workbook with one query that show sales of a plant. User can select many plants, but he doesn't like it, too easy. In this way query shows all the plant in the same sheet and he want a sheet for each plant. The most simply way to do

  • Limited Number of visible slides in TOC?

    Hi, I have a project with 22 slides marked as visible in my TOC. When I preview the project, TOC items 1-19 navigate to the slide correctly when I click on them, but items 20-22 don't do anything. Is there a limit to the number of items that will wor

  • "required file cannot be found" error message

    hi everybody, i recently just purchased an ipod video 5th edition. i plugged it into the computer and immediately tried adding my music collection. everything seemed to be working fine until about 20 some odd songs into the syncing process when i got

  • Rendering the alpha channel

    Hi guys I have shot some video against greensreen,keyed out the green and want to save file with the alpha channel because I want to place the keyed video inside an animation applictaion(cinema4d). I would like to know how can I render my keyed video