deployment error
Hi. I've got an j2ee-app that works fine with: Orion1.5.2, linux, Sun JDK 1.3.1. Now I am forced to move to: Orion 1.5.2, Win2k (sp2), Sun JDK 1.3.1. When I try to deploy my app, I get the following error-msgs: Error in application protestanttester: Error loading package at file:/D:/java/protestant/protestanttester/protestant-ejb.jar, Unable to find/read assembly info for D:\java\protestant\protestanttester/protestant-ejb.jar (META-INF/ejb-jar.xml) Error instantiating application 'protestanttester' at file:/D:/java/protestant/protestanttester.ear: Error auto-deploying application-client at protestanttester-client.jar: Unable to find/read assembly info for D:\java\protestant\protestant tester/protestanttester-client.jar (META-INF/application-client.xml) Any ideas? Could it be a problem that is related to the '/' versus '\' issue? The error-msg mixes these two versions heavily. A desperate Armin Michel
Re: JMS && orion
> I have a project to do which depends heavily on message driven beans. It > also needs to be as high performance as possible, as we are expecting a > lot of traffic. I had planned on using the IBM JDK for this, but > apparently it may have some problems with MDB. The application needs only > subscribe to a remote topic and process the messages. Is this a problem? > What issues have been seen with orion and JMS? All issues may be related to RH7.1/JDK combination. If you don't use RH7.1 use may not have any problems at all. Armin Michel
Re: IBM JDK with Orion?
> Are there any known issues with using the IBM JDK with Orion? With Orion 1.5.2 JMS support didn't work with the IBM JDK. Therefore I had to switch to the Sun JDK (which has some other problems though - at least here). Greetings Armin Michel
Orion 1.5.2 and JMS demo
Hi. I just updated from 1.4.7 to 1.5.2. Everything still works except JMS related stuff. Neither my own application nor the JMS chat demo work. My own program hangs when calling topicConnection.start(). I'd bet that the demo is hanging on just the same line. I am using RH7.1 with IBM JDK 1.3 (with that ASSUME_KERNEL work-around). Can someone help me here?
DataSourceUserManager and addToRole
I configured my App to use the DataSourceUserManager. According to orionsupport and Orion API I added the following text to my orion-application.xml: In my DBMS I did the following: create table user_groups (username varcharg, roupname varchar); create table users (username varchar,password varchar); Adding a new User with: Principal user = roleManager.createPrincipal("userName","password"); works perfectly. But when I do a: roleManager.addToRole(user,"aRole"); I get the following exception: java.lang.RuntimeException: SQL error: No value specified for parameter 2. at java.lang.RuntimeException.(RuntimeException.java:49) at com.evermind.sql.DataSourceUser.addToGroup(JAX) at com.evermind.server.hm.addToRole(JAX) Using the default UserManager I don't get any exception. Could anyone help me here?
orion 1.5.1 and Map-CMP
- I just updated to 1.5.1. - In an CMP-EJB (2.0) I have a Map-field. - When I call the getMyMap()-method from within the ejb everything seems to work just fine. (A map with the correct entries is returned.) - Whenever I call this method from outside the ejb (I added that method to the remote-interface) an empty Map is returned. Bug or feature? Do I have to modify some DDs in order to make such getter-methods work? Or is that an error in 1.5.1? Does anybody else experience this problem or is it just me?
JNDI-Problem: Unknown command: 7 (orion1.4.7)
I wrote an J2EE-client that uses EJB via JNDI. Everything worked just fine. Then I rearranged my ejb-files into sub-packages and updated all of my DDs to reflect that change. (Of course I also corrected the imports and package statements in the java-files.) This new version compiles and deploys without errors or warnings. But when I start my client now (for the first time), I get the following exception on client-side: [java] javax.naming.NamingException: Error reading application-client descriptor: Error looking up EJBHome: Disconnected: Unknown command: 7 Starting the client for the second time leads to another error. This exception is thrown on server-side: javax.naming.NameNotFoundException: java:comp/env/ejb/TestProject not found I checked with orionconsole that the jndi-entries are correct. So is this a bug of orion-server? Bug #156 also refers to "Unkown command: 7", maybe it's the same failure? The only solution I can think of (yet) is to undo all re-packagings and use the old and plain version of my project, but this is getting really unhandy. Does anyone know how to work around this problem or even how to solve it? Yours Armin Michel
Re: Orin cpu usage ???
What OS and JVM do you use? > Can someone please answer this question !!!??? > The problem I am having is the Orion sometimes hangs, it uses a lot of cpu > and I can't figure out why, so I need some advices on how I can monitor > this. > > Please... ?? > > Eddie > > - Original Message - > From: Eddie <[EMAIL PROTECTED]> > To: Orion-Interest <[EMAIL PROTECTED]> > Sent: Wednesday, May 16, 2001 11:42 AM > Subject: Orin cpu usage ??? > > > Can someone please tell me how to monitor the cpu usage of Orion in > > detail per component/item/application ? > > > > When I use orionconsole I can only view the overall memory usage of all > > application, but that's it. With "top" I see it is using a lot of cpu > > time: > > about 50 percent. > > But I want more information, how do I get that ?? > > > > Eddie
Re: CMP Primary Key and ejbCreate
The point is that the declaration of your ejbCreate() must specify that you will return the PrimKeyClass. In the implementation of the ejbCrate() however you just return null - a PrimKeyClass null. That's how I do it and that's what I think is correct with respect to the spec. Yours Armin Michel > When I generate a CMP bean with a Primary Key Class, it compiles and > packages fine as far as the java side is concerned, however, when it is > deployed, it has an issue. > > According to page 69 of the J2EE developers guide (I checked to be sure > I wasn't just talking about anything), it says that if the bean has > Container Managed Persistence, then the ejbCreate method should return > null... the container handles that along with ejbFindByPrimaryKey... > > So, I have left it as null, but am using a custom Primary Key class. > When I try to deploy it, it says: > > Error compiling ... filename ... method public void ... ejbCreate() > throws javax.ejb.CreateException, java.rmi.RemoteException doesn't > return a ... PrimaryKey (the path to the primary key class) > > Then the deploy fails. > > In JBoss, just to see what it had to say, it at least will deploy it but > still gives a warning saying: > > "The return type of an ejbCreate(...) method must be the entity bean > primary key type." > > > From what I can tell in the documentation, these errors are wrong > > On a BMP bean, then yes I should have to return the Primary Key class > type from the ejbCreate method, this is stated in the developers guide, > but not for a CMP bean. > > In the 1.3 preview release of the developers guide, it states the same > thing for BMP beans, however, it doesn't say anything about CMP -- it > says TBD ... maybe To Be Discussed... like TBA, I don't know... but > considering we're still using 1.2.1 standards, I'd like to know if I'm > just completely wrong, or this issue has been overlooked in the > orionserver (and jboss to some degree) deployment. > > If it has changed since earlier versions of EJB specs and I'm just not > seeing it, I'd appreciate someone explaining it to me. > > I've run this through VisualAge Enterprise Edition 3.5 as well... it > works fine with ejbCreate returning null on a CMP with a primary key > class, and if I try to tell it to return the key type, then it flags > warnings about it. > > I can fool it into thinking everything is alright by setting the > ejbCreate to return the primary key, but is this the correct way of > doing this considering what the specs say? > > Thanks in advance. > > > -- > Ben Christensen > Novisum Development Inc. > www.novisum.com > [EMAIL PROTECTED] > 780-909-4707
Re: User/Role problem
On Tuesday 08 May 2001 17:14, you wrote: > We have had similar problems, and I have reported them to orion (but they > said they couldn't reproduce the problem). Here is what I found. > > If you have an EJB method foo(), and you restrict its access to a role > MYROLE, then a user who, according to the XML files, should have access to > foo() is denied access. > > If, however (and quite contrary to specs) you specify a GROUP name (e.g. > MYGROUP) instead of a ROLE name (e.g. MYROLE), then access is granted > (assuming your user is in that group). > > I would be very interested to know if you can confirm this. Probably yes. IMHO, Orion forces me to specify a group for every role that I define. I can only do a addToRole("bar") when I have a group defined that bar is mapped upon. Your problem may be closely related to mine, but I think my problem is still another one. > > Nick > > At 03:52 PM 5/8/01 +0200, you wrote: > >Following situation: > > > >- I restricted method permission of method "foo" to role "bar" > >- if I do: > > > > roleManager.addToRole(ctx.getCallerPrincipal(),"bar"); > > foo(); > > > >everything works just fine. > > > >- if I create a (temporary) user (e.g. user123), add him to role "bar" > > then log him in with the RoleManager and finally do a foo(), I get as > > security-exception. (see below). > > > >Why? > >Are there some default-roles that I have to add a newly created user to? > >Are there any further group-permissions I've got to set for group "bar"? > >(I took the permissions of group "users"). > > > > > >For completeness: > >- I have also created a group named "bar" (in principal.xml) and specified > > a security-role-mapping (in orion-ejb.xml). > >- Furthermore I added a security-role definition for "bar" in both the > >application.xml and the ejb-jar.xml > >- I have also tried the "<default-ejb-caller-role>" role and then > >changed the default-method-access to role "bar". > >- I also tripple checked that ctx.isCallerInRole("bar") returns true; > >just the line before I call foo(). > > > > > >The exception: > > > > [java] javax.transaction.TransactionRolledbackException: > >com.evermind.server.rmi.OrionRemoteException: user123 is not allowed to > > call this EJB method, check your security settings (method-permission in > > ejb-jar.xml and security-role-mapping in orion-application.xml). > > [java] at com.evermind.server.rmi.bb.invokeMethod(JAX) > > [java] at com.evermind.server.rmi.a2.invoke(JAX) > > [java] at com.evermind.server.rmi.a3.invoke(JAX) > > > >Ideas, or even solutions? > > > >Armin Michel
Re: User/Role problem (solved)
There was an other method permission set on findByPrimaryKey(). Orion obviously calls this method for a remote object when you call a remote-method on that object (presumably for uptodate-checks). Thus a remote-method may only be invoked by a user that belongs to roles for both the remote-method in question and for any subsequently needed Home/Remote methods. Pretty obvious when you look at it that way, isn't it? Only methods implicitly called by OrionServer are not always that obvious. ;-) Yours Armin Michel On Tuesday 08 May 2001 15:52, you wrote: > Following situation: > > - I restricted method permission of method "foo" to role "bar" > - if I do: > > roleManager.addToRole(ctx.getCallerPrincipal(),"bar"); > foo(); > >everything works just fine. > > - if I create a (temporary) user (e.g. user123), add him to role "bar" then >log him in with the RoleManager and finally do a foo(), I get as >security-exception. (see below). > > Why? > Are there some default-roles that I have to add a newly created user to? > Are there any further group-permissions I've got to set for group "bar"? > (I took the permissions of group "users"). > > > For completeness: > - I have also created a group named "bar" (in principal.xml) and specified > a security-role-mapping (in orion-ejb.xml). > - Furthermore I added a security-role definition for "bar" in both the > application.xml and the ejb-jar.xml > - I have also tried the "<default-ejb-caller-role>" role and then >changed the default-method-access to role "bar". > - I also tripple checked that ctx.isCallerInRole("bar") returns true; >just the line before I call foo(). > > > The exception: > > [java] javax.transaction.TransactionRolledbackException: > com.evermind.server.rmi.OrionRemoteException: user123 is not allowed to > call this EJB method, check your security settings (method-permission in > ejb-jar.xml and security-role-mapping in orion-application.xml). > [java] at com.evermind.server.rmi.bb.invokeMethod(JAX) > [java] at com.evermind.server.rmi.a2.invoke(JAX) > [java] at com.evermind.server.rmi.a3.invoke(JAX) > > Ideas, or even solutions? > > Armin Michel
User/Role problem
Following situation: - I restricted method permission of method "foo" to role "bar" - if I do: roleManager.addToRole(ctx.getCallerPrincipal(),"bar"); foo(); everything works just fine. - if I create a (temporary) user (e.g. user123), add him to role "bar" then log him in with the RoleManager and finally do a foo(), I get as security-exception. (see below). Why? Are there some default-roles that I have to add a newly created user to? Are there any further group-permissions I've got to set for group "bar"? (I took the permissions of group "users"). For completeness: - I have also created a group named "bar" (in principal.xml) and specified a security-role-mapping (in orion-ejb.xml). - Furthermore I added a security-role definition for "bar" in both the application.xml and the ejb-jar.xml - I have also tried the "<default-ejb-caller-role>" role and then changed the default-method-access to role "bar". - I also tripple checked that ctx.isCallerInRole("bar") returns true; just the line before I call foo(). The exception: [java] javax.transaction.TransactionRolledbackException: com.evermind.server.rmi.OrionRemoteException: user123 is not allowed to call this EJB method, check your security settings (method-permission in ejb-jar.xml and security-role-mapping in orion-application.xml). [java] at com.evermind.server.rmi.bb.invokeMethod(JAX) [java] at com.evermind.server.rmi.a2.invoke(JAX) [java] at com.evermind.server.rmi.a3.invoke(JAX) Ideas, or even solutions? Armin Michel
Re: FW: custom finder in CMPs (SLSB facade)
IMHO, facades are only useful when they do some extra-work, e.g. consolidating the work with many other EJBs. When you just use a facade to plainly forward any request to exactly one EntityBean (1:1 relationship between facades and EntityBeans) than it's not worth the trouble. I am just about to write such 1on1 facades - because I need some extra level of security (checkout original topic of this thread). If I didn't have to cope with such security issues, I wouldn't use these facades; I'd rather prefer to directly communicate with my EntityBeans (for the sake of simplicity). Yours Armin Michel --- On Monday 07 May 2001 10:07, you wrote: > The call to a SFSB cause you (with Orion) at max the additional penalty of > an extra Activation and Passivation cycle. Depending on the amount of > resource usage for these extra cycli as percentage of the overall resource > usage, the use of SFSBs will hit you. > > The thing which puzzles me is why not go to the Entity Bean directly > itself? It saves both computer and programming resources. In all > discussions and readings I have found no decent arguments that prevent me > from going direct, unless you throw in the -valid- information hiding > argument. > > The system I'm working on uses a Swing client. Most important reason: Using > an application client you can validate user input the moment it gets > entered. > > One of the things we do is validating keys against the server the moment > someone has entered the complete key. The validation is done against the > Entity Bean itself, not against a facade. > > > Now I know that the quality of constructive comments does not necessarily > have a positive correlation with the price of a suite, but an expensive > (and thus highly regarded) consultant claimed that using a SLSB facade is > better. > I still can't figure out why (although I do agree that the extra > performance overhead is little), so I'm tending to the position that it's > probably bollocks. > > > Stuborn at the risk to get shot ... > > FE
Re: custom finder in CMPs
> Something interesting to try would be to limit access to the Entity Home > Interface methods to a particular Role which the facade raises by > programmatically logging in. In other words, clients would access the > facade SLSB using a different Role than that which is permitted to access > the Entities, and the SLSB would use RoleManager.login() to raise the Role > that can access the Entities. If this would work, would it allay your > concerns? This one could solve my problem. I'll try that approach. Thanks a lot. Armin Michel
Re: custom finder in CMPs
On Friday 04 May 2001 14:44, you wrote: > Commonly, developers build a Stateless Session EJB "facade" through which > all access to Entity EJBs is accomplished. If you were to employ such a > pattern, the method of this "facade" that invokes the CMP finder in > question would be an appropriate place to manipulate the results before > returning them to the client. Have a look around www.theserverside.com for > lots of information and discussions of EJB module design. The facade-approach is no option, because someone could bypass that facade and use the home interface directly. (Everybody must be able to access my JNDI - thus everybody has access to the Home-Interfaces too). It would be cool, if I could hook the cmp-finder-Method in some way. Is that possible? Such a callback-solution would solve my problem. Armin Michel PS: Meanwhile I will have a look at theserverside.com
custom finder in CMPs
Hi. I want to add additional code to the finder-methods (for further restrictions on the find-results based upon security information). How can I achive this? I'd like to extend those auto-generated finder-methods and don't want to fall back to BMPs. Hope someone can help. Armin Michel
Re: JMS from remote client
Again, I could fix the problem by myself. The solution ist to change the jms.xml ... Greetings Armin Michel On Wednesday 18 April 2001 14:44, Armin Michel wrote: > When I try to do a > > topicConnection.start(); > > I get the following error: > > .javax.jms.JMSException: Unable to connect to JMSServer > (ATTILA/127.0.0.1:9127) > > The obvious problem is that the JMSServer isn't located at the specified > address. > Where do I have to change which properties to connect to the right server? > > Yours > > Armin Michel
JMS from remote client
When I try to do a topicConnection.start(); I get the following error: .javax.jms.JMSException: Unable to connect to JMSServer (ATTILA/127.0.0.1:9127) The obvious problem is that the JMSServer isn't located at the specified address. Where do I have to change which properties to connect to the right server? Yours Armin Michel
Re: JNDI Problem with J2EE components
I have already solved that problem. There was an error in the jndi properties. My fault, sorry. Greetings Armin
JNDI Problem with J2EE components
I am trying to use an J2EE component as a client. Everything works just fine - as long as I run the client on the same machine as the server. When I try to run the client on another machine using: java -classpath $CLASSPATH \ com.evermind.client.applicationlauncher.ApplicationLauncher \ ormi://192.9.200.105/ProTestAntTester/protestanttester-client.jar \ admin 123 I get the following exception: javax.naming.NamingException: java:comp/env namespace is only available from within a J2EE component at java.lang.Throwable.(Throwable.java:96) at java.lang.Exception.(Exception.java:44) at javax.naming.NamingException.(NamingException.java:103) at com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLContext.java:392) at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51) at javax.naming.InitialContext.lookup(InitialContext.java:351) [...] Why doesn't Orion recognize that my client is indeed a J2EE-client? If I forgot something in - let's say - the DDs, why does the client work on the server? Hope someone can help me out here ... Armin
JMS and Orion
I setup an application that successfully uses a pub/sub topic. On subscriber side I am currently using "subscriber.receive()" to retrieve the sent messages (in an extra thread). So far, so good. But: I'd like to use "subscriber.setMessageListener()" instead. And this doesn't work (up to now). I seems that my MessageListener doesn't get informed when new Messages arrive. The jms demo of orion also works with subscriber.receive(). Does the MessageListener variation work at all? Has anyone succeeded in using this technique? Hope someone could help me. Yours Armin Michel
Re: orion with mysql?
> [...] We also tried Hypersonic, > but it seems that when both Orion and JBuilder communicate with the db the > db gets confused. At least the changes we make in JBuilder don't get > updated. That's propably because Orion caches data of the DB. If you stop Orion, then update the DB and then restart Orion, you shouldn't perceive any update problems. Greetings Armin
Orion with PostgreSQL (oid)
I got some problems with PostgreSQL and Orion when using blobs (oids in the table). I checked: http://www.postgresql.org/users-lounge/docs/7.0/programmer/jdbc6519.htm In the above page you can read the following example: To insert an image, you would use: File file = new File("myimage.gif"); FileInputStream fis = new FileInputStream(file); PreparedStatement ps = conn.prepareStatement("insert into images values (?,?)"); ps.setString(1,file.getName()); ps.setBinaryStream(2,fis,file.length()); ps.executeUpdate(); ps.close(); fis.close(); This does a PreparedStatement.setBinaryStream(int,InputStream,int); - Exactly what Orion did! Here is the interesting part of the Exception.printStackTrace(); : > Nested exception is: > InputStream as parameter not supported > at java.lang.Throwable.(Throwable.java:84) > at java.lang.Exception.(Exception.java:35) > at java.sql.SQLException.(SQLException.java:100) > at > org.postgresql.util.PSQLException.(PSQLException.java:22) > at > org.postgresql.jdbc2.PreparedStatement.setBinaryStream(PreparedStatement > .java:417) > at com.evermind.sql.ao.setBinaryStream(JAX) So, this would lead to the conclusion, that Orion just tries to use a standard JDBC-API. Maybe Orion uses a special subclass of InputStream and the JDBC-Driver doesn't correctly account for this situation. In the JDBC API it reads: Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. This would blame the JDBC-driver then? Yours Armin
PostqreSQL with Orion (oid)
Hello. My suspicion is that Orion's DB-Mapping (CMP) doesn't work well when it comes to tables that have OID fields. My experiments suggest that whenever a table has to be generated that has OID-fields, the following exception will be thrown just after having executed the ejbCreate() Method of the EJB in question: com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Database error: InputStream as parameter not supported at java.lang.Throwable.(Throwable.java:96) at java.lang.Exception.(Exception.java:44) at java.io.IOException.(IOException.java:49) at java.rmi.RemoteException.(RemoteException.java:58) at com.evermind.server.rmi.OrionRemoteException.(JAX) at ChangeManagerHome_EntityHomeWrapper7.create(ChangeManagerHome_EntityHome Wrapper7.java:542) at ejb.ProjectSessionEJB.getChangeManager(ProjectSessionEJB.java:95) at ejb.ProjectSessionEJB.ejbCreate(ProjectSessionEJB.java:111) at ProjectSessionHome_StatefulSessionHomeWrapper2.create(ProjectSessionHome _StatefulSessionHomeWrapper2.java:36) at java.lang.reflect.Method.invoke(Native Method) at com.evermind.server.rmi.bc.do(JAX) at com.evermind.util.f.run(JAX) Nested exception is: InputStream as parameter not supported at java.lang.Throwable.(Throwable.java:84) at java.lang.Exception.(Exception.java:35) at java.sql.SQLException.(SQLException.java:100) at org.postgresql.util.PSQLException.(PSQLException.java:22) at org.postgresql.jdbc2.PreparedStatement.setBinaryStream(PreparedStatement .java:417) at com.evermind.sql.ao.setBinaryStream(JAX) at com.evermind.sql.ao.setBinaryStream(JAX) at com.evermind.server.ejb.EntityEJBObject.storeObject(JAX) at ChangeManagerHome_EntityHomeWrapper7.create(ChangeManagerHome_EntityHome Wrapper7.java:432) at ejb.ProjectSessionEJB.getChangeManager(ProjectSessionEJB.java:95) at ejb.ProjectSessionEJB.ejbCreate(ProjectSessionEJB.java:111) at ProjectSessionHome_StatefulSessionHomeWrapper2.create(ProjectSessionHome _StatefulSessionHomeWrapper2.java:36) at java.lang.reflect.Method.invoke(Native Method) at com.evermind.server.rmi.bc.do(JAX) at com.evermind.util.f.run(JAX) IMHO, the JDBC driver of PostgreSQL (jdbc7.0-1.2.jar) is capable of handling OIDs correctly, because I successfully tried the same setup with jBoss/PostgreSQL. So what may I do? Do you know a way to get around this OID problem? Many thanks in advance Armin Michel