JRE classloading issue
Hi,
I have an application where I use JAF(Java Activation Framework) source code for my purpose. My application works fine with jdk1.5. When I run my application with jdk1.6, it does not work properly.
The cause is JAF is included in JRE1.6 and my application refers to the JAF present in the JRE not the one in my application.
My question is by any means can I ignore the JAF present in JRE1.6 and use the one present with my application?
Any help is appriciated.
Champak
cutecolt wrote:
I need to deploy a java application in a unix box.Deploy?
Do you just mean "run" or "launch" - or do you mean deploy under an AppServer framework?
when i wanted to execute the same application in the unix box, I get NoClassDefFound for the library jars though i have set the classpath and the write permissions are there for the lib jar files.NoClassDefFound for the library jars?
Do you mean you get NoClassDefFound for the class containing "main()" or some other specific class?
You don't get NoClassDefFound for jars...
But i found the issue may be in the JRE conflict. I have 2 jre's available in the box. You can have several JREs installed. That does not cause conflicts.
When i type java -version, it is showing, 1.4.2_08 but my application was compatible with jdk 1.5 and infact 1.5.0 is also available in the machine.This just means that your 1.4.2 JRE is on your PATH and is the first place the shell found "java".
I tried to exectue the program by changing to the jdk 1.5.0 path like /app/instals/jdk1/5/bin/java -cp /lib/hibernate.jar abc. so i didn't get the unsupportedversionexception.You mean by launching java using the fully qualified name.
But none of the jars in the classpath wasn't loaded. Huh?
I think there is some classloading issue associated with JRE. Unlikely.
How i use the 1.5.0 jre? Same way as the 1.4.2 JRE.
Btw, there are some application running in the box so i may not be able to switch to 1.5 entirely.Not relevant.
Similar Messages
-
Best Practice for Resolving OAS 10g R3 Classloading Issues
What's the best practices for eliminating classloading issues for shared libraries that are loaded by default (apache.commons.logging, oracle.toplink, etc) in OAS 10g R3?
So far it looks like my options are to exclude the conflicting JARs in my deployed applications or manually remove the entries from the application.xml and system-application.xml files in the OC4J instance config directory.
I know that I can override the shared libraries loaded from the system-application.xml by using the <web-app-class-loader search-local-classes-first="true"/> element in my orion-web.xml but is that the best practice? Also note that this solution does not override the apache.commons.logging shared library loaded from the container's application.xml.
So what is the best practice?What's the best practices for eliminating classloading issues for shared libraries that are loaded by default (apache.commons.logging, oracle.toplink, etc) in OAS 10g R3?
So far it looks like my options are to exclude the conflicting JARs in my deployed applications or manually remove the entries from the application.xml and system-application.xml files in the OC4J instance config directory.
I know that I can override the shared libraries loaded from the system-application.xml by using the <web-app-class-loader search-local-classes-first="true"/> element in my orion-web.xml but is that the best practice? Also note that this solution does not override the apache.commons.logging shared library loaded from the container's application.xml.
So what is the best practice? -
Java.lang.ClassNotFoundException - classloader issue ?
Hi All
We tried to deploy our ADF ear file to 10.3.6 weblogic.
Our app uses 3rd party jars put in WEB-INF/lib in war which in turn is in our app ear file.
Our web.xml is configured
<listener>
<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
</listener>
When we deploy our ear app, we get this error:
Is this a classloader issue ? If it is, at what level of classloader this is failing ?
What file should we configure ?
Where should we put our third-party jars as we do not have control over the install weblogic servers owned by another team.
Any help is appreciated.
Sincerely
####<Sep 18, 2013 10:54:50 AM PDT> <Error> <Console> <host> <AdminServer> <[ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <085fcd85a0c1669b:64c5b0f5:141284171fa:-8000-00000000000001eb> <1379526890738> <BEA-240003> <Console encountered the following error weblogic.management.DeploymentException: [Deployer:149233]An unexpected error was encountered during the deployment process.
at weblogic.deploy.internal.targetserver.DeployHelper.handleException(DeployHelper.java:385)
at weblogic.deploy.internal.targetserver.DeployHelper.convertThrowableForTransfer(DeployHelper.java:511)
at weblogic.deploy.internal.targetserver.DeploymentManager.notifyCommitFailure(DeploymentManager.java:1442)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:457)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.lang.ClassNotFoundException: ch.qos.cal10n.MessageConveyorException
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:52)
at ch.qos.cal10n.MessageConveyor.lookup(MessageConveyor.java:115)
at ch.qos.cal10n.MessageConveyor.getMessage(MessageConveyor.java:77)
at org.jboss.weld.logging.WeldMessageConveyor.getMessage(WeldMessageConveyor.java:66)
at org.jboss.weld.exceptions.WeldExceptionKeyMessage.getAsString(WeldExceptionKeyMessage.java:67)
at org.jboss.weld.exceptions.WeldException.getMessage(WeldException.java:87)
at org.jboss.weld.exceptions.WeldException.getLocalizedMessage(WeldException.java:82)
at java.lang.Throwable.toString(Throwable.java:343)
at com.bea.logging.ThrowableWrapper.<init>(ThrowableWrapper.java:26)
at com.bea.logging.ThrowableWrapper.<init>(ThrowableWrapper.java:29)
at com.bea.logging.BaseLogRecord.setThrown(BaseLogRecord.java:172)
at com.bea.logging.BaseLogRecord.<init>(BaseLogRecord.java:100)
at weblogic.logging.WLLogRecord.<init>(WLLogRecord.java:63)
at weblogic.logging.JDKLoggerFactory.createBaseLogRecord(JDKLoggerFactory.java:85)
at com.bea.logging.LoggingService.log(LoggingService.java:234)
at weblogic.i18n.logging.Loggable.log(Loggable.java:158)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.complete(AbstractOperation.java:429)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:326)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)Please check if the clas ch.qos.cal10n.MessageConveyorException is available.
check permissions.
check if exist.
check if the directory is into JAVA_CLASSPATH. -
I place my WAR file for deployment in the domain/applications directory for automatic deployment when the Weblogic server starts. This usually works fine. But, for unkown reasons, I am now getting a ClassNotFoundException after I added some new JARS to the appliation's WEB-INF/lib directory. The Class that it complains about is in one of the new JARs, the package name is correct, and the JAR is getting deployed. When I deploy the application manually, I the problem goes away. Deploying manually means that I make the applicatoin directory myself under domain/applications and the unwar it into that directory.
I'm using Weblogic 8.1 SP3 on a Windows Server 2000.Hi
The problem with t3config and disableWeblogicClassPath (described below) also
seems to exist in WLS 5.1 - sp2.
Regards
Steffen Bering Jensen
Systems Architect * Nordija ApS * Denmark
[email protected] wrote:
I hope that it is fixed in post 4.5.0 versions.
[email protected] wrote:
Steffen
I ran into the same problem with 4.5.0 while using t3config
I would like to know the version you are working with.
Support, please tell me it can be fixed.
Madhu
"Steffen B. Jensen" wrote:
Hi
Due to some classloader issues we start up WebLogic with the following
system property:
-Dweblogic.system.disableWeblogicClassPath=true
and no weblogic.class.path property.
However, when trying to set this up for an NT service using wlconfig,
wlconfig seems to insist on a weblogic.class.path system property. When
that property exists (although empty) WebLogic will not boot.
It seems that you can't run weblogic as an NT service with
weblogic.system.disableWeblogicClassPath=true?
Regards
Steffen Bering Jensen
Systems Architect * Nordija ApS * Denmark -
CUSTOM CLASSLOADER ISSUES WITH APPLET
HELP WOULD BE MUCH APPRECIATED FROM ANYONE KNOWING ABOUT CLASSLOADER ISSUES
I have an applet that must be dynamically extensible at run time. I am using
the URLClassLoader to support dynamic class loading for the modules the
applet must contain on the specific page.
Each jar file contains:
* The class files, icons and other resources for the module
* a file called META-INF/ext.initializers
The initializers file contains a list of classes which implement my
ExtensionInitializer interface. I am using
ClassLoader.getResources("META-INF/ext.initializers") to obtain these lists.
This works fine.
Each class implementing ExtensionInitializer is responsible for attaching
various objects to the main applet i.e extra GUI items, information
processors etc...
The problem I am getting is that although the class loader will load
resources ok, it WILL NOT LOAD the damn classes!!!
Here's the snippet of code where it runs into trouble:
while (it.hasNext())
String name = (String)it.next();
Class c = classLoader.loadClass(name);
ExtensionInitializer initializer =
(ExtensionInitializer)c.newInstance();
initializer.preInitialize(session);
System.out.println("Pre Initialized: " + initializer);
// Remember we initialized this so we can call postInitialize
later
initializers.add(initializer);
The output proving that the URLs were infact added and the ext.initializers
list was processed (containing the class name
com.katalyzt.toolbox.ext.cm.gui.CaseInitializer):
Extension URLs
file:/C:/java/Katalyzt/lib/ext/Case.jar
file:/C:/java/Katalyzt/lib/ext/WorkArea.jar
Found initializer:
jar:file:/C:/java/Katalyzt/lib/ext/Case.jar!/META-INF/ext.initializers
java.lang.ClassNotFoundException:
com.katalyzt.toolbox.ext.cm.gui.CaseInitializer
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at
com.katalyzt.toolbox.gui.AppletExtensionLoader.loadExtensions(AppletExtensio
nLoader.java:97)
at
com.katalyzt.toolbox.gui.ToolboxSessionPanel.preInitialize(ToolboxSessionPan
el.java:70)
at
com.katalyzt.toolbox.gui.ToolboxSessionApplet.init(ToolboxSessionApplet.java
:28)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:484)
java.lang.ClassNotFoundException:
com.katalyzt.toolbox.ext.cm.gui.CaseInitializer
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at
com.katalyzt.toolbox.gui.AppletExtensionLoader.loadExtensions(AppletExtensio
nLoader.java:97)
at
com.katalyzt.toolbox.gui.ToolboxSessionPanel.preInitialize(ToolboxSessionPan
el.java:70)
at
com.katalyzt.toolbox.gui.ToolboxSessionApplet.init(ToolboxSessionApplet.java
:28)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:484)
Found initializer:
jar:file:/C:/java/Katalyzt/lib/ext/Case.jar!/META-INF/ext.initializersIt is the standard secure java.net.URLClassLoader that I am using to load the classes. I create an instance of this with a URL[] specifying the urls of dynamic extension jars. Someone suggested that security restrictions may be to blame but it also occurs with the applet viewer with all class loading restrictions turned off. The resource files contained in the jars do become available. Someone suggested was signing the jars which I will check today.
-
Classloader issue when deploying a war file
Hello,
Using Jdev 11.1.1.3 with WebLogic 10.3.2.0 when we deploy a new version of our war file we get a ClassCastException for an entity class that cannot be cast on itself ! We are using standalone JPA for persistence.
Caused by: javax.faces.el.EvaluationException: java.lang.ClassCastException: gouv.micc.intimm.pers.model.entite.Personne cannot be cast to gouv.micc.intimm.pers.model.entite.Personne
It looks like a classloader cache issue. This happend even if we first delete the war file before we upload a new one. The only way to solve this is to restart WebLogic. Any idea?Seems like a WebLogic issue - try asking on that forum:
http://forums.oracle.com/forums/category.jspa?categoryID=193 -
AuditProvider classloading issues
Hi all,
We are implementing an AuditProvider for WLS that communicates via SOAP with a custom application that provides secure audit storage.
We have followed the following example to implement the base of the provider:
https://codesamples.projects.dev2dev.bea.com/servlets/Scarab?id=S189
After that, we used the clientgen Ant task to generate the SOAP access code, and packaged everything in an MJF file using MBeanMaker.
We copy the MJF to WL_HOME/server/lib/mbeantypes, configure the MBean using the admin console.
However, when restarting stuff, during our AuditProvider initialization we get:
javax.xml.rpc.ServiceException: weblogic client internal deployment descriptor com/kroopier/bea/sap/soap/BEAAuditLogService_internaldd.xml not found. Please make sure all clientgen generated files are in the classpath.
at weblogic.wsee.jaxrpc.ServiceImpl.loadWeblogicDD(ServiceImpl.java:397)
at weblogic.wsee.jaxrpc.ServiceImpl.loadInternalDD(ServiceImpl.java:346)
at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:110)
at com.kroopier.bea.sap.soap.BEAAuditLogService_Impl.<init>(BEAAuditLogService_Impl.java:21)
at com.kroopier.bea.sap.soap.BEAAuditLogService_Impl.<init>(BEAAuditLogService_Impl.java:17)
Truncated. see log file for complete stacktraceUpon further research, it seems that the SOAP code generated by clientGen uses Thread.currentThread().getContextClassLoader() to load the support files (some xml files it generates). We suspect that this class loader is not the class loader being used to load the mjf jar, so the mjf jar contents (which include the file that cannot be found) are not used.
Is there a simple way to solve this?
Kind regards,
AlexThank you.
As we are creating an AuditProvider for distribution, we'd rather have it be a single jar file that goes into mbeantypes than having to put our jar into system classpath (i.e. I'd think this would make our provider less desirable).
My current line of reasoning is as follows:
1. We are trying to invoke code from our AuditProvider that uses Thread.currentThread().getContextClassLoader() for reflection purposes
2. Thread.currentThread().getContextClassLoader() does not include the AuditProvider jar deployed in mbeantypes, but the one in this.getClass().getClassLoader() does (I suspect that the this.getClass().getClassLoader() is the one that the class uses for loading the classes it needs).
3. Why would someone use Thread.currentThread().getContextClassLoader() to load classes? Clearly, if you are loading the rest of the classes your class needs with this.getClass().getClassLoader(), use that one, as you don't know what your thread's context class loader is.
Therefore, our hacky solution is to do this:
ClassLoader threadClassLoader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
// bad code that uses the thread's context class loader
finally {
Thread.currentThread().setContextClassLoader(threadClassLoader);
}Long term, I'd like to advise people (esp. the guys who wrote weblogic.wsee.tools.anttasks.ClientGenTask and Hessian- which is the code that's given us trouble so far) to use the current class' classloader for reflection stuff instead of the thread's.
Of course, I have my doubts that this hack won't cause further trouble, so I'd appreciate further feedback on this issue.
Alex -
JAXB 2.1 w/JDK 6 Error. bootstrap classloader issue.
When I run one of my JUnit tests, I get this error:
JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/usr/local/netbeans-6.0/java1/modules/ext/jaxws21/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader.
So, I copy jaxb-api.jar into /usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/endorsed/jaxb-impl.jar
Then I get this error:
JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/endorsed/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API
OS: Ubuntu 7.10
JVM: Sun 1.6.0.03
IDE: NetBeans 6.0
How do I resolve?This seems to be the answer: https://jaxb.dev.java.net/guide/Migrating_JAXB_2_0_applications_to_JavaSE_6.html#Using_JAXB_2_1_with_JavaSE_6
Place the 2.1 jaxb-api.jar into $JRE_HOME/lib/endorsed. This essentially makes your JRE to "JRE 6 + JAXB 2.1". This won't affect any other applications that use this JRE, and it's easy. On the other hand, in various scenarios you may not be able to alter the JRE. -
Classloader issue with resource adapter and webservice
The following applications are planned to be deployed on the server.
1.My-shared-lib.ear (J2EE shared library).
2.My-Service-ear.ear (Service)
3.My-Resource-Adapter.rar
The My-shared-lib.ear contains a war which has 3rd Party jars.
The My-Service-ear.ear contains the service classes and refers to the My-shared-lib.ear using a library relationship. In our case, it refers to spring, Hibernate and related jars.
The My-Resource-Adapter.rar contains the Resources Adapters. In this case it contains the Spring jars.
Points on Setup
1.The configuration does not specify any jars in the classpath.
2.There are no 3rd party jars in the ext folder.
*2.Issue Description*
Issue while starting the Service EAR.*
The development setup has an application server that has My-shared-lib.ear and My-Service-ear.ear deployed. This works fine.
The proposed deployment architecture mandates that these applications be deployed on a server where the My-Resource-Adapter.rar is already running. We can deploy & start My-shared-lib.ear . However, when we try to deploy and start My-Service-ear.ear, it fails to start with the error. The detailed exception is found in Appendix A.
Error Message:
java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence
*3.Options tried*
1.Place all the required jars in the .rar.
We placed all the 3rd party jars required for the My-Service-ear.ear in the My-Resource-Adapter.rar file. When we deployed all the 3 applications, all applications including the My-Service-ear.ear were deployed and started as well.
2.Place all the required jars in the Service ear.
We placed all the 3rd party jars required for the My-Service-ear.ear in the My-Service-ear.ear file with the <prefer-web-inf-classes>true</prefer-web-inf-classes>. When we deployed all the 3 applications, all applications including the My-Service-ear.ear were deployed and started as well.
3.Altering deployment order.
The deployment order was altered with a higher preference being given to the My-Service-ear.ear. When we deployed all the 3 applications, the application My-Service-ear.ear was deployed but failed to start giving the same exception.
*4.Analysis*
1.The spring jar though available in the library ear is being loaded from the .rar application by the classloader.
2.The above point means that the library reference being provided in the My-Service-ear.ear does not seem to have any impact.
3.In the 3rd scenario we observed that when the spring is removed from the .rar, it gets loaded from the My-shared-lib.ear. However when it tries to load Hibernate related classes, it fails.
*5.Summary*
Our understanding is that all the applications run within their own Classloaders. If classes are not found within the applications, then they should be looking at the Application Server. But here we see that they are referring to the classes in ‘.rar’ file. Hence we are unable to understand this issue. The above problem has workarounds. However, these options are not allowed as per the requirement. The requirement is that the application should run independent of the’ .rar’. Is there a better approach? Are we missing any configuration?
Edited by: user8575867 on Oct 13, 2010 11:41 PMThis thread caught my attention - because since switching last week from a late '06 Macbook to the Macbook Pro 13", my Wifi performance at home has gotten slow and unreliable.
I'm using the Apple MiniDP-DVI adapter, connected to a 24" Dell monitor, which has worked great for a few years on my white Macbook. My base station is a Linksys WRTSL54GS, located about 20 feet away from my desk.
So, I tried some speed tests with and without the DVI. Performance with the adapter connected is terrible, disconnected it's perfect. Further testing shows that positioning matters.
When the adapter is turned back 90 degrees, leading the monitor cable towards the back of my desk, Wifi performance is bad. When I turn the adapter so it sticks straight out the left side of the Macbook Pro, performance is normal.
This is a little weird, but an acceptable workaround for me. -
Hello All, I hope this is the right place to ask...
I just reinstalled a HP desktop from scratch, put Windows XP on it, all windows updates, SP3 etc, and then started installing software starting with JRE 6u13. Right at the end of the install I received a windows prompt with the title:
Microsoft JScript compilation error
'Syntax Error'
It seems that as soon as javaw.exe launches the error comes up.
I can't seem to google up anything reasonable on this apart from one forum post a while back to do with Java network settings: A user mentioned that they were getting a "Microsoft JScript compilation error" and that it was solved by them altering the network settings from "Browser Settings" to "Direct Connection".
I have done this and rebooted, and it seems to have stopped the error, so I guess it was having trouble reading our proxy settings from Internet Explorer. This is the only PC I have with the issue so I am guessing it relates to the fact this is the only PC I have with Internet Explorer 8 on it, and it cannot retrieve the proxy settings.
Now it is only a work around using "Direct Connection", and I really need Java to be using our proxy settings from the browser.
Does anyone have a resolution for this issue / more insight as to the cause ? Or is this just a simple case of an incompatibility with Internet Explorer 8?
Thanks in advance for replys.i am having the promblem of Missing/No Java Section in Advanced tab of IE7 Browser and i am also running vista. my daughter is running XP and i asked her to go onto a site i can't get into on mine - she can't get onto it with hers either. i will check if her java is missing later. i just did a complete reinstall also and i have a bunch of software to install before i look at hers. it was working fine until about 6 days ago. i have tried and checked every setting and i can't figure it out so i did reinstal.
-
Dr Watson error (MSI.exe) comes up when installing JRE 1.4.2_11 on Windows NT 4 workstation. Can anyone help or provide a workaround with this issue? JRE version 1.5 does not support Windows NT 4.
Use an older version that does support it is the only alternative I know.
-
Downloadable "Embedded" JRE licensing issues
I have several applications that I want to make available for download. Rather than having to upload the JRE to my website 3 times (embedded in 3 seperate files), I would like to only upload it once.
I found the freeware installer NSIS. It seems to have the option to let you download a file from a website and then install it. I would like to have a copy of the JRE on my website and then have an NSIS installer that checks whether the JRE is installed and then downloads it if it isn't.
Since there's several applications, an user would be able to use all the applications and only download the JRE once.
This would be similar to an installer created by Install4J (http://www.ej-technologies.com/products/install4j/overview.html). What I'm worried about is licensing issues. This isn't really "embedding" the JRE, but it must be permissible because Install4J does it.
Is it permissible to remove files as the license allows for embedded JREs? Somehow I doubt that, but it would save me a little bit of bandwidth.
Is it permissible to use all the JRE's files just without the JRE's installer? (It would be placed within the application directory just like it was an embedded JRE.) There are 2 reasons I want to avoid using the JRE installer:
1) I want it to install "silently". I really hate it when someone downloads an application and thinks that JRE is the application just because the JRE installer pops up at the end of the application's installer.
2) I don't want people to be able to uninstall the JRE without uninstalling the application too.
Basically, I would be using the JRE just like an embedded JRE, but it would be downloaded as a seperate file by the installer. It could be that just having the JRE and the application stored as seperate files violates some aspect of the licensing agreement. Does it? It seems harmless to me, but I don't know what the official stance on this is.
Message was edited by:
cowgodYou must obtain everything directly from Dell to utilize your "downgrade" rights.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ” -
ClassNotFoundException in EJB's and Threads (Classloader issue)
A very interesting bug has cropped up in WebLogic 6.1. When a J2EE
application packaged appropriately, a client application running in a
user-created Thread will always throw a ClassNotFoundException when
attempting to get back a user-created object from an EJB living on
another cluster. This error does not happen when the call is being made
from outside a Thread.
Sounds strange, I know, so I'll try to give everyone as much detail as
possible so they can avoid this bug, and so that the folks at BEA can
fix it.
* A java class running inside a clustered WL6.1 server is attempting to
reference an EJB on another clustered WL 6.1 server. Accessing the bean
is not a problem, the client class is able to obtain a remote reference
to the bean and make method calls on it. Calling a method causes the
following stack trace:
2002-01-11 10:36:57,331 [Thread-4] ERROR
wpni.app.mywp.display.DisplayJobs$JobsMonitor -
wpni.app.mywp.display.DisplayJobs$JobsMonitor.run: Error checking Jobs
status.
java.rmi.UnmarshalException: failed to unmarshal class
wpni.app.jobs.JobsData; nested exception is:
java.lang.ClassNotFoundException: wpni.app.jobs.JobsData: This
error could indicate that a component was deployed on a cluster member
but not other members of that cluster. Make sure that any component
deployed on a server that is part of a cluster is also deployed on all
other members of that cluster
java.lang.ClassNotFoundException: wpni.app.jobs.JobsData: This error
could indicate that a component was deployed on a cluster member but
not other members of that cluster. Make sure that any component deployed
on a server that is part of a cluster is also deployed on all other
members of that cluster
at
weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:146)
at
weblogic.rjvm.MsgAbbrevInputStream.readClassDescriptor(MsgAbbrevInputStream.java:211)
at
weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readClassDescriptor(ChunkedObjectInputStream.java:290)
at
java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:906)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at
weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:107)
at
weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:115)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
at
weblogic.rmi.internal.BasicRemoteRef.unmarshalReturn(BasicRemoteRef.java:230)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:254)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy140.getJobsData(Unknown Source)
at
wpni.app.mywp.display.DisplayJobs$JobsMonitor.run(DisplayJobs.java:48)
at java.lang.Thread.run(Thread.java:484)
* The class that is not found (JobsData) is definitely in the EAR file
on both the client cluster and the server cluster, and in the
appropriate location.
* When we attempted to run the code outside of a Thread, everything
worked perfectly, so it was definitely the Thread that was causing the
problem.
* Deploying the EJB on the client cluster did not do anything to solve
the problem.
* Adding the JobsData to the System CLASSPATH at the startup of the
WebLogic server DID solve the problem. But of course that defeats the
purpose of packaging everything in the EAR file.
So, the conclusion seems to be that when DisplayJobs$JobsMonitor kicked
off the Thread, the Thread should have been created in either the WAR's
classloader or the JAR's classloader (wouldn't matter, since the
JobsData class is in the JAR's classloader, which is a parent of the
WAR's classloader). But instead, the Thread is being created in the
System classloader, which can't find the JobsData class!
We believe that any Thread created by a class living within an EAR's
classloader should remain within that same classloader, and not migrate
to any other classloader, in order to avoid situations like this. We're
opening a case with BEA to attempt to get this resolved. In the
meantime, we recommend to developers that if they have to make
cross-cluster RMI calls from inside user-created Threads, that they only
attempt to receive primitive types or standard JDK objects. Otherwise,
you'll have to add the classes to the System CLASSPATH at startup of the
WebLogic instance.
Thanks,
Erin
* "[White House spokeperson Ari] Fleischer
* warned Democrats this morning against
* investigations into the Bush administration's
* dealings with Enron. 'The American people
* are tired of partisan witch hunts and endless
* investigations,' he said." [Ed.: Uh... ]
* www.washingtonpost.com/wp-dyn/articles/A25159-2002Jan10.html
* Erin Reid Myers, Chief Architect
* WashingtonPost.Newsweek Interactive
* [email protected]
* Work: (703) 469-3154
* Cell: (703) 725-3050
[att1.html]Things can go seriously wrong if your application uses user threads (violating
EJB spec programming restrictions and BEA recommendations).
I'm curious, does it work if you enable network classloading on the server
which invokes remote EJB (in config.xml -
<Server NetworkClassLoadingEnabled="true" ...
</Server>
Erin Reid Myers <[email protected]> wrote:
A very interesting bug has cropped up in WebLogic 6.1. When a J2EE
application packaged appropriately, a client application running in a
user-created Thread will always throw a ClassNotFoundException when
attempting to get back a user-created object from an EJB living on
another cluster. This error does not happen when the call is being made
from outside a Thread.
Sounds strange, I know, so I'll try to give everyone as much detail as
possible so they can avoid this bug, and so that the folks at BEA can
fix it.
* A java class running inside a clustered WL6.1 server is attempting to
reference an EJB on another clustered WL 6.1 server. Accessing the bean
is not a problem, the client class is able to obtain a remote reference
to the bean and make method calls on it. Calling a method causes the
following stack trace:
2002-01-11 10:36:57,331 [Thread-4] ERROR
wpni.app.mywp.display.DisplayJobs$JobsMonitor -
wpni.app.mywp.display.DisplayJobs$JobsMonitor.run: Error checking Jobs
status.
java.rmi.UnmarshalException: failed to unmarshal class
wpni.app.jobs.JobsData; nested exception is:
java.lang.ClassNotFoundException: wpni.app.jobs.JobsData: This
error could indicate that a component was deployed on a cluster member
but not other members of that cluster. Make sure that any component
deployed on a server that is part of a cluster is also deployed on all
other members of that cluster
java.lang.ClassNotFoundException: wpni.app.jobs.JobsData: This error
could indicate that a component was deployed on a cluster member but
not other members of that cluster. Make sure that any component deployed
on a server that is part of a cluster is also deployed on all other
members of that cluster
at
weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:146)
at
weblogic.rjvm.MsgAbbrevInputStream.readClassDescriptor(MsgAbbrevInputStream.java:211)
at
weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readClassDescriptor(ChunkedObjectInputStream.java:290)
at
java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:906)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at
weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:107)
at
weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:115)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
at
weblogic.rmi.internal.BasicRemoteRef.unmarshalReturn(BasicRemoteRef.java:230)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:254)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy140.getJobsData(Unknown Source)
at
wpni.app.mywp.display.DisplayJobs$JobsMonitor.run(DisplayJobs.java:48)
at java.lang.Thread.run(Thread.java:484)
* The class that is not found (JobsData) is definitely in the EAR file
on both the client cluster and the server cluster, and in the
appropriate location.
* When we attempted to run the code outside of a Thread, everything
worked perfectly, so it was definitely the Thread that was causing the
problem.
* Deploying the EJB on the client cluster did not do anything to solve
the problem.
* Adding the JobsData to the System CLASSPATH at the startup of the
WebLogic server DID solve the problem. But of course that defeats the
purpose of packaging everything in the EAR file.
So, the conclusion seems to be that when DisplayJobs$JobsMonitor kicked
off the Thread, the Thread should have been created in either the WAR's
classloader or the JAR's classloader (wouldn't matter, since the
JobsData class is in the JAR's classloader, which is a parent of the
WAR's classloader). But instead, the Thread is being created in the
System classloader, which can't find the JobsData class!
We believe that any Thread created by a class living within an EAR's
classloader should remain within that same classloader, and not migrate
to any other classloader, in order to avoid situations like this. We're
opening a case with BEA to attempt to get this resolved. In the
meantime, we recommend to developers that if they have to make
cross-cluster RMI calls from inside user-created Threads, that they only
attempt to receive primitive types or standard JDK objects. Otherwise,
you'll have to add the classes to the System CLASSPATH at startup of the
WebLogic instance.
Thanks,
Erin
* "[White House spokeperson Ari] Fleischer
* warned Democrats this morning against
* investigations into the Bush administration's
* dealings with Enron. 'The American people
* are tired of partisan witch hunts and endless
* investigations,' he said." [Ed.: Uh... ]
* www.washingtonpost.com/wp-dyn/articles/A25159-2002Jan10.html
* Erin Reid Myers, Chief Architect
* WashingtonPost.Newsweek Interactive
* [email protected]
* Work: (703) 469-3154
* Cell: (703) 725-3050
Dimitri -
EJB Classloader issue (dmcl40 library.dll already loaded)
I have written a stateless session bean. The session bean calls a documentum connection pool. This connection pool are java classes that use a dll (dmcl40.dll).
The Project is wrapped into a DC (one for ejb, one for app libs)
The dll-directory is set in the PATH environmentvariable.
Also, I set the classpath to my jar files in application-j2ee-engine.xml (tab expert settings -> classpath).
My problem is the EJB classloading. Any time the createSession method in the EJB (documentum) tries to create a session pool, i get the dmcl40 library already loaded error.
1. Where do I have to set the path to the library in WebAS to fix this?
2. is there a setting in the VisualAdmin, where one can set the path. Where can i set the path for parent classloader?
I am greateful for any hints.
thanks markusHi Markus,
Can u please let me know how did u solve ur problem?..
I am facing same problem and not able to fix it. So ur answer may be greatful to fix my problem..
Thanks in Advance.
Waiting ur Reply.
Best Regards,
Sadik. -
Given 3 deployed ears within the same weblogic 8.1sp4 server instance we try to pass a result object from ear1 to ear3 via ear2 (ear2 is basically a "heavyweight" facade for ear1).
-Ear1 -> Ear2 --> Ear3
ear2 and ear3 only know the interface implemented by the result object, the object itself gets instantiated in ear1. While unmarshalling and remote classloading of the result object works flawlessly in ear2, passing it on to ear3 causes a ClassNotFound exception in ear3 since the implementing class cannot be found.
Where should the implementing class be loaded from in ear3 or is passing remotely loaded classes over various nodes impossible?
Thanks in advance
/cpAmethastos Lorekeeper <> writes:
Looks like a bug to me, although how we would fix it I'm not sure.
andy
Given 3 deployed ears within the same weblogic 8.1sp4 server instance we try to pass a result object from ear1 to ear3 via ear2 (ear2 is basically a "heavyweight" facade for ear1).
-Ear1 -> Ear2 --> Ear3
ear2 and ear3 only know the interface implemented by the result object, the object itself gets instantiated in ear1. While unmarshalling and remote classloading of the result object works flawlessly in ear2, passing it on to ear3 causes a ClassNotFound exception in ear3 since the implementing class cannot be found.
Where should the implementing class be loaded from in ear3 or is passing remotely loaded classes over various nodes impossible?
Thanks in advance
/cp
Maybe you are looking for
-
Error in account determination: table T030K key CNFX MWS
Hi, i have a issue when releasing the billing document .i have a issue like "Error in account determination: table T030K key CNFX MWS". Actually iam trying to map the scrap process. User requirement is , when upload the non valuated materi
-
Big fail: CC says my membership is expired, but it's gonna expire on August!
I've a subscription that will expire on August 17th. But my client says that my membership is expired. Why??? I need to work
-
Hello, I bought two NI cards very recently, the first one a PCI 6024E is perfeclty working but the other one a PCI 6528 does not work at all. I plugged this very last card in 3 differents PC but i see nothing on digital output from port 3 to port 5 f
-
How to upgrade from 10.6.8 to mountain lion
How do i inatall Mountain Lion on my macbook pro running system 10.6.8?
-
Hi Still learning PowerShell remoting. Can access with remoting 2 computers (XPProf/SP3, Workgroup) perfect. Powershell2.0 (running as Administrator). Using Firewall ZoneAlarm not Windows Firewall (stopped). But when using Get-WMIObject always run in