Batch loading with sdordf.jar.

Hi Guys
I have just tried a batch load with sdordf.jar.
In my first attempt there was a mistake in the n3 file.
After correcting the file and re running I now get the error.
Connecting to jdbc:oracle:thin:...........
Append mode
Copy existing data out
Just load triples into one column
Temporary table already exists!
java.sql.SQLException: ORA-00955: name is already used by an existing object
ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 3326
ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 3362
ORA-06512: at "MDSYS.RDF_APIS", line 786
ORA-06512: at line 1
Can anyone tell me what the name of this temporary table is, so that I can get rid of it.
Cheers
Phil

Hi Mellie
After having a little break I have installed the jena patch during which I had to drop the network and model created before.
I tried running a batch load as before but I still get the error message saying the temporary table already exists.
I tried the clean up routine as suggested but get the error.
SQL> exec sdo_rdf.cleanup_batch_load('researchdata')
BEGIN sdo_rdf.cleanup_batch_load('researchdata'); END;
ERROR at line 1:
ORA-13199: Batch load cleanup failed. ORA-00942: table or view does not exist
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_RDF", line 1016
ORA-06512: at "MDSYS.SDO_RDF", line 1022
ORA-06512: at line 1
I run it as mdsys as you said.
Any other suggestions?
Cheers
Phil

