[Persistence, JBoss/CMP, Hibernate, Database] - could not deserialize
by toni
Hi,
I have an entity bean, which references an exception. Persiting the entity bean to the postgresql 7.4 works without problems.
However, I can't read/restore them, because I get the following exception:
org.hibernate.type.SerializationException: could not deserialize
Does anybody know how to avoid this? I think the code and annotations are fine. Here is the entity bean in question:
| @Entity
| @Name("systemMessage")
|
| public class SystemMessage implements Serializable
| {
| @Id
| @GeneratedValue(strategy = GenerationType.IDENTITY)
| long id;
|
| @Lob
| String message;
|
| @Temporal(TemporalType.TIMESTAMP)
| Date creationDate = new Date(System.currentTimeMillis());
|
| @Enumerated
| SystemMessageType systemMessageType = SystemMessageType.INFO;
|
| @Lob
| Throwable throwable;
|
| public SystemMessage()
| {
| super();
| }
|
| public SystemMessage(String message, SystemMessageType systemMessageType, Throwable throwable)
| {
| this.message = message;
| this.systemMessageType = systemMessageType;
| this.throwable = throwable;
| }
|
| public long getId()
| {
| return id;
| }
|
| public void setId(long id)
| {
| this.id = id;
| }
|
| public String getMessage()
| {
| return message;
| }
|
| public void setMessage(String message)
| {
| this.message = message;
| }
|
| public Date getCreationDate()
| {
| return creationDate;
| }
|
| public void setCreationDate(Date creationDate)
| {
| this.creationDate = creationDate;
| }
|
| public SystemMessageType getSystemMessageType()
| {
| return systemMessageType;
| }
|
| public void setSystemMessageType(SystemMessageType systemMessageType)
| {
| this.systemMessageType = systemMessageType;
| }
|
| public Throwable getThrowable()
| {
| return throwable;
| }
|
| public void setThrowable(Throwable throwable)
| {
| this.throwable = throwable;
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037915#4037915
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037915
19 years, 1 month
[JBoss Portal] - Re: Can i remove
by Antoine_h
Hello,
This is an extract of my installation procedure, for this.
To change the root path of the url.
>From (classic) : http://localhost:8080/portal/portal/default/
To : http://localhost:8080/myPortalContextRoot/myDefaultCommand/myDefaultPorta... (defined at 070319).
a) Prefix for : Portal Context Root (first "portal" in classic url)
In the file : \deploy\jboss-portal.sar\portal-server.war\WEB-INF\jboss-web.xml
Replace the context root item to : <context-root>/myPortalContextRoot</context-root>
The cms coded url can then be : http://localhost:8080/myPortalContextRoot/cms_root_code/cms_repository_pa....
b) Prefix for : PortalObjects commands (PortalObject Commands and url factories)
(second "portal" in classic url)
The PortalObjects commands are used to call a page or window, with parameters in the url.
In the file : \deploy\jboss-portal.sar\META-INF\jboss-service.xml
b1) Command factory
Switch off the service : name="portal:commandFactory=Delegate,prefix=portal"
Replace the déclaration with a new one, with modification :
- modify the name to : name="portal:commandFactory=Delegate,prefix=myDefaultCommand"
- modify the prefix item to : myDefaultCommand
b2) Url factory
Switch off the service : name="portal:urlFactory=PortalObject"
Replace the déclaration with a new one, with modification :
- modify the prefix item to : myDefaultCommand
c) The portal prefix
(the "default" prefix, in third position in the classic url)
This prefix is set in the portal description, default-object.xml file.
The one provide by JBoss portal, and in yours.
The item is : <portal-name>myDefaultPortalName</portal-name>
Also in the default-object.xml file, see the definition of the default page :
The name of the default page and the value item of the property of default object of the portal :
the item : portal.defaultObjectName
And see this forum and jira posts to set it as the default portal of multiple portals : http://jboss.org/index.html?module=bb&op=viewtopic&t=104612
and
http://jira.jboss.com/jira/browse/JBPORTAL-1324?watch=true
for a pb with not using "default" as the default portal name.
make a wiki of this ?
how to create a subject in the wiki ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037914#4037914
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037914
19 years, 1 month
[JBoss Portal] - Custom Window State
by engela
Does the JBoss Portal (2.4) support custom window states? Which class do I need to overwrite if I want to add my custom window state?
For printing the content of a portlet I quite like to introduce a custom window state 'print' which is mapped by by layout descriptor to print.jsp, which will only display the portlet without heading or navigation.
<layouts>
| <layout>
| <name>mylayout</name>
| <uri>/layouts/mylayout/index.jsp</uri>
| <uri state="maximized">/layouts/mylayout/maximized.jsp</uri>
| <uri state="print">/layouts/mylayout/print.jsp</uri>
| <regions>
| <region name="left"/>
| <region name="center"/>
| <region name="navigation"/>
| </regions>
| </layout>
| </layouts>
Is that possible?
Thanks,
Anette
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037913#4037913
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037913
19 years, 1 month
[JBoss AOP] - Re: Unable to use/run JBossAOP on JBossAS 4.0.5.GA
by varkon
Ok, I've installed and ran the example.
| 15:17:10,241 INFO [STDOUT] **** ExampleValue empty Constructor
| 15:17:10,242 INFO [STDOUT] **** ExampleValue.getMessage()
| 15:17:15,314 INFO [STDOUT] **** EarExampleServlet.service()
| 15:17:15,336 INFO [STDOUT] *** ExampleSessionBean.getValue()
| 15:17:15,336 INFO [STDOUT] **** ExampleValue String Constructor
| 15:17:15,337 INFO [STDOUT] **** ExampleValue String Constructor
| 15:17:15,341 INFO [STDOUT] **** ExampleValue.getMessage()
|
Obviously, it did not work.
The example's documentation clearly states that "UseJBossWebLoader" should be "true" for it to work. However, I've had various concurrency problems when using non-isolated class-loading (for example, HttpSessions from different clients get mixed-up). Is there a way to make this work using isolation?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037910#4037910
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037910
19 years, 1 month
[Security & JAAS/JBoss] - Re: Single Sign On with LDAP Examples
by thomascremers
I have been on big quest as well to get this working. The documentation leaves a lot to be desired but here is what I did to get it working.
First a basic LDAP schema
| # Base
| dn: dc=foo,dc=bar
| dc: foo
| objectClass: top
| objectClass: dcObject
| objectClass: organization
| o: Foo Bar
|
| # Ldap admin user
| dn: cn=admin, dc=foo,dc=bar
| userPassword:: secret
| description: LDAP administrator
| objectClass: simpleSecurityObject
| objectClass: organizationalRole
| cn: admin
|
| # People ou where we attach the users
| dn: ou=People, dc=foo,dc=bar
| ou: People
| objectClass: top
| objectClass: organizationalUnit
|
| # A basic inetOrgPerson
| dn: cn=Test User,ou=People, dc=foo,dc=bar
| sn: Test
| userPassword:: secret
| mail: test(a)foo.bar
| displayName: Test User
| objectClass: top
| objectClass: person
| objectClass: organizationalPerson
| objectClass: inetOrgPerson
| uid: test
| cn: Test User
|
| # The ou where we attach roles/groups
| dn: ou=roles, dc=foo,dc=bar
| ou: roles
| objectClass: top
| objectClass: organizationalUnit
|
| # A test group member of roles ou
| dn: cn=TestGroup,ou=roles, dc=foo,dc=bar
| ou: TestGroup
| objectClass: top
| objectClass: groupOfUniqueNames
| uniqueMember: cn=Test User,ou=People
| cn: TestGroup
|
Now the importent part is of course the jboss-sso.sar/conf/sso.cfg.xml file. For the ldap schema above this would look like this:
| <?xml version='1.0' encoding='ISO-8859-1'?>
|
| <jboss-sso>
| <identity-management>
| <login>
| <provider id="si:jboss-sso:ldap:login" class="org.jboss.security.idm.ldap.LDAPIdentityProvider">
| <property name="connectionURL"> jdbc:ldap://ldap.domain.com:389/dc=foo,dc=bar?SEARCH_SCOPE:=subTreeScope&secure:=false&concat_atts:=true&size_limit:=10000000</property>
| <property name="username">cn=admin,dc=foo,dc=bar</property>
| <property name="password">secret</property>
| <!-- ou that contains all your inetOrgPersons -->
| <property name="identityOu">People</property>
| <!-- ou that contains your groups -->
| <property name="roleOu">roles</property>
| </provider>
| </login>
| <!--login>
| <provider id="si:jboss-sso:demo:login" class="org.jboss.security.idm.demo.DemoLoginProvider"/>
| </login-->
| </identity-management>
| <sso-processor>
| <processor class="org.jboss.security.saml.JBossSingleSignOn">
| <!-- Conf this to your sso jboss server -->
| <property name="trustServer">http://sso-jboss.domain.com:8080/federate/trust</property>
| </processor>
| </sso-processor>
| </jboss-sso>
|
Really importend here is to verify then you have set identityOU and roleOU to the right values. If there is an error here you will get "No such object" jdbc errors witch of course is an ldap error telling you it can't find the ou. I use openldap and set the loglevel property to 265, witch makes debuging jboss-sso a whole lot easier.
If you tail the ldap log and start the sso service you should see jboss-sso connecting and scanning in the roles. If so and you can confirm the sso startup in the jboss server.log you are done.
Hope this helpt
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037902#4037902
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037902
19 years, 1 month