Websphere EJB/JAAS interoperability failure
Greetings all,
I am attempting to deploy 2 applications on my Websphere server.
The first contains a Servlet in a Web Module that performs JAAS authentication using Websphere's WSLogin class. The second contains an EJB in an EJB Module, which invokes the getCallerPrincipal method and performs some application based logic based on the result. The servlet code contacts the EJB after its JAAS authentication phase, and invokes the method in which getCallerPrincipal is called.
My current status is: JAAS authentication is succeeding. I receive a valid Subject in which there is a valid Principal that corresponds to the username and password input WSLogin expects. EJB contact also succeeds, and my method is invoked. However, getCallerPrincipal, which I expect to return me the Principal successfully authenticated via JAAS, always and only returns Websphere's default 'UNAUTHENTICATED' principal.
There is nothing helpful in the log files. I have spent a great deal of time in configuration, but I'm sure I could have made some mistake along the way.
Does anyone have any clue about the above error?
Has anyone successfully deployed a Websphere solution involving EJB-JAAS interoperability? If so, what were the critical elements to your solution/deployment?
Thanks very much in advance,
Peter
hi peter,
can u post a sample servlet-jaas example alongwith the policy files which you can deploy on websphere 5 version?
it would be great to know how you did it...
my email is [email protected]
thanks,
satyan
Similar Messages
-
I can't call ejb remotely with java applicatoin (javax.naming.NameNotFoundException).
I tried with the servlet and works fine.
How can i setup the environment so that it works with java client remotely.
//call ejb from ejb
Context initial = new InitialContext();
sample.HelloWorldHome home = ( sample.HelloWorldHome )PortableRemoteObject.narrow( initial.lookup("ejb/sample/HelloWorldHome"), sample.HelloWorldHome.class);
sample.HelloWorld h = home.create();
//from remote client
Context initial = new InitialContext();
sample.HelloWorldHome home = ( sample.HelloWorldHome )PortableRemoteObject.narrow( initial.lookup("IIOP://localhost:2809#ejb/sample/HelloWorldHome"), sample.HelloWorldHome.class);
sample.HelloWorld h = home.create();I made it working.
The problem was running two web logic server on a machine and there was some kind of conflict. -
Hi,
I have a problematic EJB that can return very large amounts of data. When this occurs the bean fails with an OutOfMemoryException but (get this!) then retries the query several times failing each time.
The OOME happens on the 'return' line of the bean which leads me to believe that it is caused during serialization of the data.
We are running Weblogic 6.0 SP2 on Solaris.
Has anyone encountered this problem before? If so, is it possible to prevent this series of retries because it really hogs the server's memory and processor time.
CraigAre you sure you are not catching this exception on the client side and then re-trying from the client side?? This sure seems odd!!
--Das -
I have made a Simple Login Application, thats implemnent JAAS.
My Applicaiton Authenticate the User Successullly, but not authorize.
I am using MySQL (Database)
Server: JBOSS 4.0
I have made Two Tables:
1: Login (with column username ,password)
DATA-----------> ali 123
2:Userrole(with column username ,role, roleGroup)
DATA-----------> ali user Admin
Authentication Successful:
2:54:47,828 INFO [STDOUT] Here Our Subject is =Subject:
Principal: ali
Principal: Admin(members:user)
2:54:47,828 INFO [STDOUT] Principal= ali,org.jboss.security.SimplePrincipal
2:54:47,828 INFO [STDOUT] Principal= Admin(members:user),org.jboss.security.SimleGroup
2:54:47,828 INFO [STDOUT] ....Authentication Succeeded.....
But Problem is here:
An Exception occurs:
2:54:48,359 ERROR [RoleBasedAuthorizationInterceptor] Insufficient permissions, principal=null, requiredRoles=[user], principalRoles=[ ]
2:54:48,359 INFO [STDOUT] Authorization failure
2:54:48,359 ERROR [STDERR] javax.ejb.EJBAccessException: Authorization failure
2:54:48,359 ERROR [STDERR] at org.jboss.ejb3.security.RoleBasedAuthorizatio
Interceptor.invoke(RoleBasedAuthorizationInterceptor.java:104)
2:54:48,359 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invo eNext(MethodInvocation.java:101)
Why I am getting this error while In Authentication lc.login() found the principal ali but when I am going to authorize "ali" then principal found =null.....
In My LoginSessionBean I have made method "hello()" Such as:
@Resource SessionContext ctx;
@RolesAllowed ({"user"} )
public void hello() {
System.out.println(".............With in hello() method..................");
System.out.println(ctx.getCallerPrincipal().getName());
System.out.println(".............Role are going to verify authorize users..................");
if(ctx.isCallerInRole("user")) {
System.out.println("hello Ali you r authorize to access:");
}else if(ctx.isCallerInRole("supervisor")) {
System.out.println("hello you r authorize to access");
}else {
System.out.println("UNAUTHORISED ");
}Not really related to JSF.
I would recommend posting your question to the jboss user forums/mailing list. -
WLS 6 EJB making calls to an CORBA ORBIX 2000 Server
My WLS 6 EJB needs to use the ORBIX 2000 Naming Service to find a
ORBIX 2000 C++ Server.
How do I initialize Weblogic Orb. I need to to tell the ORB where the Naming
Service is located on the network. There are probably System Properties or Command
line arguments that the ORB will recognize. What are there names?
Thanks
AlAndy,
Thanks for your reply!
I also noticed IBM JDK1.3 is still at GIOP1.1 level. But Sun'd JDK ORB
is just a toy.
The new JDK1.4 will include a POA, so basically I will see much better
ORB interoperability at that level. Especially the Portable
Interceptor will help the ORB to plug into JDK.
The ORB in IBM JDK doesn't support the COSNaming fully, it uses
resolve_initial_references_remote() to resolve create InitialContext.
While Sun JDK doesn't support it at all(coz it is not part of OMG's
standard).
EJB2.0 spec is to address the INS issue, so hopefully it will not be
an issue in the long run.
How about JRockit JVM? It is certified for WLS, but it contains which
ORB? If it just uses JavaIDL, I bet the RMI-IIOP performance won't be
good as IBM JDK.
And someone from Borland has proposed to use IDL type mapping for
RMI-IIOP protocol, I think that will be a cool proposal and if any
RMI-IIOP implementation will do the conversion under transfer that
will be the fastest way.
Last question, any plan to support Dynamic Stub download over RMI-IIOP
for WLS? EJB2.0 spec talks about this possibility, but don't see any
vendor do it yet.
Thanks!
Simon Song
On 11 Feb 2002 16:42:28 -0800, Andy Piper <[email protected]> wrote:
[email protected] (Simon Song) writes:
Does this mean, WLS can plug into any ORB? For example, IBM JDK embedsYes.
IBM ComponentBroker ORB, which is incomptabible with Sun JDK ORB. So
to WebSphere EJB client, it must run on IBM JDK not on Sun JDK.
If we run WLS on IBM JDK, does this imply the WLS client must run on
IBM JDK now? For 6.1? No. 6.1 basically supports RMI-IIOP conformant Orbs and the
JDK (note that this implies that the JDK is not an RMI-IIOP compliant
Orb). So in general this means that the IBM client orb will work
against an instance of WLS running on the Sun JDK.
The place where this may break down is with valuetype chunking. This
is required by custom marshaled datatypes and both the JDK 1.3.1 and
the IBM JDK do it wrongly. We support the "wrong way" if the client is
using GIOP 1.0 or 1.1, we do it the "right" way for GIOP 1.2. JDK 1.4
does it the right way and uses GIOP 1.2. The IBM JDK does it the wrong
way and uses GIOP 1.1, the JDK 1.3.1 does it the wrong way and uses
GIOP 1.0.
IBM provides comptabile EJB client package, which contains IBM ORB to
replace any other JDK's ORB.
WLS has no real ORB embedded? IBM JDK ORB IIOP performs much better
than JDK1.3's JavaIDL. Right, and although we don't use an Orb, we do use the ValueHandler
out of the JDK and I suspect this works much faster in the IBM JDK
than the normal JDK.
andy -
Is there a way to do that? To use dynamic EJB connections?
Hello Developers,
I have developed a security web application using EJB,
Jaas with customer provider
I used DBSystemLogin module
I want to fined a way that the EJB connection change each time when the user login.
I used the HR as the main schema.
I created three schemas that I want to use them as users:
-Lina
-Salem
-Ahmad
I granted Roles to users on hr tables.
additional, created my own roles in data base and granted to my users:
ADMINISTRATOR Lina - can see all records
EMPLOYEE Ahmad -can see the records added by this employee
CUSTOMER Salem - can see the records belongs to this customer
In developer 10.1.3.3
I created Order Entity been using HR database connection, created session been,
Modified web.xml:
-security roles["ADMINISTRATOR","EMPLOYEE","CUSTOMER"])
-Loginconfig (Form-based authentication: login page, error page)
-Security constraints: ord on /faces/Orders.jsp to ADMINISTRATOR,EMPLOYEE,CUSTOMER.
I created Orders.jsp page contains order table.
Now, I want that when the user login as Lina to switch the EJB database connection to Lina, so the displayed order table achieves ADMINISTRATOR roles that created in database,means opening database session for user Lina and use it.
and so on for user salem and ahmad.
Is there a way to do that? To use dynamic EJB connections? To achieve authentication based connection? to implement the user database roles on the client side? To specify the database connection at run time?
That is possible using forms but I don’t want to use forms.
I want to reed the roles from database according to the user.
I hope to get answers soon,
thanks.Does JNDI do this job?
-
Hi,
As anyone tried to call WebSphere EJB from weblogic? If so, how is it
achieved, and what to look out for?
Any pointers appreciated. Thanks!
ph
[email protected]I have a servlet that is connecting using the
HttpsUrlConnection object to another servlet on
another domain. The idea is to use my servlet as a
proxy to this other application on the other domain
via a HttpsURLConnection object.
Okay. For clarity, let's refer to the Servlet that initiates the connection as Server A and the resource that it accesses as Server B.
For security reasons, I am not able to redirect or do
a form submission to this other application as that
will cause the user's browser to be "aware" of my
connection to this other application.
I do not follow. The user's browser is only able to connect to Server A (your Servlet) and can only receive a response from the same. It has no knowledge of what Server A does, including initiating a SSL connection to Server B.
The URLConnection works, however when the other
application's servlet either tries to redirect,
forward or do a form submission to a different
servlet, the content of the other servlet can't be
seen in the user's browser.
I thought you were proxying. Why would Server B issue a redirect to the browser? It could do so to Server A.
Is this a possible solution, or does
HttpsUrlConnection only allow HTTP header information
transfer on a webserver-to-webserver level?This is
what appears to be the case.
With HTTP, you will normally only 'see' the HTTP CONNECT command with the URL of the target server. Even the headers should be encrypted.
To complicate things, my application is on WebLogic
and is talking to another application on WebSphere.Makes no difference. HTTP is HTTP. SSL is SSL. That's all you are really using.
- Saish -
How to configure JAAS in SAP Web AS 6.40
Hi to all,
We are migrating from IBM Websphere to SAP Web AS6.40
The application on websphere uses JAAS for authentication of User.
1. It has custom login module as follows:
public class UPServiceLoginModule implements LoginModule
2. The information about Login Configuration is mentioned in file Websphere's <b>wsjass.config</b> file.
MyLoginModule
com.mypackage.auth.UPServiceLoginModule
required
debug="true"
serviceName="SecurityService";
My question is how can we do this <b>JAAS settings on SAP Web AS</b>?
I have read all the documents on SAP Library regarding developing Custom LoginModules, making its library and registring it on J2EE engine and then referring it in application.
But we don't want our Login module to extend the Class <b>AbstractLoginModule</b> provided by SAP.check
http://service.sap.com/instguides
Thanks
Prince Jose -
This post is intended to be more of an FYI than anything,
For Build JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407, both Studio and Java Edition I could not get any of the updates to download.
1) I am running Windows 7 RTM (and really liking it) AND a XP VM, each with the latest updates.
2) I downloaded that last Sun JDK (jdk 1.6_16) for the Java Edition and was running Studio with the Sun JDK that ships with Studio.
The build shipped with the Web Browser and Proxy preferences set to
Use HTTP Proxy Server
Host: emeacache.uk.oracle.com
Port: 80
I had never seen this before and figure it was the cause of the problem. To get the updates to download I had to place an '*' in the Exceptions field. The properties don't save though so I have had to do with every update.
Deselecting 'Use HTTP Proxy Server' did not fix the issue.
I would consider this a workaround, but still an issue. If anyone has some other information I am very interested in knowing how to correct this.
CheersOne more input: I can actually call deployejb from command line and deploy the ejb without any failure!
-
Hi,
We are trying to deploy an Ear file on OC4J, but that fails every time with an error in the logs (see below).
The same application deploys and runs without problems on JBoss4 and 3.
The oracle message suggests that the query method could not be found but it does exist on the bean class, is abstract, returns a Collection and takes a string as its parameter.
The XML has been validated and is correct at least in syntax. I have also eliminated the possibility that the path names are wrong (by limiting the query to TRAIN_RUN), and that the parameter is wrong by changing the type a couple of times. Nothing changes, the same message every time.
Does anybody know what could be the problem?
Thanks,
Guy
oracle.oc4j.admin.internal.DeployerException: Error initializing ejb-module; Exception Failure to initialize EJBQL descriptors: java.lang.RuntimeException: No method found for XML query element:
java.lang.String
<query><query-method>
<method-name>ejbSelectStepByCharPoint
</method-name>
<method-params>
<method-param>
java.lang.String
</method-param>
</method-params>
</query-method>
<ejb-ql>
SELECT OBJECT ( s ) FROM TRAIN_RUN AS t, IN ( t.trajectorySteps ) AS s
WHERE s.characteristicPoint.name = ?1
</ejb-ql>
</query>9082,
Forgive me if I am stating the obvious, but different versions of OC4J have different support for EJB-QL. Since I couldn't find any details (in your post) of the OC4J version you are using, let me ask if you are sure that it supports your EJB-QL?
Good Luck,
Avi. -
Why can't I get an initial context in websphere!?!
I am using WebSphere App Dev v.4.0, and I have written a client application which should call methods from an EJB. But I don't seem to be able to get an initial context no matter what I do. Here is a snippet of the app code and the exception it throws: I will be most grateful if someone could help me out. Thanks Ben.
THE CODE...
try {
System.out.println("about to retrieve initial context.");
java.util.Properties p = new java.util.Properties();
p.put(Context.PROVIDER_URL, "iiop://localhost:901");
p.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
InitialContext initContext = new InitialContext(p);
System.out.println("initial context has been created.");
}catch (Exception e) {
e.printStackTrace();
THE EXCEPTION...
about to retrieve initial context.
javax.naming.NoInitialContextException: Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory. Root exception is java.lang.ClassNotFoundException: com.ibm.websphere.naming.WsnInitialContextFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:325)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:212)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:656)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:199)
at BeanClient.main(BeanClient.java:18)Hi Ben,
As the gurus told in the earlier replies, it is the problem with Class loading.
Make Sure that following jar files are in CLASSPATH. (Assuming C:\Websphere is your websphere installation directory)
J2EE.jar - C:/Websphere/AppServer/lib/J2ee.jar
Websphere.jar - C:/Websphere/AppServer/lib/websphere.jar
Ibmorb.jar - C:/Websphere/AppServer/java/jre/lib/ext/ibmorb.jar
Once you have all these in your CLASSPATH, try running your client application. If you are using Sun JDK you will encounter an error message in the runtime which says like "Service Unavaible.. XXXX Service not found".
When you encounter this problem make sure that your service named XXXX is running and you are calling it appropriately. To find whether a service with name XXXX is running type
>>>>dumpnamespace
at the command prompt. If your service name is listed by dumpnamespace.. your service is running. So there is something wrong with the client code. Proceed to the next step.
In this tep you can use IBM JDK to fix the error. But that might not be the most suitable solution.
Here is how you can run Websphere EJB client programs without IBM JDK.
http://www7b.software.ibm.com/wsdd/downloads/pluggableclient.html
Follow this link and download the Websphere Pluggable application client and follow the instructions given in Readme to install the pluggable application client.
Once you finish installing the pluggable application client, you should be able to run with no problems.
For dwildcat92
I was also under the impression that we SHOULD use IBM JDK to make the client run. But our integration process demanded that the clients be called from Apache Tomcat. Thats how I was forced to find this link
http://www7b.software.ibm.com/wsdd/downloads/pluggableclient.html
Thanks for making me learn guys,
Ravi. -
Please help me. I am baffled. I am only able to deploy my application to the embedded oc4j when my machine is connected to the internet. When I am offline and try to deploy the same application, I get the following message:
[Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
C:\sun\j2eesdk1.4_beta2\jdk\bin\javaw.exe -ojvm -classpath C:\oracle\jdev10g\j2ee\home\oc4j.jar;C:\oracle\jdev10g\jdev\lib\jdev-oc4j.jar -Xverify:none -Ddisable.checkForUpdate=true -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doracle.dms.sensors=NONE -Doc4j.jms.usePersistenceLockFiles=false com.evermind.server.OC4JServer -config C:\oracle\jdev10g\jdev\system9.0.5.0.0.1375\oc4j-config\server.xml
[waiting for the server to complete its initialization...]
04/01/22 19:21:33 com.sun.enterprise.deployment.xml.ParseException: Neither this XML document's public nor system id's could be resolved: java.net.UnknownHostException: java.sun.com java.sun.com
on parsing the doucment corresponding to class com.sun.enterprise.deployment.xml.EjbBundleNode
04/01/22 19:21:33 at com.sun.enterprise.deployment.xml.XMLUtils.getNodesByType(XMLUtils.java:292)
04/01/22 19:21:33 at com.sun.enterprise.deployment.xml.EjbBundleNode.readEjbBundleNodes(EjbBundleNode.java:735)
04/01/22 19:21:33 at com.sun.enterprise.deployment.xml.EjbBundleNode.read(EjbBundleNode.java:759)
04/01/22 19:21:33 at com.sun.enterprise.deployment.EjbBundleDescriptorFactory.makeEjbBundleDescriptor(EjbBundleDescriptorFactory.java:37)
04/01/22 19:21:33 at com.evermind.server.ejb.deployment.EJBPackage.initializeEjbqlDescriptors(EJBPackage.java:2252)
04/01/22 19:21:33 at com.evermind.server.ejb.deployment.EJBPackage.init(EJBPackage.java:2236)
04/01/22 19:21:33 at com.evermind.server.ServerComponent.init(ServerComponent.java:235)
04/01/22 19:21:33 at com.evermind.server.ejb.EJBPackageDeployment.getPackage(EJBPackageDeployment.java:709)
04/01/22 19:21:33 at com.evermind.server.ejb.EJBContainer.postInitBatch(EJBContainer.java:2241)
04/01/22 19:21:33 at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:2191)
04/01/22 19:21:33 at com.evermind.server.Application.postInit(Application.java:553)
04/01/22 19:21:33 at com.evermind.server.Application.setConfig(Application.java:170)
04/01/22 19:21:33 at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1924)
04/01/22 19:21:33 at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1866)
04/01/22 19:21:34 at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1438)
04/01/22 19:21:34 at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
04/01/22 19:21:34 at java.lang.Thread.run(Thread.java:536)
04/01/22 19:21:34 Error instantiating application 'current-workspace-app' at file:/C:/oracle/jdev10g/jdev/mywork/Application2/Application2-oc4j-app.xml: Error initializing ejb-module; Exception Failure to initialize EJBQL descriptors: com.sun.enterprise.deployment.xml.ParseException: Neither this XML document's public nor system id's could be resolved: java.net.UnknownHostException: java.sun.com java.sun.com
on parsing the doucment corresponding to class com.sun.enterprise.deployment.xml.EjbBundleNode
Ready message received from Oc4jNotifier.
Embedded OC4J startup time: 4216 ms.
04/01/22 19:21:34 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0) initialized
[Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
C:\sun\j2eesdk1.4_beta2\jdk\bin\javaw.exe -ojvm -classpath C:\oracle\jdev10g\j2ee\home\oc4j.jar;C:\oracle\jdev10g\jdev\lib\jdev-oc4j.jar -Xverify:none -Ddisable.checkForUpdate=true -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doracle.dms.sensors=NONE -Doc4j.jms.usePersistenceLockFiles=false com.evermind.server.OC4JServer -config C:\oracle\jdev10g\jdev\system9.0.5.0.0.1375\oc4j-config\server.xml
[waiting for the server to complete its initialization...]
04/01/22 19:21:33 com.sun.enterprise.deployment.xml.ParseException: Neither this XML document's public nor system id's could be resolved: java.net.UnknownHostException: java.sun.com java.sun.com
on parsing the doucment corresponding to class com.sun.enterprise.deployment.xml.EjbBundleNode
04/01/22 19:21:33 at com.sun.enterprise.deployment.xml.XMLUtils.getNodesByType(XMLUtils.java:292)
04/01/22 19:21:33 at com.sun.enterprise.deployment.xml.EjbBundleNode.readEjbBundleNodes(EjbBundleNode.java:735)
04/01/22 19:21:33 at com.sun.enterprise.deployment.xml.EjbBundleNode.read(EjbBundleNode.java:759)
04/01/22 19:21:33 at com.sun.enterprise.deployment.EjbBundleDescriptorFactory.makeEjbBundleDescriptor(EjbBundleDescriptorFactory.java:37)
04/01/22 19:21:33 at com.evermind.server.ejb.deployment.EJBPackage.initializeEjbqlDescriptors(EJBPackage.java:2252)
04/01/22 19:21:33 at com.evermind.server.ejb.deployment.EJBPackage.init(EJBPackage.java:2236)
04/01/22 19:21:33 at com.evermind.server.ServerComponent.init(ServerComponent.java:235)
04/01/22 19:21:33 at com.evermind.server.ejb.EJBPackageDeployment.getPackage(EJBPackageDeployment.java:709)
04/01/22 19:21:33 at com.evermind.server.ejb.EJBContainer.postInitBatch(EJBContainer.java:2241)
04/01/22 19:21:33 at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:2191)
04/01/22 19:21:33 at com.evermind.server.Application.postInit(Application.java:553)
04/01/22 19:21:33 at com.evermind.server.Application.setConfig(Application.java:170)
04/01/22 19:21:33 at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1924)
04/01/22 19:21:33 at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1866)
04/01/22 19:21:34 at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1438)
04/01/22 19:21:34 at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
04/01/22 19:21:34 at java.lang.Thread.run(Thread.java:536)
04/01/22 19:21:34 Error instantiating application 'current-workspace-app' at file:/C:/oracle/jdev10g/jdev/mywork/Application2/Application2-oc4j-app.xml: Error initializing ejb-module; Exception Failure to initialize EJBQL descriptors: com.sun.enterprise.deployment.xml.ParseException: Neither this XML document's public nor system id's could be resolved: java.net.UnknownHostException: java.sun.com java.sun.com
on parsing the doucment corresponding to class com.sun.enterprise.deployment.xml.EjbBundleNode
Ready message received from Oc4jNotifier.
Embedded OC4J startup time: 4216 ms.
04/01/22 19:21:34 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0) initializedI was using the base release with my own SDK. I fixed the problem by downloading the full release.
-
Transaction propagation between OC4J to non-OC4J J2EE container
I have a OC4J instance 10.1.3.1 containing a stateless session EJB 2.1. This bean call another session EJB in Websphere EJB container. The call goes through but the transaction is not distributed, meaning I cannot roll the transaction back from the OC4J container.
I have tried all kinds of context factories but it doesen't work. I use a XA datasource to an Oracle DB from the Websphere container.
Does anyone know how to propagate transactions from an OC4J container to another J2EE container:
Thanks
regards
A BastellYou can specify the JNDI properties in your JSP/Java Client to lookup the EJB if it's in a different EJB container than the one provided by the JSP container.
Rob -
Hi,
I have a strange Java Client Server application with a corba interface between the two.
There are three Session Classes that describe this interface.
The base session is SessionA. Extending that (i.e. :: in IDL) is SessionB and extending that is SessionC.
The client is broken up into two parts which run in the same JVM. The first part has a dependency to SessionC and the second part has a dependency SessionB. It has to be this way.
Upon start up the client creates a SessionC everything okay. The client then launches part of the application which only has a dependency to SessionB. To launch this part of the client application a SessionB object must be past. To do this I use the SessionBHelper class and the narrow method.
Everything works fine no exceptions are thrown.
Now here is the part that is killing me - when I invoke a method then from the Client to SessionB it throws a Marshalling exception
org.omg.CORBA.MARSHAL: minor code: 0 completed: No. I check the spec. and there is minor code 0 has a default meaning - i.e. nothing. I have n't a clue what is wrong.
My only thoughts are that narrow can only be used in down casting. But I could be wrong here.
I would really appreciate any help or thoughts. Thanks in Advance.When ever I come across the most lovely Marshalling exceptions... its usually because my skel/stub classes out of synch with each other (on the client/server)
When I update the everyone... I usually have everything working and playing nicely.
This occurs with some frequency using Websphere EJB (using IIOP)... if your client JAR's are not in synch with your server JAR's... then the objects can't be marshalled... its a pain
./dave -
Transfer-Encoding: chunked
Hi
I'm creating an http client.. but got problems with the chunked data encoding.. does anybody know a link where there is more info about it? how much should I read from each chunk and where is it written? did anybody face such a problem before? My client tells the server it's firefox:
GET / HTTP/1.1
Host: mail.yahoo.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
and the server sends this:
HTTP/1.1 200 OK
Date: Sun, 25 Sep 2005 13:45:31 GMT
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
Cache-Control: private
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
Content-Encoding: gzip
Set-Cookie: B=9dikf6d1jdafr&b=3&s=5m; expires=Tue, 02-Jun-2037 20:00:00 GMT; path=/; domain=.yahoo.com
1562
please help!
hmm.. looks like nobody is gonna answer.. :(3.6.1 Chunked Transfer Coding
The chunked encoding modifies the body of a message in order to
transfer it as a series of chunks, each with its own size indicator,
followed by an OPTIONAL trailer containing entity-header fields. This
allows dynamically produced content to be transferred along with the
information necessary for the recipient to verify that it has
received the full message.
Chunked-Body = *chunk
last-chunk
trailer
CRLF
chunk = chunk-size [ chunk-extension ] CRLF
chunk-data CRLF
chunk-size = 1*HEX
last-chunk = 1*("0") [ chunk-extension ] CRLF
chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
chunk-ext-name = token
chunk-ext-val = token | quoted-string
chunk-data = chunk-size(OCTET)
trailer = *(entity-header CRLF)
The chunk-size field is a string of hex digits indicating the size of
the chunk. The chunked encoding is ended by any chunk whose size is
zero, followed by the trailer, which is terminated by an empty line.
The trailer allows the sender to include additional HTTP header
fields at the end of the message. The Trailer header field can be
used to indicate which header fields are included in a trailer (see
section 14.40).
A server using chunked transfer-coding in a response MUST NOT use the
trailer for any header fields unless at least one of the following is
true:
a)the request included a TE header field that indicates "trailers" is
acceptable in the transfer-coding of the response, as described in
section 14.39; or,
b)the server is the origin server for the response, the trailer
fields consist entirely of optional metadata, and the recipient
could use the message (in a manner acceptable to the origin server)
without receiving this metadata. In other words, the origin server
is willing to accept the possibility that the trailer fields might
be silently discarded along the path to the client.
This requirement prevents an interoperability failure when the
message is being received by an HTTP/1.1 (or later) proxy and
forwarded to an HTTP/1.0 recipient. It avoids a situation where
compliance with the protocol would have necessitated a possibly
infinite buffer on the proxy.
An example process for decoding a Chunked-Body is presented in
appendix 19.4.6.
All HTTP/1.1 applications MUST be able to receive and decode the
"chunked" transfer-coding, and MUST ignore chunk-extension extensions
they do not understand.
Maybe you are looking for
-
How to open excel files from email in macro enabled workbooks NOT 2003-2007 worksheets?
I have recently installed Office 365 and it was working great. I needed to open excel documents via email with the macro enabled option. Yesterday it flicked back to only giving me the option to open in 2003-2007 workbook so now I am having issues wi
-
What is the criteria for buying an iphone?
I heard that to buy an iphone you need a contract? Is that true? and what is the meaning of having a contract when buying an iphone? and can one buy an iPhone without a contract?
-
Dunno what's going on with this trigger
I created the following trigger: CREATE OR REPLACE TRIGGER common.auto_entity_types_type_id BEFORE INSERT ON common.ENTITY_TYPES FOR EACH ROW begin if :old.type_id > 0 THEN null; else select SEQ_ENTITY_TYPES_TYPE_ID.next
-
Problems to watch czech or polish characters
Hi, I have a problem using Desktop Intelligence to read Czech or Polish characters. In my database I have stored this characters. They exist. I can see them using SQL Developer. My DB is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64b
-
Re-install procedure for Premiere Pro CS 5.5
My instalation of Win7 Premiere Pro CS 5.5 is corrupted and I have lost the ability to handle HD files/projects. I can still process SD projects. I have also lost the ability to capture HD video over Firewire (no video, only sound) and I can't work w