"no type with this name could be found at this location" error..

Though my project has been successfully compiled.
But when I open some specific class, it always comes out some error, says "ERROR: no type with this name could be found at this location". I am not quite clear, because the class underlined is absolutely in the project source folder. :(
Can anybody tell me what wrong with it?:(

Hi Tom
There is a known limitation with Workshop where you would see those errors when the java classes (the types that error out) are part of you webproject itself.
The classes get compiled and get moved into web-inf\classes folder and somehow IDE does not get to see this in its classpath.
The workaround is to move those classes into a java project which will get compiled into a jar file that will be part of libraries (goes into APP-INF\lib).
You should not see those errors after the workaround.
This is a known limitation addressed via CR277571
Thanks
Vimala

Similar Messages

  • Unable to create the type with the name 'MSORA'. (Microsoft.SqlServer.ManagedDTS)

    I am attempting to use the Integration Services Import Project Wizard within Microsoft Visual Studio and am getting this error
    Unable to create the type with the name 'MSORA'. (Microsoft.SqlServer.ManagedDTS)
    upon Import.
    Can anyone shed some light for me on this cryptique error message?
    Thanks for your review and am hopeful for a reply.

    If you have the SSIS and SSDT (BIDS) installed then
    I believe the DTS assemblies got derigistered, a typical outcome of corrupted software, so a full re-install would be the best option. VS +SQL Server  + more
    Otherwise, as a quick fix try to
    reference the SSIS assemblies, like Microsoft.SQLServer.ManagedDTS.dll + more.
    They are by default in C:\Program Files\Microsoft SQL Server\<number>\SDK\Assemblies.
    Arthur
    MyBlog
    Twitter

  • Unable to create the type with the name 'ODATA'

    On a test server with VS 2012 and SQL 2012 installed, I have created an SSIS project in project deployment mode. In the packages of the project I use the Odata source for SSIS. The packages run fine in VS 2012. But when I deploy the package to the Integration
    Services catalog on the same server as where I am running VS 2012 I get a deployment error:
    ‘Failed to deploy project. For more information, query the operation_messages view for the operation identifier '25084'.  (Microsoft SQL Server, Error: 27203)'
    When I read this message from the SSISDB database, I see the problem with ODATA.
    use SSISDB
    go
    select * from catalog.operation_messages where operation_id = 25084
    --Failed to deploy the project. Fix the problems and try again later.:Unable to create the type with the name 'ODATA'.
    As I said: the packages with the Odata run without error when tested from within VS2012 on the SAME server. When I deploy the project from Visual Studio I get the error. 
    For completeness: I have also tried deployment from VS2012 to another server where the SSIS Odata source has bene deployed. Also to no avail.
    Jan D'Hondt - SQL server BI development

    The next possiblity for me was to convert the project to Package deployment and see what the result I get. I have converted my project with package connections from project deployment to Package deployment. Then I deployed the package on the server in MSDB
    catalog from SSIS. I.e. I connect with SSMS to Integration Services as an administrator and under the MSDB folder I added a new folder for my package. I then imported the dtsx into the mdsb package store. The Import worked. Still from within SSMS and connected
    to the Integration Services, i right-clicked on the package in the MSDB store and selected 'Run package'. In the Execute Package dialog window, I clicked on 'Execute' and the package actually ran. The Odata connector was opened, it read the data and imported
    into my database.
    This experience made me realize what the real culprit  was: The OData connector is a 32-bit connector in SQL Server 2012. 
    To prove this: with SSMS I connected to the SQL database server and in the Integration services catalog, i right-clicked on the package that was deployed in Project deployment mode, then selected 'Execute...'. In the execute dialog windo in the 'Advanced'
    tab I checked 32-bit runtime. And the package ran.
    To wrap it all up:
    The Project deployment will work, but not with the Odata source as project connection. The Odata connection must be defined in each package as a package connection.
    Run the deployed packages in 32-bit mode on the server
    Jan D'Hondt - SQL server BI development

  • No event method with matching name and signature found on EventSet

    Dear,
    I have this error in the Problems view in Workshop (I'm using the Weblogic 9.2.1) :
    No event method with matching name and signature found on EventSet: com.bea.control.TaskControl.Callback.
    This error occurs sometimes when I put an event on a task in a process definition. Example, I have a process : Application.java, when I put the onReceptionCompleted control (receive) in my process, the error appears!
    Thanks for your help,
    Regards,
    Mathieu

    It is a problem with the drap & drop in Workshop (from the taskControl to the Process). Workshop automatically inserts a wrong eventSet instead of the good one from the generated task control !
    See you,
    Mathieu

  • Project Server 2010 - Unable to open project, no valid Project Detail Page could be found for the project error

    I have a workflow being deployed for the first time on a farm. When I create a project with an EPT connected to the workflow it runs and can enter the required field in a PDP.  Then I Submit the workflow to go to the next stage and I get the "Unable
    to open project, no valid Project Detail Page could be found for the project" error.  After that the project is stuck on the same error.  All of the 18 stages have PDP and Schedules assigned to them.
    Any ideas on why the workflow cannot see the PDPs?  Is there a farm permissions that I am missing?  Thanks!

    Hi David,
    It starts to be a bit technical for me, but here is what I found on the web (seems to be an authentication issue with Sharepoint 2010):
    http://social.technet.microsoft.com/Forums/en-US/120ab535-63d2-4205-a51f-1987e9c0cf79/sharepoint-fba-the-content-type-texthtml-charsetutf8-of-the-response-message-does-not-match-the
    http://social.msdn.microsoft.com/Forums/silverlight/en-US/5cc70ff6-50d9-4cd3-b092-12007f4e495b/response-message-contenttypebindingtype-mismatch
    http://stackoverflow.com/questions/5263150/the-content-type-text-html-charset-utf-8-of-the-response-message-does-not-match
    Hope it will help you going forward in resolving your issue.
    Guillaume Rouyre - MBA, MCP, MCTS

  • Unable to update itunes. help. error message when trying to update to latest version of itunes. "the installer has encountered an unexpected error installing this package. this may indicate a problem with this package. error code 2721"

    unable to update itunes. help. error message when trying to update to latest version of itunes. "the installer has encountered an unexpected error installing this package. this may indicate a problem with this package. error code 2721"

    Hello chae84swangin,
    I recommend following the steps in the article below when getting an error message trying to install iTunes:
    Trouble installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/HT1926
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • HT201210 in my phone when i open it appers a mesage with this message : error in application occured .error code : DF XX2700/6F1D WHAT'S THAT?

    in my phone when i open it appers a mesage with this message : error in application occured .error code : DF XX2700/6F1D WHAT'S THAT?

    i googled it - try a different sim card - did you go through a demagnetizer or something?

  • There are too many PIN changes associated with this account (Error ID: 30801)

    how to solve this error on app world "There are too many PIN changes associated with this account (Error ID: 30801)" can anyone advice because I follow all the steps to solve it and no one answer me
    I call the customer care using the free number then I call my provider to redirect me to blackberry customer care and no one help me
    so is there any link can show me all the PIN which is assign to my account and manage them
    Please Advice

    Hi and Welcome to the Community!
    Here is a KB that discusses that error:
    KB25553 "There are too many PIN changes associated with this account (Error ID: 30801)" is encountered when attempting to login to BlackBerry App World
    As you see, the way to resolve it is clear, and you seem to have reached some folks in your attempts that were not able to resolve it. Nevertheless, you should not allow them to fob you off...insist that the KB instructs the resolution path and insist that they make good on that.
    aleyadma wrote:
    so is there any link can show me all the PIN which is assign to my account and manage them
    No.
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I need help with this code error "unreachable statement"

    the error_
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errors
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    public class Tools//tool class
    private int numberOfToolItems;
    private ToolItems[] toolArray = new ToolItems[10];
    public Tools()//array of tool
    numberOfToolItems = 0;
    for(int i = 0; i < toolArray.length; i++)//for loop to create the array tools
    toolArray[i] = new ToolItems();
    }//end for loop
    }//end of array of tools
    public int search(int id)//search mehtod
    int index = 0;
    while (index < numberOfToolItems)//while and if loop search
    if(toolArray[index].getID() == id)
    return index;
    else
    index ++;
    }//en while and if loop
    return -1;
    }//end search method
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0;
    int index;
    index = search(id); <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    }//end delete method
    public void display()//display method
    for(int i = 0; i < numberOfToolItems; i++)
    //toolArray.display(g,y,x);
    }//end display method
    public String getRecord(int i)//get record method
    // return toolArray[i].getName()+ "ID: "+toolArray[i].getID()
    }//end getrecod
    }//end class
    Edited by: ladsoftware on Oct 9, 2009 6:08 AM
    Edited by: ladsoftware on Oct 9, 2009 6:09 AM
    Edited by: ladsoftware on Oct 9, 2009 6:10 AM
    Edited by: ladsoftware on Oct 9, 2009 6:11 AM

    ladsoftware wrote:
    Subject: Re: I need help with this code error "unreachable statement"
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errorsThe compiler is telling you exactly what the problems are:
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0; // <<== HERE you return, so everyting in the if block after this is unreachable
    int index;
    index = search(id);  //< -----------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    // <<== HERE where is the return statement?
    }//end delete method
    public String getRecord(int i)//get record method
    // return toolArray.getName()+ "ID: "+toolArray[i].getID() <<== HERE you commented out the return statement
    }//end getrecod
    }//end class

  • Managed c++ class - The type or namespace name could not be found

    Hello,
    I have a managed c++ class library project with the following attribute:
        <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    That library is used from a C# project. If I change the C# framework to 4 they both compile fine.
    If I set the C# framework to 3.5 the managed C++ class is not recognized and the C# project compilation fails with the following error :
    Error XXX The type or namespace name 'XXX' could not be found (are you missing a using directive or an assembly reference?) C:\XXX.cs 19 7 XXX
    Any idea about weird behavior? shouldn't it just work?
    The C# project is using basic stuff, the same for the C++ project.
    Cheers,
    Javier Andres Caceres Alvis

    Hello there,
    After searching for a while I found this: "Everything is ok when I use for example .net 4.5 in c# and c++, but c# must be using 3.5 version. I read that I need to build c++ library in older visual studio (i tried 2005 and 2008)" here:
    http://stackoverflow.com/questions/24364687/how-to-import-a-managed-c-library-to-c-sharp-app-target-net-version-3-5
    I think that part of that statement is true because when I inspect the added reference (i.e.: the managed C++ project reference -also known as wrapper- from the C# class library) I see in the property tab that the runtime property value is v4.0.30319
    -this is very weird, because the managed c++ project is set to compile with v3.5 and the same with the C# project but it seems that if VS2008 or VS2010 is not present then is compiled with the default version.
    Thanks,
    Javier Andres Caceres Alvis

  • No persistent store with the logical name could be found on the server

    Weblogic 10.3.6 standalone server (no cluster).
    I want to move ejb timers persistence from the default store to DB.
    I created a new data source, non-XA, global transactions not supported, targeted to my managed server. Tested configuratiion against DB: OK.
    I created a JDBC persistent store (type JDBCStore), attached it to data source, targeted to my managed server, committed changes OK.
    In my application, TimedObject is implemented by a Stateless Session bean.
    I modified the weblogic-ejb-jar.xml descriptor for my SLSB specifying the persistence store name:
    <stateless-session-descriptor>
                <timer-descriptor>
                    <persistent-store-logical-name>MyStore</persistent-store-logical-name>
                </timer-descriptor>
    When I deploy my application, I get the following error
    [EJB:011112]Error initializing the EJB Timer store for the EJB '...' The weblogic-ejb-jar.xml deployment descriptor or annotation for this EJB contains a persistent-store-logical-name setting but no persistent store with the logical name 'MyStore' could be found on the server 'yyyy'.
    Why ?

    Hi JB,
    The OTM schema has been created on an external database and not on the embedded XE database. Using 'Oracle Application Testing Database Configuration' we were able to successfully configure the said DB. We are able to use OTM through the 'Oracle Test Manager - Win32 Client' also. We are being held up by the above error when we attempt to deploy and use the server based OTM application.
    Do we need to configure the above Schema under the Weblogic console also?
    Regards,
    Aniket.

  • "No tag library could be found with this URI" error while compiling jsp

    I am using WebLogic Server 9.2 MP1, JDK 1.5.0_09, Struts 1.3.5
              I am pre-compiling jsp pages with wlappc ant task. However, I got following errors when a jsp page contains ant taglib:
              No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
              The jsp page looks like:
              <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
              wlappc complains taglib could not be retrieved from this uri. Actually, since Struts 1.3.5, those ".tld" files are contained in strust-taglib-1.3.5.jar, folder META-INF/tld/. And I don't need to set anything in web.xml <tag-lib> tab anymore.
              All the jsp pages can be successfully compiled while being deployed to Server. So what am I missing? My build.xml file looks like:
                   <target name="compile-jsp">
                        <wlappc source="${src.dir}" output="${out.dir}"
                             keepgenerated="true" optimize="true" classpathref="wl_classpath"/>
                   </target>
              where "wl_classpath" contains all the struts related jar files, e.g. struts-core-1.3.5.jar, struts-taglib-1.3.5.jar, ...., and weblogic related jars, e.g. weblogic.jar.....
              I checked "beehive" samples coming with weblogic92, and found it pretty much did the same thing regarding build script and jsp files. So I am totally lost!
              Please help me out. Many thanks.
              Edited by jqian at 02/02/2007 10:24 AM

    Yes sorry, you're correct. The uri I mentioned is just 1.0.
    Do you have the "Oracle WebLogic Web App Extension" Facet for your web project? If not, try adding that and making sure that there is a weblogic.xml file created in the WEB-INF dir. The weblogic.xml file allows you to deploy usig a shared lib for JSTL. It should contain a library-ref element something like the following, with a version of 1.1.
    <wls:library-ref>
    <wls:library-name>jstl</wls:library-name>
    <wls:specification-version>1.1</wls:specification-version>
    <wls:exact-match>true</wls:exact-match>
    </wls:library-ref>

  • WebDav using https fails with network name cannot be found.

    When I attempt to connect to a Webdav server from a Windows 8.1 box it fails with
    System Error 67 has occurred.
    The network name cannot be found.
    I am using the net.exe USE command with the following syntax:
    net.exe use Z: https://dav.DomainYaya.com/  <PASSWORD> /user:USERNAME
    This exact syntax works for Windows 7.
    I have more than one Windows 8.1 box where this fails.
    There are various suggestions found all over the internet for various other situations. They do not apply or do not work.
    For example, you will find an issue involving sending Basic authentication over http where there are suggestions about changing HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WebClient\Parameters
    That does not work. There is also discussion about the Webclient service. (it is running). One can find discussion of the redirector. (The SYS file is present and is installed with Windows 8+ anyway.)
    Using HTTP only fails similarly but with error 53 (but I only did that as a test.) The issue is the HTTPS version.
    I have BTW tried this with two different webdav servers.
    Any help is appreciated.
    Joe

    Hi Joe,
    Based on our research, the error 67 have the following several possable causes:
    •IIS is not installed or is not running on the server that you are attempting to connect to.
    •You have not installed the WebDAV Redirector on your client system.
    •The WebClient service is not running on your client system.
    •You have not enabled WebDAV on your web site.
    •You are using Basic Authentication and connecting to your web site using HTTP instead of HTTPS.
    •You are connecting to a web site on your local network that is using Fully-Qualified Domain Names (FQDNs) for name resolution, your web site uses Windows Authentication, and you have not added the web site's FQDN to the proxy server bypass list on your client.
    For more information, please refer to the article as below:
    Using the WebDAV Redirector
    http://www.iis.net/learn/publish/using-webdav/using-the-webdav-redirector  
    According to the test, I am able to reproduce this issue in my lab. By default, the Webclient service is not running on windows 8.1 client. But for windows 7 client this service is running by default.
    So please try to start the WebClient service on windows 8.1 client to check if it helps.
    If you have any question, please don't hesitate to let us know.
    Karen Hu
    TechNet Community Support

  • Can anyone help me with this 1120 error? So frustrated...

    I have those two objects homeS and galleryS and two corresponding functions to change the size of their layer masks. The structure of the two are
    exactly the same except for their names and positions. However, only one of them functions.
    The instance's name is the same in the code and there is only one key frame in the layer where movieClip "galleryMsk" is.
    But Flash always through this 1120 error saying "undefined property galleryMsk"...
    I don't know why it happens since part I is functioning perfectly.
    The only thing is that object "homeMsk" and object"galleryMsk" are in the same layer mask, does that cause the trouble?
    I am so frustrated and I cannot focus on anything else in the whole day...couldn't even sit down and watch tv happily...
    Here are the two parts of the code. Part I is working Part II is not...
    homeS.addEventListener(MouseEvent.MOUSE_OVER,f_homeDisplay);
    function f_homeDisplay(event:MouseEvent):void
              homeBtn.gotoAndPlay("home_pass");
              changeContent(homeMsk,-62.8,0);
              changeContent(homeS, -62.8,0);
              homeS.removeEventListener(MouseEvent.MOUSE_OVER,f_homeDisplay);
         }  //Part I
    galleryS.addEventListener(MouseEvent.MOUSE_OVER,f_galleryDisplay);
    function f_galleryDisplay(event:MouseEvent):void
              galleryBtn.gotoAndPlay("gallery_pass");
              changeContent(galleryMsk,-56.55,160);
              changeContent(galleryS, -56.55,160);
              galleryS.removeEventListener(MouseEvent.MOUSE_OVER,f_galleryDisplay);
         } //Part II

    never mind the paragraph at the bottom of this reply, I just got it. I found the instance galleryMsk,
    I can't upload the image now because of some strange reason,
    but it is basically a symbol with a red dot under and it says "mask3, <galleryMsk>", like this:
    Scene1
    - Symbol Definition(s)
          - buttons
              - mask3, <galleryMsk>
    It only showed the objects which are in my major scene, but all those layers are actually inside a movie clip called "buttons", I see "buttons" in the movie explorer, but I don't know how to search for the content inside...

  • JMF Datasource problem..i need help with this one error

    This the error i get when i try to run my program
    Error: Unable to realize com.sun.media.amovie.AMController@18b81e3Basically i have a mediapanel class that initialize and play the media as datasource
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.io.*;
    import java.net.URL;
    import javax.media.*;
    import javax.swing.JPanel;
    import java.nio.ByteBuffer;
    public class MediaPanel extends JPanel
       InputStream stream;
       String name = "";
       ByteBuffer inputBuffer;
       byte[] store = null;
       public MediaPanel( InputStream in )
       try{
          this.stream = in;
          //store stream as ByteBuffer
          store = new byte[stream.available()];
          stream.read(store);
          inputBuffer.allocate(store.length);
          inputBuffer.wrap(store);
          //get contentType
          DrmDecryption drm = new DrmDecryption();
          name = drm.naming;
          setLayout( new BorderLayout() ); // use a BorderLayout
          ByteBufferDataSource ds = new ByteBufferDataSource(inputBuffer,name);
          // Use lightweight components for Swing compatibility
          Manager.setHint( Manager.LIGHTWEIGHT_RENDERER, true );
             // create a player to play the media specified in the URL
             Player mediaPlayer = Manager.createRealizedPlayer(ds);
             // get the components for the video and the playback controls
             Component video = mediaPlayer.getVisualComponent();
             Component controls = mediaPlayer.getControlPanelComponent();
             if ( video != null )
                add( video, BorderLayout.CENTER ); // add video component
             if ( controls != null )
                add( controls, BorderLayout.SOUTH ); // add controls
             mediaPlayer.start(); // start playing the media clip
           }catch(Exception e){}
       } // end MediaPanel constructor
    } // end class MediaPanelThe ByteBufferDataSource class is use to create the datasource for the player
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.PullDataSource;
    import java.nio.ByteBuffer;
    import java.io.IOException;
    import javax.media.MediaLocator;
    import javax.media.Duration;
    import javax.media.Time;
    public class ByteBufferDataSource extends PullDataSource {
    protected ContentDescriptor contentType;
    protected SeekableStream[] sources;
    protected boolean connected;
    protected ByteBuffer anInput;
    protected ByteBufferDataSource(){
    * Construct a ByteBufferDataSource from a ByteBuffer.
    * @param source The ByteBuffer that is used to create the
    * the DataSource.
    public ByteBufferDataSource(ByteBuffer input, String contentType) throws IOException {
    anInput = input;
    this.contentType = new ContentDescriptor(
                   ContentDescriptor.mimeTypeToPackageName(contentTyp  e));
    * Open a connection to the source described by
    * the ByteBuffer/CODE>.
    * The connect method initiates communication with the source.
    * @exception IOException Thrown if there are IO problems
    * when connect is called.
    public void connect() {
    sources = new SeekableStream [1];
    sources[0] = new SeekableStream(anInput);
    * Close the connection to the source described by the locator.
    * The disconnect method frees resources used to maintain a
    * connection to the source.
    * If no resources are in use, disconnect is ignored.
    * If stop hasn't already been called,
    * calling disconnect implies a stop.
    public void disconnect() {
    * Get a string that describes the content-type of the media
    * that the source is providing.
    * It is an error to call getContentType if the source is
    * not connected.
    * @return The name that describes the media content.
    public String getContentType() {
    return contentType.getContentType();
    public Object getControl(String str) {
    return null;
    public Object[] getControls() {
    return new Object[0];
    public javax.media.Time getDuration() {
    return Duration.DURATION_UNKNOWN;
    * Get the collection of streams that this source
    * manages. The collection of streams is entirely
    * content dependent. The MIME type of this
    * DataSource provides the only indication of
    * what streams can be available on this connection.
    * @return The collection of streams for this source.
    public javax.media.protocol.PullSourceStream[] getStreams() {
    return sources;
    * Initiate data-transfer. The start method must be
    * called before data is available.
    *(You must call connect before calling start.)
    * @exception IOException Thrown if there are IO problems with the source
    * when start is called.
    public void start() throws IOException {
    * Stop the data-transfer.
    * If the source has not been connected and started,
    * stop does nothing.
    public void stop() throws IOException {
    }i have a SeekableStream to manipulate the control of the streaming position.
    import java.lang.reflect.Method;
    import java.lang.reflect.Constructor;
    import java.io.IOException;
    import java.nio.ByteBuffer;
    import java.nio.BufferUnderflowException;
    import javax.media.protocol.PullSourceStream;
    import javax.media.protocol.Seekable;
    import javax.media.protocol.ContentDescriptor;
    public class SeekableStream implements PullSourceStream, Seekable {
    protected ByteBuffer inputBuffer;
    * a flag to indicate EOF reached
    /** Creates a new instance of SeekableStream */
    public SeekableStream(ByteBuffer byteBuffer) {
    inputBuffer = byteBuffer;
    this.seek((long)(0)); // set the ByteBuffer to to beginning
    * Find out if the end of the stream has been reached.
    * @return Returns true if there is no more data.
    public boolean endOfStream() {
    return (! inputBuffer.hasRemaining());
    * Get the current content type for this stream.
    * @return The current ContentDescriptor for this stream.
    public ContentDescriptor getContentDescriptor() {
    return null;
    * Get the size, in bytes, of the content on this stream.
    * @return The content length in bytes.
    public long getContentLength() {
    return inputBuffer.capacity();
    * Obtain the object that implements the specified
    * Class or Interface
    * The full class or interface name must be used.
    * The control is not supported.
    * null is returned.
    * @return null.
    public Object getControl(String controlType) {
    return null;
    * Obtain the collection of objects that
    * control the object that implements this interface.
    * No controls are supported.
    * A zero length array is returned.
    * @return A zero length array
    public Object[] getControls() {
    Object[] objects = new Object[0];
    return objects;
    * Find out if this media object can position anywhere in the
    * stream. If the stream is not random access, it can only be repositioned
    * to the beginning.
    * @return Returns true if the stream is random access, false if the stream can only
    * be reset to the beginning.
    public boolean isRandomAccess() {
    return true;
    * Block and read data from the stream.
    * Reads up to length bytes from the input stream into
    * an array of bytes.
    * If the first argument is null, up to
    * length bytes are read and discarded.
    * Returns -1 when the end
    * of the media is reached.
    * This method only returns 0 if it was called with
    * a length of 0.
    * @param buffer The buffer to read bytes into.
    * @param offset The offset into the buffer at which to begin writing data.
    * @param length The number of bytes to read.
    * @return The number of bytes read, -1 indicating
    * the end of stream, or 0 indicating read
    * was called with length 0.
    * @throws IOException Thrown if an error occurs while reading.
    public int read(byte[] buffer, int offset, int length) throws IOException {
    // return n (number of bytes read), -1 (eof), 0 (asked for zero bytes)
    if ( length == 0 )
    return 0;
    try {
    inputBuffer.get(buffer,offset,length);
    return length;
    catch ( BufferUnderflowException E ) {
    return -1;
    public void close() {
    * Seek to the specified point in the stream.
    * @param where The position to seek to.
    * @return The new stream position.
    public long seek(long where) {
    try {
    inputBuffer.position((int)(where));
    return where;
    catch (IllegalArgumentException E) {
    return this.tell(); // staying at the current position
    * Obtain the current point in the stream.
    public long tell() {
    return inputBuffer.position();
    * Find out if data is available now.
    * Returns true if a call to read would block
    * for data.
    * @return Returns true if read would block; otherwise
    * returns false.
    public boolean willReadBlock() {
    return (inputBuffer.remaining() == 0);
    }

    can u send me ur DrmDecryption.java file so that i can help

Maybe you are looking for