portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <david.sean.tay...@bbc.co.uk>
Subject RE: export from castor db to dbpsml problems
Date Fri, 20 Sep 2002 10:12:01 GMT
Glenn,

The importer can work from any directory on the file system by combining
this JR.p setting:

services.PsmlManager.root=/WEB-INF/psml

With the 2nd arg in the import target:

            <arg value="false"/>
            <arg value="./bin"/>

...to find your file-based PSML.
The example above locates to ./bin/WEB-INF/psml as the PSML root on the file
system.


Im looking at your stack trace,

> java.lang.NullPointerException
>          at 
> org.exolab.castor.xml.Marshaller.setMapping(Marshaller.java:323)

And setMapping is what sets the mapping file defined in the JR.p

/WEB-INF/conf/psml-mapping.xml

Anyway it shouldn't get a NULL pointer error if its not found so that needs
to be fixed.

David


> -----Original Message-----
> From: Glenn R. Golden [mailto:ggolden@umich.edu] 
> Sent: 19 September 2002 20:15
> To: jetspeed-dev
> Subject: export from castor db to dbpsml problems
> 
> 
> I'm doing the psml importer, from the file system to a 
> database.  I've 
> changed things here so that I can run this from the deployed webapps 
> folder, rather than the jetspeed source tree, since my deploy process 
> builds stuff there.
> 
> It almost works.  It finds all my psml files and tries to add them to 
> the database, but for each one gets this error (from jetspeed.log):
> 
> [19 Sep 2002 15:05:46  INFO] - Running with Importer Service: class 
> org.apache.jetspeed.services.psmlmanager.db.DatabasePsmlManagerService
> [19 Sep 2002 15:05:46  INFO] - Running with Exporter Service: class 
> org.apache.jetspeed.services.psmlmanager.CastorPsmlManagerService
> [19 Sep 2002 15:05:46  INFO] - PSML-Man: calculated 
> resource:user/admin/html/default.psml. Base: 
> /usr/local/jakarta- tomcat-4.0.3/webapps/chef/WEB-INF/psml
> [19 Sep 2002 15:05:46  WARN] - 
> DatabasePsmlManagerService.createOrSaveDocument: profile: 
> BaseProfile[user/admin/html/default.psml] tableName: 
> JETSPEED_USER_PROFILE
> java.lang.NullPointerException
>          at 
> org.exolab.castor.xml.Marshaller.setMapping(Marshaller.java:323)
>          at 
> org.apache.jetspeed.services.psmlmanager.db.DBUtils.portletsToBytes
> (DBUtils.java:146)
>          at 
> org.apache.jetspeed.om.dbpsml.JetspeedUserProfilePeer.doInsertOrUpdate
> (JetspeedUserProfilePeer.java:101)
>          at 
> org.apache.jetspeed.om.dbpsml.JetspeedUserProfilePeer.insert
> (JetspeedUserProfilePeer.java:66)
>          at 
> org.apache.jetspeed.services.psmlmanager.db.DatabasePsmlManage
> rService.createOrSaveDocument(
> DatabasePsmlManagerService.java:622)
>          at 
> org.apache.jetspeed.services.psmlmanager.db.DatabasePsmlManage
> rService.createDocument(
> DatabasePsmlManagerService.java:582)
>          at 
> org.apache.jetspeed.services.psmlmanager.CastorPsmlManagerServ
> ice.export
> (CastorPsmlManagerService.java:1240)
>          at 
> org.apache.jetspeed.services.psmlmanager.PsmlImporter.run(Psml
> Importer.java:
> 210)
>          at 
> org.apache.jetspeed.services.psmlmanager.PsmlImporter.main(Psm
> lImporter.java:
> 179)
> [19 Sep 2002 15:05:46  WARN] - 
> DatabasePsmlManagerService.createOrSaveDocument: profile: 
> BaseProfile[user/admin/html/default.psml] tableName: 
> JETSPEED_USER_PROFILE
> java.lang.NullPointerException
>          at 
> org.exolab.castor.xml.Marshaller.setMapping(Marshaller.java:323)
>          at 
> org.apache.jetspeed.services.psmlmanager.db.DBUtils.portletsToBytes
> (DBUtils.java:146)
>          at 
> org.apache.jetspeed.om.dbpsml.JetspeedUserProfilePeer.doInsertOrUpdate
> (JetspeedUserProfilePeer.java:101)
>          at 
> org.apache.jetspeed.om.dbpsml.JetspeedUserProfilePeer.update
> (JetspeedUserProfilePeer.java:77)
>          at 
> org.apache.jetspeed.services.psmlmanager.db.DatabasePsmlManage
> rService.createOrSaveDocument(
> DatabasePsmlManagerService.java:626)
>          at 
> org.apache.jetspeed.services.psmlmanager.db.DatabasePsmlManage
> rService.store(
> DatabasePsmlManagerService.java:593)
>          at 
> org.apache.jetspeed.services.psmlmanager.CastorPsmlManagerServ
> ice.export
> (CastorPsmlManagerService.java:1247)
>          at 
> org.apache.jetspeed.services.psmlmanager.PsmlImporter.run(Psml
> Importer.java:
> 210)
>          at 
> org.apache.jetspeed.services.psmlmanager.PsmlImporter.main(Psm
> lImporter.java:
> 179)
> [19 Sep 2002 15:05:46 ERROR] - Failed to export profiles to DB: 
> BaseProfile[user/admin/html/default.psml]
> java.lang.RuntimeException: Could not create new profile in DB
>          at 
> org.apache.jetspeed.services.psmlmanager.db.DatabasePsmlManage
> rService.createOrSaveDocument(
> DatabasePsmlManagerService.java:671)
>          at 
> org.apache.jetspeed.services.psmlmanager.db.DatabasePsmlManage
> rService.createDocument(
> DatabasePsmlManagerService.java:582)
>          at 
> org.apache.jetspeed.services.psmlmanager.CastorPsmlManagerServ
> ice.export
> (CastorPsmlManagerService.java:1240)
>          at 
> org.apache.jetspeed.services.psmlmanager.PsmlImporter.run(Psml
> Importer.java:
> 210)
>          at 
> org.apache.jetspeed.services.psmlmanager.PsmlImporter.main(Psm
> lImporter.java:
> 179)
> 
> I don't have the castor code or know what it is doing - but 
> it might be 
> something not setup right?  Here's the ant target:
> 
> 
> 	<target name="import" description="Import PSML">
> 		<java fork="true" 
> classname="org.apache.jetspeed.services.psmlmanager.PsmlImporter" >
> 			<arg value="true" />
> 			<arg value="${catalina.home}/webapps/chef" />
> 			<arg 
> value="/WEB-INF/conf/chef_site_resources.properties" />
> 			<classpath>
> 				<pathelement 
> location="${catalina.home}/webapps/chef/WEB-INF/db/hsql.jar"/>
> 				<pathelement 
> location="${catalina.home}/common/lib/classes12.jar"/>
> 				<pathelement 
> location="${catalina.home}/webapps/chef/WEB-INF/classes"/>
> 				<path refid="classpath"/>
> 			</classpath>
> 		</java>
> 	</target>
> 
> I've added <arg>s to the importer, to point it at the deploy 
> area and at 
> my master resources.properties file.
> 
> Does anyone know what's going on here, what I might be missing to get 
> that particular null pointer?
> 
> Thanks.
> 
> - Glenn
> 
> ---------------------------------------------------------------------
> Glenn R. Golden    Systems Research Programmer
> School of Information             University of Michigan
> ggolden@umich.edu                            734-615-1419
> ---------------------------------------------------------------------
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:jetspeed-dev-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>
> 


BBCi at http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain 
personal views which are not the views of the BBC unless specifically 
stated.
If you have received it in error, please delete it from your system, do 
not use, copy or disclose the information in any way nor act in 
reliance on it and notify the sender immediately. Please note that the 
BBC monitors e-mails sent or received. Further communication will 
signify your consent to this.


--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message