Application Client 2nd trial
We have some EJB's running in an OC4J, which are acessed by a Swing client.
Everything works fine so far.
Now we want to deploy this client as an APPLICATION-CLIENT to the OC4J and launch it on the client-machine in a CLIENT-CONTAINER.
The JDeveloper doc says:
"Oracle9iAS provides full support for J2EE Client applications....
To know, what the subject is have a look here:
http://java.sun.com/j2ee/j2ee-1_3-fr-spec.pdf Chapter 9
http://www.orionserver.com/docs/client-deployment.html
http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/06060007.html
How is this done for our product?
How is it supported by JDeveloper ?
How can i launch my client in an (Oracle) application-client-container against my EJB's hosted by an OC4J ?
I understand that this thread is quite old, but I'd like to ask if this has ever been answered adequately and, if so, what the answer was?
As I understand this, Mr. Miller is correct with everything he's said, however I see nothing more than passive mention of the Application Client Container in the Oracle documentation (and it is now May 2006).
So, is this finally an available feature of the Oracle OC4J container, or is it in the documentation but not actually in the server product?
If it does exist, I would really be interested in an example.
Tom Fuller
Similar Messages
-
Application Client to call JSP...
Hi all,
I am using Websphere to write EJB codes and JSP pages and print report based on data retrieved from database. Every morning, i need to manually print sales reports and copied it to a network folder. I found it very tedious. I planned to write an application client to automate the task at midnite. I managed to call the session bean using the client but how can I call the jsp page to print the report? Is it possible? Can I save the jsp page to network folder automatically? Thank you for your help.
Regards,
DreonHere is some simple code to read from a url
private String loadPage() throws Exception
StringWriter out;
URL url;
URLConnection conn;
BufferedReader reader;
String inputString;
out = new StringWriter();
if ( logLoads ) System.out.println("Running loadPage, for URL : " + url );
conn = _url.openConnection();
conn.connect();
if (DEBUG) System.out.println(" connected to server...");
_contentType = conn.getContentType();
if (DEBUG) System.out.println(" got Content Type : " + conn.getContentType() );
reader = new BufferedReader( new InputStreamReader( conn.getInputStream() ) );
if (DEBUG) System.out.println(" Ready to read data..." );
while (true) {
inputString = reader.readLine();
int index = inputString.toUpperCase().indexOf("<HTML>");
if ( index >= 0 ) {
if (DEBUG) System.out.println(" found <HTML> tag in line : '" + inputString + "'");
out.write( inputString.substring( index, inputString.length() ).trim() + "\n" );
break;
inputString = reader.readLine().trim();
while ( inputString != null ) {
if ( inputString.length() > 0 )
out.write( inputString + "\n" );
inputString = reader.readLine();
if (DEBUG) System.out.println(" finished.");
return out.toString();
} -
Combining single transaction between session bean & application client
Hi All,
The following transaction exception was encountered when trying to combine a EmployeeSessionBean.create(Employee) method in an application client:
Application Client output
SEVERE: null
javax.transaction.SystemException: org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
org.omg.CORBA.UNKNOWN: WARNING: IOP00010002: Unknown user exception thrown by the server - exception: org.eclipse.persistence.exceptions.DatabaseException; message:
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.
Error Code: 0
Call: INSERT INTO EmployeeDB.Project (ID, NAME) VALUES (?, ?)
bind => [2 parameters bound]
Query: InsertObjectQuery(domain.Project@19d2d53) vmcid: OMG minor code: 2 completed: Maybe
at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:117)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
----------END server-side stack trace---------- vmcid: OMG minor code: 2 completed: Maybe
at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:332)
at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.commitDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:184)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:873)
at com.sun.enterprise.transaction.UserTransactionImpl.commit(UserTransactionImpl.java:208)
at applicationClient(*applicationClient.java:229*)
GF 3.1 Server log
WARNING: A system exception occurred during an invocation on EJB EmployeeSessionBean method public void ejb.EmployeeSessionBean.create(Employee) javax.ejb.EJBException
Caused by: javax.persistence.TransactionRequiredException
at ejb.EmployeeSessionBean.create(*EmployeeSessionBean.java:27*)
SEVERE: RAR5027:Unexpected exception in resource pooling
java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.
WARNING: RAR7132: Unable to enlist the resource in transaction. Returned resource to pool. Pool name: [ mysqlPool ]
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ mysqlPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.]
WARNING: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.
Below is the code snippet of EmployeeSessionBean & client.applicationClient:
@Stateless
//@TransactionManagement(TransactionManagementType.BEAN)
public class EmployeeSessionBean implements EmployeeService {
@PersistenceContext(unitName="EmployeeDB-PU")
private EntityManager manager;
public void create(Employee employee) {
manager.persist(employee); // line 27
import javax.transaction.UserTransaction;
public class applicationClient {
@Resource UserTransaction tx;
@EJB private static EmployeeService bean;
try {
tx.begin();
Employee employee = new Employee()
bean.create(employee);
} finally {
try {
tx.commit(); // line 229
}How to relinguish transaction on EmployeeSessionBean so that all transaction could take place in applicationClient side only?
I am trying to apply examples in Pro JPA 2 to a Java EE 6 ManyToMany application.
Your assistance would be much appreciated.
Thanks,
JackHi r035198x,
Thank you for some solid advice and would rather JPA take care of all the special cases such as keeping the records unique.
Below are the changes made as suggested in ( 1 ), ( 2 ), ( 3 ):
@Entity
@IdClass(EmployeePK.class)
@Table(name="EMPLOYEE", catalog="EmployeeDB", schema="")
public class Employee implements Serializable {
@Id
@Column(name="FIRSTNAME")
private String firstName;
@Id
@Column(name="SURNAME")
private String surName;
@Id
@Column(name="DOB")
@Temporal(TemporalType.DATE)
private Date dob;
@ManyToMany(cascade={CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}, fetch=FetchType.EAGER)
@JoinTable(name="EMPLOYEE_PROJECT", catalog="EmployeeDB", schema="",
joinColumns={@JoinColumn(name="FIRSTNAME_ID", referencedColumnName="FIRSTNAME"),
@JoinColumn(name="SURNAME_ID", referencedColumnName="SURNAME"),
@JoinColumn(name="DOB", referencedColumnName="DOB")},
inverseJoinColumns={@JoinColumn(name="PROJECT_ID")})
private Set<Project> projects = new HashSet<Project>();
@Entity
@Table(name="PROJECT", catalog="EmployeeDB", schema="")
public class Project implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="ID")
private int id;
@ManyToMany(mappedBy="projects", cascade={CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}, fetch=FetchType.EAGER)
@JoinTable(name="EMPLOYEE_PROJECT", catalog="EmployeeDB", schema="",
joinColumns={@JoinColumn(name="PROJECT_ID", referencedColumnName="PROJECT_ID")},
inverseJoinColumns={@JoinColumn(name="FIRSTNAME_ID", referencedColumnName="FIRSTNAME"),
@JoinColumn(name="SURNAME_ID", referencedColumnName="SURNAME"),
@JoinColumn(name="DOB_ID", referencedColumnName="DOB")})
private Set<Employee> employees = new HashSet<Employee>();
@Stateless
public class EmployeeSessionBean implements EmployeeService {
@PersistenceContext(unitName="EmployeeDB-PU") private EntityManager manager;
public void create(Employee employee)
manager.persist(employee);
public class applicationClient {
@EJB
private static EmployeeService bean;
public static void main(String[] args) {
Employee employee = new Employee()
bean.create(employee); // line 209
} I have diverged slightly from using simple primary key (EMPLOYEE_ID) to composite key class (FIRSTNAME, SURNAME, DOB) to resemble the actual application.
Also gone back to using non - XADatasources since I am depending on JTA to do all the hardwork on the server side.
Unfortunately, we have hit a snag once again with the following exception still:
Application Client Output
java.lang.reflect.InvocationTargetException
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:597)
at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClientContainer.java:432)
at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade.java:182)
at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGroupFacade.java:65)
Caused by: javax.ejb.EJBException: java.rmi.MarshalException: CORBA MARSHAL 1330446347 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: ----------BEGIN server-side stack trace----------
org.omg.CORBA.MARSHAL: WARNING: IOP00810011: Exception from readValue on ValueHandler in CDRInputStream vmcid: OMG minor code: 11 completed: Maybe
Caused by: java.io.StreamCorruptedException: WARNING: ORBIO00013: Stream corrupted
----------END server-side stack trace---------- vmcid: OMG minor code: 11 completed: Maybe
at ejb._EmployeeService_Wrapper.create(ejb/_EmployeeService_Wrapper.java)
at applicationClient(applicationClient.java:209)
GF 3.1 Server log
WARNING: IOP00810011: Exception from readValue on ValueHandler in CDRInputStream
org.omg.CORBA.MARSHAL: WARNING: IOP00810011: Exception from readValue on ValueHandler in CDRInputStream vmcid: OMG minor code: 11 completed: Maybe
Caused by: java.lang.NullPointerException
WARNING: ORBIO00013: Stream corrupted
java.io.StreamCorruptedException: WARNING: ORBIO00013: Stream corrupted
Your valuable input would be very appreciated.
Thanks,
Jack -
EJB 3.0 Application Client threw Remote nested exception
Hi All,
I came across the following EJBException message when trying to retrieve an Employee record (entity bean in EJB 3.0) after having successfully added it into EMPLOYEE table using stateless session bean:
*10/03/2009 8:53:14 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>*
WARNING: ACC003: Application threw an exception.
javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: null; nested exception is:
java.lang.NullPointerException
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: null; nested exception is:
java.lang.NullPointerException
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
at ejb.__EmployeeRemote_Remote_DynamicStub.findEmployee(ejb/__EmployeeRemote_Remote_DynamicStub.java)
at ejb._EmployeeRemote_Wrapper.findEmployee(ejb/_EmployeeRemote_Wrapper.java)
at client.EmployeeApplicationClient.printEmployee(EmployeeApplicationClient.java:608)
at client.EmployeeApplicationClient.main(EmployeeApplicationClient.java:55)
Below is the code snippets of EmployeeApplicationClient.java:
public class EmployeeApplicationClient {
@EJB
private static EmployeeRemote employeebean1;
@EJB
private static EmployeeRemote employeebean2;
public EmployeeApplicationClient() {}
public static void main(String[] args)
EmployeeApplicationClient employee_application_client = new EmployeeApplicationClient();
employee_application_client.addEmployee(1, John, Smith);
employee_application_client.printEmployee(1);
public void addEmployee(int id, String firstname, String surname)
try {
Employee employee1 = new Employee();
employee1.setID(id);
employee1.setfirstname(firstname);
employee1.setsurname(surname);
employeebean1.createEmployee(employee1);
catch {.....}
public void printEmployee(int employee_id)
Employee employee2 = employeebean2.findEmployee(employee_id);
System.out.println("employee Id: " + employeebean2.getId());
System.out.println("employee firstname: " + employeebean2.getfirstname());
System.out.println("employee surname: " + employeebean2.getsurname());
}Using employeebean1/employeebean2 in printEmployee() did not make any difference.
The error message appears to indicate that I have incorrectly structured these methods.
The deployment of EmployeeBean was successful and employee1 is in EMPLOYEE table via SQL query.
I am using JDK1.6.07, Glassfish v2 with MySQL 5.0 and Netbeans 6.1 on Windows XP platform.
Any assistance would be greatly appreciated.
Thanks,
JackHi Ataraxisme,
Thank you for responding to this post.
This is a J2EE Application Client that was created and deployed along as an Netbeans EAR (both Application Client and EJB) project which uses resource injection as opposed to JNDI lookup.
I am trying to get employeeApplicationClient.java to work the same way as the following travelAgentApplicationClient.java example which has successfully retrieved its record record immediately after adding using resource injection:
public class TravelAgentClient {
@EJB
private static TravelAgentRemote travelagent;
public TravelAgentClient() {
public static void main(String[] args) {
TravelAgentClient client = new TravelAgentClient();
client.doTravelAgent();
public void doTravelAgent() {
try {
Cabin cabin_1 = new Cabin();
cabin_1.setId(1);
cabin_1.setName("Master Suite");
cabin_1.setDeckLevel(1);
cabin_1.setShipId(1);
cabin_1.setBedCount(3);
travelagent.createCabin(cabin_1);
Cabin cabin_2 = travelagent.findCabin(1);
System.out.println(cabin_2.getName());
System.out.println(cabin_2.getDeckLevel());
System.out.println(cabin_2.getShipId());
System.out.println(cabin_2.getBedCount());
......Thanks,
Jack -
How to run a pure java application client with ear deployed on 9ias
Hello all,
We want to run a pure java application client which is packed with target bean in the same ear file. In the application-client.xml we refer to some EJBs.
We deployed the ear file which contains ejb jar module and application client module to oracle 9ias 904 through enterprise manager on unix. The jndi.properties we used looks like this
java.naming.factory.initial=com.evermind.server.rmi.ApplciationClientInitialContextFactory
java.naming.provider.url=opmn:ormi://opmn_host:opmn_port:oc4j_instance_name/application_name
java.naming.security.principal=test
java.naming.security.credentials=test
Is there anybody knows how to run such an application client? Do we need to provide such a jndi.properties or not at all?
Thanks,
9ias userRefer OpenEJB User - Oracle ADF Essential and TomEE+
Also refer Bug in tomee 1.5.2. Fixed in 1.6.
https://issues.apache.org/jira/browse/TOMEE-756 -
SAP NetWeaver Application Server ABAP Trial Version for Linux
Donde podría conseguir los paquetes de instalación del SAP NetWeaver Application Server ABAP Trial Versión para correrla en una Maquina Virtual con Linux.
https://store.sap.com/sap/cpa/download/20/0000000218?tkt=6728195BC9A41D6FDC99371FC9BB49E9_20140521182535.4356890&sap-lan…
-
If someone trying to call me on there first attempt they can hear that it's busy even if its not and then on 2nd trial it's fine. How can I fix it.?
iPhone 5, iOS 7.0.4Contact the carrier to troubleshoot. The issue described has nothing to do with the phone.
-
Getting the InitialContext in an application client
I have an application client deployed in my application. When I run the client like this:
java -jar reconcile-client/reconcile-client.jar
It is failing with this exception when trying to look up anything through the InitialContext object:
Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at aoc.arkansas.ReconcileClient.main(ReconcileClient.java:26)Is there another way I should be running the client? According to this link I shouldn't have to supply any information to the constructor of the InitialContext object. http://download.oracle.com/docs/cd/B32110_01/web.1013/b28221/servjndi011.htmYou missed the part where it says you have to use "oracle.j2ee.naming.ApplicationClientInitialContextFactory" and that you should see "Configuring an Oracle Initial Context Factory" (http://download.oracle.com/docs/cd/B32110_01/web.1013/b28221/servjndi011.htm#CIACBCHB). Follow that link and you'll find you have to pass in a map with the "java.naming.factory.initial" property set to that factory, and with the "java.naming.provider.url" property set up to point to the OC4J server.
-
Application-client.xml - resourceBundle
Hi..
I have a problem creating a standalone application client...
I have crated an application-client.xml file containing ejb-refs to 2 Sessionbeans : Like this ->
<ejb-ref>
<ejb-ref-name>bean/AdvisorProxy</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>app.common.proxy.AdvisorProxyHome</home>
<remote>app.common.proxy.AdvisorProxy</remote>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>bean/AdminProxy</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>app.common.proxy.AdminProxyHome</home>
<remote>app.common.proxy.AdminProxy</remote>
</ejb-ref>
When I try to run my app I get an exception when I try to get my bean through the context :
java.util.MissingResourceException: Can't find bundle for base name com/evermind/client/assembler/Assembler, locale en_GB
Is there something else I have to specify anywhere?
Thanks...
johanThis fixed my problem:
- JNDI initial context factory -
com.evermind.server.rmi.RMIInitialContextFactory
- jndi provider url -
opmn:ormi://servername -
If someone trying to call me on there first attempt they can hear that it's busy even if its not and then on 2nd trial it's fine. How can I fix it.?
Hey there holla0,
It sounds like the person calling you has to call 2 times to get through. The first time they get a busy signal and the second time it goes through. I want to recommend the following troubleshooting assistant for cellular connections to help troubleshoot the issue:
Calls and connection issues
http://www.apple.com/support/iphone/assistant/calls/
Start at step 2, and work your way down as needed. Here is step 2 to get you started:
Reset network settings
To reset your network settings, tap Settings > General > Reset, then scroll down and tap Reset Network Settings.
Thank you for using Apple Support Communities.
All the best,
Sterling -
Env-entry-mapping in orion-application-client not available in JNDI lookup
I have an application client module in my EAR file that I've configured to auto-start.
It has a few env-entry defined in it's application-client.xml.
When I deploy the EAR file to OC4J 10.1.3, the application client module gets started and can access these env-entry properties from its JNDIContext.
Now, comes the problem. During the deployment process, I edit the Deployment Plan, and change the env-entry property values, and then deploy the application.
However, the application client module still gets the original values when it does the JNDI lookups of those env-entry names.
I have checked to see that OC4J creates an orion-application-client.xml during deployment and it shows the env-entry-mapping elements with the updated values.
Why is the JNDI lookup returning the values from application-client.xml and not the overriden values set in orion-application-client.xml?
I have tried this on OC4J 10.1.3, as well as 10.1.3.1.0 - got same behavior.
Is this a bug in OC4J? This seems to work fine with ejb modules, but not application client modules.
Thanks,
KalpakAvi!
Of course, I had tried it before I wrote the question. I put the modified xml file into the application area. After that AS restarts OC4J instance. And then I find my xml without any changes I made! I tried to do the same thing from the AS console. The same!
Leonid -
Distributing a Java EE Application Client (Thin Client)
Hi,
I'm following the instructions in Section 4 Developing a Java EE Application Client (Thin Client) in Oracle® Fusion Middleware Programming Stand-alone Clients for Oracle WebLogic Server, 11g Release 1 (10.3.1), Part Number E13717-01.
I packaged the application client in an ear. If I set up my environment using C:\bea10\wlserver_10.3\server\bin\setWLSEnv.cmd. I can extract the application client using a command line like:
java weblogic.ClientDeployer myear.ear myclient
I can execute the client using a command line like:
java weblogic.j2eeclient.Main myclient.jar t3://localhost:7003
However, I would like to run the application client on a client machine (i.e., a machine without WebLogic installed). I thought I could use one of the wl*client.jar files such wlclient.jar, wlfullclient.jar, etc. I started with wlfullclient.jar.
If I try to extract the application client with a command line like
java -classpath wlfullclient.jar weblogic.ClientDeployer myear.ear myclient
I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/bea/xml/XmlException
at weblogic.descriptor.BasicDescriptorManager.getMarshallerFactory(BasicDescriptorManager.java:143)
at weblogic.descriptor.BasicDescriptorManager.getDescriptorFactory(BasicDescriptorManager.java:183)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:320)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:409)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
at weblogic.application.ApplicationDescriptor.getApplicationDescriptor(ApplicationDescriptor.java:301)
at weblogic.ClientDeployer.findAltDDUri(ClientDeployer.java:210)
at weblogic.ClientDeployer.processClientJar(ClientDeployer.java:107)
at weblogic.ClientDeployer.processClientJar(ClientDeployer.java:75)
at weblogic.ClientDeployer.main(ClientDeployer.java:43)
Caused by: java.lang.ClassNotFoundException: com.bea.xml.XmlException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 12 more
Next I tried using the jar previously extracted on the server and tried to run it using:
java -classpath wlfullclient.jar weblogic.j2eeclient.Main myclient.jar t3://localhost:7003
I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/j2ee/descriptor/wl/WeblogicApplicationClientBean
at weblogic.j2eeclient.Main.fillEnvironment(Main.java:326)
at weblogic.j2eeclient.Main.run(Main.java:185)
at weblogic.j2eeclient.Main.main(Main.java:924)
Caused by: java.lang.ClassNotFoundException: weblogic.j2ee.descriptor.wl.WeblogicApplicationClientBean
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 3 more
Is it possible to extract and execute an application client on a machine without WebLogic server? If so, what jars do I need? If not, why not?
I'm testing using WebLogic 10.3.1 on a Windows XP SP2 machine using JDK 1.6.0_05.
Thanks in advance,
KeithHello,
I tried doing pre-compilation of jsps using the weblogic.appc and getting the below exception.
Can any one advise the jar file containing the below class file so that I can add in the classpath and try for it.
java.lang.ClassNotFoundException: com.bea.xml.XmlException
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at weblogic.descriptor.BasicDescriptorManager.getMarshallerFactory(BasicDescriptorManager.java:137)
at weblogic.descriptor.BasicDescriptorManager.getDescriptorFactory(BasicDescriptorManager.java:171)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:303)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoa
r2.java:788)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.ja
:409)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorL
der2.java:759)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java
68)
at weblogic.application.ApplicationDescriptor.getApplicationDescriptor(ApplicationDescriptor.java:311)
at weblogic.application.compiler.CompilerCtx.setApplicationDescriptor(CompilerCtx.java:138)
at weblogic.application.compiler.AppcUtils.setDDs(AppcUtils.java:142)
at weblogic.application.compiler.flow.DescriptorParsingFlow.compile(DescriptorParsingFlow.java:57)
at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26)
at weblogic.application.compiler.EARCompiler.compile(EARCompiler.java:49)
at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCompilerFlow.java:118)
at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompilerFlow.java:43)
at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26)
at weblogic.application.compiler.Appc.runBody(Appc.java:181)
at weblogic.utils.compiler.Tool.run(Tool.java:158)
at weblogic.utils.compiler.Tool.run(Tool.java:115)
at weblogic.application.compiler.Appc.main(Appc.java:192)
at weblogic.appc.main(appc.java:14)
com.bea.xml.XmlException -
BC4J and OAS with Java Application Client
Could you show me an example about using the BC4J and OAS with Java Application client.
The JDeveloper Help is not enough to solve this kind of problem.
Configuration:
Jdeveloper 3.1
OAS 4.0.8.1
Database 7.3.4
nullif you can logon with client tools then that should be an indication that the service account running the CMS IS working! Good news.
So the problem is likely with the java portion (krb5/bsclogin or java options)
If the files are in c:\winnt\ (if not copy them there) and perform c:\program files\business objects\javasdk\bin\kinit username
then enter and password/enter again
Probably get the same message. To note in your krb5.ini all domain info must be in CAPS (the .com appears to be in lower case)
kinit works with just the krb5.ini, java SDK and AD (removing BO config and the service account from the picture). Once that works if your java options are specified properly you should be able to login to CMC/infoview.
also 1 last point. Add udp_preference_limit = 1 to the krb5 lib defaults section
libdefaults
default_realm = BD.com
dns_lookup_kdc = true
dns_lookup_realm = true
udp_preference_limit = 1
Regards,
Tim -
J2EE Tutorial - Application Client
Hi,
I've been trying to work through the J2EE Tutorial and I've come to a complete standstill at the EJB section. I have a few problems.
First of all my deployment tool does not have a JNDI Names Tag as shown in the Mapping The Enterprize Beans Section (Chapter 19). How do I do this?
I am getting the following error when I try to run my J2EE Application Client.
Caught an unexpected exception!
java.lang.ClassCastException
at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableR
emoteObject.java:229)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at ConverterClient.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:23
7)
at com.sun.enterprise.appclient.Main.<init>(Main.java:425)
at com.sun.enterprise.appclient.Main.main(Main.java:97)
Caused by: java.lang.ClassCastException
at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableR
emoteObject.java:212)
Finally, can anybody recommend a good tutorial or book as I think the J2EE tutorial is unusually bad.http://docs.sun.com/source/819-0079/dgacc.html
Finally, can anybody recommend a good tutorial or
book as I think the J2EE tutorial is unusually bad.Search for Mastering EJB by Ed Roman. It should give a better understanding. -
How can i run application client from the command prompt ?
Hi,
I'm new to java & EJB. so can any body tell me the command to run the application client from the command prompt. Here is the code to print hello world:
/* Remote interface */
public interface Hello extends javax.ejb.EJBObject
public String hello() throws java.rmi.RemoteException;
/* Home interface */
public interface HelloHome extends javax.ejb.EJBHome
Hello create() throws java.rmi.RemoteException, javax.ejb.CreateException;
/* Stateless session bean class */
public class HelloBean implements javax.ejb.SessionBean
private javax.ejb.SessionContext ctx;
public void ejbCreate(){
System.out.println("ejbcreate()");
public void ejbRemove(){
System.out.println("ejbRemove()");
public void ejbActivate(){
System.out.println("ejbActivate()");
public void ejbPassivate(){
System.out.println("ejbejbPassivate()");
public void setSessionContext(javax.ejb.SessionContext ctx){
this.ctx=ctx;
public String hello(){
System.out.println("hello()");
return "Hello, world!";
/*Client class */
import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.Properties;
public class HelloClient
public static void main(String[] args) throws Exception{
Properties props=System.getProperties();
Context ctx=new InitialContext(props);
Object obj=ctx.lookup("HelloHome");
HelloHome home=(HelloHome)javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
Hello hello=home.create();
System.out.println(hello.hello());
hello.remove();
I have stored .java files in c:\ejb
I have successfully created the .class files using javac command in the following directory :
c:\ejb
I have also created Helloworld.ear file in c:\ejb using sun application server which contains the following files:
ejb-jar-ic.jar
app-client-ic.jar
sun-j2ee-ri.project
application.xml
sun-application.xml
Manifest.mf
But the problem is that i'm not able to run the HelloWorld.class file successfully from the command prompt. So please suggest me the comand.
Thanx in advance.
Best regards,
PankajHi
You can run this code from the command prompt in the same way as you run any other simple java program. The only thing is you need to set the Home and Local interfaces in the classpath.And obviously if u had deployed the bean in ur app server container, then its all over.
And one more thing is that u need to set the provider URL in the InitialContext created in the client program.
Thanks
Arun B
Maybe you are looking for
-
How to prevent flash intro to be played each time
Ive bought recently a flash header for my website. Its mailny purpose is to look good and provide me a menu. So basicly the header is flash, the rest of the site is html. Now, my problem is that id like to like the intro of flash to be played only on
-
whenever I take pictures with my 4s and the flash is on the picture comes out with a blue tint.. I have a case but I took it off to test that theory and it still turns up blue.. I also don't have a protective film or anything over the camera..
-
the following query returns me the correct no of rows: select col1 from tab1 where col1 like '%'||chr(32)||'%'; but i need to use my query in the following form and it doesn't return any row: select col1 from tab1 where col1 IN ('%'||chr(32)||'%'); w
-
Hide disclosure icon for some nodes
Hi, For some nodes with children, I would like hide the disclosure icon; for some not. How can I do that? I tried disclosure._visible = false in the function setValue(node, state) of my custom TreeRow Renderer extended from mx.controls.treeclasses.Tr
-
when i connect my lumia 720 to windows xp pc , it is shows " camera connected" and lumia 720 is shown in scanners and cameras and not in removable devices , so i'm unable to move files from pc to my phone, pls help