Making class available to bootstrap loader?  interesting twist.......

We're deploying our jar wrapped in an exe (created by exe4j). It's not an option to unwrap the jar, but I want to make a particular class available to the bootstrap loader. If you're not familiar with exe4j, you can pass arguments to the jvm, so I can pass an -Xbootclasspath argument, but I have no idea how that works when the class is in a package in a jar in an exe. I've tried to pass arguments like -Xbootclasspath/a:com.organization.project.package.MyClass and of course it didn't work. Note that what I'm doing is security policy related, and I'd really prefer not to have this class outside of the wrapped jar.
Is what I want to do actually possible? If so, what am I doing wrong?

Erm, sorry for being unclear :s
I'm doing my best to explain myself, please excuse me for not being a native english speaker ;)
About showing more code, I wouldn't know which part to show : several classes are involved already, each of them weighing a couple hundred lines. That's why I prefer explaining rather than dropping unrevealing code snippets. :-x
If from this description you know what piece of code interests you, I'll post it asap. Until then, here goes a shorter explanation of the situation.
My custom ClassLoader loads .class entries from jar files using the java.util.jar package. I define those classes using defineClass(String name, byte[] b, int off, int len). At the same time entries from the jar file get processed, I list the classes which could or couldn't be loaded. The second list being empty once the jar is processed proved me the classes are well-loaded.
Then I seek through the list of loaded ones for classes implementing AIPlayer, Player or other interfaces. My problem is that the classes implementing AIPlayer (c in my previous example) can't get assigned to AIPlayer though they can get assigned to Player, Player being a super-interface of AIPlayer.
Additionnal information are : Player and AIPlayer are loaded by the bootstrap ClassLoader, the bootstrap ClassLoader being the parent of my custom ClassLoader's instance at some degree (it is either the parent or the parent of the parent).
My question is : why can not a class implementing AIPlayer (and thus, Player) be assigned to AIPlayer, though it can be assigned to Player ?
I hope I was clearer here. Thanks for lending me your time.

