Can anyone use the ZipURLConnection object?

I have some code in an EJB which, in orer to initialize, looks for compiled classes
in a deployed JAR file. Specifically, it looks for all classes for a package,
as returned by the getResources(name) method on ClassLoader. This returns a Collection
of URL objects which contain classes.
The resource returned has a protocol of "zip". When I call openConnection on
the URL, I get an instance of weblogic.util.zip.ZipURLConnection, althought I
store it as a URLConnection reference (I don't want any vendor specific definitions
in my code).
Once I have the connection, I get an InputStream (again, an instance of weblogic.util.zip.SafeZipFileInputStream
stored in an InputStream variable). I was under the assumption that I could pass
that inputStream into a java.util.zip.ZipUnputStream, in order to get at the names
of the entries. But whenever I try to do anything with the returned InputStream
(the SafeZipFileInputStream), I get a nullPointerException. It seems that no
matter how I try to use the stream, the exception is thrown.
Has anyone been able to use this without resorting to WebLogic classes? Other
vendors provide the default JAR protocol, which makes it much easier. Does WebLogic
have to force me to use their classes to access this information?
The classes I'm attempting to access aren't EJB classes. Just supporting classes
which I need to access.
Thanks for any help,
Ed

While I haven't been able to use it, I've been able to manipulate the URL value
so that I can create new one which will work with JARs (which is what the file
is anyways).
I take the URL.toString() value, and exchange the "zip" at the start with "jar".
Works for me.
"Ed Hillmann" <[email protected]> wrote:
>
I have some code in an EJB which, in orer to initialize, looks for compiled
classes
in a deployed JAR file. Specifically, it looks for all classes for a
package,
as returned by the getResources(name) method on ClassLoader. This returns
a Collection
of URL objects which contain classes.
The resource returned has a protocol of "zip". When I call openConnection
on
the URL, I get an instance of weblogic.util.zip.ZipURLConnection, althought
I
store it as a URLConnection reference (I don't want any vendor specific
definitions
in my code).
Once I have the connection, I get an InputStream (again, an instance
of weblogic.util.zip.SafeZipFileInputStream
stored in an InputStream variable). I was under the assumption that
I could pass
that inputStream into a java.util.zip.ZipUnputStream, in order to get
at the names
of the entries. But whenever I try to do anything with the returned
InputStream
(the SafeZipFileInputStream), I get a nullPointerException. It seems
that no
matter how I try to use the stream, the exception is thrown.
Has anyone been able to use this without resorting to WebLogic classes?
Other
vendors provide the default JAR protocol, which makes it much easier.
Does WebLogic
have to force me to use their classes to access this information?
The classes I'm attempting to access aren't EJB classes. Just supporting
classes
which I need to access.
Thanks for any help,
Ed

