Fórumok

Confusion at Portal Change (RESOLVED)

thumbnail
Cynthia Kimball, módosítva 13 év-val korábban

Confusion at Portal Change (RESOLVED)

Junior Member Bejegyzések: 45 Csatlakozás dátuma: 2010.07.26. Legújabb bejegyzések
I have a question, well a confusion actually I am hoping someone can explain.

I have been working with the Liferay portal for about 2 weeks, specifying user roles, organizations, etc; getting the site ready for a demo.

Today I got the Liferay IDE hooked up and connected and started the Liferay portal from within Eclipse - suddenly everything I had put into the portal is gone and it is back to square one.

I stopped it within eclipse and started it up in the command line and see that all my original data is gone.

So, my question is - how do I access the data from my original installation?

I am going to restart the portal from within Eclipse so that I can work within the IDE, but I would like to access all my user roles without having to recreate all of it again.

Any ideas?

TIA!

Thiaemoticon
thumbnail
sibi thomas, módosítva 13 év-val korábban

RE: Confusion at Portal Change

Junior Member Bejegyzések: 43 Csatlakozás dátuma: 2008.05.30. Legújabb bejegyzések
Hi Cynthia,

I think you have been using hsql DB, once you run the "ant clean" command, hsql db script also will get delete.

I think that will be the reason.
thumbnail
Pranay R Patadiya, módosítva 13 év-val korábban

RE: Confusion at Portal Change

Regular Member Bejegyzések: 177 Csatlakozás dátuma: 2010.02.23. Legújabb bejegyzések

Hi,

It doesn't matter whether you are starting server from Eclipse or anywhere else from command prompt.

But make sure when you do the "ant clean deploy", portal-ext.properties file contain DB properties that points to your working DB copy, which need to be deployed.

Thanks,
Pranay Patadiya
thumbnail
Cynthia Kimball, módosítva 13 év-val korábban

RE: Confusion at Portal Change

Junior Member Bejegyzések: 45 Csatlakozás dátuma: 2010.07.26. Legújabb bejegyzések
Ok, so, what do I need to put in portal-ext.properties to make it point to that specific database? Is there an article you can point me to?

TIA!

Thia emoticon
thumbnail
Cynthia Kimball, módosítva 13 év-val korábban

RE: Confusion at Portal Change

Junior Member Bejegyzések: 45 Csatlakozás dátuma: 2010.07.26. Legújabb bejegyzések
Ok, I have figured out I need to create an EXT environment and am searching through those articles now. I just need to find an updated one for version sixemoticon

Thia emoticon
thumbnail
Samuel Liu, módosítva 13 év-val korábban

RE: Confusion at Portal Change (Válasz)

Expert Bejegyzések: 301 Csatlakozás dátuma: 2010.05.27. Legújabb bejegyzések
Hi Cynth,

#
    # DB2
    #
    #jdbc.default.driverClassName=com.ibm.db2.jcc.DB2Driver
    #jdbc.default.url=jdbc:db2://localhost:50000/lportal:deferPrepares=false;fullyMaterializeInputStreams=true;fullyMaterializeLobData=true;progresssiveLocators=2;progressiveStreaming=2;
    #jdbc.default.username=db2admin
    #jdbc.default.password=lportal

    #
    # Derby
    #
    #jdbc.default.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
    #jdbc.default.url=jdbc:derby:lportal
    #jdbc.default.username=
    #jdbc.default.password=

    #
    # Hypersonic
    #
    jdbc.default.driverClassName=org.hsqldb.jdbcDriver
    jdbc.default.url=jdbc:hsqldb:${liferay.home}/data/hsql/lportal
    jdbc.default.username=sa
    jdbc.default.password=

    #
    # Ingres
    #
    #jdbc.default.driverClassName=com.ingres.jdbc.IngresDriver
    #jdbc.default.url=jdbc:ingres://localhost:II7/lportal
    #jdbc.default.username=
    #jdbc.default.password=

    #
    # MySQL
    #
    #jdbc.default.driverClassName=com.mysql.jdbc.Driver
    #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    #jdbc.default.username=
    #jdbc.default.password=

    #
    # Oracle
    #
    #jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver
    #jdbc.default.url=jdbc:oracle:thin:@localhost:1521:xe
    #jdbc.default.username=lportal
    #jdbc.default.password=lportal

    #
    # P6Spy
    #
    #jdbc.default.driverClassName=com.p6spy.engine.spy.P6SpyDriver
    #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    #jdbc.default.username=
    #jdbc.default.password=

    #
    # PostgreSQL
    #
    #jdbc.default.driverClassName=org.postgresql.Driver
    #jdbc.default.url=jdbc:postgresql://localhost:5432/lportal
    #jdbc.default.username=sa
    #jdbc.default.password=

    #
    # SQL Server
    #
    #jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
    #jdbc.default.url=jdbc:jtds:sqlserver://localhost/lportal
    #jdbc.default.username=sa
    #jdbc.default.password=

    #
    # Sybase
    #
    #jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
    #jdbc.default.url=jdbc:jtds:sybase://localhost:5000/lportal
    #jdbc.default.username=sa
    #jdbc.default.password=


So these are all the possible databases to use with Liferay, and the properties you need to put into portal-ext.properties. Example: if you want to use MySQL, uncomment the lines you want and copy into your portal-ext.properties, replacing username and password with your own. So if my username is root and password is test, then:

    # MySQL
    #
    jdbc.default.driverClassName=com.mysql.jdbc.Driver
    jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    jdbc.default.username=root
    jdbc.default.password=test