Similar Messages

  • JMS: how to make child class loader (classes) available to parent loader

    Hi,
    Environment: oc4j 10.1.3.1 on SunOS 5.10
    Our application (set up in an instance other than "home") sets up a JMS receiver, everything works fine to the point where the receiver receives the message but the message deserialization fails with the below error. Looks like the deserializer (loaded by the parent classloader sytem.root) is not able to load the class from its child code-source (one of my application libraries in WEB-INF/lib) I have seen a lot of documentation on how libraries can be shared between applications, but I haven't come across any that is related to my problem here. I have even tried adding the library in question to bootclasspath that did not help either.
    How to get around this problem.
    Thanks in advance.
    Caused by: java.io.InvalidClassException: toSerializable
    at com.evermind.server.jms.JMSUtils.toSerializable(JMSUtils.java:1374)
    at com.evermind.server.jms.JMSUtils.toSerializable(JMSUtils.java:1395)
    at com.evermind.server.jms.EvermindObjectMessage.getObject(EvermindObjectMessage.java:114)
    ... 4 more
    Caused by: oracle.classloader.util.AnnotatedClassNotFoundException:
    Missing class: com.deploy.atao.message.client.Message
    Dependent class: com.evermind.io.ClassLoaderObjectInputStream
    Loader: oc4j:10.1.3
    Code-Source: /export/home/oracle10as/product/10.1.3.1/OracleAS_3/j2ee/home/lib/oc4j-internal.jar
    Configuration: <code-source> in META-INF/boot.xml in /export/home/oracle10as/product/10.1.3.1/OracleAS_3/j2ee/
    home/oc4j.jar
    This load was initiated at system.root:0.0.0 using the Class.forName() method.
    The missing class is available from the following locations:
    ......( WEB-INF/lib/ directory in /export/home/oracle10as/product/10.1.3.1/OracleAS_3/j2ee/CI11TRY2/ap
    plications/dev/ci/WEB-INF/lib)
    This code-source is available in loader dev.web.ci:0.0.0. This is a child of the dependent loader system.root:0.0.0.
    at oracle.classloader.PolicyClassLoader.handleClassNotFound(PolicyClassLoader.java:2078)
    at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1679)
    at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635)
    at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1620)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at com.evermind.server.ApplicationContextClassLoader.findClass(ApplicationContextClassLoader.java:23)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at com.evermind.io.ClassLoaderObjectInputStream.resolveClass(ClassLoaderObjectInputStream.java:33)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    at com.evermind.server.jms.JMSUtils.toSerializable(JMSUtils.java:1364)
    ... 6 more

    Resolved by adding the application library in question to config/application.xml as <library path="<relative path to the library>"/> so the library has instance scope is accessible by the sytem.root loader.

  • ABAP Class to start Infopackage load

    I want to write a little interface that allows a non-tech user to provide a desktop file (.csv) allow a selection of filetype (sales, repair, historical, demand) and a button to start the load process.
    The file is then transfered to the BW system and afterwards uploaded using an appropriate Infopackage depending on the filetype.
    Are there ABAP classes available that have methods to e.g. start the load of an InfoPackage?
    Regards,
    Eric

    Hi Eric,
    if you want to start or even create or change Infopackages by ABAP, you
    could also use BAPIs. These are provided in BAPI Ecplorer (TC BAPI)
    -SAP Business Information Warehouse
    --Warehouse Management
    ---InfoPackage
    Here you should find required methods
    Regards
    Joe

  • Which JAR file has the class weblogic.xml.domimpl.Loader ?

    when an Axis web-service WSDL is read and parsed using weblogic client - i get this error. which weblogic-10 jar file has this class "weblogic/xml/domimpl/Loader" ?
    java.lang.NoClassDefFoundError: weblogic/xml/domimpl/Loader
    at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:168)
    at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:58)
    at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:311)
    at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:402)
    at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:388)
    at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:78)
    at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:65)
    at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:468)
    at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:114)
    at com.qwest.assia.service.client.Provisioning_Info_Impl.<init>(Unknown Source)
    at com.qwest.assia.service.client.Provisioning_Info_Impl.<init>(Unknown Source)
    at com.qwest.iom.connector.adapter.webservice.qcontrol.AssiaWebServiceConnectionFactory.getWebServiceConnection(AssiaWebServiceConnectionFactory.java:64)
    at com.qwest.mdw.connector.webservice.WebServiceConnectionFactory.getConnection(WebServiceConnectionFactory.java:25)
    at com.qwest.iom.connector.adapter.webservice.qcontrol.AssiaWebServiceTestCase.test_MyAccountWebService(AssiaWebServiceTestCase.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)

    Hi,
    I found it in ADF 11g R2 documentation - http://docs.oracle.com/cd/E24382_01/web.1112/e16182/taskflows_regions.htm#insertedID10
    I guess this is 11g R2 feature.
    I have a requirement to display the multiple regions dynamically. This feature suits my requirement perfectly, but unfortunately it is not available in 11g R1.
    Can we achieve the similar functionality in 11g R1 through other means?
    Thanks
    Ravi

  • Why is iMessage taking my incoming emails and then not making them available for my PC to get?  Why can I not send a text msg with photos when iMessage is turned off (but MMS is still on).

    Apple is great!
    Why is iMessage taking my incoming emails and then not making them available for my PC to get?  Why can I not send a text msg with photos when iMessage is turned off (but MMS is still on).
    I compose an iMessage with the destination as my email address and I attach 2 photos I want on my PC.  I send them several times from my iPhone 5C but they never arrive. I look at my ipad later and realize that it's iMessage app is getting ( and swallowing) these emails. I then turn the ipad off.  Still can't get the photos through because iphone is now getting them on it's iMessage.  I turn off the iMessage feature and try to send photos from text msging.  Phone tells me it can't send photos unless iMessage it turned on.  What happened to regular MMS text messaging?  I go and try to send photos as an email attachment and see that there is no option to attach from the stupid email program.  I look up online to learn about the brave new world of apple attachments and send them.
    Why is iMessage taking my incoming emails and then not making them available for my PC to get?
    The email program on my iphone is not configured to remove messages from the server.
    If iMessage is turned off I don't have the issue.
    Why can I not send a text msg with photos when iMessage is turned off (but MMS is still on).

    Did not work. I've selected iMessage to ON and left it. After a few hours I recieved a message "activation unsuccessful. Turn on iMessage to try again". This has been going on for the past 3 days.

  • I share a an apple id with my kids. We all use the same credit card for purchases.  Is it possible for only me to use the icloud online storage without making this available or visible to the kids?

    My kids and I all use the same credit card and password for app and music purchases.   I'm assuming we all use the same apple ID too. (not sure) We can share apps and music although we all have our own itunes libraries. Is it possible for only me to use the icloud online storage without making this available or visible to the kids or do we all have our own storage?

    I just checked and they have already sucked up all my online storage.  Ahhh techy teens!  I think I will just leave it at that and back my own stuff up on my computer. Less confusing
    Thanks for all the help!  I am definitely more educated now and I'm off to check that cc bill too.

  • Long Time For Internet Network Access After Sleep (Interesting Twist)

    I have a Macbook Pro and an Airport Extreme. Recently, I have noticed that when my Macbook Pro comes out of sleep mode, it takes a long time to connect to my network. Here is the interesting twist on the problems that I have seen reported on here: I immediately connect to the Airport Extreme. I know this because I see the signal strength indicator on the Pro (upper toolbar) showing that I am connected with strong signal strength. However, when I attempt to access the Internet I get page errors that show I am not connected to the Net. After about a minute or two, everything is fine.
    This started happening recently and other than whatever upgrades Apple has sent my way, I have not changed nor added anything to the system.
    Any thoughts?

    Given your connection will eventually come good you'll probably find that your problem lies with your DHCP server and your MBP's inability to quickly get a new address. Check the DHCP's server admin that it has a decently large enough address pool as having too small a pool can often cause these issues. I normally recommend having a pool around 50% more than the number of computers that it serves else a minimum of 5.

  • The MBean class could not be loaded by the default loader repositor

    Im trying to register a custom MBean to WebLogic 8.1 Sp5 Application Server but i get this error :
    The MBean class could not be loaded by the default loader repository .
    i have make a servelt that registers the Managed Bean i added the MBean jar file to the WAR file of the servelt and I added the Mbean jar file to the CLASSPATH in setEnv.cmd for the domain
    the code for the servlet is this :
    try
    Hashtable props = new Hashtable();
    props.put( Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory" );
    props.put( Context.PROVIDER_URL, "t3://naiden:7001" );
    props.put( Context.SECURITY_PRINCIPAL, "admin" );
    props.put( Context.SECURITY_CREDENTIALS, "secret:)" );
    InitialContext ctx = new InitialContext( props );
    mbeanServer = ( MBeanServer )
    ctx.lookup( "weblogic.management.server" );
    logger.debug( "domain name e " + mbeanServer.getDefaultDomain() );
    catch( NamingException ne )
    error=ne.getMessage();
    logger.debug( ne.getMessage() );
    try {
    ObjectName objName = new ObjectName("isy:Name=NaidenStandardMBean");
    mbeanServer.createMBean("samplembean.Standard", objName);
    catch( MalformedObjectNameException ex )
    }

    You should use jre 1.5 or 1.6 for migmon from 7.10. It looks like your jre is 1.4.

  • Is this class available CL_GUI_WDR_VIEWER? Urgent Solution Needed.

    Hi Experts,
    Please check the blog below.
    /people/david.fernandespietroniro/blog/2008/06/19/web-dynpro-running-web-dynpro-applications-over-sapgui
    In this blog he used CL_GUI_WDR_VIEWER to declare lr_viewer.
    But when i tried this blog, i'm not able to locate this class.
    I checked SE24. there is no class in this name.
    My question is : Is there any other class available like CL_GUI_WDR_VIEWER.(To do the same blog).
    Expecting Reply ASAP
    Thanks & Regards
    SM Nizamudeen

    Hello Nizamudeen,
    This class was released with the version 700 of SAP_BASIS component. I'm writing a new blog that shows how to call web dynpros in later versions, but for while take a look at the program RSDEMO_HTML_VIEWER.
    Regards.

  • Failed to load servlet Class: MyServletIgnoring: unable to load class:java.

    Hi,
    I am using WebLogic Server 10.0, i deployed my application in that.
    It is giving the below error:
    Failed to load servlet Class: MyServletIgnoring: unable to load class:java.lang.
    ClassNotFoundException: Class bytes found but defineClass()failed for: 'MyServle
    If it is the wrong place(forums category), please do ignore.
    Plz help me out..........

    Probably not the right forum. But you have the honour of being the first person to ask a specific WebLogic Server question here.
    The BEA dev-2-dev site still seems to be active. Try here hunting for a category here: http://forums.bea.com/index.jspa
    -steve-

  • Class could not be loaded or is not an entity class

    Hello,
    I am using Berkeley DB JE 3.3.75 in a web application. I have a class which extends a Persistent class.
    @Entity
    public class XMessageInMemoryAdapter extends XMessage implements Serializable {
    private static final long serialVersionUID = 1L;
    @SecondaryKey(relate=Relationship.MANY_TO_ONE)
    private int objectStatus;
    @Persistent
    public class XMessage extends YMessage implements Serializable {
    private static final long serialVersionUID = 1L;
    @SecondaryKey(relate=Relationship.MANY_TO_ONE)
    private String serviceVariant;
    @Persistent
    public abstract class YMessage implements Serializable {
    private static final long serialVersionUID = 42L;
    @PrimaryKey
    private String messageGroupId;
    But when I try to query the PrimaryKey, an IllegalArgumentException is thrown:
    java.lang.IllegalArgumentException: Class could not be loaded or is not an entity class: com.mycompany.common.model.XMessageInMemoryAdapter
    at com.sleepycat.persist.impl.Store.checkEntityClass(Store.java:1175)
    at com.sleepycat.persist.impl.Store.getPrimaryIndex(Store.java:313)
    at com.sleepycat.persist.EntityStore.getPrimaryIndex(EntityStore.java:257)
    at com.mycompany.common.memorydb.impl.StoreRefImpl.queryPrimaryIndex(StoreRefImpl.java:49)
    at com.mycompany.common.memorydb.dao.MessageDao.init(MessageDao.java:67)
    And here is the MessageDao ve StoreRefImpl ( I deleted irrelevant parts )
    public class MessageDao {
         protected void init() {
              primaryKey = this.store.queryPrimaryIndex(String.class, XMessageInMemoryAdapter.class);
    public class StoreRefImpl {
         public PK queryPrimaryIndex(Class<?> indexClass, Class<?> objectClass) {
              try {
                   PrimaryIndex index = this.store.getPrimaryIndex(indexClass, objectClass); // this is where the exception is thrown
                   return new PKImpl(index);
              } catch (DatabaseException e) {
                   throw new DBException(e);
    Everything working nice in my local machine but when we deploy the application on test server we keep getting this exception.
    Thank you for your help.

    Hi Yusuf,
    This sounds like a classpath problem on your test server. This exception will occur if the class cannot be loaded.
    Please make sure that the je-3.3.75.jar file and your app classes or jar are in the same classpath location, and that there are not multiple copies in different locations. For example, if you're deploying a servlet, be sure to place the JE jar and your app jar in the same lib directory.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Class file cannot be loaded.

    I wrote an applet code and tested it in appletviewer. It's fine. But the class file cannot be loaded into the browser. Please tell me how to fix it.
    I appreciate any help.

    Couple small errors. You have a close bracket instead of a close parens after "Hello" and most importantly, you are missing a few steps. Here is one solution.
    import javax.swing.JApplet;
    import java.awt.Graphics;
    public class Test extends JApplet{
         public void paint(Graphics g)
              g.drawString("Hello", 25, 25);
    I imported the swing and awt packages. This allowed the call to graphics. I also replaced the close bracket with a close parens.
    You almost had it. The HTML you supplied is correct.

  • Class.forname - Unable to load class if two jars with same package name

    class.forname - Unable to load class if two jars contains same package name exists in classpath.
    JVM is stopping search for class one it finds the package name in the jar file that is ahead in classpath,
    JVM is not continuing search in the remaining jar files.
    For this , I put the jar file that contained class ahead of of ther jar file containing same package name, then it worked.
    Is this a JVM bug ? (JDK 1.5)

    I reported as bug to sun. I got auto email, looks they have not assigned any Bug ID so far.

  • HT1351 I have been regularly receiving video tutorials from Addicted 2 Salsa and synching these to my iPod but recently I have been unable to do so. I overcame this problem in the past by making an ipod version or loading them on to iMovie and then sharin

    I have been regularly receiving video tutorials from Addicted 2 Salsa and synching these to my iPod but recently I have been unable to do so. I overcame this problem in the past by making an ipod version or loading them on to iMovie and then sharing them but this method no longer works. THere is no problem viewing them on my computer and everything else synchs okay to the iPod so what is going on and how can I overcome this problem?

    Double check to make sure podcasts are configured to sync to your device from under the iPod's Podcast configuration tab.
    To access the Podcasts tab for your iPod, plug your iPod in and click on it from under theDevices section in the left hand pane of iTunes.  This will bring you to the Summary tab. Along the top you should see a Podcasts tab, so go ahead and click on it.  Here you can configure how and what podcasts sync to your iPod.
    If you do make any changes to do this tab, make sure to hit the Apply button in the lower right hand corner to apply the update changes to your device.
    Otherwise, are you getting any error messages when you sync your iPod Classic with iTunes?
    B-rock

  • WARNING: Problem validating implementation class. Failed to load class:

    when i am running plsqlAssembler.jar file for wsa.jar with all other atributes , i am getting this warning WARNING: Problem validating implementation class. Failed to load class.
    Please if anybody knows about this reply me,
    thanks in advance.

    If you are using Ex in the implemetation class, make sure that you also include the same in the interface (or SEI).
    If the implementation looks something like:
    public void doSomething() throws Ex {
    System.out.println("Is there something to do, now ?");
    then the SEI should be:
    public void doSomething() throws Ex, RemoteException;
    If your have ommited Ex, then you will have the warning you are seing, and there wont be any artifact generated for Ex in the WSDL.
    Because the Ex exception was not mapped to any WSDL artifact, there is no way you will see the Ex exception generated on the client side (or proxy).
    I have been able to reproduce your error message, so you should be all good.
    WARNING: Problem validating implementation class. Exception declaration mismatch between Implementation: bugyyy.MyServiceImpl and Interface: bugyyy.MyWebService. Impl class Method: doSomething declares exceptions not declared by the interface (bugyyy.Ex)
    Hope this helps,
    Eric

Maybe you are looking for

  • Private network OK, guest network no IP

    Hi Community - Just installed our new AirPort Extreme, went very well.  The private network (using W2PA Personal) works great.  Devices can connect to the guest network (WPA2 Personal), but do not acquire an IP.  Router is a SonicWall TZ 215.  Any th

  • TS4147 Is there anyway possible to get contacts back that were not backed up on the iCloud?

    When I updated my phone I had to erase my phone completely. It did not bring back all my contacts, therefore I'm guessing I didn't have the backed up on iCloud. It might be stretch but is there anyway I can get my old contacts from before the restore

  • Infotype 0210 - W4 Withholding

    We have a situation, where were using the payroll period start date for changes on infotype 210 and noticed on the second pay period, that it actually retro to the first pay. For example our second payroll  date was Jan 22, 2010, period start date wa

  • This entry already exists in the following tables

    Hi Friends, While making inventory transfer, the following error is coming. Please let me know why..? [Inventory Transfer - Rows - Warehouse Code][line: 1] , 'This entry already exists in the following tables  '' (ILM1) (ODBC -2035)'  [Message 131-18

  • Tecra a4 update tool

    Hello all, Is there a tool that can scan my laptop and tell me what updates (hardware/software) beside Windows Update I might need?  Dell has a utility that does that for Dell laptops and it would be very helpful to know if one exists for Tecras and