• Post Reply Bookmark Topic Watch Topic
  • New Topic

XYZ is a proprietary API and may be removed in a future release.  RSS feed

 
Claude Moore
Ranch Hand
Posts: 923
9
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

during compilation of a quite complex Java project with NetBeans, I got a lot of warning messages like the one in the subject of this post, for example i have a warning like


warning: Match is internal proprietary API and may be removed in a future release
import com.sun.org.apache.xerces.internal.impl.xpath.regex.Match;


That's a good advice. My question is : where could I find information on equivalent / or suggested replacement APIs ?

Thank you for your help
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The java.util.regex package is what you should generally use for regexp operations.

But there is no general way for finding out what an appropriate replacement class for some sun.* or com.sun.* class would be. The class name generally makes it clear, though, so this tends not to be a problem.
 
Claude Moore
Ranch Hand
Posts: 923
9
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your clear explanation and help, Ulf... even if in a couple of cases I wasn't able to find a valid replacement by myself.
For example, where I could find a WebRowSet implementation ? Usage of the default one give the same warning...

Thank you again

 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Claude Moore wrote:during compilation of a quite complex Java project with NetBeans, I got a lot of warning messages like the one in the subject of this post, for example i have a warning like

Hmmm. Don't like the sound of that, because it would suggest that some class of yours is trying - directly or indirectly (maybe via some 3rd party code) - to make use of a Match class that is proprietary, and was never meant to be used that way.

There is no Match class in the standard API (at least for v7), but clearly you're using a xerces jar as well (probably among others), so exactly what's going on I can't say.

Winston
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For example, where I could find a WebRowSet implementation ? Usage of the default one give the same warning...

That sounds odd - WebRowSet is part of the official Java API, and is not internal or deprecated. Please post the full complete error message.

If official classes or methods (java.* or javax.*) are deprecated, then the javadocs generally point out what you should use as a replacement.
 
Campbell Ritchie
Marshal
Posts: 56525
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible that OP has been using an IDE. If you try to find a class by name on Eclipse, it gives you a dropdown list, and com. packages seem to appear at its top. If you simply push enter, you get the top class in the list, which may be an internal package like that.
 
Claude Moore
Ranch Hand
Posts: 923
9
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:
If official classes or methods (java.* or javax.*) are deprecated, then the javadocs generally point out what you should use as a replacement.


The original warning is

warning: WebRowSetImpl is internal proprietary API and may be removed in a future release
import com.sun.rowset.WebRowSetImpl;


Simply, I want to use a WebRowSet but I don't know how to instantiate one. I wasn't able to find a factory, or a concrete class beside WebRowSetImpl.

 
Paul Clapham
Sheriff
Posts: 22819
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you follow this link: http://docs.oracle.com/javase/tutorial/jdbc/basics/jdbcrowset.html#rowsetfactory you will find part of an Oracle tutorial which talks about RowSet handling. The example shows how to produce a JDBC rowset but there are similar methods to produce a WebRowSet.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WebRowSet - talk about a blast from the past :-) I don't think I've ever heard about another implementation than the one you're using, and the JRE still doesn't come with one. So I don't think there's any easy replacement for that one - if this is a real concern then you may wish to replace it entirely with some other design that does not rely on the WebRowSet interface (which hasn't exactly taken the world by storm).
 
Claude Moore
Ranch Hand
Posts: 923
9
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think I've ever heard about another implementation than the one you're using

Ulf,
I was really afraid to hear someone talking like you about WebRowSet... by the way, I agree to you.. at the time I used it (luckily, only in a very few classes)
I thought that it was a good idea... but I'm pretty sure I was wrong.
Which alternative pattern to you advice me to use, if I may abuse of your patience ?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently, it seemed like a good idea at the time to a few people at Sun as well, so don't be too hard on yourself :-)

Are you actually using it for transferring DB data remotely, and then transforming it back to a RowSet? If so, I'd suggest a redesign. Maybe implement a REST WS that transfers the data as JSON. That would actually also my suggestion if you only use it to create XML from the RowSet - assuming you don't really need XML.
 
Claude Moore
Ranch Hand
Posts: 923
9
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks for the advice. It may be a good idea work with JSON representation of exchanged data.
Thank you.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!