Restart the server, and life is good to go!

Sorry you lost all your configs. This is a common mistake, and we probably need better documentation to let people know to not use HSQL. Sorry we don't have articles separated by version yet -- this is going to happen in the near future. Improvements one step at a time emoticon

Warm regards,
Sam
thumbnail
Cynthia Kimball, módosítva 13 év-val korábban

RE: Confusion at Portal Change

Junior Member Bejegyzések: 45 Csatlakozás dátuma: 2010.07.26. Legújabb bejegyzések
Sam

Thanks for that info - that makes sense. Now I think I will get my IT staff to move to the database they have been discussing - postgresql - before I do too much more - though at least all of this is a great learning experience.

I do appreciate how fast responses come on this Forum!

You guys are fantastic!

Thia emoticon
thumbnail
Samuel Liu, módosítva 13 év-val korábban

RE: Confusion at Portal Change

Expert Bejegyzések: 301 Csatlakozás dátuma: 2010.05.27. Legújabb bejegyzések
Glad to help you Thia, hope your experience with Liferay goes well emoticon

Warm regards,
Sam
thumbnail
Cynthia Kimball, módosítva 13 év-val korábban

RE: Confusion at Portal Change

Junior Member Bejegyzések: 45 Csatlakozás dátuma: 2010.07.26. Legújabb bejegyzések
Ok,

I got back to the whole portal-ext file quesiton and added the code for Hypersonic to my portal-ext.properties file. (only till this demo period is over and they get my production server set up)

Confused - but I stopped the server from within Eclipse and started it via command line and tada - my original site was back!

So, I shut it down and started it up in Eclipse, and it is still the new site.

I am confuzzled. As they are both port 8080, why are they two different sites? Shouldn't both of them be using the portal-ext file? And if so, are there now two sections of the database?

How can I merge them?

I want the same site to appear, whether the site is started via eclipse or command line. Most of the time, I want the server to be run via the scripts that are activated when the server is rebooted. But, when I am working on files, I want to be able to do it within the IDE environment.

Will this no longer be an issue when IT switches me to SQL?

Is there other code I need to add to the portal-ext file to make the same database be accessed?

I know - tons of questions, sorry about that. I just don't understand why there are now two sites at :8080

Thia emoticonemoticon
thumbnail
Samuel Liu, módosítva 13 év-val korábban

RE: Confusion at Portal Change (Válasz)

Expert Bejegyzések: 301 Csatlakozás dátuma: 2010.05.27. Legújabb bejegyzések
Hi Thia,

Hm. You know, you don't have to use portal-ext.properties to enable hypersonic.

Okay so this is how it works: portal-ext.properties is a file wherein you can put in additional properties settings. These settings then get put *on top* of a file called portal.properties, which is the actual file that gets read by Liferay. Why you shouldn't directly edit portal.properties is for best-practices reasons; it contains defaults that are known to work. Portal-ext will contain only the settings you want to change from the Liferay defaults. That would include everything from database to ldap.

Now, in portal.properties, the default setting is to use hypersonic. The reason for that is that hypersonic is the only database guaranteed to exist (and easy to create if it doesn't) when Liferay starts up.

So if you want to use hypersonic, don't put any database stuff in your portal-ext.properties. There's no need, because your portal will automatically say "hey, no database! lets use hsql (hypersonic)!"

Also, the problem you're describing is seeing two liferay instances on :8080 -- that is simply not possible. Only one application can run on a single port, the other will get refused, it's how ports work in general. So I think you are possibly seeing what's going on wrong...

From what you've described, it seems that you might have two separate Liferay bundles downloaded. One that you downloaded to use with the IDE, one that you run through the command line. Maybe you can share what directory location the IDE's tomcat is configured to be in / use? Then let me know exactly where in the command line you have changed directory to, and what command you use to start it. emoticon

Do you have two different folders named tomcat-6.0.26 on your computer? That would be the ultimate test, because each tomcat folder you have means a separate hsql database.

If you could provide screenshots and more explanation of the problem I can help to diagnose! Always glad to help emoticon

Warm regards,
Sam
thumbnail
Cynthia Kimball, módosítva 13 év-val korábban

RE: Confusion at Portal Change

Junior Member Bejegyzések: 45 Csatlakozás dátuma: 2010.07.26. Legújabb bejegyzések
Thanks Sam!

Ok, I think I have it now emoticon It turns out the server admin had put the original bundle within the same file system, so I had set up the IDE to work within the bundle, so I now have it configured to actually work with the same files as the command line. (hey, learned my new thing for the day, and its not even 9am!emoticon)

Essentially: I should have been pointing the IDE to C:\liferay\tomcat-6.0.26

Instead, I had been pointing to C:\liferay\liferay-portal-tomcat-6.0.4\liferay-portal-6.0.4\tomcat-6.0.26

Amazing how things work when you have them pointing at the same thing! The site is the same now, whether I start it via command line or via Eclipse.

And I now understand about portal-ext.properties. I removed the call to the HSQl database and will leave the database info for when we are setting up production and are instead hooking up to SQL.

Again, thanks so much for your help!

Thia emoticon
thumbnail
Samuel Liu, módosítva 13 év-val korábban

RE: Confusion at Portal Change

Expert Bejegyzések: 301 Csatlakozás dátuma: 2010.05.27. Legújabb bejegyzések
Always glad to help Cyn emoticon

Though you might want to delete the extra bundle within a bundle. That could get confusing later too emoticon

Warm regards,
Sam