Similar Messages

  • How can I use the same object in the different jsp files?

    I am doing a project. I have finished my jave source files and compiled them successfully. And I also wrote a main method to test my classes, they also worked well. Now I am trying to use my jave code in the jsp files. But I meet a problem, in my method of java source file, I can generate a object of a class, and use it in the whole main method. But in the different jsp files, how can I do same thing?
    For example, in the .java file,
    Vector vl = new Vector();
    While ...{
    vl.add(...)
    In each of my .jsp file I want to do one loop of the above, meanwhile I want to do that in the same object.
    I hope you can understand what I mean. Really need your help!

    put your object into a session and you can the use it in all the jsps as long as the session is valid. Or you could create a static variable in the class that only creates one instance off an object and then create a static method to return this object.

  • How can i use the shared object already present in the system from java.

    explanation:
    Actually there are shared objects present in the jdk which is used by java itself.I want to know if i can use the methods in any library file(shared object) which is already present in the system.
    Or the question can be put this way how does the java call the native methods? (Can we do that explicitly) in our code.

    It isn't entirely clear what you mean by 'shared' objects and what the relationship with these shared objects and calling native code is.
    There are no shared objects in the Java language, only the java platform.
    The platform system properties are exposed via the System class (java.lang package).
    You are free to create your own shared objects by using static member access or some other mechanism.
    Your access to methods in any of the API's is dictated by the access type you have, normally public being the only completely open access allowing complete visibility.
    You can call native methods, thats what JNI is for. Calling native methods in classes other than your own is generally done using the API provided by the developer(s) of those classes.

  • Can anyone use the Javascript CSOM SP.Publishing.PublishingWeb in non-app code?

    I have been trying to write some javascript which can be used to create publishing pages in the current site (this is called in an application page opened via a custom action on the Pages library).
    I am trying to use code similar to the example on the
    SP Typescript demos page.  The only real difference between their and my implementation which I can see is that they are running in an app (hence checking SPHostUrl is is non-existent for me as I am on premise and non-app).
    My code is as follows:
    SP.SOD.executeFunc('mQuery.js', 'm$', function () {
    m$.ready(function () {
    m$('#CreatePage').click(function () {
    SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function () {
    SP.SOD.executeOrDelayUntilScriptLoaded(function () {
    SP.SOD.executeFunc('sp.publishing.js', 'SP.Publishing', function () {
    createPage();
    }, 'SP.Runtime.js');
    function createPage() {
    var context = SP.ClientContext.get_current();
    var web = context.get_web();
    context.load(web);
    context.executeQueryAsync(function () {
    var pubWeb = SP.Publishing.PublishingWeb.getPublishingWeb(context, web);
    context.load(pubWeb);
    context.executeQueryAsync(function () {
    var pageInfo = new SP.Publishing.PublishingPageInformation();
    var newPage = pubWeb.addPublishingPage(pageInfo);
    context.load(newPage);
    context.executeQueryAsync(function () {
    var listItem = newPage.get_listItem();
    context.load(listItem);
    context.executeQueryAsync(function () {
    var link = document.getElementById("linkToPage");
    link.setAttribute("href", web.get_url() + "/Pages/" + listItem.get_fieldValues().FileLeafRef);
    link.innerText = "Go to new page!";
    }, function (sender, args) {
    alert('Failed to get new page: ' + args.get_message());
    }, function (sender, args) {
    alert('Failed to Add Page: ' + args.get_message());
    }, function (sender, args) {
    alert('Failed to get the PublishingWeb: ' + args.get_message());
    }, function (sender, args) {
    alert('Failed to get the Web: ' + args.get_message());
    However I cannot for the life of me figure out how to get the PublishingWeb object.  Everytime my code hits the "context.load(pubWeb)" I get a javascript error thrown in sp.runtime.js:
    "Object doesn't support property or method 'get_$y_0'"
    I've tried a number of alternatives such as hard coding the url for the context, but nothing seems to work.  Is this just me?  Or just non-app code?

    Hi,
    According to your post, my understanding is that you want to create publishing pages using ECMA Script.
    The following code(a aspx page) for your reference:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <%@ Page Language="C#" %>
    <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <head runat="server">
    <meta name="WebPartPageExpansion" content="full" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Create Publishing Pages</title>
    <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script>
    <script type="text/javascript" src="/sites/DennisSite/_layouts/15/sp.runtime.js"></script>
    <script type="text/javascript" src="/sites/DennisSite/_layouts/15/sp.js"></script>
    <script type="text/javascript" src="/sites/DennisSite/_layouts/15/sp.publishing.js"></script>
    <script type="text/javascript">
    var context;
    var web;
    var pubWeb;
    var pageInfo;
    var newPage;
    var listItem;
    context = SP.ClientContext.get_current();
    function createPage() {
    web = context.get_web();
    pubWeb = SP.Publishing.PublishingWeb.getPublishingWeb(context, web);
    context.load(web);
    context.load(pubWeb);
    context.executeQueryAsync(
    function () {
    pageInfo = new SP.Publishing.PublishingPageInformation();
    newPage = pubWeb.addPublishingPage(pageInfo);
    context.load(newPage);
    context.executeQueryAsync(
    function () {
    listItem = newPage.get_listItem();
    context.load(listItem);
    context.executeQueryAsync(
    function () {
    var link = document.getElementById("linkToPage");
    link.setAttribute("href", web.get_url() + "/Pages/" + listItem.get_fieldValues().FileLeafRef);
    link.innerText = "Go to new page!";
    function (sender, args) {
    alert('Failed to get new page: ' + args.get_message());
    function (sender, args) {
    alert('Failed to Add Page: ' + args.get_message());
    function (sender, args) {
    alert('Failed to get the PublishingWeb: ' + args.get_message());
    </script>
    </head>
    <body>
    <form id="form1" runat="server">
    </form>
    <button onclick="createPage()">Create Publishing Page</button>
    <a id="linkToPage"></a>
    </body>
    </html>
    The Result:
    Best Regards
    Dennis Guo
    TechNet Community Support

  • I stream Internet radio from my iPad air to Bluetooth speaker.  Can anyone suggest the best EQ app to use to enhance the sound.  Thanks

    I stream Internet raidiot from iPad air to Bluetooth speakers.  Can anyone suggest the best EQ app to use to enhance the sound.
    THanks

    Yeah, I know I can restore it, but I might as well go ahead and try. I just finished a backup for icloud and itunes to make sure, I'll go ahead and restore it and set it up as new and see how that works. Seems like I have no other options at this point, I'd still like to know what they did with the Download tab in itunes store, if they removed it or if I'm just overlooking it.

  • My iPad is stuck with a small blue screen saying iCloud Backup, this iPad hasn't been backed up in 4 weeks.Backups blah blah- Click OK. I can't get it off the screen and I can't use the iPad because of it. Can anyone out there help?

    my iPad is stuck with a small blue screen saying iCloud Backup, this iPad hasn't been backed up in 4 weeks.Backups blah blah… Click OK. I can't get it off the screen and I can't use the iPad because of it. Can anyone out there help?

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after the iPad shuts down, then press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds).

  • I am putting together a proposal for a Final Cut Pro Workstation to use with a tapeless HD camera.  Can anyone suggest the best camera (in the 5-10,000 dollar range) ?  What hardware and software should I include in the package?

    I am putting together a proposal for a Final Cut Pro Workstation to use with a tapeless HD camera.  Can anyone suggest the best camera (in the 5-10,000 dollar range) ?  What hardware and software should I include in the package?

    This is quite an open suggestion, but here are some ideas which might get you started.  There are good HD cameras in your price range from Sony, Panasonic and Canon (and maybe other manufacturers). Tapeless formats vary.  I have only worked with Sony XDCAM which seems pretty good to me.  File sizes for material shot at 35MBS are not too huge and, with the free Sony transfer and conversion programme, are easy to bring into the computer via USB direct from the camera or from a fairly inexpensive converter.  The Sony XDCAM EX3 can produce results well up to broadcast quality.
    As to hardware, you'll need a powerful MAC - iMac, Macbook Pro or MacPro with 4GB or more of RAM and a good video card.  Softwarewise, FCPX is quite a bit cheaper than FC Studio 3 and of course it's 64bit and can make better use of multi-core machines than FCP7.    It's also designed to handle HD formats with less hassle than FCP7 and is matched to the latest versions of Motion and Compressor.   But you'd probably be wise to search reviews of FCPX before you make your choice - it has some issues.
    A good HD monitor will be essential and, for colour correction etc, you may want to consider a second monitor or HD TV foe editing. ( A MacPro is generally the best machine to connect a second monitor to). 
    This should give you a good editing system, but there are many other things you could add (Photoshop, professional sound monitors, etc)
    Hope this helps a bit.
    Jonathan

  • Can't create table that grows using the button object

    Im a beginner, and this seems like a simple issue. Appreciate your help in advance.  When I try to do this, the button fails to add a row.
    So, I printed out the Help section entitled, "create a table that grows using the button object" and started from scratch with a simple table as the only object on the form- and followed the instructions to the letter.
    When I go to preview and click the button, a row is not added.
    Can you suggest something?

    Try this:
    Select body row of table from hierarchy palette that you want to repeat then on he object tab of the properties tab select binding tab. You need to click on "Repeat Row for Each Data Item"
    I hope this helps
    Murat
    www.muratkuru.com.tr

  • I'm trying to delete multiple pix in iPhoto that i stupidly made duplicates of without knowing, I've tried going into the applications folder and using image capture but i think I've missed a step , can anyone send the correct info / steps pls thanks

    I'm trying to delete multiple pix in iPhoto that i stupidly made duplicates of without knowing, I've tried going into the applications folder and using image capture but i think I've missed a step , can anyone send the correct info / steps pls thanks

    again image capture is not involved with deleting photos from iPhoto in any way ever
    the paid version of iPhoto Library Manager is very good for finding duplicates as is Duplicate Annihilator
    And I have no idea who told you this - or what it means - but re-read both of my opening statements
    I was told I could delete multpiles thru image capture by transferring my iPhoto library etc
    LN

  • Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear????  any help would be greatly appreciated.

    Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear????  any help would be greatly appreciated.

    You will need to find a forum for MS Word since that is the software that you are trying to manipulate in this.  If you think the processing/creation of the PDF plays a role then you should ask in the forum for the software that you are using to create the PDF.
    This forum is for issue regarding downloading and installing Adobe trial products, so in any circumstance, your issue does not fit in this forum.

  • Can anyone explain the use of PhantomReference

    Can anyone explain the use of PhantomReference( if possible by an example..).

    Payment request is a noted document and as such does not pass any accounting entry. For effecting a payment to a
    Against the payment request you can effect the down payment. Suppose u have completly automated payment system and if you want to effect a down payment, you can do it only by payment request.
    Payment requests can be controlled through workflow for proper autorization.

  • I recently upgraded my Mac to Yosemite and I can't use the custom function (grayed out) in Image Trace Illustrator CS6 (physical version). Anyone else having this issue?

    I recently upgraded my Mac to Yosemite and I can't use the custom function (grayed out) in Image Trace Illustrator CS6 (physical version). Anyone else having this issue?

    Custom will show automatically as soon as you just edit some options. So just go ahead, you don't need to select "custom"

  • Hi Guys! I have an Imac with Mac OS X version 10.5.8 and bought a wireless keyboard. Unfortunately I can´t use the volume buttons on the keyboard. I have checked almost everything, does anyone have any good idea?

    Hi Guys! I have an Imac with Mac OS X version 10.5.8 and bought a wireless keyboard. Unfortunately I can´t use the volume buttons on the keyboard. I have checked almost everything, does anyone have any good idea?

    Hello, try kguy's solution here...
    https://discussions.apple.com/thread/2332457?start=0&tstart=0
    First, Go to System Preferences, keyboard, and click on the Keyboard tab
    Make sure that the checkbox by "Use all F1, F2, etc, keys as standard function keys" is NOT checked.
    Next, click on the Show All button, and select Bluetooth. You should see your Apple Wireless Keyboard listed on the left side of the screen.
    Click once to select it, and then click the gear icon at the bottom of the box, and choose Disconnect.
    Power off the keyboard by holding down the power button on the keyboard for a few seconds until it show "keyboard Off on your imac screen, then turn it back on again.
    The device should appear once again in your bluetooth list.
    Try out the volume control buttons now, and see if that cleared things up

  • I've upgraded my mini mac to os x mavericks but now it won't work.  I can't use the internet or photoshop etc... can anyone help?

    I've upgraded my mini mac to os x mavericks but now it won't work.  I can't use the internet or photoshop etc... can anyone help?

    Hardware Information:
              Mac mini - model: Macmini3,1
              1 2.26 GHz Intel Core 2 Duo CPU: 2 cores
              2 GB RAM
    Video Information:
              NVIDIA GeForce 9400 - VRAM: 256 MB
    System Software:
              OS X 10.9.2 (13C64) - Uptime: 0 days 1:0:4
    Disk Information:
              Hitachi HTS543216L9SA02 disk0 : (160.04 GB)
                        EFI (disk0s1) <not mounted>: 209.7 MB
                        Macintosh HD (disk0s2) / [Startup]: 159.18 GB (62.27 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
              PIONEER DVD-RW  DVRTS08 
    USB Information:
              SanDisk Cruzer Edge 4 GB
                        NO NAME (disk1s1) /Volumes/NO NAME: 4 GB (162.5 MB free)
              Apple, Inc. Keyboard Hub
                        Apple, Inc Apple Keyboard
              Apple Computer, Inc. IR Receiver
              Apple Inc. BRCM2046 Hub
                        Apple Inc. Bluetooth USB Host Controller
    FireWire Information:
    Thunderbolt Information:
    Configuration files:
              /etc/hosts - Count: 30
    Startup Items:
              HWNetMgr: Path: /Library/StartupItems/HWNetMgr
              HWPortDetect: Path: /Library/StartupItems/HWPortDetect
    Launch Daemons:
              [System] com.adobe.fpsaud.plist 3rd-Party support link
              [System] com.adobe.SwitchBoard.plist 3rd-Party support link
              [System] com.trusteer.rooks.rooksd.plist 3rd-Party support link
    Launch Agents:
              [System] com.adobe.AAM.Updater-1.0.plist 3rd-Party support link
              [System] com.adobe.CS5ServiceManager.plist 3rd-Party support link
              [System] com.epson.epw.agent.plist 3rd-Party support link
              [System] com.kodak.BonjourAgent.plist 3rd-Party support link
              [System] com.trusteer.rapport.rapportd.plist 3rd-Party support link
              [System] com.waltop.waltoptablet.plist 3rd-Party support link
              [invalid] KodakAiOBonjourAgent
    User Launch Agents:
              [not loaded] com.adobe.AAM.Updater-1.0.plist 3rd-Party support link
              [not loaded] com.akamai.client.plist 3rd-Party support link
              [not loaded] com.akamai.single-user-client.plist 3rd-Party support link
              [not loaded] com.citrixonline.GoToMeeting.G2MUpdate.plist 3rd-Party support link
    User Login Items:
              iTunesHelper
              Skype
              Dropbox 17-33-15
              SpyderUtility
              Dropbox
              Launch Nikon Message Center 2
              FKeyHandlerX
    Internet Plug-ins:
              FlashPlayer-10.6: Version: 11.5.502.110 3rd-Party support link
              Flash Player: Version: 11.5.502.110 Cannot contact Adobe
              iPhotoPhotocast: Version: 7.0
              QuickTime Plugin: Version: 7.7.3
              AdobeAAMDetect: Version: AdobeAAMDetect 1.0.0.0 - SDK 10.6 3rd-Party support link
              Default Browser: Version: 537 - SDK 10.9
    Audio Plug-ins:
              BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
              AirPlay: Version: 2.0 - SDK 10.9
              AppleAVBAudio: Version: 203.2 - SDK 10.9
              iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins:
              Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    User Internet Plug-ins:
              BrowserPlus_2.9.8: Version: 2.9.8 3rd-Party support link
              CitrixOnlineWebDeploymentPlugin: Version: 1.0.105 3rd-Party support link
    3rd Party Preference Panes:
              Akamai NetSession Preferences  3rd-Party support link
              BrowserPlus  3rd-Party support link
              Flash Player  3rd-Party support link
              Growl  3rd-Party support link
              Rapport  3rd-Party support link
    Old Applications:
              /Users/[redacted]/Applications/Akamai
                        checkclientstatus:          Version: 1.0 - SDK 10.5 3rd-Party support link
                        macui:          Version: 1.0 - SDK 10.5 3rd-Party support link
                        Akamai NetSession Uninstaller:          Version: 1.0 - SDK 10.5 3rd-Party support link
              Epson Printer Utility 4:          Version: 9.00 - SDK 10.5 3rd-Party support link
                        /Library/Printers/EPSON/InkjetPrinter2/Utility/UT4/Epson Printer Utility 4.app
    Time Machine:
              Time Machine not configured!
    Top Processes by CPU:
                   3%          WindowServer
                   1%          EtreCheck
                   0%          mDNSResponder
                   0%          aosnotifyd
    Top Processes by Memory:
              109 MB          com.apple.IconServicesAgent
              63 MB          Dropbox
              63 MB          Mail
              57 MB          mds_stores
              55 MB          Finder
    Virtual Memory Information:
              348 MB          Free RAM
              741 MB          Active RAM
              411 MB          Inactive RAM
              290 MB          Wired RAM
              315 MB          Page-ins
              0 B          Page-outs

  • Can anyone confirm the date used for pushing the data into AR interface table? Is it abse don Actual ship date or scheduled ship date?

    Can anyone confirm the date used for pushing the data into AR interface table? Is it abse don Actual ship date or scheduled ship date? We are facing a scenario where trx date is lower than the actual ship to which logically sounds incorrect.
    Appreciate any quick response around this.

    Hi,
    Transaction date  will be your autoinvoice master program submission level date (If you haven't setup any logic.
    Please check the program level default date, if user enter old date ststem will pick the same.
    Customer is trying to set the value of the profile OM:Set receivables transaction date as current date for non-shippable lines at the responsiblity level. System does not set the transaction date to current date in ra_interface_lines_all.
    CAUSE
    Customer has used the functionality in R11i. But after the upgrade to R12, the system functions differently than R11i.
    SOLUTION
    1.Ensure that there are no scheduled workflow background process run.
    2.Set the profile "OM: Set Receivables Transaction Date as Current Date for Non-Shippable Lines"  at Responsibility level only as Yes.
    3.Now switch the responsibility to which the profile is set.
    4.Create order for Non-Shippable Lines and progress it to invoicing.
    5.Ensure that the 'workflow background process' concurrent program is run in the same responsibility and this line is considered in it.
    6.Now check if the 'SHIP_DATE_ACTUAL' is populated to ra_interface_lines_all

Maybe you are looking for

  • WPA Enterprise on Palm Pre

    We have found that the Palm Pre will not connect to our WPA Enterprise wireless system, because our network needs clients to eliminate the "validate server certificate" process.  For example, our standard laptops use the SecureW2 client and the "vali

  • Playable on DVD Player and standalone files

    Is it possible to author a DVD so its playable on a DVD player but as well have files that can be taken off (ie a folder of pictures)? Thank you in advance

  • Default macro is not saving values

    We created a macro for a calculation and its updating a KF,  the macro is kept in default mode.  But when we check the updated KF in a different view, the values are not showing.  Though we saved in initial step, the values are not reflecting in diff

  • Delta Concept For Data Source

    Hi All, !!!!!!!!!!!Make my concept clear Guys!!!!!!!!!! Lets take a datasource 2LIS_04_P_ARBPL when any transaction is done in production planning the data is gathered in extract structure and when collective update is run (queue delta) then data com

  • Cost Allocation Using BADI

    Hi, I have to do cost allocation using BADI. shall I use UJ_CUSTOM_LOGIC for this if not then which BADI should I use? Can anyone provide me the sample code for this. (BPC version is 10) I am totally new to BPC. Please help. Regards, Atiqa.