Error in ThreadLocal's JavaDoc?
I'm currently reading "Java Concurrency In Practice" (an excellent book,
BTW), and was looking at the passage on ThreadLocal. I then went to the
JavaDoc, and it sure looks to me like there's an error in the example code
in the JavaDoc. Can someone confirm or contradict me?
See http://java.sun.com/javase/6/docs/api/java/lang/ThreadLocal.html
The example code looks like this:
public class UniqueThreadIdGenerator {
private static final AtomicInteger uniqueId = new AtomicInteger(0);
private static final ThreadLocal < Integer > uniqueNum =
new ThreadLocal < Integer > () {
@Override protected Integer initialValue() {
return uniqueId.getAndIncrement();
public static int getCurrentThreadId() {
return uniqueId.get();
} // UniqueThreadIdGeneratorIt seems to me that getCurrentThreadId() should call uniqueNum.get() , not
uniqueId.get() . uniqueId.get() would return the last unique ID generated
in any thread, since it isn't ThreadLocal, while uniqueNum is the
ThreadLocal ID for this thread.
By the way, if you look at the JavaDoc for 1.4.2 and 1.5.0, it's a very similar
example, that appears correct to me (except for the counter not being
and AtomicInteger, since that didn't exist in 1.4.2, but the 1.5.0 example has no excuse for not avoiding that race condition).
[1.4.2 JavaDoc for ThreadLocal.html|AtomicInteger]
[1.5.0 JavaDoc for ThreadLocal.html|http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ThreadLocal.html]
Am I right? Thanks.
Heh. I did search for it before sending the bug report, but I think I searched for ThreadLocal Example or Doc or something like that. Thanks for finding that but report.
The original bug report was filed almost three years ago, but I see someone submitted a comment two days ago mentioning it still was wrong in the canonical JavaDoc location. Odd coincidence, that.
It seems this example code has been a problem for a while. See bugs 4850726 and 6251838.
Similar Messages
-
Build error :package com.sun.javadoc does not exist
Question from a Turing machine expert who is new to Java.
Trying to run a sample program from Richardson's book "Java JDK 5 Edition" Chapter 1.
In Netbeans 5.5 receive build error :package com.sun.javadoc does not exist
for "import com.sun.javadoc.*;"
Believe missing classes are in tools.jar in C:\Sun\SDKee5SDK\jdk\lib
How do I define this to Netbeans and/or JDK?
Using java_ee_sdk-5_01
and netbeans-5_5-windows downloads.
Platform is XP.
Netbeans has been updated to date.
Appreciate.sony_tj wrote:
D:\Xyz.java:22: package com.sun.javadoc does not exist
import com.sun.javadoc.*;After getting this error, I have set my classpath to C:\Program Files\Java\jdk1.5.0_03\lib\tools.jar. But still the error persists. Could anyone please tell me how do I solve this problem.You have failed in setting your classpath in that case. -
Error in generating the JAVADOC
Hi all,
I made a file called mylist.txt containing lists of files that will be used in the documentation process
C:\jdk1.4\bin\DMD\*.java
then when i try to generate javadoc then i am getting the following error i have kept the mylist.txt in C:\jdk1.4\bin\mylist.txt
javadoc: cannot read mylist (The system cannot find the file specified)
1 errorIf it can't find "mylist", maybe it can find "mylist.txt"?
-
Netbeans 4.1 and creation of javadoc failure. Also no api docs...
Hi people.
I recently downloaded and installed Netbeans 4.1 over Netbeans 4.1 early access 1 and I got the two following problems that I didn't have before (the older version worked flawlessly):
1: I cannot create the javadoc html files from the sources of the project. The IDE reports: javadoc: error - Illegal package name: "${javadoc.additionalparam}"
tries to load the source tree and then reports:
ProjectName\nbproject\build-impl.xml:344: Javadoc returned 1
2: The IDE cannot find the Java 1.5 SDK documentation that was correctly installed in the folder docs of the Java 1.5 SDK and that worked flawlessly with the previous version of Netbeans that I had installed. I tried to import path names in Library Manager and Java Platform Manager, but no luck there either.
Any ideas that could help the situation?
Thanks all of you in advance!
AkumaXI would suggest that your problems are due to the way you installed.
Remove and reinstall a clean copy.
No problems with either item for me in 1.4 final. -
How to slove follwoing error "Unreported exception java.io.IOException;"
Currently I'm using following:
XP Professional
J2sdk1.4.2_01
Xerces-2_5_0
Xalan-j_2_5_1
Jakarta-tomcat-4.1.27
Jdom-b9
Current Classpath setting
User variables
PATH = c:\bmrt2.5\bin; c:\j2sdk\bin;%PATH%;%JAVA_HOME%\bin;
CLASSPATH=.;c:\xerces\xmlParserAPIs.jar;c:\xerces\xercesImpl.jar;
c:\xerces\xercesSamples.jar;c:\xalan\xercesImpl.jar;c:\xalan\xmlapis.jar;c:\xalan\xalan.jar;c:\tomcat\lib\webserver.jar;c:\tomcat\lib\jasper.jar;c:\tomcat\lib\xml.jar;c:\tomcat\common\lib\serlet.jar;c:\tomcat\lib\tools.jar; c:\tomcat\lib\tools.jar;c:\jdom\build\jdom.jar;
CATALINA_HOME= c:\tomcat
JAVA_HOME= c:\j2sdk
System variables
PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
c:\j2sdk\bin;%Path%;%JAVA_HOME%\bin;
CLASSPATH=.;c:\xerces\xmlParserAPIs.jar;c:\xerces\xercesImpl.jar;
c:\xerces\xercesSamples.jar;c:\xalan\xercesImpl.jar;c:\xalan\xmlapis.jar;c:\xalan\xalan.jar;c:\tomcat\lib\webserver.jar;c:\tomcat\lib\jasper.jar;c:\tomcat\lib\xml.jar;c:\tomcat\common\lib\serlet.jar;c:\tomcat\lib\tools.jar; c:\tomcat\lib\tools.jar;
CATALINA_HOME= c:\tomcat
JAVA_HOME= c:\j2sdk
Program
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.jdom.*;
import org.jdom.Element;
import org.jdom.Document;
import org.jdom.output.XMLOutputter;
import org.jdom.input.SAXBuilder;
import org.jdom.Attribute;
import java.util.List;
public class AddToList extends HttpServlet
public Document getDocument(File sourceFile, PrintWriter errorsOut)
try
SAXBuilder builder = new SAXBuilder();
Document document = builder.build(sourceFile);
return document;
catch(JDOMException e)
errorsOut.print("there was a problem building the document: " e. getMessage()"<br/>"+ "Returning blank document.");
return new Document(new Element("blank"));
public void saveDocument(Document saveDoc, File saveFile, PrintWriter errorsOut)
try
FileOutputStream outStream= new FileOutputStream(saveFile);
XMLOutputter outToFile= new XMLOutputter(" ",true);
outToFile.output(saveDoc, outStream);
outStream.flush();
outStream.close();
catch (IOException e)
errorsOut.print("Can't save order.xml: " + e.getMessage()+"<br />");
public void addItem(Element orderElement, String product_id, String quant)
Element newItem =new Element("item");
newItem.setAttribute("product_id", product_id);
Element quantity =new Element("quantity");
quantity.addContent(quant);
newItem.addContent(quantity);
orderElement.addContent(newItem);
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
String thisProduct_id=request.getParameter("addProduct_id");
String thisQuantity=request.getParameter("addQuantity");
response.setContentType("text/html");
PrintWriter out= response.getWriter();
out.print("Adding "+ thisQuantity + "of item to chart "+ thisProduct_id +" ... ");
File orderFile = new File ("file:///c:/jdk1.3/orders.xml");
if(!orderFile.exists())
out.print("Creating ordersrocks....<br />");
Element root= new Element("orders");
root.addContent(" ");
Document document = new Document(root);
saveDocument (document, orderFile, out);
else
out.print("Orders File Exists.");
Document document =getDocument(orderFile, out);
HttpSession session =request.getSession(true);
String session_id= session.getId();
Element root =document.getRootElement();
List orders =root.getChildren();
int num_orders =orders.size();
boolean orderExists =false;
int orderIndex =0;
for(int i=0; i<num_orders; i++)
Element iOrder=(Element)orders.get(i);
String iOrder_id=iOrder.getAttributeValue("order_id");
if (iOrder_id.equals(session_id))
orderExists=true;
orderIndex=i;
break;
if(!orderExists)
Element order =new Element("order");
order.setAttribute("order_id", session_id);
Element status =new Element("order_status");
status.setText("open");
order.addContent(status);
addItem(order, thisProduct_id, thisQuantity);
root.addContent(order);
else
Element thisOrder=(Element)orders.get(orderIndex);
boolean itemExists=false;
int itemIndex =0;
List items =thisOrder.getChildren("item");
int num_items =items.size();
for(int i=0; i<num_items; i++)
Element iItem=(Element)items.get(i);
String iProduct_id =iItem.getAttribute("product_id").getValue();
if(iProduct_id.equals(thisProduct_id))
itemExists =true;
itemIndex =i;
break;
if(itemExists)
Element thisItem=(Element)items.get(itemIndex);
String currentQuantity= thisItem.getChildText("quantity");
int newQuantity = Integer.parseInt(currentQuantity)+ Integer.parseInt(thisQuantity);
String strQuantity= new String().valueOf(newQuantity)+1;
thisItem.getChild("quantity").setText(strQuantity);
else
addItem(thisOrder, thisProduct_id, thisQuantity);
saveDocument (document, orderFile, out);
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
doGet(request, response);
When I compile above program, it gives me following error.
Error
C:\tomcat\webapps\book\WEB-INF\classes>javac AddToList.java
AddToList.java:19: unreported exception java.io.IOException; must be caught
or declared to be thrown
Document document = builder.build(sourceFile);
^
1 error
Any help regarding this will be appreciated
Thank you
RocksObadare
Thank for your help, my program compile successfully. But now I�m facing different kind of error on Tomcat; why it gives me following error and how do I solve it
http://localhost:8080/rock/servlet/AddToList
Following Error generate by Tomcat:
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: Cannot allocate servlet instance for path /rock/servlet/AddToList
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:435)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
root cause
java.lang.NoClassDefFoundError: org/jdom/JDOMException
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:903)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:416)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
The following is my configuration
Classpath= .;c:\xalan\bin\xalan.jar;c:\xalan\bin\xml-apis.jar;c:\xerces\xmlParserAPIs.jar;c:\xerces\xercesImpl.jar;c:\tomcat\common\lib\servlet.jar;c:\jdom\build\jdom.jar;
Java_Home=c:\jdk1.3
Catalina_Home=c:\tomcat
Server.xml
<Engine name="Standalone" defaultHost="localhost" debug="0">
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="/rock" docBase="rock" debug="0"
reloadable="true" crossContext="true">
P.S When I try to build javadoc it give me following error:
C:\jdom>build javadoc
JDOM Build System
Building with classpath c:\jdk1.3\lib\tools.jar;.\lib\ant.jar;.\lib\xml-apis.jar
;.\lib\xerces.jar;
Starting Ant...
Buildfile: build.xml
[javadoc] Constructing Javadoc information...
[javadoc] Building tree for all the packages and classes...
[javadoc] Building index for all the packages and classes...
[javadoc] javadoc: warning - Tag @link: Class or Package not found: javax.xml.
transform.TransformerFactory#getFeature
[javadoc] javadoc: warning - Tag @link: Class or Package not found: javax.xml.
transform.TransformerFactory#getFeature
[javadoc] Building index for all classes...
[javadoc] javadoc: warning - Tag @link: Class or Package not found: javax.xml.
transform.TransformerFactory#getFeature
[javadoc] javadoc: warning - Tag @link: Class or Package not found: javax.xml.
transform.TransformerFactory#getFeature
[javadoc] javadoc: warning - Tag @link: Class or Package not found: javax.xml.
transform.Transformer
[javadoc] javadoc: warning - Tag @link: Class or Package not found: javax.xml.
transform.Transformer
[javadoc] javadoc: warning - Tag @link: Class or Package not found: javax.xml.
transform.Transformer JAXP TrAX Transformer
[javadoc] javadoc: warning - Tag @link: Class or Package not found: javax.xml.
transform.TransformerFactory#getFeature
[javadoc] javadoc: warning - Tag @link: Class or Package not found: javax.xml.
transform.TransformerFactory#getFeature
[javadoc] javadoc: warning - Tag @link: Class or Package not found: java.lang.
Double#NaN
[javadoc] Generating C:\jdom\build\apidocs\stylesheet.css...
[javadoc] 10 warnings
BUILD SUCCESSFUL
Total time: 12 seconds -
JavaDoc crashs in netbeans !!!
Hi ,
My problem is when i generate a javadoc for my project in netbean 4.1 it just crashs and this is the message in the console text area :
Javadoc execution
javadoc: error - Illegal package name: "${javadoc.additionalparam}"
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\indexer\Connectivity.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\indexer\Indexer.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\jranker1\JRanker.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\jranker1\ParserGetter.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\jranker1\RankingInterface.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\jranker1\WordsToIgnore.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\spider\CrawlerNParserThread.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\spider\FileUtilities.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\spider\HTMLParse.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\spider\RankerSharedStatus.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\spider\Spider.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\spider\SpiderSettings.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\spider\SpiderSharedStatus.java...
Loading source file C:\NetBeans Workspace\Spider june 7\Spider june 7\src\spider\StatusCheck.java...
1 error
C:\NetBeans Workspace\Spider june 7\Spider june 7\nbproject\build-impl.xml:344: Javadoc returned 1
BUILD FAILED (total time: 1 second)
It used to work before and generate javadoc but now it no longer does ,any suggestions ??This is a known issue, and there's an easy work-around.
See http://www.netbeans.org/issues/show_bug.cgi?id=58221
Cheers,
Peter -
Opinions on javadoc and wrapper classes
I have several wrapper classes (in this case, wrappers for InputStream) that override all of the methods, but only a few of the methods overridden have important changes. The rest of the methods behave as described in the original contract (in this case, the various InputStream.read() methods).
I would like to hear some opinions regarding documenting these methods. Any javadoc I write for them would be nearly identical or even copy/pasted from the original javadoc. The javadoc comment for the whole class clearly says that the class follows the contract for the wrapped class, and as such the overrideen methods will work as such.
Is it reasonable to ask that someone reading the javadoc for this class should refer back to the wrapped class' API documentation, or should I copy (or paraphrase) the description from the original API documentation?I like the idea of @see, but since I'm just javadoc'ing my classes, @see doesn't link, which in this case, eliminates some of the usefulness. Here's a concrete example:
/* ************ Normal ************ */
available
public int available()
throws java.io.IOException
Overrides:
available in class java.io.InputStream
Throws:
java.io.IOException
/* ************ @see ************ */
available
public int available()
throws java.io.IOException
Overrides:
available in class java.io.InputStream
Throws:
java.io.IOException
See Also:
InputStream.available()
/* ************ JDK in sourcepath ************ */
available
public int available()
throws java.io.IOException
Description copied from class: java.io.InputStream
Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream. The next invocation might be the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes.
Note that while some implementations of InputStream will return the total number of bytes in the stream, many will not. It is never correct to use the return value of this method to allocate a buffer intended to hold all data in this stream.
A subclass' implementation of this method may choose to throw an IOException if this input stream has been closed by invoking the InputStream.close() method.
The available method for class InputStream always returns 0.
This method should be overridden by subclasses.
Overrides:
available in class java.io.InputStream
Returns:
an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking or 0 when it reaches the end of the input stream.
Throws:
IOException - if an I/O error occurs.
/* ********************* end javadoc stuff *************** */
Because of the Overrides bit, the @see tag isn't really adding anything new. The inherited comment is clearly labeled as such, which is a big plus to me (give credit where credit is due). -
WD - Adobe Interactive Form - Bound data node must not be empty!
Hello,
i have a problem to display the result of a search view in an Adobe PDF. I got the error-message "Bound data node Node(ResultPDFView.FlightList) of InteractiveForm must not be empty!"
To develop a prototyp i have changed the Flight-List example. I have added a new view, mapped the data of the model to the data of the customController. At the wdInit-Method i have initialized the nodes.
//@@begin javadoc:wdDoInit()
/** Hook method called to initialize controller. */
//@@end
public void wdDoInit()
//@@begin wdDoInit()
// Create a new element in the Bapi_Flight_Getlist_Input node
Bapi_Flight_Getlist_Input bapiInput = new Bapi_Flight_Getlist_Input();
wdContext.nodeBapi_Flight_Getlist_Input().bind(bapiInput);
// Create new elements in the Destination_From and Destination_To nodes
bapiInput.setDestination_From(new Bapisfldst());
bapiInput.setDestination_To(new Bapisfldst());
// Create a new element in the Bapi_Flight_Getlist_Output node
Bapi_Flight_Getlist_Output bapiOutput = new Bapi_Flight_Getlist_Output();
wdContext.nodeOutput().bind(bapiOutput);
// Create a new element in the Flight_List node
Bapisfldat bapiFlightList = new Bapisfldat();
wdContext.nodeFlight_List().bind(bapiFlightList);
bapiFlightList.setAirline("LH");
//@@end
If i start the application i can see all the information (the airline) in my PDF-Dokument, but after the Bapi-Call
i got the error message !
//@@begin javadoc:onActionSearch(ServerEvent)
/** Declared validating event handler. */
//@@end
public void onActionSearch(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionSearch(ServerEvent)
wdThis.wdGetFlightListCustController().executeBapi_Flight_Getlist_Input();
//@@end
Where is the problem ? Must i mapp the result element to the currentContextElement ?
Thanks for help !
Regards
Jürgen BerndtHi Jurgen
Were you able to find out the solution for this? I am getting the same error on a much simpler application - I am trying to do the tutorial given on SAP Help Site at
http://help.sap.com/saphelp_nw04/helpdata/en/dc/f1783fe3263042e10000000a114084/frameset.htm
Thanks
Pankaj -
-overview Doesn't like me.....
Well, I've gotten my multitude of errors and warnings with Javadoc down to one....
Generating doc\overview-summary.html...
javadoc: Error while reading file overview.htmlPah. I am using the tool included with the release version of 1.4.2.
Here's the contents of my batch file:
c:/j2sdk1.4.2/bin/javadoc.exe ^
-d doc ^
-sourcepath src ^
-subpackages a:a.b:a.c:a.d^
-overview overview.html ^
-windowtitle "My Documentation" ^
-link http://java.sun.com/j2se/1.4/docs/api ^
-tag todo:a:"To Do:" (Note: I'm not changing the todo tag because I figure that if Java ever includes it.... and Java should, that it would support just a text string syntax, which is all I'm using.
I have my overview.html file placed in the src directory where it should be. Here's the contents of my file right now....
<html><body>
WORK darn you!!!! Dumb program....
</body></html>Yes, I know that the html does nothing in Javadoc.
Soooo... any ideas?Of course none of this works with Ant. These silly little carets, spaces, newlines (manifest), and other cryptic anomolies accompanied with the lack of documentation and lack of error reporting by the tools themselves are counterproductive and the main reason why C# is gaining momentum in market share. It might be a complete ripoff of Java (which is it), it might be proprietary, closed (which it is), it might be cross platform (so long as you run it on windoze), it might be buggier (or maybe not) but they make it incredibly easy to use.
The day Sun figures this out that the useris_right_ and abandons the mentality that 'if you don't know these cryptic commands, then you're not worthy of us Unix gods" that will of course be the day they kill C# and become the defacto standard for virtual platforms.
That's the bottom line. Thanks for listening to my rant. I now have to go and *manually* change my html files since I cannot do it in Ant. -
RMI/SSL Java 5: simple answer for simple app?
I have a very simple RMI application (no dynamic class loader, no security manager, no rmiregistry), which I'd like to run with SSL. I'm using Java 5 and want to use the standard socket factories but haven't found a clear example of how to do it; I've run into what's probably a trivial problem.
My current code looks something like
public class X extends UnicastRemoteObject {
public void startServer(String url, int port) {
System.setProperty("java.rmi.server.ignoreStubClasses", "true");
LocateRegistry.createRegistry(port);
Naming.rebind(url,server);
}This works properly.
To use SSL, I changed the createRegistry call to
LocateRegistry.createRegistry(port,
new SslRMIClientSocketFactory(),
new SslRMIServerSocketFactory());However, with this change, the rebind call throws an exception:
startServer: java.rmi.ConnectIOException: non-JRMP server at remote endpoint
java.rmi.ConnectIOException: non-JRMP server at remote endpoint
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:217)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
...Any idea of what I'm doing wrong?
ThanksThis should be in a new thread.
java.rmi.server.RMISocketFactory.setSocketFactory(new
RmiSecureSocketFactory());Delete this line. It calls a deprecated method which is 6 years out of date, and you are only calling it at the server, so of courseyour client is speaking JRMP, not JRMP/SSL, to the server, as the exception says. You should be using RMIServerSocketFactory and RMIClientSocketFactory, as follows (and as per the samples that come with your JDK):
this.rmiProcessor = new SamlProcessorImpl();Make sure that SamIProcessorImpl() calls
super(port, new RmiSSHClientSocketFactory(), new RmiSSHClientSocketFactory());
LocateRegistry.createRegistry(port);
LocateRegistry.getRegistry(port).bind(bindName, rmiProcessor);Now you're creating a JRMP registry, but your client expects a JRMP/SSL registry. Change this to
Registry reg = LocateRegistry.createRegistry(port, new RmiSSHClientSocketFactory(), new RmiSSHClientSocketFactory());
reg.bind(bindName, rmiProcessor);
the RmiSecureSocketFactory returns sslsockets and
when running the server i pass these options
-Djavax.net.ssl.trustStore=pdp.keystore
-Djavax.net.ssl.keyStore=pdp.keystore
-Djavax.net.ssl.keyStorePassword=*******This won't do at the server. The server socket factory must initialize an SSLContext with a non-null KeyManagerFactory which uses these keystore attributes, and create the SSLServerSocket from the context's SSLServerSocketFactory. This seems to be an error in the JDK javadoc.
rmiServer = (RmiProcessor)
miProcessor) LocateRegistry.getRegistry(hostName,
port,
new RmiSSHClientSocketFactory()).lookup(serverBindName);This is OK.
good luck -
Hi Experts,
Could you please tell me, how to pass XML document as a request string to the webservice scenario. Inside the service, I have to do the schema validation for the request . Please guide me, how to proceed further?
Regards
SaraHi SARA,
use following Code written in SAX parsing .this will fulfil your requirment.This handle Special character also.
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.Attributes;
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.SAXException;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
public class SimpleForwardMappingString extends DefaultHandler implements StreamTransformation
private List m_arlCurrent = new ArrayList();
private List m_arlBOList = new ArrayList();
private List m_arlObjectList = new ArrayList();
public static int counter = 0;
String listName = "newList";
public StringBuffer m_totalElementsBuffer = new StringBuffer();
String startData = "<inCanonStream>";
String endData = "</inCanonStream>";
private Map param = null;
/** Constant Strings used in Forward Mapping */
public static void main(String args[])
try {
InputStream in = new FileInputStream(new File("C:
Documents and Settings
281152
Desktop
Cannonical12321.xml"));
OutputStream out = new FileOutputStream(new File("C:
Documents and Settings
281152
Desktop
Cannonical21.xmlOut.xml"));
SimpleForwardMappingString myMapping = new SimpleForwardMappingString();
catch (Exception e)
e.printStackTrace();
public void execute(InputStream arg0, OutputStream arg1)
throws StreamTransformationException
Writer out;
try
out = new OutputStreamWriter(arg1, "UTF16");
/** Building the SAX parser */
getXMLDoc(arg0, arg1);
arg1.write(m_totalElementsBuffer.toString().getBytes("UTF16"));
catch (IOException e)
System.out.println("Error : io" + e.getMessage());
catch (Exception e)
System.out.println("Error :" + e.getMessage());
/* (non-Javadoc)
@see com.sap.aii.mapping.api.StreamTransformation#setParameter(java.util.Map)
public void setParameter(Map arg0)
public void getXMLDoc(InputStream inputStream, OutputStream outputStream)
Defines a factory API that enables applications to configure and
obtain a SAX based parser to parse XML documents. Once an application
has obtained a reference to a SAXParserFactory it can use the
factory to configure and obtain parser instances.
SAXParserFactory factory = SAXParserFactory.newInstance();
try
factory.setNamespaceAware(true);
factory.setValidating(true);
SAXParser saxParser = factory.newSAXParser();
Parse the content of the given {@link java.io.InputStream}
instance as XML using the specified
{@link org.xml.sax.helpers.DefaultHandler}.
@param inputstream InputStream containing the content to be parsed.
@param cobject The SAX DefaultHandler to use.
@exception IOException If any IO errors occur.
@exception IllegalArgumentException If the given InputStream is null.
@exception SAXException If the underlying parser throws a
SAXException while parsing.
saxParser.parse(inputStream, this);
catch (FactoryConfigurationError e)
System.out.println("Error");
catch (ParserConfigurationException e)
e.printStackTrace();
catch (SAXException e)
e.printStackTrace();
catch (IOException e)
e.printStackTrace();
/** ===========================================================
Methods Overriding in SAX Default Handler
===========================================================
Receive notification of the beginning of the document.
By overriding this method in a subclass to take specific actions
at the beginning of a document (such as allocating the root node
of a tree or creating an output file)
public void startDocument()throws SAXException
if(m_totalElementsBuffer.length()>0)
m_totalElementsBuffer = new StringBuffer();
counter = 0;
m_totalElementsBuffer.append(m_prologue);
m_totalElementsBuffer.append(m_nameSpace);
m_totalElementsBuffer.append(startData); }
Receive notification of the end of the document.
By overriding this method in a subclass to take specific
actions at the end of a document (such as finalising a tree
or closing an output file)
public void endDocument()throws SAXException
m_totalElementsBuffer.append(endData);
m_totalElementsBuffer.append(m_rootElementEnd);
Receive notification of the start of an element.
By overriding this method in a subclass to take specific
actions at the start of each element (such as allocating
a new tree node or writing output to a file)
public void startElement(String namespaceURI, String name, String qName, Attributes attrs)
throws SAXException
/** If current List is not empty then append node to StringBuffer */
m_totalElementsBuffer.append("<" + name + ">");
Receive notification of the end of an element.
By overriding this method in a subclass to take specific
actions at the end of each element (such as finalising
a tree node or writing output to a file)
public void endElement(String uri, String name, String qName) throws SAXException
m_totalElementsBuffer.append("</" + name + ">");
Receive notification of character data inside an element.
By overriding this method to take specific actions for each
chunk of character data (such as adding the data to a node
or buffer, or printing it to a file)
public void characters(char buf[], int offset, int len)
throws SAXException
String s = new String(buf, offset, len);
if (null != s && s.length() >0)
if(s.equalsIgnoreCase("&"))
//System.out.println("FOUND AND SYMBOL");
String s1 = s.replaceAll("&","_-#_");
//System.out.println("s= " +s1);
s = s1;
if(s.equalsIgnoreCase("<"))
//System.out.println("FOUND AND SYMBOL");
String s1 = s.replaceAll("<","_#-_");
//System.out.println("s= " +s1);
s = s1;
m_totalElementsBuffer.append(s);
Thanks
Sunil Singh -
When I create an EJB Transport Business Service, after selecting the jar that has the EJB 2.1 artefacts (Remote, Home, etc) the oepe plugin fails and can't continue.
As I understand it seems that there is a problem with the classpath of ant build.xml that oepe creates inside folder /tmp/alsbejbtransport/ to compile the bs and generate the wsdl. I checked if tools.jar is in the classpath (in eclipse) and is included, so I can't figure out wich is the problem.
I found this in Oracle, but not helps solve the problem:
BEA-398120
Error: The WSDL for the typed transport endpoint could not be accessed.
Description
There was a problem retrieving the WSDL from the typed transport service endpoint at the time of service registration
Action
Contact technical support
This is the the full stacktrace that shows eclipse.
Generate : Error during generation of the WSDL:
BUILD FAILED
java.lang.NoClassDefFoundError: com/sun/javadoc/Type
at com.bea.util.jam.provider.JamServiceFactoryImpl.createSourceBuilder(JamServiceFactoryImpl.java:205)
at com.bea.util.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:158)
at com.bea.util.jam.provider.JamServiceFactoryImpl.createClassLoader(JamServiceFactoryImpl.java:137)
at com.bea.util.jam.provider.JamServiceFactoryImpl.createService(JamServiceFactoryImpl.java:78)
at weblogic.wsee.util.JamUtil.parseSource(JamUtil.java:152)
at weblogic.wsee.tools.anttasks.JwsLoader.loadJClasses(JwsLoader.java:186)
at weblogic.wsee.tools.anttasks.JwsLoader.load(JwsLoader.java:75)
at weblogic.wsee.tools.anttasks.JwsModule.loadWebServices(JwsModule.java:569)
at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:369)
at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:256)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:184)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.ClassNotFoundException: com.sun.javadoc.Type
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 27 more
Total time: 0 seconds
Eclipse Installation details:
*** System properties:
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.buildId=M20110909-1335
eclipse.commands=-os
linux
-ws
gtk
-arch
x86_64
-showsplash
-launcher
{home}/Development/oepe-indigo/eclipse
-name
Eclipse
--launcher.library
{home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505/eclipse_1407.so
-startup
{home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.overrideVmargs
-exitdata
1e418010
-vm
/usr/bin/java
eclipse.home.location=file:{home}/Development/oepe-indigo/
eclipse.launcher={home}/Development/oepe-indigo/eclipse
eclipse.launcher.name=Eclipse
[email protected]/../p2/
eclipse.p2.profile=PlatformProfile
eclipse.product=org.eclipse.platform.ide
eclipse.startTime=1374623921455
eclipse.vm=/usr/bin/java
eclipse.vmargs=-Xms256m
-Xmx768m
-XX:MaxPermSize=512m
-Dsun.lang.ClassLoader.allowArraySyntax=true
-Dweblogic.home={home}/Oracle/Middleware/wlserver_10.3
-Dharvester.home={home}/Oracle/Middleware/Oracle_OSB1/harvester
-Dosb.home={home}/Oracle/Middleware/Oracle_OSB1
-Dosgi.bundlefile.limit=750
-Dosgi.nl=en_US
-Dmiddleware.home={home}/Oracle/Middleware
-jar
{home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
equinox.use.ds=true
file.encoding=UTF-8
file.encoding.pkg=sun.io
file.separator=/
guice.disable.misplaced.annotation.check=true
harvester.home={home}/Oracle/Middleware/Oracle_OSB1/harvester
http.nonProxyHosts=localhost
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.awt.printerjob=sun.print.PSPrinterJob
java.class.path={home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
java.class.version=50.0
java.endorsed.dirs=/usr/lib/jvm/jdk1.6.0_45/jre/lib/endorsed
java.ext.dirs=/usr/lib/jvm/jdk1.6.0_45/jre/lib/ext:/usr/java/packages/lib/ext
java.home=/usr/lib/jvm/jdk1.6.0_45/jre
java.io.tmpdir=/tmp
java.library.path=/usr/lib/jvm/jdk1.6.0_45/jre/lib/amd64/server:/usr/lib/jvm/jdk1.6.0_45/jre/lib/amd64:/usr/lib/jvm/jdk1.6.0_45/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.protocol.handler.pkgs=null|com.bea.wli.sb.resources.url|com.bea.wli.sb.resources.jca.upgrade.url|weblogic.utils|weblogic.utils|weblogic.utils|weblogic.net|weblogic.net
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=1.6.0_45-b06
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.6
java.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
java.version=1.6.0_45
java.vm.info=mixed mode
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.vendor=Sun Microsystems Inc.
java.vm.version=20.45-b01
javax.rmi.CORBA.PortableRemoteObjectClass=weblogic.iiop.PortableRemoteObjectDelegateImpl
javax.rmi.CORBA.UtilClass=weblogic.iiop.UtilDelegateImpl
jna.platform.library.path=/usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:/lib64:/usr/lib:/lib
line.separator=
middleware.home={home}/Oracle/Middleware
oracle.eclipse.tools.weblogic.ui.isWebLogicServer=true
org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
org.eclipse.equinox.launcher.splash.location={home}/Development/oepe-indigo/plugins/org.eclipse.platform_3.7.1.v201109091335/splash.bmp
org.eclipse.equinox.simpleconfigurator.configUrl=file:org.eclipse.equinox.simpleconfigurator/bundles.info
org.eclipse.m2e.log.dir={home}/workspace/pragma/.metadata/.plugins/org.eclipse.m2e.logback.configuration
org.eclipse.update.reconcile=false
org.omg.CORBA.ORBClass=weblogic.corba.orb.ORB
org.omg.CORBA.ORBSingletonClass=weblogic.corba.orb.ORB
org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,OSGi/Minimum-1.2,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6
org.osgi.framework.language=en
org.osgi.framework.os.name=Linux
org.osgi.framework.os.version=3.8.0
org.osgi.framework.processor=x86-64
org.osgi.framework.system.capabilities=osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0, 1.1, 1.2",osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6"
org.osgi.framework.system.packages=javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.transaction,javax.transaction.xa,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.soap,javax.xml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.ws.wsaddressing,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.portable,org.omg.CORBA.TypeCodePackage,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.PortableServer.ServantLocatorPackage,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views,org.w3c.dom.xpath,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers
org.osgi.framework.uuid=901615cd-f3f3-0012-11b6-a3bca4d97ac1
org.osgi.framework.vendor=Eclipse
org.osgi.framework.version=1.6.0
org.osgi.supports.framework.extension=true
org.osgi.supports.framework.fragment=true
org.osgi.supports.framework.requirebundle=true
os.arch=amd64
os.name=Linux
os.version=3.8.0-26-generic
osb.home={home}/Oracle/Middleware/Oracle_OSB1
osgi.arch=x86_64
osgi.bundlefile.limit=750
osgi.bundles=reference:file:javax.transaction_1.1.1.v201105210645.jar,reference:file:org.eclipse.equinox.simpleconfigurator_1.0.200.v20110502-1955.jar@1:start
osgi.bundles.defaultStartLevel=4
osgi.bundlestore={home}/Development/oepe-indigo/configuration/org.eclipse.osgi/bundles
osgi.configuration.area=file:{home}/Development/oepe-indigo/configuration/
osgi.framework=file:{home}/Development/oepe-indigo/plugins/org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar
osgi.framework.extensions=reference:file:javax.transaction_1.1.1.v201105210645.jar
osgi.framework.shape=jar
osgi.framework.version=3.7.1.R37x_v20110808-1106
osgi.frameworkClassPath=., file:{home}/Development/oepe-indigo/plugins/javax.transaction_1.1.1.v201105210645.jar
osgi.install.area=file:{home}/Development/oepe-indigo/
osgi.instance.area=file:{home}/workspace/pragma/
osgi.instance.area.default=file:{home}/workspace/
osgi.logfile={home}/workspace/pragma/.metadata/.log
osgi.manifest.cache={home}/Development/oepe-indigo/configuration/org.eclipse.osgi/manifests
osgi.nl=en_US
osgi.nl.user=en_US
osgi.os=linux
osgi.splashLocation={home}/Development/oepe-indigo/plugins/org.eclipse.platform_3.7.1.v201109091335/splash.bmp
osgi.splashPath=platform:/base/plugins/org.eclipse.platform
osgi.syspath={home}/Development/oepe-indigo/plugins
osgi.tracefile={home}/workspace/pragma/.metadata/trace.log
osgi.ws=gtk
path.separator=:
securerandom.source=file:/dev/./urandom
socksNonProxyHost=localhost
sun.arch.data.model=64
sun.boot.class.path=/usr/lib/jvm/jdk1.6.0_45/jre/lib/resources.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/rt.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/sunrsasign.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/jsse.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/jce.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/charsets.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/modules/jdk.boot.jar:/usr/lib/jvm/jdk1.6.0_45/jre/classes
sun.boot.library.path=/usr/lib/jvm/jdk1.6.0_45/jre/lib/amd64
sun.cpu.endian=little
sun.cpu.isalist=
sun.desktop=gnome
sun.io.unicode.encoding=UnicodeLittle
sun.java.command={home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher {home}/Development/oepe-indigo/eclipse -name Eclipse --launcher.library {home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505/eclipse_1407.so -startup {home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.overrideVmargs -exitdata 1e418010 -vm /usr/bin/java -vmargs -Xms256m -Xmx768m -XX:MaxPermSize=512m -Dsun.lang.ClassLoader.allowArraySyntax=true -Dweblogic.home={home}/Oracle/Middleware/wlserver_10.3 -Dharvester.home={home}/Oracle/Middleware/Oracle_OSB1/harvester -Dosb.home={home}/Oracle/Middleware/Oracle_OSB1 -Dosgi.bundlefile.limit=750 -Dosgi.nl=en_US -Dmiddleware.home={home}/Oracle/Middleware -jar {home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
sun.java.launcher=SUN_STANDARD
sun.jnu.encoding=UTF-8
sun.lang.ClassLoader.allowArraySyntax=true
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
sun.os.patch.level=unknown
svnkit.http.methods=Basic
svnkit.library.gnome-keyring.enabled=false
user.country=AR
user.dir={home}/Development/oepe-indigo
user.home={home}
user.language=es
user.name={username}
user.timezone=America/Argentina/Buenos_Aires
weblogic.home={home}/Oracle/Middleware/wlserver_10.3
Thanks!!run this one in command prompt and then convert the applet using converter tool
JC_HOME = C:\java_card_kit-2_2_2\bin\
set CLASSES=%JCHOME%\lib\apduio.jar;%JC_HOME%\lib\apdutool.jar;%JC_HOME%\lib\jcwde.jar;%JC_HOME%\lib\converter.jar;%JC_HOME%\lib\scriptgen.jar;%JC_HOME%\lib\offcardverifier.jar;%JC_HOME%\lib\api.jar;%JC_HOME%\lib\installer.jar;%JC_HOME%\lib\capdump.jar;
D:\NareshPalle\jcardRE\Smart\src>java -classpath %_CLASSES% com.sun.javacard.con
verter.Converter -out EXP JCA CAP -exportpath .\exp -applet 0x0a:0x00:0x00:0x00:0x0e:0x01:0x02:
0x03:0x04:0x05:0x06 PackageName appletName 0x01:0x02:0x03:0x04:0x05:0x0
6:0x07:0x08 1.0
or
go to following directory and run the converter tool in command prompt
step 1: cd C:\java_card_kit-2_2_2\bin\
then run this command under the above directory
step 2:converter -classdir E:\Pathof Your applet class file -out EXP JCA CAP -exportpath E:\path of exp files folder -applet AID PackageName AppletName PackAID major.minor no
For more doubts mail me....
*[removed by moderator]*
Thanks and Regards
NareshPalle
Edited by: EJP on 31/03/2012 20:09: removed your email address. Unless you like spam and unless you think these forums are provided for your personal benefit only, posting an email address here serves no useful purpose whatsoever. -
Error in generating Javadoc ..
Hi,
I'm trying to run a ant script to create javadoc. I'm using JDK 1.5 for the same. But I'm getting following error.
Can anybody give me some suggestion what could be wrong there. I'm not getting any files written after this error, and build is failing due to this.
javadoc: error - In doclet class x.y.z, method start has thrown an exception java.lang.reflect.InvocationTargetException
java.lang.NullPointerException
at com.sun.tools.doclets.internal.toolkit.Configuration.setOptions(Configuration.java:404)
at a.b.c.d.Standard.start(Standard.java:63)
at a.b.c.start(c.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
1 error
at java.lang.reflect.Method.invoke(Method.java:585)
I'm really got frustrated in searching whats wrong in this.
Thanks in advance for any support and suggestions.
- NrupeshHi,
Using JDK 1.5.0, and the ANT target which i'm running is shown below ..
<target name="javadoc_template">
<mkdir dir="${nb.output.directory}/${nb.internal.target}" />
<path id="doclet_pathref">
<path refid="v_classpath"/>
<fileset dir="${ant.home}/lib/lib_v">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${nb.install.directory}/lib/ext">
<include name="**/*.jar"/>
</fileset>
</path>
<javadoc destdir="${nb.output.directory}/${nb.internal.target}"
maxmemory="512M"
link="http://java.sun.com/j2se/1.5.0/docs/api/"
sourcepath="${nb.javadocprep.directory}/src"
overview="${nb.javadocprep.directory}/src/com/e/overview.html"
header="${build.datestamp}"
footer="${build.datestamp}"
doclet="com.a.b.c.VDoclet"
docletpathref="doclet_pathref"
packagelist="${basedir}/api_grouping/javadoc_def_packages_${nb.internal.target}.txt"
additionalparam="-showsecondarypages ${nb.install.directory}/bootstrap ${nb.internal.doclet_params} @${basedir}/api_grouping/javadoc_def_${nb.internal.target}.txt"
use="true"
access="${nb.internal.accesslevel}"
failonerror="true"
>
<classpath>
<path refid="v_classpath"/>
<pathelement location="${nb.sc.checkout.dir}/WEB-INF/lib/jakarta-servlet-2.3.jar"/>
<pathelement location="${nb.sc.checkout.dir}/WEB-INF/lib/verity.jar"/>
<pathelement location="${nb.sc.checkout.dir}/WEB-INF/lib/vindex.jar"/>
<pathelement location="${nb.sc.checkout.dir}/WEB-INF/lib/vsearch.jar"/>
</classpath>
</javadoc>
<copy todir="${nb.output.directory}/${nb.internal.target}" overwrite="true">
<fileset dir="${nb.javadocprep.directory}/src/com/e/">
<include name="*.gif"/>
<include name="*.html"/>
<exclude name="overview.html"/>
</fileset>
<fileset dir="${nb.javadocprep.directory}/src/">
<include name="copyrights.html"/>
</fileset>
</copy>
</target>
Message was edited by:
nrupesh -
"javadoc not found" error for javax package in netbeans.
I am using jmf api on windows under netbeans. But problem is that netbeans do not display documentation for jmf methods . Instead it shows "javadoc not found"
error. Can someone plz help me how to configure the javadoc for jmf.I am using jmf api on windows under netbeans. But problem is that netbeans do not display documentation for jmf methods . Instead it shows "javadoc not found"
error. Can someone plz help me how to configure the javadoc for jmf.Download api docs from [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/specdownload.html] ....
Then in NetBeans:
Tools > Java Platforms > "JDK 1.x (Default)" > "Javadoc" tab > "Add zip/folder" button.....
Add the path of the jmf javadoc zip (or you may have to extract the zip)
You may not see the changes immediately, try restarting NetBeans....
Thanks! -
Javadoc: error Illegal package name: JNI
Hi,
After writting the Java code using native method, Like
package jni;
public class jniFile {
static{
System.loadLibrary("jniFile");
public jniFile() {
System.out.println("Inside constructor ");
private native void printMessage(String msg);
public static void main(String[] args) {
jniFile m= new jniFile();
m.printMessage("String from java");
I tried to create the header file using javah -jni jniFile.
i got "javadoc: error - Illegal package name: "D:\JNI\build\classes\jni" error.
Can any one help me.
Thanks in advance.The jni package which i used is a user defined one.
Now i changed it to jniPack.
Still i cant able to create a header file.
I am using netbean IDE 5.0.
I got the following error
C:\Documents and Settings\GUNR2818>javah -jni D:\JNI\build\classes\jniPack\jniPack
javadoc: error - Illegal package name: "D:\JNI\build\classes\jniPack\jniPack"
1 error
Maybe you are looking for
-
Hi, I need little help with the following application. I need to to read the items from the file, process them and save them in other file. I think I am on the right path but now I got stuck with the illegal start of the expression when I am declarin
-
When i am trying to edit the Variable in the Business Rule?
Hai Guys, When i am trying to edit the Variable in the Business Rule , I am getting String Error Message? Guys any one have any idea about the String Error Message
-
Hi, My customer is having following requirements related to OIM Form Customization. 1.In createuser form,UserID ,Password and Confirm Password Should not be displayed.We are generating userid and password automatically and we should not allow the adm
-
Reg: how to customize a java file
Hi, I have a requirement where i need to modify the message which is right now being thrown on one of the seeded page. So for that i identified the place from where it is being thrown. It is from AccountHelper.java which is one of the standard page.
-
What is required when adding references when building up a new development computer?
I just took over an existing project from another developer. I am using Visual Studio Ultimate 2012 Update 4 I am trying to set up a new, clean, development machine but this project has references to ComponentOne Studio for WinForms software for whic