Similar Messages

  • WLS 9.2.2: JSP recompile for every page load with JAR'ed tag files

    I have a small custom tag library of three tag files. With the server running in development mode and the tag files in a JAR (included in WEB-INF/lib), the server appears to be doing a JSP recompile on every page load. However, it only compiles on the first page load if the tag files are included in WEB-INF/tags (no JAR). Also, running the server in production mode with the JAR'ed tag files avoids the recompile for every page load.
              Is that how the server should behave?
              For whatever it's worth, I'm also using Eclipse 3.3.2 with WTP and WebLogic Server Tools 1.1.2. The server is running the Sun JVM (1.5_10).

    Vikram,
              I went back and created a simple example to test. Below I'm posting the Java source code generated from the two relevant files: index.jsp, and hello.tag.
              __index.java:
              package jsp_servlet;
              import java.io.*;
              import java.util.*;
              import javax.servlet.*;
              import javax.servlet.http.*;
              import javax.servlet.jsp.*;
              import javax.servlet.jsp.tagext.*;
              public final class __index extends weblogic.servlet.jsp.JspBase implements weblogic.servlet.jsp.StaleIndicator {
              private static void _releaseTags(javax.servlet.jsp.tagext.JspTag t) {
              while (t != null) {
              if(t instanceof javax.servlet.jsp.tagext.Tag) {
              javax.servlet.jsp.tagext.Tag tmp = (javax.servlet.jsp.tagext.Tag)t;
              t = ((javax.servlet.jsp.tagext.Tag) t).getParent();
              try {
              tmp.release();
              } catch(Exception ignore) {}
              else {
              t = ((javax.servlet.jsp.tagext.SimpleTag)t).getParent();
              public boolean _isStale(){
              boolean stale = staticIsStale((weblogic.servlet.jsp.StaleChecker) getServletConfig().getServletContext());
              return _stale;
              public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) {
              if (sci.isResourceStale("/index.jsp", 1207926672370L ,"9.2.2.0","America/Denver")) return true;
              if (sci.isResourceStale("/null", 1207926783245L ,"9.2.2.0","America/Denver")) return true;
              return false;
              private static void _writeText(javax.servlet.ServletResponse rsp, javax.servlet.jsp.JspWriter out, String block, byte[] blockBytes)
              throws java.io.IOException {
              if (!_WL_ENCODED_BYTES_OK || _hasEncodingChanged(rsp)){
              out.print(block);
              } else {
              ((weblogic.servlet.jsp.ByteWriter)out).write(blockBytes, block);
              private static boolean _hasEncodingChanged(javax.servlet.ServletResponse rsp){
              String encoding = rsp.getCharacterEncoding();
              if ( "ISO-8859-1".equals(encoding) || "Cp1252".equals(encoding) || "ISO8859_1".equals(encoding) || "ASCII".equals(encoding) ){
              return false;
              if (_WL_ORIGINAL_ENCODING.equals(encoding)) {
              return false;
              return true;
              private static boolean WLENCODED_BYTES_OK = true;
              private static final String WLORIGINAL_ENCODING = "ISO-8859-1";
              private static byte[] _getBytes(String block){
              try {
              return block.getBytes(_WL_ORIGINAL_ENCODING);
              } catch (java.io.UnsupportedEncodingException u){
              WLENCODED_BYTES_OK = false;
              return null;
              private final static String wlblock0 ="<!--\n * $Id$\n-->\n \n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \n\t\t\"http://www.w3.org/TR/html4/loose.dtd\">\n \n";
              private final static byte[] wlblock0Bytes = getBytes( wl_block0 );
              private final static String wlblock1 =" \n \n\t";
              private final static byte[] wlblock1Bytes = getBytes( wl_block1 );
              private final static String wlblock2 ="\n";
              private final static byte[] wlblock2Bytes = getBytes( wl_block2 );
              private final static String wlblock3 ="\n\n<html>\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" />\n\n\t<title>Tag File Test</title>\n</head>\n<body> \n\t";
              private final static byte[] wlblock3Bytes = getBytes( wl_block3 );
              private final static String wlblock4 ="\n</body>\n</html>";
              private final static byte[] wlblock4Bytes = getBytes( wl_block4 );
              static private javelin.jsp.JspFunctionMapper jspxfnmap = javelin.jsp.JspFunctionMapper.getInstance();
              public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException, java.io.IOException {
              javax.servlet.ServletConfig config = getServletConfig();
              javax.servlet.ServletContext application = config.getServletContext();
              javax.servlet.jsp.tagext.JspTag _activeTag = null;
              Object page = this;
              javax.servlet.jsp.JspWriter out;
              javax.servlet.jsp.PageContext pageContext = javax.servlet.jsp.JspFactory.getDefaultFactory().getPageContext(this, request, response, null, true , 8192 , true );
              response.setHeader("Content-Type", "text/html; charset=ISO-8859-1");
              out = pageContext.getOut();
              javax.servlet.jsp.JspWriter _originalOut = out;
              javax.servlet.http.HttpSession session = request.getSession( true );
              try {;
              response.setContentType("text/html; charset=ISO-8859-1");
              {_writeText(response, out, _wl_block0, _wl_block0Bytes);}
              {_writeText(response, out, _wl_block1, _wl_block1Bytes);}
              {_writeText(response, out, _wl_block2, _wl_block2Bytes);}
              {_writeText(response, out, _wl_block3, _wl_block3Bytes);}
              jsp_servlet._tags.__hello_tag __tag0 = null ;
              int __result__tag0 = 0 ;
              if (__tag0== null )__tag0 = new jsp_servlet._tags.__hello_tag ();
              __tag0.setJspContext(pageContext);
              __tag0.setParent(null);
              activeTag=_tag0;
              __tag0.doTag();
              {_writeText(response, out, _wl_block4, _wl_block4Bytes);}
              } catch (Throwable __ee){
              if(!(__ee instanceof javax.servlet.jsp.SkipPageException)) {
              while ((out != null) && (out != _originalOut)) out = pageContext.popBody();
              releaseTags(activeTag);
              pageContext.handlePageException(__ee);
              __hello_tag.java:
              package jsp_servlet . _tags ;
              import java.io.*;
              import java.util.*;
              import javax.servlet.*;
              import javax.servlet.http.*;
              import javax.servlet.jsp.*;
              import javax.servlet.jsp.tagext.*;
              public final class __hello_tag extends javax.servlet.jsp.tagext.SimpleTagSupport {
              private static void _releaseTags(javax.servlet.jsp.tagext.JspTag t) {
              while (t != null) {
              if(t instanceof javax.servlet.jsp.tagext.Tag) {
              javax.servlet.jsp.tagext.Tag tmp = (javax.servlet.jsp.tagext.Tag)t;
              t = ((javax.servlet.jsp.tagext.Tag) t).getParent();
              try {
              tmp.release();
              } catch(Exception ignore) {}
              else {
              t = ((javax.servlet.jsp.tagext.SimpleTag)t).getParent();
              public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) {
              if (sci.isResourceStale("/META-INF/tags/hello.tag", 1207926783175L ,"9.2.2.0","America/Denver")) return true;
              return false;
              protected static final String tagxTagInfo = "-84,-19,0,5,116,0,5,104,101,108,108,111,116,0,29,106,115,112,95,115,101,114,118,108,101,116,46,95,116,97,103,115,46,95,95,104,101,108,108,111,95,116,97,103,116,0,5,101,109,112,116,121,112,112,112,112,119,5,0,0,0,0,3,116,0,10,106,115,112,67,111,110,116,101,120,116,119,1,0,116,0,28,106,97,118,97,120,46,115,101,114,118,108,101,116,46,106,115,112,46,74,115,112,67,111,110,116,101,120,116,113,0,126,0,4,119,1,1,112,119,2,1,0,112,112,116,0,7,106,115,112,66,111,100,121,119,1,0,116,0,36,106,97,118,97,120,46,115,101,114,118,108,101,116,46,106,115,112,46,116,97,103,101,120,116,46,74,115,112,70,114,97,103,109,101,110,116,113,0,126,0,6,119,1,1,112,119,2,1,0,112,112,116,0,6,112,97,114,101,110,116,119,1,0,116,0,31,106,97,118,97,120,46,115,101,114,118,108,101,116,46,106,115,112,46,116,97,103,101,120,116,46,74,115,112,84,97,103,113,0,126,0,8,119,1,1,112,119,2,1,0,112,112,119,4,0,0,0,0,112,112,";
              protected JspContext jspContext ;
              public void setJspContext ( JspContext ctx ){
              super . setJspContext ( ctx );
              java.util.List nested = null ;
              java.util.List atBegin = null ;
              java.util.List atEnd = null ;
              this.jspContext = new javelin.jsp.JspContextWrapper(ctx, nested, atBegin, atEnd, null);
              }public JspContext getJspContext() {
              return this.jspContext;
              private java.io.Writer jspxsout;
              private javax.servlet.jsp.tagext.JspTag _activeTag;
              private static void _writeText(javax.servlet.ServletResponse rsp, javax.servlet.jsp.JspWriter out, String block, byte[] blockBytes)
              throws java.io.IOException {
              if (!_WL_ENCODED_BYTES_OK || _hasEncodingChanged(rsp)){
              out.print(block);
              } else {
              ((weblogic.servlet.jsp.ByteWriter)out).write(blockBytes, block);
              private static boolean _hasEncodingChanged(javax.servlet.ServletResponse rsp){
              String encoding = rsp.getCharacterEncoding();
              if ( "ISO-8859-1".equals(encoding) || "Cp1252".equals(encoding) || "ISO8859_1".equals(encoding) || "ASCII".equals(encoding) ){
              return false;
              if (_WL_ORIGINAL_ENCODING.equals(encoding)) {
              return false;
              return true;
              private static boolean WLENCODED_BYTES_OK = true;
              private static final String WLORIGINAL_ENCODING = "ISO-8859-1";
              private static byte[] _getBytes(String block){
              try {
              return block.getBytes(_WL_ORIGINAL_ENCODING);
              } catch (java.io.UnsupportedEncodingException u){
              WLENCODED_BYTES_OK = false;
              return null;
              private final static String wlblock0 ="\n<center><h1>Hello World</h1></center>";
              private final static byte[] wlblock0Bytes = getBytes( wl_block0 );
              static private javelin.jsp.JspFunctionMapper jspxfnmap = javelin.jsp.JspFunctionMapper.getInstance();
              public void doTag() throws JspException, java.io.IOException {
              javax.servlet.jsp.PageContext pageContext = (javax.servlet.jsp.PageContext) getJspContext();
              javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest) pageContext.getRequest ();
              javax.servlet.http.HttpServletResponse response = (javax.servlet.http.HttpServletResponse) pageContext.getResponse();
              javax.servlet.http.HttpSession session = pageContext.getSession();
              javax.servlet.ServletContext application = pageContext.getServletContext();
              javax.servlet.ServletConfig config = pageContext.getServletConfig();
              javax.servlet.jsp.JspWriter out = jspContext.getOut();
              javax.servlet.jsp.tagext.JspTag _activeTag = null;
              try {
              {_writeText(response, out, _wl_block0, _wl_block0Bytes);}
              } catch ( Throwable t ){
              if( t instanceof javax.servlet.jsp.SkipPageException )
              {throw (javax.servlet.jsp.SkipPageException)t;}
              if( t instanceof java.io.IOException )
              {throw (java.io.IOException)t;}
              if( t instanceof IllegalStateException )
              {throw (IllegalStateException)t;}
              if( t instanceof javax.servlet.jsp.JspException )
              {throw (javax.servlet.jsp.JspException)t;}
              throw new javax.servlet.jsp.JspException(t);
              finally {
              ((javelin.jsp.JspContextWrapper)jspContext).syncEndTagFile();
              Edited by Stephen Davison at 04/11/2008 9:02 AM

  • Poblem with FXML to load image in jar using: Image url="@/myImage.png"/

    If my FXML und image files are in a JAR-file then I have the Exception:
    Caused by: java.lang.IllegalArgumentException: URL must not be empty
    at javafx.scene.image.Image.validateUrl(Image.java:966)
    at javafx.scene.image.Image.<init>(Image.java:611)
    at com.sun.javafx.fxml.builder.JavaFXImageBuilder.build(JavaFXImageBuilder.java:27)
    My FXML file:
    <Button>
    <graphic>
    <ImageView>
    <image>
    <Image url="@/images/Printer_48.png" />
    </image>
    </ImageView>
    </graphic>
    </Button>
    Is there a Problem with the JavaFXImageBuilder which can't not load Images in JAR files?

    In jars it is case-sensitive:
    <Image url="@/images/myImage.png"/>
    is not the same as
    <Image url="@/images/myImage.PNG"/>
    Edited by: 961538 on Sep 27, 2012 4:03 AM

  • Batch load images (tiff) into table with a BLOB column

    Hi,
    Does anyone know any third-party tool/software to bulk/batch load images into Oracle table? There is an ETL software to regularly pull the images (tiff) from a ftp server to a directory in the database server. There is no way I can hardcode the image filenames into the control file and use SQL*Loader to load the files. Is there any tool/software that can just grab whatever files in the directory and load them into Oracle. Then, I can write a program to extract the filename from the file already loaded into the table and update the filename column.
    Thanks.
    Andy

    sound like simple scripting to me...
    -- SQL loader example
    http://www.orafaq.com/wiki/SQL%2ALoader_FAQ#How_does_one_use_SQL.2ALoader_to_load_images.2C_sound_clips_and_documents.3F
    -- dynamically build control file
    devuser1:/tmp>>touch image1.gif
    devuser1:/tmp>>touch image2.jpg
    devuser1:/tmp>>touch image3.jpg
    devuser1:/tmp>>ls -l image*
    -rw-rw-r--   1 devuser1   mygrp           0 Jul 10 11:19 image1.gif
    -rw-rw-r--   1 devuser1   mygrp           0 Jul 10 11:19 image2.jpg
    -rw-rw-r--   1 devuser1   mygrp           0 Jul 10 11:19 image3.jpg
    devuser1:/tmp>>ls -l image* | awk '{ print NR "," $9}'
    1,image1.gif
    2,image2.jpg
    3,image3.jpg
    devuser1:/tmp>>echo "LOAD DATA" > t.ctl
    devuser1:/tmp>>echo "INFILE *" >> t.ctl
    devuser1:/tmp>>echo "..." >> t.ctl
    devuser1:/tmp>>echo "BEGINDATA" >> t.ctl
    devuser1:/tmp>>ls -l image* | awk '{ print NR "," $9}' >> t.ctl
    devuser1:/tmp>>cat t.ctl
    LOAD DATA
    INFILE *
    BEGINDATA
    1,image1.gif
    2,image2.jpg
    3,image3.jpgEdited by: maceyah on Jul 10, 2009 12:42 PM

  • Problem with Batch Loader and FDM user regional settings

    Hi
    I am using FDM 11.1.2.1.
    When I use the English regional settings for my FDM user account, I can do Export Excel from FDM, but Batch Loader doesn't work (Error : "one or more parallel processes failed to start).
    When I use the French regional settings for my FDM user account, Export to Excel doesn't work anymore (Error: Conversion from string "12.0" to type 'Long' is not valid. Detail: InnerException1: Input string was not in a correct format.), but the Batch loader is ok.
    Any idea?
    Thanks in advance for your help
    Fanny

    Hi Mittal,
    By default, formats for date is determined by the report server language at run time. The report server language is the language of the operating system on which the report server is installed. So the formats for date is determined by the language of the
    operating system on which the report server is installed.
    When you deploy the report to SharePoint site that the regional setting is set to English (Australia), please also set the report language to ‘en-AU’. Then the date format can be also changes to English (Australia).
    If the issue is still exited, could you please tell us the date format of date parameters and the field? If possible, please post the screenshot about this, then we can make further analysis.
    Reference:
    Solution Design Considerations for Multi-Lingual or Global Deployments (Reporting Services)
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Performance problem with ojdbc14.jar

    Hi,
    We are having performance problem with ojdbc14.jar in selecting and updating (batch updates) entries in a table. The queries are taking minutes to execute. The same java code works fine with classes12.zip ans queries taking sub seconds to execute.
    We have Oracle 9.2.0.5 Database Server and I have downloaded the ojdbc14.jar from Oracle site for the same. Tried executing the java code from windows 2000, Sun Solaris and Opteron machines and having the same problem.
    Does any one know a solution to this problem? I also tried ojdbc14.jar meant for Oracle 10g, that did not help.
    Please help.
    Thanks
    Yuva

    My code is doing some thing which might be working well with classes12.zip and which does not work well with ojdbc14.jar? Any general suggestions to make the code better, especially for batch updates.
    But for selecting a row from the table, I am using index columns in the where cluase. In the code using PreparedStatement, setting all the reuired fields. Here is the code. We have a huge index with 14 fields!!. All the parameters are for where clause.
    if(longCallPStmt == null) {
    longCallPStmt = conn.prepareStatement(longCallQuery);
    log(Level.FINE, "CdrAggLoader: Loading tcdragg entry for "
    +GeneralUtility.formatDate(cdrAgg.time_hour, "MM/dd/yy HH"));
    longCallPStmt.clearParameters();
    longCallPStmt.setInt(1, cdrAgg.iintrunkgroupid);
    longCallPStmt.setInt(2, cdrAgg.iouttrunkgroupid);
    longCallPStmt.setInt(3, cdrAgg.iintrunkgroupnumber);
    longCallPStmt.setInt(4, cdrAgg.iouttrunkgroupnumber);
    longCallPStmt.setInt(5, cdrAgg.istateregionid);
    longCallPStmt.setTimestamp(6, cdrAgg.time_hour);
    longCallPStmt.setInt(7, cdrAgg.icalltreatmentcode);
    longCallPStmt.setInt(8, cdrAgg.icompletioncode);
    longCallPStmt.setInt(9, cdrAgg.bcallcompleted);
    longCallPStmt.setInt(10, cdrAgg.itodid);
    longCallPStmt.setInt(11, cdrAgg.iasktodid);
    longCallPStmt.setInt(12, cdrAgg.ibidtodid);
    longCallPStmt.setInt(13, cdrAgg.iaskzoneid);
    longCallPStmt.setInt(14, cdrAgg.ibidzoneid);
    rs = longCallPStmt.executeQuery();
    if(rs.next()) {
    cdr_agg = new CdrAgg(
    rs.getInt(1),
    rs.getInt(2),
    rs.getInt(3),
    rs.getInt(4),
    rs.getInt(5),
    rs.getTimestamp(6),
    rs.getInt(7),
    rs.getInt(8),
    rs.getInt(9),
    rs.getInt(10),
    rs.getInt(11),
    rs.getInt(12),
    rs.getInt(13),
    rs.getInt(14),
    rs.getInt(15),
    rs.getInt(16)
    }//if
    end_time = System.currentTimeMillis();
    log(Level.INFO, "CdrAggLoader: Loaded "+((cdr_agg==null)?0:1) + " "
    + GeneralUtility.formatDate(cdrAgg.time_hour, "MM/dd/yy HH")
    +" tcdragg entry in "+(end_time - start_time)+" msecs");
    } finally {
    GeneralUtility.closeResultSet(rs);
    GeneralUtility.closeStatement(pstmt);
    Why that code works well for classes12.zip (comes back in around 10 msec) and not for ojdbc14.jar (comes back in 6-7 minutes)?
    Please advise.

  • Sdordf.jar?

    hi
    The new "10.2.0.2 Fast Batch Loader for N-Triple Files" specifies to use "sdordf.jar" . I feel that jar file is missing from the download.
    Thanks chandra

    Hi Chandra,
    sdordf.jar for the batch loader for 10.2.0.2 will be available at $ORACLE_HOME/md/lib/sdordf.jar in a 10.2.0.2 database installation - as indicated in the classpath of the README instructions. We will update the instructions to make that clearer. It is not intended to be part of the download (yes, the download package is a bit different from the 10.2.0.1 package which included a jar file).
    Melli

  • Loading an entire JAR via a classloader

    Hi how would I load an entire JAR file via a classloader. Currently I'm able to load one file at a time (in this case org.w3c.dom.Node) as shown below:
    import java.net.*;
    public class MyJarLoader {
       public static void main(String [] args) throws Exception {
         URL[] urlsToLoadFrom = new URL[]{new URL("file:subdir3/xml-apis.jar")};
         URLClassLoader loader1 = new URLClassLoader(urlsToLoadFrom);
         Class cls1 = Class.forName("org.w3c.dom.Node", true, loader1);
         System.out.println("Loaded '"+cls1.getName()+"'");
         org.w3c.dom.Node Node = (org.w3c.dom.Node) cls1.newInstance();
    Thanks

    Figured this one out as below. Note this is the simplistic solution since it requires that the jar files be present in the classpath. If not, you will have to write your own loadClass method to read the data from the zip (& then can't use the method 'Class.forName()').
    Regards
    //Load Apache JAR files
    URL[] urlArrToLoadFrom = new URL[]{new URL("file:xalan-j_2_5_0/xml-apis.jar"),
                new URL("file:xalan-j_2_5_0/xercesImpl.jar"), new URL("file:xalan-j_2_5_0/xalan.jar")};
    //Create a URLClassLoader to access jar files
    URLClassLoader urlLoaderGeneric = new URLClassLoader(urlArrToLoadFrom);
    //Foreach jar file, open, load class files & close
    for(int i=0; i<urlArrToLoadFrom.length; i++) {
    //Debug
       System.out.println(urlArrToLoadFrom.toString());
       //Open zip file
       ZipFile zf = new ZipFile(urlArrToLoadFrom[i].getFile());
       for (Enumeration enum = zf.entries(); enum.hasMoreElements();) {
         //Get entry
         ZipEntry ze = (ZipEntry) enum.nextElement();
         //Only load if it's not a directory and it's a class file
         int iIndexClass = -1;
         if (!ze.isDirectory() && ((iIndexClass = ze.getName().indexOf(".class")) != -1)) {
             //Remove .class & replace / with .
             String strApacheClassName = (ze.getName().substring(0,iIndexClass)).replace('/','.');
             //Load class file
             Class classApache = Class.forName(strApacheClassName, true, urlLoaderGeneric);
             System.out.println("Loaded '"+classApache.getName()+"'");
       //Close zip
       zf.close();

  • Loading Xlet via .jar

    Hi everybody,
    i've got an Xlet containing about 100 classes and some resources. Since the startup-time is beyond the pale when files are loaded separetely by the object carousel, I want to load them with some .jar-files.
    Therefore I wrote a custom ClassLoader that overrides the loadClass(String,boolean)-method as required in JDK1.1.8, reads the .jar as dsmccObject and defines/resolves the class. And everything's working so far.
    part of sample code for loading from repository:
    <code>
    DSMCCObject dsmccZipFile = new DSMCCObject("test1.jar");
    dsmccZipFile.asynchronousLoad(this);
    FileInputStream fi = new FileInputStream(dsmccZipFile);
    ZipInputStream zis = new ZipInputStream(fi);
    ZipEntry entry = null;
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    while((entry = zis.getNextEntry()) != null){
         String entryName = entry.getName();
         if(entryName.equals(className+".class")){
              buffer = new byte[1024];
              int len=0;
              while((len=zis.read(buffer)) != -1){
                   baos.write(buffer, 0, len);
              zis.closeEntry();
              zis.close();
              byte[]classBytes = baos.toByteArray();
              baos.close();
              return classBytes;
    </code>
    Cause I'm a newbie to classLoaders, I have the following problem:
    The classes from the jar files are not known at build-time, so that I'm not able to do typecasting and calling the classes' methods.
    The only way I handled the problem was the ReflectionAPI.
    <code>
    Class c = mcl.loadClass("test", true);
    Object o = c.newInstance();
    Method method = c.getMethod("aMethod", new Class[0]);
    method.invoke(o, new Object[0]);
    </code>
    It works, but i don't like this solution, since it will result in complex code and the reflection's performance is not so high in comparison to direct method calls.
    Another solution would probably be a common known interface, which calls methods, but that's worse i think and i had to implement the interface in all classes.
    => my questions:
    1) Is there a common solution for jar-loading in MHP (i'm surely not the only one with a bad startup-time if loading files seperately)?
    2) If not: is there a better solution than mine (using the reflection api) (the source will be the same: initial ClassLoader.class and .jar's send from same source over the oc)?
    3) Should I extend org.dvb.lang.DVBClassLoader (I simply extended java.lang.ClassLoader) and which parentClassLoader should I use as second parameter? I tested it once with the Xlet's ClassLoader (getClass().getClassLoader()) but the problem is of course still the same.
    4) Is there a reason that there is no jar support in the mhpAPI / environments (resp. those i know)? I simply used ZipInputStream instead of JarInputStream. Are jar classes available for download anywhere?
    THX
    regards,
    Ben

    Thanks to desperado for pointing out that you couldn't load classes from JAR files. I thought that was the case, but couldn't find where in the spec said it, so I assumed I was wrong. Ho hum.
    To answer your questions:
    - caching can be done on either the module level of the file level. MHP is pretty flexible about this, and doesn't define how much cache will be present (having no cache at all is acceptable, but most boxes have some)
    - module arrangement will not always help, but it does make things easier. What you can do in DSM-CC that you can't do in HTTP is change the repetition rate of modules, so that commonly-used modules are transmitted more often (and thus have less latency) than less commonly used modules. Of course, this does affect the time needed to transmit the entire carousel.
    - jars work pretty well in an internet app, but they're much less use in a DTV environment because you're transmitting your apps in a carousel. See below for why this is the case.
    - you are right that you have to load files separately and not from JAR files. Loading from JAR files is not interoperable.
    Loading classes from a JAR file would be slower because you have to wait for the entire file to load before you get any classes out of it. Depending on the size of your file, this can have a number of problems:
    1) you need to load the entire JAR file. This means that you have to load all of the files, not just the ones you need, which takes longer. You're still only transmitting your object carousel at the same speed.
    2) using modules that group together your files in a logical way may make better use of the DSM-CC cache in the receiver. If the receiver caches modules, then grouping files that are used together in the same module means that you will have less latency when loading files froma cached module. This gives you some of the benefits if using a JAR file in a more flexible way.
    3) DSM-CC can compress the data in your files before transmitting it, so using a JAR file won't actually help you much in terms of reducing space.
    The only tutorials that I know of that discuss DSM-CC are mine and the ETSI documentation. If you find any more, please let me know.
    Steve.

  • Problems with signed JAR files in JWS/JRE6 environment.

    Hello All,
    I'm encountering a problem running our desktop application as a Java Web Start deployment in a JRE 6 environment. There were never any problems when running the same application as a JWS deployment in JRE 1.4, or 5, environments. There are also currently no problems in a JRE 6 environment when running the application as a standard desktop application.
    The problem which I am having has nothing to do with launching the application. But for good measure, I verified the JNLP file with JaNeLA. A couple things we out of order, which I addressed to make JaNeLA happy, but my problem still persists. Here is my JNLP file (anonymized to protect the innocent):
    TS: 2010-10-18 17:04:46
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase="$$codebase" href="$$name">
         <information>
              <title>Acme Desktop</title>
              <vendor>Acme Corporation</vendor>
              <homepage href="http://www.acme.com/"/>
              <description>Acme Client for Acme Server</description>
              <description kind="tooltip">Acme Client for Acme Server</description>
              <icon href="desktop.gif"/>
              <offline-allowed/>
         </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <j2se version="1.5+"/>
              <jar href="acmedesktop.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/antlr-2.7.2.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/backport-util-concurrent.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/commons-codec-1.3.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/commons-httpclient.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/commons-logging.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/acmeapi.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/HelpJavaDT.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/HelpJavaDT_es.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/jacorb.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/Multivalent.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/slf4j-api-1.5.6.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/slf4j-jdk14-1.5.6.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/snow.jar" download="lazy" version="8.00.01.00+"/>
              <jar href="lib/AcmeTMClient.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/xercesImpl.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/xml-apis.jar" download="eager" version="8.00.01.00+"/>
              <extension name="installer" href="desktopInstaller.jnlp" />
              <extension name="Java Help" href="help.jnlp"/>
              <property name="java.library.path" value="./lib"/>
              <property name="admin" value="false"/>
              <property name="webstart" value="true"/>          
              <!-- The following two lines are for SSO implementation only
              <property name="urladdress" value="http://localhost:8080/AcmeDesktop/servlet/AcmeServlet"/>
              <property name="cookiespec" value="RFC2109"/>
              -->          
         </resources>
         <resources os="Windows">
              <nativelib href="lib/jniWin32.jar" version="8.00.01.00+"/>
         </resources>
         <application-desc main-class="desktop"/>     
    </jnlp>-----
    When running as a JWS deployment, on JRE 6, the application will be functioning normally for a little while, and then suddenly the following exception is thrown, and the current operation fails because the class in question cannot be accessed:
    java.lang.SecurityException: class "acmeapi.communication.CDocImpl"'s signer information does not match signer information of other classes in the same package
         at java.lang.ClassLoader.checkCerts(ClassLoader.java:807)
         at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:288)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at acmeapi.common.CDoc.getAnnotationsInfo(CDoc.java:493)
         at acmedesktop.communication.CCommunicationManager.privateGetAnnotations(CCommunicationManager.java:1976)
         at acmedesktop.communication.CCommunicationManager.getAnnotations(CCommunicationManager.java:1828)
         at acmedesktop.annotations.CViewAnnotations.getAnnotations(CViewAnnotations.java:826)
         at acmedesktop.annotations.CViewAnnotations.createView(CViewAnnotations.java:583)
         at acmedesktop.annotations.CViewAnnotations.setData(CViewAnnotations.java:736)
         at acmedesktop.annotations.CViewAnnotations.init(CViewAnnotations.java:205)
         at acmedesktop.hitspanel.CHitsPanel.viewAnnotations(CHitsPanel.java:281)
         at acmedesktop.hitspanel.CHitsTab$3.mousePressed(CHitsTab.java:316)
         at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263)
         at java.awt.Component.processMouseEvent(Component.java:6260)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6028)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4630)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4460)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4460)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)-----
    The classes of our desktop product are contained within the 'acmedesktop' and 'acmeapi' packages. It requires access to the hard drive of the workstation, and therefore, all jar files included with the application are signed using the following ANT task when compiled:
    <signjar keystore="resources/codesigning/keystore.pfx" storetype="pkcs12" storepass="myPassword" alias="myAlias">
         <fileset dir="${jws_dist}/app" includes="*.jar"/>
         <fileset dir="${jws_dist}/app/lib" includes="*.jar" excludes="jhall__V${dt_version}.jar"/>
    </signjar>-----
    Therefore, all classes, within all jar files, are signed with the same certificate (with the exception of the JavaHelp libraries, which are already signed by Sun - but the class in question attempting to be loaded here is not contained within the JavaHelp jar file anyway). So, the point being, that the exception message stating that the "signer information of the acmeapi.communication.CDocImpl class doesn't match the signer information of other classes in the same package", is simply not correct. All classes within that jar file were signed using the same certificate.
    I downloaded the JRE 6 source from dev.java.net and picked through this issue with a debugger. The ClassLoader.checkCerts() method compares the certificate used to sign the current class which is attempting to be loaded, with the certificates which signed all other previously loaded classes within the same package. If they don't match, the exception above is thrown. What is causing the issue is when the checkCerts() method attempts to get the certificates which signed the currently loading class, null is returned. And obviously, comparing null, with an array of the certificates which signed the previously loaded classes, isn't going to match; therefore this exception is thrown.
    The checkCerts() method gets the certificates of the currently loading class by calling the java.security.CodeSource.getCertificates() method. Tracing deeper in the debugger, the CodeSource object ultimately gets the certificates from the 'signersRef' member variable of the com.sun.deploy.cache.CachedJarFile class. signerRef is a SoftReference object and can therefore be garbage collected at some point. If it has already been garbage collected, the CachedJarFile class will attempt to retrieve it again from the loaded cache entry by calling com.sun.deploy.cache.MemoryCache.getLoadedResource().
    The MemoryCache class maintains the cache entries to the jar files as MemoryCache.CachedResourceReference objects, which subclass WeakReference, and therefore these objects can be garbage collected as well. If the cache entries have also been garbage collected, this leaves the CachedJarFile class with no ability to repopulate the CachedJarFile.signerRef object. Therefore it is completely out of luck getting the certificates which signed the currently loading class, which ultimately causes the above exception.
    When the com.sun.deploy.cache.Cache class attempts to retrieve a cache entry using its getCacheEntry() method, it will attempt to get the entry from the MemoryCache class, if null is returned, it will recreate the cache entry and add it back to the MemoryCache. In contrast, when the CachedJarFile class attempts to get a cache entry from the MemoryCache class, if null is returned, it just gives up.
    (from com.sun.deploy.cache.CachedJarFile:244)
    private CacheEntry getCacheEntry() {
         /* if it was not created by Cache do not search for entry */
         if (resourceURL == null)
              return null;
         CacheEntry ce = (CacheEntry) MemoryCache.getLoadedResource(resourceURL);
         if (ce == null) {
              //This should not happen because CacheEntry should not get collected
              // before CachedJarFile is collected.
              Trace.println("Missing CacheEntry for " + resourceURL + "\n" + ce,
                   TraceLevel.CACHE);
         return ce;
    When debugging, code execution falls within the code block with the comment stating "This should not happen...", but it is happening in my case.
    On an interesting side note, using the jvisualvm.exe tool included with JDK 6, I was able to tell that it seems as though these objects are collected the first time that the JVM allocates more heap space, and then the issue will occur. If I set the initial heap size very large (using -Xms) this issue won't occur at all. But that is kind of a bad solution which I would rather not do, but it is interesting to note for the sake of troubleshooting this issue. The max heap size (-Xmx) is plenty big enough, so the issue is not that we are running out of memory here.
    Does anyone have any insight as to what could be causing this? I've searched, and found a couple threads with similar problems but with no clear solutions. It is not just one workstation either, it happens everywhere I deploy the app as a Java Web Start application in a JRE 6 environment. I have been using version 1.6.0_18 on XP, but it seems to happen on any update version of 1.6. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?
    Thank you
    Jake
    Edited by: jkc532 on Nov 12, 2010 10:35 AM

    jkc532 wrote:
    .. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? From your comprehensive investigation and report, it seems so to me.
    ..I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?Just after read the summary I was tired, so I have some understanding of the effort you have already invested in this (the 'wits' you have already spent). I think you should raise a bug report and seek Oracle's response.

  • Error Missing class: oracle.xdb.XMLType with xdb.jar in JDeveloper 10.1.3

    I am using JDeveloper 10.1.3 and get the following error when executing the web service proxy with my call to the web service( this web service is using class OracleXMLSave with method insertXML):
    I have included the xdb.jar in my project properties libraries of the web service project and added a file group with xdb.jar to the properties of the webservices.deploy. What else needs to be done? This worked in JDeveloper 10.1.2.
    THE ERROR after running proxy in log window:
    java.rmi.ServerException:
    start fault message:
    caught exception while handling request: caught exception while handling request: oracle.classloader.util.AnnotatedNoClassDefFoundError:
         Missing class: oracle.xdb.XMLType
         Dependent class: dbdata2package.DBDataOperations
         Loader: DBData2WSApp-DBData2Operations-WS.web.WebServices:0.0.0
         Code-Source: /D:/h/cots/Oracle/JDeveloper10g10.1.3/j2ee/home/applications/DBData2WSApp-DBData2Operations-WS/WebServices/WEB-INF/classes/
         Configuration: WEB-INF/classes/ in D:\h\cots\Oracle\JDeveloper10g10.1.3\j2ee\home\applications\DBData2WSApp-DBData2Operations-WS\WebServices\WEB-INF\classes
    The missing class is available from the following locations:
         1. Code-Source: /D:/h/cots/Oracle/JDeveloper10g10.1.3/j2ee/home/applications/DBDataWSApp-webservice-WS/WebServices/WEB-INF/lib/xdb.jar (from WEB-INF/lib/ directory in D:\h\cots\Oracle\JDeveloper10g10.1.3\j2ee\home\applications\DBDataWSApp-webservice-WS\WebServices\WEB-INF\lib)
         This code-source is available in loader DBDataWSApp-webservice-WS.web.WebServices:0.0.0.
         2. Code-Source: /D:/h/cots/Oracle/JDeveloper10g10.1.3/j2ee/home/applications/DBDataWSApp-DBDataOperations-WS/WebServices/WEB-INF/lib/xdb.jar (from WEB-INF/lib/ directory in D:\h\cots\Oracle\JDeveloper10g10.1.3\j2ee\home\applications\DBDataWSApp-DBDataOperations-WS\WebServices\WEB-INF\lib)
         This code-source is available in loader DBDataWSApp-DBDataOperations-WS.web.WebServices:0.0.0.
    :end fault message
         at oracle.j2ee.ws.client.StreamingSender._raiseFault(StreamingSender.java:545)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:390)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:111)
         at dbdata2packageproxy.runtime.DBData2WSSoapHttp_Stub.insertData(DBData2WSSoapHttp_Stub.java:80)
         at dbdata2package.DBData2WSSoapHttpPortClient.insertData(DBData2WSSoapHttpPortClient.java:54)
         at dbdata2package.DBData2WSSoapHttpPortClient.main(DBData2WSSoapHttpPortClient.java:34)
    Process exited with exit code 0.

    Hi,
    actually you increment the index
    pstmt.setString(++idx,inrecord.getCommentID());
    which means you never have an index of 0 but always start with 1
    Frank

  • One JNLP with different JARs depending on JRE version

    Hello everybody! I want to produce one JNLP file that, depending on the user's Java version, loads a particular JAR or not. As an example, Java Activation Framework is included with Java 6 (no download needed), but not with Java 5. This serves just as an example, as that particular library is very small. Still, a user with Java 5 needs to retrieve and load "activation.jar", but Java 6 users might be better of with their built-in version. I know that I can mark the whole JNLP for a particular version (<java>) and that I can make a resource depend on "osName" and "arch". Does anyone know whether such a JDK-dependent resource (or JAR) is possible with JNLP syntax?
    Alternatively, I can programmatically download the library, but loading it is cumbersome: I just want to use JavaMail (which needs the Activation Framework) right away, it seems to me that with a custom URLClassLoader I cannot access the library directly (as I need classpath-like access to the Activation Framework)... and I'm hesitant to hack into Reflection as mentioned here.
    I'll just provide activation.jar for all of my users, including Java 6 ones; but I'm curious what would be the best way to handle such a situation. I did search the web and the forums a lot, sorry if I missed something obvious.

    Sorry, you meant two <resources> in the same JNLP? I can't put "activation.jar" in the same JNLP than the rest of my application, because it's already signed by Sun, but I did try to have in "activation.jnlp" two <resources>, an empty one for version 1.6+ and the JAR in the second one for "1.5". Didn't work either, the JAR gets downloaded.
    Same thing for several <resources> in the main JNLP, one for "1.5" including the extension for activation.jar, the other for "1.6+" listing the same contents but without that extension. No matter how I try, I get the console message "JNLP JREDesc in Component ignored". (If I just include everything in one single resource for "1.5+", I don't get that error, so it's not a typo in the <j2se> tag ;-)
    Edited by: cato_minor on Mar 26, 2009 12:00 PM

  • Issue with Packaged Jars added to project from resource Palette

    Hello!
    I am using Jdeveloper 11.1.2.2.
    I started this post thinking there was an issue having to do with packaging jars that refer to other libraries (see post Are Libraries Required?
    Now I realize it is a different issue (although that other post is relevant).
    Issue: I create a package -- a template in this case.
    I deploy it in my file system and then load it into the resource palette as a file system connection.
    I create a new application. From the resource palette, I add the jar to the view controller project, and am able to use the template in jsf files. No problem. Runs fine.
    then I load the application into subversion or I move the whole application to another directory on my computer.
    When I open the moved application (or do a checkout from subversion), I open the jsf that contains a reference to the jar, the design view is completely blank. Going to the source, I see my original code, but there are red signals in the upper-right signifying an error.
    If I run the application without fixing it, I get an error saying the template cant be found, Also, when I deployed to a standalone weblogic server, I get the same error (see the post above for this error).
    I open the project properties. The ADF Library is in the "Libraries and Classpath" and pressing edit, I can see the correct reference to the path of the jar.
    To make the application work, I have to remove the ADF Library (or at least the reference when pressing edit) and then from the resource palette, add it again to the project.
    IS THIS NORMAL? Am I doing something wrong with the initial packaging of the jar? Should I change some setting somewhere?
    How am I supposed to deploy to weblogic?
    The other posting shows an error output if I try to run the application before fixing the jar reference. I got the same darn error when deploying to weblogic.
    Would appreciate any help!
    Stuart
    Edited by: Stuart Fleming on Nov 18, 2012 4:45 AM

    Timo,
    thank you for your reply. I actually created a youtube video on this, available here: http://youtu.be/ERyLngq9hlI
    Since the video might be a little tedious to view, Here are the details. You can jump to the exciting parts of the video, if you want:
    Here is what I did:
    1. I cleaned out my system directory and the temp directory on my computer.
    2. Opened the application containing my template. Deleted the existing jar file.
    3. Started taking video....
    4. (From 40 seconds into the video) Created the jar file again.
    5. (2:55 minuts into video) Closed template applcation and Created new fusion application.
    6. (4 minutes into the video) Created model
    7. (4:15 minutes into video) in view controller added template, created a jsf page.
    8. (5 minutes into the video) Created Security and users.
    9. (6:30 minutes into the video) Created a task flow, with jsff in it, with a form on the jsff. Assigned Security to objects.
    *10. (7 minutes into the video). Ran JSF successfully.*
    11. (7:40 minutes into the video). Closed application. Copied the entire application into two directories.
    12. (8 minutes into video) Opened the first copied video. You can see that the jsf page is not accessing the template. Reviewed the View Controller project Libraries and classpath. Removed the library, re-added the jar from the resource palette. Worked fine.
    13. (9:30 minutes into video). Opened the 2nd copy of the file I intend for subversion. Showed the jsf page and the error it displays when open (same as in first copied application).
    Load application into subversion.
    14. (10 minutes into video). Check out application
    15. (10:15 minutes into video). Open JSF file. The reference to the template jar file is reading properly.
    16. (11 minutes into video). Load the original working copy into subversion.
    17. (11:30 minutes into video). Check out from subverion, but the check out failed.
    18. (12 minutes into video). Check out, and look at the jsf.  The page shows fine.
    Timo, I think this might be reported as a bug. You ought to be able to move files around on your computer. Also, the first time I checked the application out from subversion, the jsf page did not read the template.
    ALSO, when I tried to deploy the application (that contained the reference to the template jar file to weblogic), I got the same error when I ran the jsf
    first lines of that error:
    Error 500--Internal Server Error
    java.io.FileNotFoundException: /WEB-INF/ssfTemplate/SSFTemplate.jsf Not Found in ExternalContext as a Resource
    at com.sun.faces.facelets.impl.DefaultFaceletFactory.resolveURL(DefaultFaceletFactory.java:224)
    Thank you for your time and commitment!
    Stuart
    Edited by: Stuart Fleming on Nov 18, 2012 10:13 AM

  • Peculiar issue with signed .jars and Linux (Debian unstable, 2.4.20-custom)

    BACKGROUND:
    I am a developer working on a Java3D application, which is to be deliverable over
    the Web. Delivery as an applet seemed a natural choice, and so I spent a considerable amount of effort learning (I won't say "mastering") the process of
    creating a self-signed .jar containing java3d-<some_version>.exe. I have in fact
    successfully created a fully-fuctional from-scratch JPI/Java3D/myapp install. By
    this I mean that Windows machine with only stock IE installed could hit my URL,
    get the proper JPI installed, followed by the Java3D runtime I'd chosen, as well
    as a third-party DXF loader, and finally (after much clicking of 'Yes', 'Accept',
    'OK', etc.) see my app in a browser window.
    That was on my old, slow, Windows2000 workstation. Now I have a shiny, new
    workstation upon which my employer has graciously allowed me to run Linux. Sadly,
    the re-creation of the self-signed .jar files under a new JDK has not gone smoothly.
    PROBLEM DESCRIPTION:
    When a user attempts to download the self-signed .jar containing the auto-install
    executable for the Java3D runtime, the normal security warning prompts are displayed (one for granting to install the extension, one to accept the "suspect" certificate from me alone). The plugin happily downloads the .jar file, and then
    a NullPointerException is thrown, with a
    stack trace like:
    NPE!
    at java.util.zip.ZipFile.getInputStream (unknown source)
    at java.util.jar.JarFile.getInputStream (unknown source)
    <something>doPrivileged<something>
    etc.
    I apologize for the lack of a full stack trace; I would essentially have to type it in by hand after printing it out on the remote test box; I hope that I've caught the important details above.
    After this, the pure-java signed .jar is downloaded and installed, and then the applet "loads" with the predictable ClassNotFoundException for javax.media.j3d.SceneGroup.
    Downloading and installing the J3D runtime by hand and then re-visiting the URL results in a fully-functional applet.
    I've tried Blackdown Linux JDKs 1.4 and 1.3.1, as well as Sun's JDKs 1.3.1_07 and 1.3.1_05 for the compiling, jar'ing, and jarsigner'ing of these files, all with the same result. At each new JDK, I re-did the HTML conversion so that he appropriate
    JPI version was required on the client. I did complete uninstallations of all client JPI instances (including Web Start for 1.4.1_x, as well as cleaning the registry on the client).
    When this strategy worked, it was on Sun JDK 1.3.1_05 for Windows runnning on Windows2000, unknown service pack.
    DESIRED BEHAVIOR:
    I would like my clients to be able to go from stock Windows2K/IE (this being an intranet without any other options) to some JPI version running the J3D extension, with only the need to click 'OK', 'Accept', 'Grant This Session', etc. a bunch of times on the part of the user. I want this to happen without my having to resurrect my decrepit old Compaq Deskpro just to play the role of "build host" for my
    Java3D and loader .jar files, if at all possible.
    FILES:
    Here's what gets merged into the "main" applet's mainfest at creation time:
    Manifest-Version: 1.0
    Extension-List: java3d DxfLoader
    java3d-Extension-Name: javax.media.j3d
    java3d-Implementation-Vendor-Id: com.sun
    java3d-Implementation-Version: 1.3
    java3d-Specification-Title: Java 3D API Specification
    java3d-Specification-Version: 1.3
    java3d-Specification-Vendor: Sun Microsystems, Inc
    java3d-Implementation-URL: http://10.1.1.1/heartcad/lib/java3d.jar
    DxfLoader-Extension-Name: eupla.dxfloader
    DxfLoader-Implementation-Title: Eupla DXFLoader
    DXFLoader-Implementation-URL: http://10.1.1.1/heartcad/lib/DxfLoader.jar
    And into the manifest for the J3D .jar:
    Manifest-Version: 1.0
    Implementation-Version: 1.3
    Specification-Version: 1.3
    Extension-Installation: "java3d-1_3-windows-i586-directx-rt.exe"
    Extension-Name: javax.media.j3d
    Implementation-Vendor-Id: com.sun
    Implementation-Vendor: Sun Microsystems, Inc
    Specification-Vendor: Sun Microsystems, Inc

    I have seen that bug, and the problem I'm having seems to be different than it. The extension installer is in the first extension .jar my applet asks for, and it
    never works automatically, regardless of how many times the applet is loaded.
    The second .jar, which doesn't have to run any installer, always works fine, but the first one will never work (a manual install of the Java3D runtime is required). This seems to not be the behavior described in the bug.
    I will continue to search for an answer to this problem, and of course if I should find anything I'll post it here.

  • Running a batch file inside a jar

    HI all
    I created a jar file , in which i need to run a batch file , so i wrote a main class to execute the run the batch file , but when iam running the jar it is searching for the given batch file out side the jar.
    my code is some thing like below
         public static void main(String args[])
              try
                   Runtime rt=Runtime.getRuntime();
                   Process process=rt.exec("%DIRNAME%/start.bat");
       InputStreamReader reader =
                      new InputStreamReader ( process.getInputStream () );
                   BufferedReader buf_reader =
                       new BufferedReader (  reader );
                    String line;
                    while ((line = buf_reader.readLine ()) != null)
                                 System.out.println (line);
              catch (IOException e) {
                    System.out.println (e);
         }so please help me.. is it the problem in specifing the path...?
    are does it have any other method to read the stream functions ..
    thanks in advance
    sam

    I don't think this will work. You could not go to a command line and enter, "%DIRNAME%/start.bat" if start.bat was inside a jar - the CLI doesn't know how to read a batch file inside a jar.
    I think it would work to programmatically read the lines of start.bat (when it is inside the jar) into an array of Strings and use Runtime.exec with the array as the argument.
    It would also work to extract the start.bat file, then execute it using Runtime.exec.

Maybe you are looking for

  • ITunes installed - will not open

    I am experiencing the same problem as a majority of users on this post. iTunes worked without a hitch until I installed Version 6 two weeks ago. Now, I can install iTunes and it allows me to complete the install. However, when I go to open iTunes, I

  • How to read the data file and write into the same file without a temp table

    Hi, I have a requirement as below: We are running lockbox process for several business, but for a few businesses we have requirement where in we receive a flat file in different format other than how the transmission format is defined. This is a 10.7

  • I have Adobe Creative Suite 5 Master Collection on discs

    My old computer died and I need to install on new Mac - but it has no disc drive.  Can I access the programs without using the discs?

  • Re: Scaling up the Express Development Environment

    Paul, We have two BM's and two AM's. We had two full-time developers and 2 part-time. BM1: 25 classes BM2: 8 classes AM1: 65 windows AM2: 22 windows 2-3 classes in each BM had to be duplicated becauses of the problem that you mentioned. What we did t

  • Reg the BDC for vendor master

    Hi All,   Currently i have a requirement for the RFC where i need to create vendor. Currently iam using a BDC recording inside the RFC to create a vendor. But there are 5 account groups for my business where the vendor customizations are done. So the