A problem with Lucene In a J2EE project

Hi everyone:
I am newer for Lucene which is used to build a search eigneer in my J2EE project.
But I can hardly understand how it works because of my poor English.
So I need you help:
* TxtFileIndexer.java
* Created on 2006�N12��8��, ����3:46
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package classes.php.lucene;
* @author eingmarra
import java.io.File;
import java.io.FileReader;
import java.io.Reader;
import java.util.Date;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.Hits;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.store.FSDirectory;
public class TxtFileIndexer {
     public String test() {
          return "test is ok hohoho";
      * @param args
     public String createIndex(String indexDir_path,String dataDir_path) throws Exception {
          String result = "";
          File indexDir = new File(indexDir_path);
          File dataDir = new File(dataDir_path);
          Analyzer luceneAnalyzer = new StandardAnalyzer();
          File[] dataFiles = dataDir.listFiles();
          IndexWriter indexWriter = new IndexWriter(indexDir,luceneAnalyzer,true);
          long startTime = new Date().getTime();
          for(int i=0; i < dataFiles.length; i++) {
               if(dataFiles.isFile() && dataFiles[i].getName().endsWith(".html")) {
                    result += "Indexing file" + dataFiles[i].getCanonicalPath()+"<br />";
                    Document document = new Document();
                    Reader txtReader = new FileReader(dataFiles[i]);
                    document.add(Field.Text("path",dataFiles[i].getCanonicalPath())); //can not pass the Netbeans IDE, maybe the Field class is not support the signature of the fuction Text anymore!!
                    document.add(Field.Text("contents",txtReader)); //can not pass the Netbeans IDE, maybe the Field class is not support the signature of the fuction Text anymore!!
                    indexWriter.addDocument(document);
          indexWriter.optimize();
          indexWriter.close();
          long endTime = new Date().getTime();
          result += "It takes"+(endTime-startTime)
                    + " milliseconds to create index for the files in directory "
                    + dataDir.getPath();
          return result;
     public String searchword(String ss,String index_path) throws Exception {
     String queryStr = ss;
     String result = "Result:<br />";
     //This is the directory that hosts the Lucene index
File indexDir = new File(index_path);
FSDirectory directory = FSDirectory.getDirectory(indexDir,false);
IndexSearcher searcher = new IndexSearcher(directory);
if(!indexDir.exists()){
     result = "The Lucene index is not exist";
     return result;
Term term = new Term("contents",queryStr.toLowerCase());
TermQuery luceneQuery = new TermQuery(term);
Hits hits = searcher.search(luceneQuery);
for(int i = 0; i < hits.length(); i++){
     Document document = hits.doc(i);
     result += "<br /><a href='getfile.php?w="+ss+"&f="+document.get("path")+"'>File: " + document.get("path")+"</a>\n";
return result;
the code above is from google and it works perfectly in the Lucene1.4. But it not pass the compiler by Netbeans IDE because I use Lucene2.0
If you have some idea,plz replace these two lines' code with the correct ones.
Thanks a lot !!

Hi everyone:
I am newer for Lucene which is used to build a search eigneer in my J2EE project.
But I can hardly understand how it works because of my poor English.
So I need you help:
* TxtFileIndexer.java
* Created on 2006�N12��8��, ����3:46
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package classes.php.lucene;
* @author eingmarra
import java.io.File;
import java.io.FileReader;
import java.io.Reader;
import java.util.Date;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.Hits;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.store.FSDirectory;
public class TxtFileIndexer {
     public String test() {
          return "test is ok hohoho";
      * @param args
     public String createIndex(String indexDir_path,String dataDir_path) throws Exception {
          String result = "";
          File indexDir = new File(indexDir_path);
          File dataDir = new File(dataDir_path);
          Analyzer luceneAnalyzer = new StandardAnalyzer();
          File[] dataFiles = dataDir.listFiles();
          IndexWriter indexWriter = new IndexWriter(indexDir,luceneAnalyzer,true);
          long startTime = new Date().getTime();
          for(int i=0; i < dataFiles.length; i++) {
               if(dataFiles.isFile() && dataFiles[i].getName().endsWith(".html")) {
                    result += "Indexing file" + dataFiles[i].getCanonicalPath()+"<br />";
                    Document document = new Document();
                    Reader txtReader = new FileReader(dataFiles[i]);
                    document.add(Field.Text("path",dataFiles[i].getCanonicalPath())); //can not pass the Netbeans IDE, maybe the Field class is not support the signature of the fuction Text anymore!!
                    document.add(Field.Text("contents",txtReader)); //can not pass the Netbeans IDE, maybe the Field class is not support the signature of the fuction Text anymore!!
                    indexWriter.addDocument(document);
          indexWriter.optimize();
          indexWriter.close();
          long endTime = new Date().getTime();
          result += "It takes"+(endTime-startTime)
                    + " milliseconds to create index for the files in directory "
                    + dataDir.getPath();
          return result;
     public String searchword(String ss,String index_path) throws Exception {
     String queryStr = ss;
     String result = "Result:<br />";
     //This is the directory that hosts the Lucene index
File indexDir = new File(index_path);
FSDirectory directory = FSDirectory.getDirectory(indexDir,false);
IndexSearcher searcher = new IndexSearcher(directory);
if(!indexDir.exists()){
     result = "The Lucene index is not exist";
     return result;
Term term = new Term("contents",queryStr.toLowerCase());
TermQuery luceneQuery = new TermQuery(term);
Hits hits = searcher.search(luceneQuery);
for(int i = 0; i < hits.length(); i++){
     Document document = hits.doc(i);
     result += "<br /><a href='getfile.php?w="+ss+"&f="+document.get("path")+"'>File: " + document.get("path")+"</a>\n";
return result;
the code above is from google and it works perfectly in the Lucene1.4. But it not pass the compiler by Netbeans IDE because I use Lucene2.0
If you have some idea,plz replace these two lines' code with the correct ones.
Thanks a lot !!

Similar Messages

  • Can we use JCo connection with non-Web Dynpro J2EE project in NW

    With Web Dynpro, we have the RFC wizard to call RFCs using JCo connection.  I am wondering, if I create a J2EE project in NW development studio, can I and how to use JCo connection to call RFCs?
    Thanks.

    yes, of course.
    Add jar sapjco.jar then
    import com.sap.mw.jco.*;
    public class Bapi1 extends Object {
       JCO.Client mConnection;
       JCO.Repository mRepository;
       public Bapi1() {
          try {
             // Change the logon information to your own system/user
             mConnection =
                JCO.createClient("001", // SAP client
                  "<userid>", // userid
                  "****", // password
                  null, // language
                  "<hostname>", // application server host name
                  "00"); // system number
            mConnection.connect();
            mRepository = new JCO.Repository("SAPJCo", mConnection);
          catch (Exception ex) {
            ex.printStackTrace();
            System.exit(1);
          JCO.Function function = null;
          JCO.Table codes = null;
          try {
             function = this.createFunction("BAPI_COMPANYCODE_GETLIST");
             if (function == null) {
               System.out.println("BAPI_COMPANYCODE_GETLIST" +
                                  " not found in SAP.");
               System.exit(1);
             mConnection.execute(function);
             JCO.Structure returnStructure =
               function.getExportParameterList().getStructure("RETURN");
             if (! (returnStructure.getString("TYPE").equals("") ||
                    returnStructure.getString("TYPE").equals("S")) ) {
               System.out.println(returnStructure.getString("MESSAGE"));
               System.exit(1);
             codes =
               function.getTableParameterList().getTable("COMPANYCODE_LIST");
             for (int i = 0; i < codes.getNumRows(); i++) {
               codes.setRow(i);
               System.out.println(codes.getString("COMP_CODE") + '\t' +
                                  codes.getString("COMP_NAME"));
          catch (Exception ex) {
            ex.printStackTrace();
            System.exit(1);
          try {
            codes.firstRow();
            for (int i = 0; i < codes.getNumRows(); i++, codes.nextRow()) {
              function = this.createFunction("BAPI_COMPANYCODE_GETDETAIL");
              if (function == null) {
                System.out.println("BAPI_COMPANYCODE_GETDETAIL" +
                                   " not found in SAP.");
                System.exit(1);
         function.getImportParameterList().
           setValue(codes.getString("COMP_CODE"), "COMPANYCODEID");
         function.getExportParameterList().
           setActive(false, "COMPANYCODE_ADDRESS");
         mConnection.execute(function);
         JCO.Structure returnStructure =
           function.getExportParameterList().getStructure("RETURN");
         if (! (returnStructure.getString("TYPE").equals("") ||
                returnStructure.getString("TYPE").equals("S") ||
                returnStructure.getString("TYPE").equals("W")) ) {
            System.out.println(returnStructure.getString("MESSAGE"));
         JCO.Structure detail =
           function.getExportParameterList().
           getStructure("COMPANYCODE_DETAIL");
         System.out.println(detail.getString("COMP_CODE") + '\t' +
                            detail.getString("COUNTRY") + '\t' +
                            detail.getString("CITY"));
      catch (Exception ex) {
        ex.printStackTrace();
        System.exit(1);
      mConnection.disconnect();
    public JCO.Function createFunction(String name) throws Exception {
       try {
         IFunctionTemplate ft =
            mRepository.getFunctionTemplate(name.toUpperCase());
         if (ft == null)
           return null;
         return ft.getFunction();
       catch (Exception ex) {
         throw new Exception("Problem retrieving JCO.Function object.");
    public static void main (String args[]) {
       Bapi1 app = new Bapi1();
    Link: [http://help.sap.com/saphelp_nw04/helpdata/en/35/42e13d82fcfb34e10000000a114084/frameset.htm]

  • Problem with Deployments of web service Project as EAR in weblogic console

    Hi All :-)
    I was facing the problem with the Deployments of web service(java class) as EAR.I created the one web project associated with EAR project. After my development i exported this project as EAR and deployed the same on the weblogic console.....But time it will work fine and sometime it Deployments status will not become active (its running status) and failed after activate the changes.
    Can any body tell me the real problem with weblogic console for Deployments?
    Please tell me the solution...it?s urgent for me...If you know the answer please mail me on [email protected] or reply here on forum
    Thank you very much for your time.
    Rgds
    Ranjit

    I received the same message and resolved it by adding the following jars to the classpath. All these jars came from the weblogic92 directory:
    server/lib/ant/ant.jar
    common/lib/apache_xbean.jar
    server/lib/jsafe.jar
    server/lib/weblogic.jar
    server/lib/webservices.jar
    server/lib/webserviceclient.jar
    server/lib/webserviceclient+ssl.jar
    server/lib/schema/weblogic-container-binding.jar
    server/lib/xbean.jar
    hth,
    John

  • Problems with rendering a 16:9 project with Chapter markers to iDVD

    Hi there
    I'm having an issue where I'm trying to export a DVD for a client with chapter markers as it's required. Problem is when I put the project into iDVD the project squishes back to 4:3 ratio.
    One solution that was on here was to use the Quicktime Conversion to create a 16:9 video however when I use Quicktime conversion I lose the chapter markers
    I need to have both 16:9 ratio and Chapter Markers in the DVD how do I overcome this problem?

    Anamorphicizer didn't work.
    I can use Quicktime Pro cause I currently have Quicktime X on my computer (snow leopard) which doesn't have a Pro upgrade.
    Any myDVDedit is really confusing to use do I have to export the DVD into a VIDEO_TS file to fix it? I'm still puzzled

  • Problem with SAP PI7.0 J2ee Engine starting

    Hi,
    Problem with SAP PI7.0 Server
    I am using AIX6.1 and p570
    J2ee engine is not starting but I am able to login to ABAP engine.
    When I am trying to long in through internet explorer it is not working.
    How to check J2ee engine started or not.
    If it is not started then how to start J2ee engine.
    If J2ee engine problem is there then how to solve the issue and where to check to solve the issue.

    Hi,
    How to check J2ee engine started or not.
    Check the url http://ipaddress:5xx00/index.html
    If this url shows you the system info page then you j2ee engine is up.
    If it is not started then how to start J2ee engine.
    Check your server0.log file.
    If J2ee engine problem is there then how to solve the issue and where to check to solve the issue.
    Check for the problems in log file and do search in sdn or in the market place you will get plenty of info read them and try to resolve the errors.
    Regards,
    Vamshi.

  • Problem with opening final cut studio3 project files

    hello, i m using final cut studio 3 and it seems it ocured a problem with the projects
    after i work on a project and save it, i can t open it anymore(it apears a dialog box wich it says unable to open project file)
    i ve uninstalled final cut, installed again and the problem it s still there
    cam you give me an advice about what i can do?
    thank you

    Uninstalling/reinstalling rarely helps in issues like these and is usually a huge waste of time... It sounds more like a corrupt project than anything. Is FCP able to open other projects?
    Hopefully you have Autosave turned on, as that  may be your only salvation... So go to your Autosave Vault (usually located in your documents folder, in the Final Cut Pro Documents folder).

  • Problem with trimming from a cs2 project

    Hello
    I'll get straight to the point.
    I started editing a projects in premiere pro 2 and i then decided to  open that project from my new pc(win 7,64 bit) which has cs5 installed,
    problem is,when i opened the project everything was there but not exactly where it suposed to be, clips where trimmed wrong,sound clips whee desynchronized from the  video.
    Have i done something wrong ? Any solutions?

    Try importing to a later version like CS3 or CS4, then saving and then importing the newly saved project into CS5. The differences between CS2 and CS5 may be too big and cause the problems you experience.
    If you don't have access to these versions, adhere to the old wisdom: Finish your project in the version you started with.

  • Problem with Missing deployment descriptor [J2EE:160043]

    Hi,
    I am having a problem deploying an *.ear into weblogic 8.1. I get the error
    J2EE:160043]Missing deployment descriptor "META-INF/application.xml" at "C:\bea\weblogic81\samples\domains\examples\applications\ejb20_dataLoadMgr.ear"
    even though the application.xml file is in the *.ear file. This *.ear file is
    built using the following
    ant script:
    Note: I am integrating a Message Driven EJB with Documentum Content Server
    DFC API calls (3rd party jars)
    Thanks, Craig
    <project name="ejb20-message" default="all" basedir=".">
         <!-- set global properties for this build -->
         <property environment="env"/>
         <property file="../../../examples.properties"/>
         <property name="build.compiler" value="${compiler}"/>
         <property name="source" value="."/>
         <property name="build" value="${source}/build"/>
         <property name="dist" value="${source}/dist"/>
         <property name="dummy" value="${source}/dummy"/>
         <!--
    <target name="all" depends="clean, init, compile_ejb, jar.ejb, appc, ear_app,
    -->
         <target name="all" depends="clean, init, compile_ejb, jar.ejb, appc, ear_app3"/>
         <!-- compile_client"/> -->
         <target name="init">
              <!-- Create the time stamp -->
              <tstamp/>
              <!-- Create the build directory structure used by compile
    and copy the deployment descriptors into it-->
              <mkdir dir="${build}"/>
              <mkdir dir="${build}/META-INF"/>
              <mkdir dir="${dist}"/>
              <copy todir="${build}/META-INF">
                   <fileset dir="${source}">
                        <include name="*.xml"/>
                        <exclude name="build.xml"/>
                        <exclude name="application.xml"/>
                   </fileset>
              </copy>
              <!-- Changed to move application.xml into ${dist}/meta-inf C. Ahtye
    <copy todir="${dist}">
    <fileset dir="${source}">
    <include name="application.xml"/>
    </fileset>
    </copy>
    -->
              <copy todir="${dist}/META-INF">
                   <fileset dir="${source}">
                        <include name="application.xml"/>
                   </fileset>
              </copy>
              <!--<copy todir="${dist}">
    <fileset dir="${source}">
    <include name="dfc.properties"/>
    </fileset>
    </copy>-->
         </target>
         <!-- Compile ejb classes into the build directory (jar preparation) -->
         <target name="compile_ejb">
              <javac srcdir="${source}" destdir="${build}" includes="DataLoadMgrBean.java"
    excludes="DSSCommand.java,GetDSSCommand.java,ImportXMLHelper.java" classpath="dfc.jar"/>
         </target>
         <!-- Update ejb jar file or create it if it doesn't exist, including XML
    deployment descriptors -->
         <target name="jar.ejb" depends="compile_ejb">
              <jar jarfile="${dist}/ejb20_dataLoadMgr.jar" basedir="${build}" update="yes">
    </jar>
         </target>
         <target name="appc" depends="jar.ejb">
              <wlappc debug="${debug}" source="${dist}/ejb20_dataLoadMgr.jar" classpath="dfc.jar"
    verbose="true"/>
         </target>
         <!-- Put the ejb into an ear, to be deployed from the ${apps.dir} dir -->
         <target name="ear_app" depends="jar.ejb">
              <ear earfile="${apps.dir}/ejb20_dataLoadMgr.ear" appxml="${source}/application.xml">
                   <!--<fileset dir="${dist}/APP-INF/lib" includes="dfc.jar"/>
    <fileset dir="${dist}/APP-INF/lib" includes="dfcbase.jar"/>-->
                   <fileset dir="${dist}" includes="ejb20_dataLoadMgr.jar"/>
              </ear>
         </target>
         <!-- Need to place dfc.jar, dfcbase.jar, log4j.jar into {source} and then deploy
    to {dist} -->
         <target name="ear_app3" depends="jar.ejb">
              <jar destfile="${apps.dir}/ejb20_dataLoadMgr.ear" basedir="${dist}"/>
         </target>
         <target name="ear_app2" depends="jar.ejb">
              <wlpackage toFile="${apps.dir}/ejb20_dataLoadMgr.ear" srcdir="${dist}" destdir="${dummy}"/>
         </target>
         <!-- Compile client app into the clientclasses directory -->
         <target name="compile_client">
              <javac srcdir="${source}" destdir="${client.classes.dir}" includes="Client.java"/>
         </target>
         <target name="clean">
              <delete dir="${build}"/>
         </target>
         <!-- Run the example -->
         <target name="run">
              <java classname="examples.ejb20.dataLoadMgr.Client" fork="yes" failonerror="true">
                   <arg value="t3://localhost:${port}"/>
                   <classpath>
                        <pathelement path="${ex.classpath}"/>
                   </classpath>
              </java>
         </target>
    </project>

    Can you show me the output of jar tvf
    C:\bea\weblogic81\samples\domains\examples\applications\ejb20_dataLoadMgr.ear
    -- Rob
    Craig Ahtye wrote:
    Hi,
    I am having a problem deploying an *.ear into weblogic 8.1. I get the error
    J2EE:160043]Missing deployment descriptor "META-INF/application.xml" at "C:\bea\weblogic81\samples\domains\examples\applications\ejb20_dataLoadMgr.ear"
    even though the application.xml file is in the *.ear file. This *.ear file is
    built using the following
    ant script:
    Note: I am integrating a Message Driven EJB with Documentum Content Server
    DFC API calls (3rd party jars)
    Thanks, Craig
    <project name="ejb20-message" default="all" basedir=".">
         <!-- set global properties for this build -->
         <property environment="env"/>
         <property file="../../../examples.properties"/>
         <property name="build.compiler" value="${compiler}"/>
         <property name="source" value="."/>
         <property name="build" value="${source}/build"/>
         <property name="dist" value="${source}/dist"/>
         <property name="dummy" value="${source}/dummy"/>
         <!--
    <target name="all" depends="clean, init, compile_ejb, jar.ejb, appc, ear_app,
    -->
         <target name="all" depends="clean, init, compile_ejb, jar.ejb, appc, ear_app3"/>
         <!-- compile_client"/> -->
         <target name="init">
              <!-- Create the time stamp -->
              <tstamp/>
              <!-- Create the build directory structure used by compile
    and copy the deployment descriptors into it-->
              <mkdir dir="${build}"/>
              <mkdir dir="${build}/META-INF"/>
              <mkdir dir="${dist}"/>
              <copy todir="${build}/META-INF">
                   <fileset dir="${source}">
                        <include name="*.xml"/>
                        <exclude name="build.xml"/>
                        <exclude name="application.xml"/>
                   </fileset>
              </copy>
              <!-- Changed to move application.xml into ${dist}/meta-inf C. Ahtye
    <copy todir="${dist}">
    <fileset dir="${source}">
    <include name="application.xml"/>
    </fileset>
    </copy>
    -->
              <copy todir="${dist}/META-INF">
                   <fileset dir="${source}">
                        <include name="application.xml"/>
                   </fileset>
              </copy>
              <!--<copy todir="${dist}">
    <fileset dir="${source}">
    <include name="dfc.properties"/>
    </fileset>
    </copy>-->
         </target>
         <!-- Compile ejb classes into the build directory (jar preparation) -->
         <target name="compile_ejb">
              <javac srcdir="${source}" destdir="${build}" includes="DataLoadMgrBean.java"
    excludes="DSSCommand.java,GetDSSCommand.java,ImportXMLHelper.java" classpath="dfc.jar"/>
         </target>
         <!-- Update ejb jar file or create it if it doesn't exist, including XML
    deployment descriptors -->
         <target name="jar.ejb" depends="compile_ejb">
              <jar jarfile="${dist}/ejb20_dataLoadMgr.jar" basedir="${build}" update="yes">
    </jar>
         </target>
         <target name="appc" depends="jar.ejb">
              <wlappc debug="${debug}" source="${dist}/ejb20_dataLoadMgr.jar" classpath="dfc.jar"
    verbose="true"/>
         </target>
         <!-- Put the ejb into an ear, to be deployed from the ${apps.dir} dir -->
         <target name="ear_app" depends="jar.ejb">
              <ear earfile="${apps.dir}/ejb20_dataLoadMgr.ear" appxml="${source}/application.xml">
                   <!--<fileset dir="${dist}/APP-INF/lib" includes="dfc.jar"/>
    <fileset dir="${dist}/APP-INF/lib" includes="dfcbase.jar"/>-->
                   <fileset dir="${dist}" includes="ejb20_dataLoadMgr.jar"/>
              </ear>
         </target>
         <!-- Need to place dfc.jar, dfcbase.jar, log4j.jar into {source} and then deploy
    to {dist} -->
         <target name="ear_app3" depends="jar.ejb">
              <jar destfile="${apps.dir}/ejb20_dataLoadMgr.ear" basedir="${dist}"/>
         </target>
         <target name="ear_app2" depends="jar.ejb">
              <wlpackage toFile="${apps.dir}/ejb20_dataLoadMgr.ear" srcdir="${dist}" destdir="${dummy}"/>
         </target>
         <!-- Compile client app into the clientclasses directory -->
         <target name="compile_client">
              <javac srcdir="${source}" destdir="${client.classes.dir}" includes="Client.java"/>
         </target>
         <target name="clean">
              <delete dir="${build}"/>
         </target>
         <!-- Run the example -->
         <target name="run">
              <java classname="examples.ejb20.dataLoadMgr.Client" fork="yes" failonerror="true">
                   <arg value="t3://localhost:${port}"/>
                   <classpath>
                        <pathelement path="${ex.classpath}"/>
                   </classpath>
              </java>
         </target>
    </project>

  • Problem with system settings for different project.

    Hello, I have something that pauses me a lot of problems. I work on different editing projects with deferent externe Hard Disc. I have 3 of those but on each one I have the video and sound and render...importation for one specific project. The thing is that I want that FC automatically changes the setting to where make the saves and import the new material (video cassettes...). It means if I open a project in disc 1 and import video it does not put it in disc 2 just, disc on witch I worked juste before on an other project. I'll have a lot of off media problems and risks of loosing things...
    What can I do ?
    Thanks for reading !
    Message was edited by: Napoléon23

    YOu have to manually reset the Scratch Disk for each project you open. There is no automated way to do this in FCP at this time.
    Shane

  • Problems with using old web service project with new WLS/OEPE install

    I developed a java web service two years ago using WLS 10.3.3 and OEPE. After development I checked the workspace into Subversion including the .metadata directory. The web service was deployed to a production WLS box and is running fine.
    Now I have a new Windows 7 desktop computer. I have installed WLS 10.3.3 and OEPE on my new desktop and am trying to get the web service I wrote two years ago to run locally. When OEPE launches I point the workspace to the workspace project directory (from two yrs ago) that I have just checked out from Subversion. However when the OEPE IDE comes up I have many errors in the java code. Pretty much every java class is flagged with a "cannot be resolved to a type" error.
    Also, when I try to create a new server and domain, I have a problem there. I select "Oracle WebLogic Server 11gR1 PatchSet 2" as the server type, click Next on the wizard, but then on the next window where you select the Domain, the Domain Directory is disabled and will not let me enter a value, and the link to allow you to create a new Domian is not visible.
    Feeling kind of stupid as this should be really simple to do. Am I proceeding correctly by saving off the entire workspace and then trying to use that workspace in the new WLS/OEPE install? Any help would be greatly appreciated.

    Have you tried creating a new workspace, then import the project from your subversion workspace?

  • Problem with bookstore1 example in J2EE 5 tutorial

    Hi everyone. I'm pretty experienced with J2EE but new to the 1.5 version. I'm using the Sun One Server 9.1 and the ant tools. This is referring to the samples in the J2EE 1.5 tutorial. I set my build.properties file and tried to build bookstore1 using ant and then ant deploy. I get the following error.
    Deploying application in domain failed; Error loading deployment descriptors for module [bookstore1] -- javax.annotation.Resource.authenticationType()Ljavax/annotation/Resource$AuthenticationType;at com.sun.enterprise.deployment.annotation.AnnotationInfo@4b35d5 Error loading deployment descriptors for module [bookstore1] -- javax.annotation.Resource.authenticationType()Ljavax/annotation/Resource$AuthenticationType;at com.sun.enterprise.deployment.annotation.AnnotationInfo@4b35d5
    This error is wracking my brain. If any one could help me with this, I'd really appreciate it.

    Well, i haven't checked this forum for a while so by now you've probably figured this out. Anyway, there is a build.properties.sample file in the $JAVA_TUTORIAL_HOME\examples\bp-project directroy. Rename that file to build.properties. Open it and look at it. Really, it should already be filled out. There is a property in there like this
    javaee.server.passwordfile=${javaee.tutorial.home}/examples/common/admin-password.txtYou have to go to this admin-password.txt file and set the password to your app server. In mine, I have
    AS_ADMIN_PASSWORD=passwordNow, you can go to any web project and run asant. Us asant (which stands for Application Server ant). You can use ant, but using asant will ensure your using the right version. Also be sure your using Java Application Server 9 and the asant that comes with it.

  • Problems with creating new WinHelp 2000 projects (RoboHELP 7)

    We changed to RoboHELP 7 one week ago. Before we used
    RoboHELP X5. On the Computer where I installed RH7 the demo of RH7
    was installed before. It is a Windows Vista sytem. But after
    encountering problems I set up a VM Ware (Windows XP SP 2). The
    problems remained the same.
    Editing our old X5 projects is no problem. But when creating
    a new project it is impossible to set a non-scrolling region. I
    figured out that the paragraph mark for setting up a non-scrolling
    region in RH5 is right before a pagebreak in the word documents
    (Topics 2 to X). In RH7 it is place directly in front of Heading 1.
    By creating a new document in the project and deleting the default
    document you can work on as normal. Editing the DOCX template works
    fine either. But from my point of view this cannot be the final
    conclusion.
    The second problem is that changes in the help window
    configuration oviously are stored but not compiled anymore. You can
    change color and dimension of your main help window and these
    changes are stored correctly. But when compiling the project there
    are no changes to the default values in the output. More worse:
    when you open the HPJ file directly with Microsoft Help Workshop
    application there are written some strange marks (like
    “”) into the first lines and the help
    file cannot be compiled by Help Workshop application anymore. The
    error message sounds like this: HC3073: Warning: hhtrace.hpj: No
    section is defined for the line ".".
    Anyone out there who encountered the same problems and solved
    them?

    Thank you for your replies! :)
    By reading your answers I became aware of another fact: we
    use a german version of RoboHelp 7 on german or multi language
    versions of Windows. I set up a VM in English this morning (US
    version of WinXP SP 2, US version of Office 2007, English RoboHelp
    7 Demo). Indeed I had NO Problems. So it may be an issue of the
    german version of RH7.
    Of course I know how to set a non scrolling region manually
    for a topic. But the result remains the same (for the german
    version of RH7). Creating a new project you face the default
    document. Now I was adding some topics (in the following linked
    screenshot ‘Topic 1’ and ‘Topic 2’). If you
    now add non scrolling regions to all the topics (manually or
    automatically), the result will be as follows:
    http://img223.imageshack.us/my.php?image=nsr01gg6.gif
    After compiling the first topic in the document will have a
    non scrolling region, the others won’t. As I said in my first
    post, the problem only occurs in the default document. Creating a
    new document the topics with non scrolling regions look like this
    and compile correctly:
    http://img220.imageshack.us/my.php?image=nsr02fm5.gif

  • Problems with JDeveloper main view (JSF project)

    Hello!
    I have some problems while making my web aplication with JSF. The problem is in view. The view is normal (table is shown) at creation, but after some time, i get problems.
    Here are the links:
    I'm trying to get from this view http://www.moj-album.com/slike/3679916/sZjgAAVGkyC46ig7.jpg , back to http://www.moj-album.com/slike/3679916/LF6ViazUIfIxqCHs.jpg .
    I can't find a way to get back my normal view. Like i sad, if i open a new project it works fine for some time.
    Thanks for all the help!!
    Andrej

    Hi,
    - which release of JDeveloper?
    - Does restarting JDeveloper help ?
    Didier Laurent blogged about this issue:
    - http://blogs.oracle.com/Didier/2006/11/22#a162
    - http://blogs.oracle.com/Didier/2007/02/26#a144
    Another source of the problem could be Servlet filters or custom PhaseListeners with dependecies to the runtime environment. This will all be fixed in JDeveloper 11
    However, in your case it sounds that re-starting JDeveloper fixes the problem. Sorry for the inconvenience.
    Frank

  • Audio problem with simple iDVD '08 slideshow project - cutout/hiccup/drop

    Hi - I just completed my first iDVD project which is just comprised of a photo slideshow (event from iPhoto) set to an iTunes playlist (AIFF and AAC files) using an iDVD theme (7.0 theme)
    Everything seemed to work well, with one glaring exception:
    Every six minutes and 22 seconds (6:22) upon DVD playback, the DVD stops for a brief second and then restarts - this causes an audio "blip." I would like to correct this.
    Other info to help diagnose this problem: there are no markers that I know of in the project. I used six "drop zones" in the theme, though I don't know how/why those would affect the playback.
    During preview, it plays fine. I have already tried "Save as Disk Image" and then burning to a high quality DVD at 4X speed - none of that corrected the problem. One other note: at each 6:22 of the approximately 37 minute slideshow, the "title" field changes from "1," to "2," to "3," etc. - what does this mean - this is apparently the cause of the problem, though I do not see how to adjust/correct this - thank you in advance!! [the other affect this has is that the running time resets every 6:22 - I would prefer this not to happen).
    A couple of other notes, not as important, though still would like to figure out:
    1. Edits I make to the songs in iTunes (namely, adjusting the volume and length of some songs) don't seem to take in the final product - why is this? The edits work when the songs play in iTunes.
    2. I have seven songs that accompany the slideshow - is it possible to put markers at the start of each of those songs so I could select through to different sections? I have read that in a slideshow, each slide is a marker, so perhaps this isn't easily doable.
    I've read about some other somewhat similar cases and some have suggested producing the slideshow in iMovie and then bringing it back into iDVD - would this help? Would this also allow me to mix the music better, as well? Or is there some better method? Garageband? Final Cut?
    Thank you so much for your help - first thing I want to solve is the audio blip problem - next priority would be to get the song volumes matched/lengths slightly edited, and next would be the markers.
    jsfitz22

    Yes, it is the 99 slide limit. Each slide is a chapter and at slide 99 the next slide is numbered back to 1 (chapter 1). Some DVD players get by that pause with just that, a brief pause, where others may balk entirely. Burning the project at the slowest possible speed, 1X if burning directly to disk from iDVD and 2X if burning a disk Image with Disk Utility, will help make that transition/pause less noticeable. It reminds me of the pause I get in playing commercial movies. There's often a pause at the point where the movies changes to the second layer (I think).
    OT

  • Problem with hello2 in the J2ee tutorial

    Hi all:
    I faced this problem when iam running the hello2 application I have followed the tutorial instructions and when i write the url in my browser http://localhost:8080/hello2/greeting but this error occur:
    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: Wrapper cannot find servlet class servlets.GreetingServlet or a class it depends on
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
         org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
         com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:272)
         com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
         org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
         java.lang.Thread.run(Thread.java:595)
    root cause
    java.lang.ClassNotFoundException: servlets.GreetingServlet
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1437)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         java.security.AccessController.doPrivileged(Native Method)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
         org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
         com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:272)
         com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
         org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
         java.lang.Thread.run(Thread.java:595)
    note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server-PE-8.0 logs.
    If any one can help i will be pleased..
    Thanks all.

    Hello,
    Are you sure that you performed all of step 5 in the instructions for packaging the example with deploytool?
    Instead of using deploytool, you can also build, package, and deploy the example by running the following commands:
    asant build
    asant create-war
    asant deploy-war
    Try this method and see it works. This will be documented in the next version of the tutorial.
    Jennifer

Maybe you are looking for

  • Unable to include Operator Interface in TestStand deployment

    Hello.  I have created a test system using TestStand 3.5.  There is only one sequence file, and this sequence calls several VIs that I have created in LabVIEW 8.0.  I would like to distribute this test system to a target computer, which will then run

  • Multiple iPods and one computer

    My kids and I own iPods (two Nanos and one video). Is it possible to have one computer recognize three devices? Thanks. Vaio   Windows XP  

  • GL account field in PO reference is blank

    Dear SAP Guru, In MIro, In PO refernce details, GL account is coming blank in case of procurement done against account assignment like WBS, sale order, network. in case of cost centre,  GL account is fill up with GL account in Miro PO reference. Kind

  • Join help pls

    hello can some one help me in joining the tables po_vendors and gl_je_headers or gl_he_headers thankyou

  • Can you get games on the iPod Nano 2nd generation?

    This is probably a simple question, but can you get games on an iPod Nano 2nd Generation?